show rollback log exec

show rollback log exec

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show rollback log exec ",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show rollback log exec",
        "msg": "Success",
        "code": "200",
        "body": {
          "log_entry": [
            "Operation            : Rollback to Checkpoint File\n",
            "Checkpoint file name : .replace_tmp_13526\n",
            "Scheme               : tmp\n",
            "Rollback done By     : admin\n",
            "Rollback mode        : atomic\n",
            "Verbose              : disabled\n",
            "Start Time           : Thu, 05:53:19 19 Jul 2018\n",
            "Start Time UTC       : Thu, 05:53:19 19 Jul 2018\n",
            "End Time             : Thu, 05:53:22 19 Jul 2018\n",
            "End Time UTC         : Thu, 05:53:22 19 Jul 2018\n",
            "Rollback Status      : Success\n"
          ]
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show rollback log exec command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show rollback log exec
Operation            : Rollback to Checkpoint File
Checkpoint file name : .replace_tmp_3662
Scheme               : tmp
Rollback done By     : admin
Rollback mode        : atomic
Verbose              : disabled
Start Time           : Fri, 04:41:21 03 Aug 2018
Start Time UTC       : Fri, 04:41:21 03 Aug 2018
End Time             : Fri, 04:41:26 03 Aug 2018
End Time UTC         : Fri, 04:41:26 03 Aug 2018
Rollback Status      : Success

Executing Patch:
----------------
config t
no hostname
vdc switch id 1
exit

show rollback log verify

show rollback log verify

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show rollback log verify",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show rollback log verify",
        "msg": "Success",
        "code": "200",
        "body": {
          "log_entry": [
            "Operation            : Rollback to Checkpoint File\n",
            "Checkpoint file name : .replace_tmp_13526\n",
            "Scheme               : tmp\n",
            "Rollback done By     : admin\n",
            "Rollback mode        : atomic\n",
            "Verbose              : disabled\n",
            "Start Time           : Thu, 05:53:19 19 Jul 2018\n",
            "Start Time UTC       : Thu, 05:53:19 19 Jul 2018\n",
            "-------------------------------------------\n",
            "End Time             : Thu, 05:53:22 19 Jul 2018\n",
            "End Time UTC         : Thu, 05:53:22 19 Jul 2018\n",
            "Status               : Success\n"
          ]
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show rollback log verify command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show rollback log verify 
Operation            : Rollback to Checkpoint File
Checkpoint file name : .replace_tmp_3662
Scheme               : tmp
Rollback done By     : admin
Rollback mode        : atomic
Verbose              : disabled
Start Time           : Fri, 04:41:21 03 Aug 2018
Start Time UTC       : Fri, 04:41:21 03 Aug 2018
-------------------------------------------
End Time             : Fri, 04:41:26 03 Aug 2018
End Time UTC         : Fri, 04:41:26 03 Aug 2018
Status               : Success

Verification patch contains the following commands:
---------------------------------------------------
!!
! No changes

show rollback status

show rollback status

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show rollback status",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{

  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show rollback status",
        "msg": "Success",
        "code": "200",
        "body": {
          "last_operation": "Checkpoint to file",
          "rollback_type": "Created ",
          "name": "checkpoingt3",
          "start_time": "Thu Jul 19 05:55:39 2018",
          "end_time": "Thu Jul 19 05:55:39 2018",
          "operation_status": "Success"
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show rollback status command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show rollback status
Last operation : Rollback to file
Details:
  Rollback type: atomic .replace_tmp_3662
  Start Time: Fri Aug 03 04:41:19 2018
  End Time: Fri Aug 03 04:41:26 2018
  Operation Status: Success