cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
532
Views
1
Helpful
0
Replies

Let's roll back config some more!

saalvare
Cisco Employee
Cisco Employee

In a previous post (Let's roll back the last configuration commits), we discussed how to use the Executor service to roll back the last configuration changes.  XR actually has three more RPCs defined in Cisco-IOS-XR-cfgmgr-rollback-act.yang. Looking at the entire set, we see RPC to:

  • roll back the n last commits
  • roll back up to (and including) a specific commit id
  • roll back up to (but excluding) a specific commit id
  • roll back a specific commit id

you can visualize the RPC structure using the pyang utility:

$ pyang -f tree Cisco-IOS-XR-cfgmgr-rollback-act.yang

module: Cisco-IOS-XR-cfgmgr-rollback-act

  rpcs:

    +---x roll-back-configuration-last

    |  +---w input

    |     +---w count          int32

    |     +---w force?         boolean

    |     +---w best-effort?   boolean

    |     +---w label?         string

    |     +---w comment?       string

    +---x roll-back-configuration-to

    |  +---w input

    |     +---w commit-id      string

    |     +---w force?         boolean

    |     +---w best-effort?   boolean

    |     +---w label?         string

    |     +---w comment?       string

    +---x roll-back-configuration-to-exclude

    |  +---w input

    |     +---w commit-id      string

    |     +---w force?         boolean

    |     +---w best-effort?   boolean

    |     +---w label?         string

    |     +---w comment?       string

    +---x roll-back-configuration

       +---w input

          +---w commit-id      string

          +---w force?         boolean

          +---w best-effort?   boolean

          +---w label?         string

          +---w comment?       string

$

comment?       string

saalvare@ohlone:612/(master=)$

Now, here are some additional sample apps for rolling back configuration changes:

nc-execute-xr-cfgmgr-rollback-act-30-ydk.py - roll back up to (and including) a specific commit id

nc-execute-xr-cfgmgr-rollback-act-32-ydk.py - roll back up to (and including) a specific commit id and add a comment

nc-execute-xr-cfgmgr-rollback-act-34-ydk.py - forced rollback up to (and including) a specific commit id, add a comment and add a label

nc-execute-xr-cfgmgr-rollback-act-40-ydk.py - roll back up to (but excluding) a specific commit id

nc-execute-xr-cfgmgr-rollback-act-42-ydk.py - roll back up to (but excluding) a specific commit id and add a comment

nc-execute-xr-cfgmgr-rollback-act-44-ydk.py - forced rollback up to (but excluding) a specific commit id, add a comment and add a label

nc-execute-xr-cfgmgr-rollback-act-50-ydk.py - roll back a specific commit id

nc-execute-xr-cfgmgr-rollback-act-52-ydk.py - roll back a specific commit id and add a comment

nc-execute-xr-cfgmgr-rollback-act-54-ydk.py - forced rollback a specific commit id, add a comment and add a label

nc-execute-xr-cfgmgr-rollback-act-11-ydk.py - execute boilerplate for rolling back to (and including) a specific commit id

nc-execute-xr-cfgmgr-rollback-act-12-ydk.py - execute boilerplate for rolling back up to (but excluding) a specific commit id

nc-execute-xr-cfgmgr-rollback-act-13-ydk.py - execute boilerplate for rolling back a specific commit id

yes, that brings us to a total of 16 samples apps for rolling config.  Give them a try!

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: