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:

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 config-replace log exec
Operation            : Config-replace to user config
Checkpoint file name : .replace_tmp_3662
Scheme               : tmp
Cfg-replace done By  : admin
Cfg-replace 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 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:

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 config-replace log verify 
Operation            : Config-replace to user config
Checkpoint file name : .replace_tmp_3662
Scheme               : tmp
Cfg-replace done By  : admin
Cfg-replace 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 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:

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 config-replace status
Last operation : Config-replace to user config
Details:
  Config-replace 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