pyaoscx icon indicating copy to clipboard operation
pyaoscx copied to clipboard

Checkpoint support

Open gcotone opened this issue 4 years ago • 3 comments
trafficstars

Hi, First of all, thanks for the module.

I was wondering if there're plans for supporting checkpoint management, rollback, etc.

gcotone avatar May 10 '21 09:05 gcotone

Hello gcotone, Thank you for filing this request. We'll look into checkpoint management in a future update. Here are some functions that I can foresee being created:

'get_all_checkpoint' 'get_checkpoint' 'load_checkpoint' 'create_checkpoint' 'delete_checkpoint'

Can you suggest any other use cases that may be missing from this list, and further expand into your rollback request?

alvinc13 avatar May 10 '21 19:05 alvinc13

Hi @alvinc13 ,

Personally, I'd like to see a function to list the available checkpoints, i.e list_checkpoint(), and also integrate the proposed get_* functions with the existing get_(all_)config: https://github.com/aruba/pyaoscx/blob/29d3fb9d2b5c3863aa1f079e89eefc9ea4208017/pyaoscx/config.py#L31

Same for loading and creating checkpoints where copy_config could be leveraged for that purpose, using a named checkpoint as src or dst name respectively. E.g.:

  • Create checkpoint -> copy_config(running_config, checkpoint_name_1234)
  • Load Checkpoint -> copy_config(checkpoint_name_1234, running_config)

gcotone avatar May 11 '21 06:05 gcotone

Hello gcotone, Thank you for filing this request. We'll look into checkpoint management in a future update. Here are some functions that I can foresee being created:

'get_all_checkpoint' 'get_checkpoint' 'load_checkpoint' 'create_checkpoint' 'delete_checkpoint'

Can you suggest any other use cases that may be missing from this list, and further expand into your rollback request?

interesting how to delete a checkpoint ;)

alagoutte avatar May 11 '21 12:05 alagoutte