show snapshots sections
show snapshots sections
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 snapshots sections",
"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 snapshots sections",
"msg": "Success",
"code": "200",
"body": {
"TABLE_snapsection": {
"ROW_snapsection": {
"sectname": "v4route",
"sectcmd": "show ip route detail vrf all",
"sectrow": "ROW_prefix",
"sectkey1": "ipprefix",
"sectkey2": "-"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show snapshots sections command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show snapshots compare before_maintenance after_maintenance
show snapshots compare before_maintenance after_maintenance
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 snapshots compare before_maintenance after_maintenance",
"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 snapshots compare before_maintenance after_maintenance",
"msg": "Success",
"code": "200",
"body": {
"TABLE_feature": {
"ROW_feature": [
{
"feat_name": "bgp",
"TABLE_element": {
"ROW_element": [
{
"elemkey1": "vrf-name-out",
"elemval1": "default",
"elemkey3": "neighbor-id",
"elemval3": "10.1.1.1",
"TABLE_value": {
"ROW_value": {
"tag": "lastflap",
"val1": "P6DT18H12M32S",
"val2": "**P6DT18H19M19S**"
}
}
},
{
"elemkey1": "vrf-name-out",
"elemval1": "default",
"elemkey3": "neighbor-id",
"elemval3": "10.1.1.9",
"TABLE_value": {
"ROW_value": {
"tag": "lastflap",
"val1": "P6DT18H12M32S",
"val2": "**P6DT18H19M19S**"
}
}
},
{
"elemkey1": "vrf-name-out",
"elemval1": "default",
"elemkey3": "neighbor-id",
"elemval3": "193.168.1.2",
"TABLE_value": {
"ROW_value": {
"tag": "lastflap",
"val1": "P6DT18H12M32S",
"val2": "**P6DT18H19M19S**"
}
}
}
]
}
},
{
"feat_name": "interface",
"TABLE_element": {
"ROW_element": [
{
"elemkey1": "interface",
"elemval1": "mgmt0",
"TABLE_value": {
"ROW_value": [
{
"tag": "vdc_lvl_in_avg_bits",
"val1": "888",
"val2": "**952**"
},
{
"tag": "vdc_lvl_out_avg_bits",
"val1": "32",
"val2": "**56**"
},
{
"tag": "vdc_lvl_in_pkts",
"val1": "1127251",
"val2": "**1127909**"
},
{
"tag": "vdc_lvl_in_ucast",
"val1": "13211",
"val2": "**13225**"
},
{
"tag": "vdc_lvl_in_mcast",
"val1": "758816",
"val2": "**759333**"
},
{
"tag": "vdc_lvl_in_bcast",
"val1": "355224",
"val2": "**355351**"
},
{
"tag": "vdc_lvl_in_bytes",
"val1": "79815718",
"val2": "**79863829**"
},
{
"tag": "vdc_lvl_out_pkts",
"val1": "27129",
"val2": "**27147**"
},
{
"tag": "vdc_lvl_out_ucast",
"val1": "17290",
"val2": "**17302**"
},
{
"tag": "vdc_lvl_out_mcast",
"val1": "9825",
"val2": "**9831**"
},
{
"tag": "vdc_lvl_out_bytes",
"val1": "6467790",
"val2": "**6471477**"
}
]
}
},
{
"elemkey1": "interface",
"elemval1": "Ethernet1/1",
"TABLE_value": {
"ROW_value": [
{
"tag": "eth_inrate1_bits",
"val1": "3648",
"val2": "**4272**"
},
{
"tag": "eth_outrate1_bits",
"val1": "416",
"val2": "**288**"
},
{
"tag": "eth_inrate1_summary_bits",
"val1": "3.65 Kbps",
"val2": "**4.27 Kbps**"
},
{
"tag": "eth_outrate1_summary_bits",
"val1": "416 bps",
"val2": "**288 bps**"
},
{
"tag": "eth_inrate2_bits",
"val1": "3104",
"val2": "**3120**"
},
{
"tag": "eth_inrate2_summary_bits",
"val1": "3.10 Kbps",
"val2": "**3.12 Kbps**"
},
{
"tag": "eth_inmcast",
"val1": "193399",
"val2": "**193532**"
},
{
"tag": "eth_inpkts",
"val1": "193399",
"val2": "**193532**"
},
{
"tag": "eth_inbytes",
"val1": "206936930",
"val2": "**207079240**"
},
{
"tag": "eth_outmcast",
"val1": "324056",
"val2": "**324279**"
},
{
"tag": "eth_outpkts",
"val1": "324056",
"val2": "**324279**"
},
{
"tag": "eth_outbytes",
"val1": "27105686",
"val2": "**27124296**"
}
]
}
},
{
"elemkey1": "interface",
"elemval1": "Ethernet1/47",
"TABLE_value": {
"ROW_value": [
{
"tag": "eth_outrate1_bits",
"val1": "264",
"val2": "**144**"
},
{
"tag": "eth_outrate1_summary_bits",
"val1": "264 bps",
"val2": "**144 bps**"
},
{
"tag": "eth_inmcast",
"val1": "304493",
"val2": "**304703**"
},
{
"tag": "eth_inpkts",
"val1": "304493",
"val2": "**304703**"
},
{
"tag": "eth_inbytes",
"val1": "21314816",
"val2": "**21329558**"
},
{
"tag": "eth_outmcast",
"val1": "29384",
"val2": "**29404**"
},
{
"tag": "eth_outpkts",
"val1": "29384",
"val2": "**29404**"
},
{
"tag": "eth_outbytes",
"val1": "8295406",
"val2": "**8301058**"
}
]
}
},
{
"elemkey1": "interface",
"elemval1": "Ethernet1/49",
"TABLE_value": {
"ROW_value": [
{
"tag": "eth_outrate1_bits",
"val1": "264",
"val2": "**144**"
},
{
"tag": "eth_outrate1_summary_bits",
"val1": "264 bps",
"val2": "**144 bps**"
},
{
"tag": "eth_inmcast",
"val1": "304491",
"val2": "**304701**"
},
{
"tag": "eth_inpkts",
"val1": "304491",
"val2": "**304701**"
},
{
"tag": "eth_inbytes",
"val1": "21314688",
"val2": "**21329430**"
},
{
"tag": "eth_outmcast",
"val1": "29388",
"val2": "**29408**"
},
{
"tag": "eth_outpkts",
"val1": "29388",
"val2": "**29408**"
},
{
"tag": "eth_outbytes",
"val1": "8295875",
"val2": "**8301527**"
}
]
}
}
]
}
},
{
"feat_name": "route-summary",
"TABLE_element": {
"ROW_element": {
"elemkey1": "vrf-name-out",
"elemval1": "management",
"elemkey3": "addrf",
"elemval3": "ipv4",
"TABLE_subrow": {
"ROW_subrow": [
{
"subrowkey": "clientname",
"subrowval": "/",
"TABLE_subvalue": {
"ROW_subvalue": [
{
"tag": "clientnameuni",
"val1": "local",
"val2": "**am**"
},
{
"tag": "best-paths",
"val1": "1",
"val2": "**9**"
}
]
}
},
{
"subrowkey": "clientname",
"subrowval": "/",
"TABLE_subvalue": {
"ROW_subvalue": [
{
"tag": "clientnameuni",
"val1": "direct",
"val2": "**am**"
},
{
"tag": "best-paths",
"val1": "1",
"val2": "**9**"
}
]
}
},
{
"subrowkey": "clientname",
"subrowval": "/",
"TABLE_subvalue": {
"ROW_subvalue": [
{
"tag": "clientnameuni",
"val1": "static",
"val2": "**am**"
},
{
"tag": "best-paths",
"val1": "1",
"val2": "**9**"
}
]
}
},
{
"subrowkey": "clientname",
"subrowval": "/",
"TABLE_subvalue": {
"ROW_subvalue": [
{
"tag": "clientnameuni",
"val1": "broadcast",
"val2": "**am**"
},
{
"tag": "best-paths",
"val1": "5",
"val2": "**9**"
}
]
}
}
]
}
}
}
},
{
"feat_name": "routev6-summary",
"TABLE_element": {
"ROW_element": {
"elemkey1": "vrf-name-out",
"elemval1": "default",
"elemkey3": "addrf",
"elemval3": "ipv6",
"TABLE_subrow": {
"ROW_subrow": {
"subrowkey": "clientname",
"subrowval": "/",
"TABLE_subvalue": {
"ROW_subvalue": [
{
"tag": "clientnameuni",
"val1": "discard",
"val2": "**local**"
},
{
"tag": "best-paths",
"val1": "2",
"val2": "**1**"
}
]
}
}
}
}
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show snapshots compare before_maintenance after_maintenance command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show snapshots compare before_maint after_maint summary
show snapshots compare before_maint after_maint summary
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 snapshots compare before_maint after_maint summary",
"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 snapshots compare before_maint after_maint summary",
"msg": "Success",
"code": "200",
"body": {
"TABLE_summary": {
"ROW_summary": [
{
"item_desc": "# of interfaces",
"summary_val1": "103",
"summary_val2": "103"
},
{
"item_desc": "# of vlans",
"summary_val1": "1",
"summary_val2": "1"
},
{
"item_desc": "# of ipv4 routes vrf default",
"summary_val1": "3",
"summary_val2": "3"
},
{
"item_desc": "# of ipv4 paths vrf default",
"summary_val1": "3",
"summary_val2": "3"
},
{
"item_desc": "# of ipv4 routes vrf management",
"summary_val1": "20",
"summary_val2": "20"
},
{
"item_desc": "# of ipv4 paths vrf management",
"summary_val1": "20",
"summary_val2": "20"
},
{
"item_desc": "# of ipv6 routes vrf default",
"summary_val1": "3",
"summary_val2": "3"
},
{
"item_desc": "# of ipv6 paths vrf default",
"summary_val1": "3",
"summary_val2": "3"
},
{
"item_desc": "# of eth interfaces",
"summary_val1": "102",
"summary_val2": "102"
},
{
"item_desc": "# of eth interfaces up",
"summary_val1": "0",
"summary_val2": "0"
},
{
"item_desc": "# of eth interfaces down",
"summary_val1": "102",
"summary_val2": "102"
},
{
"item_desc": "# of eth interfaces other",
"summary_val1": "0",
"summary_val2": "0"
},
{
"item_desc": "# of vlan interfaces",
"summary_val1": "1",
"summary_val2": "1"
},
{
"item_desc": "# of vlan interfaces up",
"summary_val1": "0",
"summary_val2": "0"
},
{
"item_desc": "# of vlan interfaces down",
"summary_val1": "1",
"summary_val2": "1"
},
{
"item_desc": "# of vlan interfaces other",
"summary_val1": "0",
"summary_val2": "0"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show snapshots compare before_maint after_maint summary command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show snapshots compare before_maintenance after_maintenance ipv4
show snapshots compare before_maintenance after_maintenance ipv4
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 snapshots compare before_maintenance after_maintenance ipv4",
"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 snapshots compare before_maintenance after_maintenance ipv4",
"msg": "Success",
"code": "200",
"body": {
"TABLE_summary": {
"ROW_summary": {
"item_desc": "# of ipv4 routes",
"summary_val1": "16",
"summary_val2": "16"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show snapshots compare before_maintenance after_maintenance ipv4 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|