show switch-profile

show switch-profile

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 switch-profile",
  "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 switch-profile",
        "msg": "Success",
        "code": "200",
        "body": {
          "profile_name": "test",
          "cfg_rev": 1
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show switch-profile 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 port-profile usage name test

port-profile test
 Ethernet1/3



show switch-profile test buffer

show switch-profile test buffer

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 switch-profile test buffer",
  "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 switch-profile test buffer",
        "msg": "Success",
        "code": "200",
        "body": {
          "prof-name": "test",
          "TABLE_commands": {
            "ROW_commands": [
              {
                "seq_no": "1",
                "cmd": "interface Ethernet1/4"
              },
              {
                "seq_no": "1.1",
                "cmd": "  switchport access vlan 22"
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show switch-profile test buffer 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 switch-profile test buffer

switch-profile  : test
----------------------------------------------------------
Seq-no  Command
----------------------------------------------------------
1       interface Ethernet1/4
1.1       switchport access vlan 22


show switch-profile test peer 10.77.143.233 details

show switch-profile test peer 10.77.143.233 details

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 switch-profile test peer 10.77.143.233 details",
  "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 switch-profile test peer 10.77.143.233 details",
        "msg": "Success",
        "code": "200",
        "body": {
          "prof-name": "test",
          "peer_address": "10.77.143.233",
          "peer_sync_status": "In_sync",
          "remote_status": "Commit_Success",
          "remote_error": ""
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show switch-profile test peer 10.77.143.233 details 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 switch-profile test peer 10.77.143.233 details

switch-profile  : test
----------------------------------------------------------
Peer-IP-address            : 10.77.143.233
Peer-sync-status           : In sync
Peer-status                : Commit Success
Peer-error(s)              :




show switch-profile test status

show switch-profile test 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 switch-profile test 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 switch-profile test status",
        "msg": "Success",
        "code": "200",
        "body": {
          "prof-name": "test",
          "start_usec": 373899,
          "start_time": "Fri Jul 27 09:21:05 2018",
          "end_usec": 743620,
          "end_time": "Fri Jul 27 09:21:07 2018",
          "revision_number": 1,
          "session_type": "Initial_Exchange",
          "session_subtype": "Init_Exchange_All",
          "peer_triggered": 0,
          "profile_status": "Sync_Success",
          "local_status": "Commit_Success",
          "local_error": "",
          "peer_address": "10.77.143.233",
          "peer_sync_status": "In_sync",
          "remote_status": "Commit_Success",
          "remote_error": ""
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show switch-profile test 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 switch-profile test status

switch-profile  : test
----------------------------------------------------------

Start-time: 373899 usecs after Fri Jul 27 09:21:05 2018
End-time: 743620 usecs after Fri Jul 27 09:21:07 2018

Profile-Revision: 1
Session-type: Initial-Exchange
Session-subtype: Init-Exchange-All
Peer-triggered: No
Profile-status: Sync Success

Local information:
----------------
Status: Commit Success
Error(s):

Peer information:
----------------
IP-address: 10.77.143.233
Sync-status: In sync
Status: Commit Success
Error(s):




show switch-profile test session-history

show switch-profile test session-history

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 switch-profile test session-history",
  "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 switch-profile test session-history",
        "msg": "Success",
        "code": "200",
        "body": {
          "prof-name": "test",
          "TABLE_session": {
            "ROW_session": [
              {
                "session_index": 1,
                "start_usec": 830159,
                "start_time": "Fri Jul 27 09:20:29 2018",
                "end_usec": 193072,
                "end_time": "Fri Jul 27 09:20:30 2018",
                "revision_number": 1,
                "session_type": "Initial_Exchange",
                "session_subtype": "Init_Exchange_All",
                "peer_triggered": 0,
                "profile_status": "Merge_Failed",
                "local_status": "Verify_Failure",
                "local_error": "Peer 10.77.143.233 unable to accept lock request",
                "peer_address": "10.77.143.233",
                "peer_sync_status": "Not_yet_merged",
                "merge_flags": "Merge Flags: pending_merge:1 rcv_merge:0 pend_validate:0",
                "remote_status": "Verify_Failure",
                "remote_error": "Global-db modification in progress"
              },
              {
                "session_index": 2,
                "start_usec": 363945,
                "start_time": "Fri Jul 27 09:20:32 2018",
                "end_usec": 577241,
                "end_time": "Fri Jul 27 09:20:32 2018",
                "revision_number": 1,
                "session_type": "Initial_Exchange",
                "session_subtype": "Init_Exchange_All",
                "peer_triggered": 0,
                "profile_status": "Merge_Failed",
                "local_status": "Verify_Failure",
                "local_error": "Peer 10.77.143.233 unable to accept lock request",
                "peer_address": "10.77.143.233",
                "peer_sync_status": "Not_yet_merged",
                "merge_flags": "Merge Flags: pending_merge:1 rcv_merge:0 pend_validate:0",
                "remote_status": "Verify_Failure",
                "remote_error": "Global-db modification in progress"
              },
              {
                "session_index": 3,
                "start_usec": 792537,
                "start_time": "Fri Jul 27 09:20:37 2018",
                "end_usec": 13960,
                "end_time": "Fri Jul 27 09:20:38 2018",
                "revision_number": 1,
                "session_type": "Initial_Exchange",
                "session_subtype": "Init_Exchange_All",
                "peer_triggered": 0,
                "profile_status": "Merge_Failed",
                "local_status": "Verify_Failure",
                "local_error": "Peer 10.77.143.233 unable to accept lock request",
                "peer_address": "10.77.143.233",
                "peer_sync_status": "Not_yet_merged",
                "merge_flags": "Merge Flags: pending_merge:1 rcv_merge:0 pend_validate:0",
                "remote_status": "Verify_Failure",
                "remote_error": "Global-db modification in progress"
              },
              {
                "session_index": 4,
                "start_usec": 320140,
                "start_time": "Fri Jul 27 09:20:58 2018",
                "end_usec": 369289,
                "end_time": "Fri Jul 27 09:21:00 2018",
                "revision_number": 1,
                "session_type": "Initial_Exchange",
                "session_subtype": "Init_Exchange_All",
                "peer_triggered": 1,
                "profile_status": "Sync_Success",
                "local_status": "Commit_Success",
                "local_error": "",
                "peer_address": "10.77.143.233",
                "peer_sync_status": "Not_yet_merged",
                "merge_flags": "Merge Flags: pending_merge:1 rcv_merge:1 pend_validate:0",
                "remote_status": "Commit_Success",
                "remote_error": ""
              },
              {
                "session_index": 5,
                "start_usec": 373899,
                "start_time": "Fri Jul 27 09:21:05 2018",
                "end_usec": 743620,
                "end_time": "Fri Jul 27 09:21:07 2018",
                "revision_number": 1,
                "session_type": "Initial_Exchange",
                "session_subtype": "Init_Exchange_All",
                "peer_triggered": 0,
                "profile_status": "Sync_Success",
                "local_status": "Commit_Success",
                "local_error": "",
                "peer_address": "10.77.143.233",
                "peer_sync_status": "In_sync",
                "remote_status": "Commit_Success",
                "remote_error": ""
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show switch-profile test session-history 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 switch-profile test session-history

switch-profile  : test
----------------------------------------------------------

Start-time: 830159 usecs after Fri Jul 27 09:20:29 2018

End-time: 193072 usecs after Fri Jul 27 09:20:30 2018


Profile-Revision: 1
Session-type: Initial-Exchange
Session-subtype: Init-Exchange-All
Peer-triggered: No
Profile-status: Merge Failed

Local information:
----------------
Status: Verify Failure
Error(s): Peer 10.77.143.233 unable to accept lock request

Peer information:
----------------
IP-address: 10.77.143.233
Sync-status: Not yet merged
Merge Flags: pending_merge:1 rcv_merge:0 pend_validate:0
Status: Verify Failure
Error(s): Global-db modification in progress

Start-time: 363945 usecs after Fri Jul 27 09:20:32 2018

End-time: 577241 usecs after Fri Jul 27 09:20:32 2018


Profile-Revision: 1
Session-type: Initial-Exchange
Session-subtype: Init-Exchange-All
Peer-triggered: No
Profile-status: Merge Failed

Local information:
----------------
Status: Verify Failure
Error(s): Peer 10.77.143.233 unable to accept lock request

Peer information:
----------------
IP-address: 10.77.143.233
Sync-status: Not yet merged
Merge Flags: pending_merge:1 rcv_merge:0 pend_validate:0
Status: Verify Failure
Error(s): Global-db modification in progress

Start-time: 792537 usecs after Fri Jul 27 09:20:37 2018

End-time:  13960 usecs after Fri Jul 27 09:20:38 2018


Profile-Revision: 1
Session-type: Initial-Exchange
Session-subtype: Init-Exchange-All
Peer-triggered: No
Profile-status: Merge Failed

Local information:
----------------
Status: Verify Failure
Error(s): Peer 10.77.143.233 unable to accept lock request

Peer information:
----------------
IP-address: 10.77.143.233
Sync-status: Not yet merged
Merge Flags: pending_merge:1 rcv_merge:0 pend_validate:0
Status: Verify Failure
Error(s): Global-db modification in progress

Start-time: 320140 usecs after Fri Jul 27 09:20:58 2018

End-time: 369289 usecs after Fri Jul 27 09:21:00 2018


Profile-Revision: 1
Session-type: Initial-Exchange
Session-subtype: Init-Exchange-All
Peer-triggered: Yes
Profile-status: Sync Success

Local information:
----------------
Status: Commit Success
Error(s):

Peer information:
----------------
IP-address: 10.77.143.233
Sync-status: Not yet merged
Merge Flags: pending_merge:1 rcv_merge:1 pend_validate:0
Status: Commit Success
Error(s):

Start-time: 373899 usecs after Fri Jul 27 09:21:05 2018

End-time: 743620 usecs after Fri Jul 27 09:21:07 2018


Profile-Revision: 1
Session-type: Initial-Exchange
Session-subtype: Init-Exchange-All
Peer-triggered: No
Profile-status: Sync Success

Local information:
----------------
Status: Commit Success
Error(s):

Peer information:
----------------
IP-address: 10.77.143.233
Sync-status: In sync
Status: Commit Success
Error(s):


show switch-profile test status commit

show switch-profile test status commit

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 switch-profile test status commit",
  "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 switch-profile test status commit",
        "msg": "Success",
        "code": "200",
        "body": {
          "prof-name": "test",
          "TABLE_session": {
            "ROW_session": {
              "session_index": 0,
              "start_usec": 335528,
              "start_time": "Fri Jul 27 09:57:11 2018",
              "end_usec": 401449,
              "end_time": "Fri Jul 27 09:57:14 2018",
              "revision_number": 2,
              "session_type": "Commit",
              "session_subtype": "-",
              "peer_triggered": 0,
              "profile_status": "Sync_Success",
              "local_status": "Commit_Success",
              "local_error": "",
              "peer_address": "10.77.143.233",
              "peer_sync_status": "In_sync",
              "remote_status": "Commit_Success",
              "remote_error": ""
            }
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show switch-profile test status commit 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 switch-profile test status commit

switch-profile  : test
----------------------------------------------------------

Start-time: 335528 usecs after Fri Jul 27 09:57:11 2018

End-time: 401449 usecs after Fri Jul 27 09:57:14 2018


Profile-Revision: 2
Session-type: Commit
Session-subtype: -
Peer-triggered: No
Profile-status: Sync Success

Local information:
----------------
Status: Commit Success
Error(s):

Peer information:
----------------
IP-address: 10.77.143.233
Sync-status: In sync
Status: Commit Success
Error(s):