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:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
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:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
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:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|