show config-replace log exec
show config-replace 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 config-replace 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 config-replace log exec",
"msg": "Success",
"code": "200",
"body": {
"log_entry": [
"Operation : Config-replace to user config\nCheckpoint file name : .replace_tmp_13526\nScheme : tmp\nCfg-replace done By : admin\nCfg-replace mode : atomic\nVerbose : 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 config-replace log exec command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show config-replace log verify
show config-replace 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 config-replace 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 config-replace log verify",
"msg": "Success",
"code": "200",
"body": {
"log_entry": [
"Operation : Config-replace to user config\nCheckpoint file name : .replace_tmp_13526\nScheme : tmp\nCfg-replace done By : admin\nCfg-replace mode : atomic\nVerbose : 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 config-replace log verify command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show config-replace status
show config-replace 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 config-replace 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 config-replace status",
"msg": "Success",
"code": "200",
"body": {
"last_operation": "Config-replace to user config",
"config_replace_type": "atomic",
"name": ".replace_tmp_13526",
"start_time": "Thu Jul 19 05:53:16 2018",
"end_time": "Thu Jul 19 05:53:22 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 config-replace status command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|