Snapshot Commands
show snapshots compare ipv4routes
show snapshots compare <snapshot-name-T1> <snapshot-name-T2> ipv4routes
import requests
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 ipv4routes",
"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)
{
"TABLE_summary": {
"ROW_summary": {
"item_desc": "# of ipv4 routes",
"summary_val1": "12",
"summary_val2": "12"
}
}
}
switch# show snapshots compare before_maintenance after_maintenance ipv4routes | xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.1.:snapshot" xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<snapshots>
<compare>
<__XML__PARAM__snapshot-name-T1>
<__XML__value>before_maintenance</__XML__value>
<__XML__PARAM__snapshot-name-T2>
<__XML__value>after_maintenance</__XML__value>
<ipv4routes>
<__readonly__>
<TABLE_summary>
<ROW_summary>
<item_desc># of ipv4 routes</item_desc>
<summary_val1>12</summary_val1>
<summary_val2>12</summary_val2>
</ROW_summary>
</TABLE_summary>
</__readonly__>
</ipv4routes>
</__XML__PARAM__snapshot-name-T2>
</__XML__PARAM__snapshot-name-T1>
</compare>
</snapshots>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
show snapshots compare ipv6routes
show snapshots compare <snapshot-name-T1> <snapshot-name-T2> ipv6routes
import requests
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 ipv6routes",
"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)
{
"TABLE_summary": {
"ROW_summary": {
"item_desc": "# of ipv6 routes",
"summary_val1": "3",
"summary_val2": "3"
}
}
}
switch# show snapshots compare before_maintenance after_maintenance ipv6routes | xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.1.:snapshot" xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<snapshots>
<compare>
<__XML__PARAM__snapshot-name-T1>
<__XML__value>before_maintenance</__XML__value>
<__XML__PARAM__snapshot-name-T2>
<__XML__value>after_maintenance</__XML__value>
<ipv6routes>
<__readonly__>
<TABLE_summary>
<ROW_summary>
<item_desc># of ipv6 routes</item_desc>
<summary_val1>3</summary_val1>
<summary_val2>3</summary_val2>
</ROW_summary>
</TABLE_summary>
</__readonly__>
</ipv6routes>
</__XML__PARAM__snapshot-name-T2>
</__XML__PARAM__snapshot-name-T1>
</compare>
</snapshots>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
show snapshots compare summary
show snapshots compare <snapshot-name-T1> <snapshot-name-T2> summary
import requests
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 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)
{
"TABLE_summary": {
"ROW_summary": [
{
"item_desc": "# of interfaces",
"summary_val1": "49",
"summary_val2": "49"
},
{
"item_desc": "# of vlans",
"summary_val1": "0",
"summary_val2": "0"
},
{
"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": "9",
"summary_val2": "9"
},
{
"item_desc": "# of ipv4 paths vrf management",
"summary_val1": "9",
"summary_val2": "9"
},
{
"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": "48",
"summary_val2": "48"
},
{
"item_desc": "# of eth interfaces up",
"summary_val1": "0",
"summary_val2": "0"
},
{
"item_desc": "# of eth interfaces down",
"summary_val1": "48",
"summary_val2": "48"
},
{
"item_desc": "# of eth interfaces other",
"summary_val1": "0",
"summary_val2": "0"
},
{
"item_desc": "# of vlan interfaces",
"summary_val1": "0",
"summary_val2": "0"
},
{
"item_desc": "# of vlan interfaces up",
"summary_val1": "0",
"summary_val2": "0"
},
{
"item_desc": "# of vlan interfaces down",
"summary_val1": "0",
"summary_val2": "0"
},
{
"item_desc": "# of vlan interfaces other",
"summary_val1": "0",
"summary_val2": "0"
}
]
}
}
switch# show snapshots compare before_maintenance after_maintenance summary | xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.1.:snapshot" xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<snapshots>
<compare>
<__XML__PARAM__snapshot-name-T1>
<__XML__value>before_maint</__XML__value>
<__XML__PARAM__snapshot-name-T2>
<__XML__value>after_maint</__XML__value>
<summary>
<__readonly__>
<TABLE_summary>
<ROW_summary>
<item_desc># of interfaces</item_desc>
<summary_val1>49</summary_val1>
<summary_val2>49</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of vlans</item_desc>
<summary_val1>0</summary_val1>
<summary_val2>0</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of ipv4 routes vrf default</item_desc>
<summary_val1>3</summary_val1>
<summary_val2>3</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of ipv4 paths vrf default</item_desc>
<summary_val1>3</summary_val1>
<summary_val2>3</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of ipv4 routes vrf management</item_desc>
<summary_val1>9</summary_val1>
<summary_val2>9</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of ipv4 paths vrf management</item_desc>
<summary_val1>9</summary_val1>
<summary_val2>9</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of ipv6 routes vrf default</item_desc>
<summary_val1>3</summary_val1>
<summary_val2>3</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of ipv6 paths vrf default</item_desc>
<summary_val1>3</summary_val1>
<summary_val2>3</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of eth interfaces</item_desc>
<summary_val1>48</summary_val1>
<summary_val2>48</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of eth interfaces up</item_desc>
<summary_val1>0</summary_val1>
<summary_val2>0</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of eth interfaces down</item_desc>
<summary_val1>48</summary_val1>
<summary_val2>48</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of eth interfaces other</item_desc>
<summary_val1>0</summary_val1>
<summary_val2>0</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of vlan interfaces</item_desc>
<summary_val1>0</summary_val1>
<summary_val2>0</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of vlan interfaces up</item_desc>
<summary_val1>0</summary_val1>
<summary_val2>0</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of vlan interfaces down</item_desc>
<summary_val1>0</summary_val1>
<summary_val2>0</summary_val2>
</ROW_summary>
<ROW_summary>
<item_desc># of vlan interfaces other</item_desc>
<summary_val1>0</summary_val1>
<summary_val2>0</summary_val2>
</ROW_summary>
</TABLE_summary>
</__readonly__>
</summary>
</__XML__PARAM__snapshot-name-T2>
</__XML__PARAM__snapshot-name-T1>
</compare>
</snapshots>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
show snapshots compare
show snapshots compare <snapshot-name-T1> <snapshot-name-T2>
import requests
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)
{
"TABLE_feature": {
"ROW_feature": [
{
"feat_name": "bgp",
"feat_state1": "enabled",
"feat_state2": "**disabled**"
},
{
"feat_name": "interface",
"TABLE_element": {
"ROW_element": {
"elemkey1": "interface",
"elemval1": "mgmt0",
"TABLE_value": {
"ROW_value": [
{
"tag": "vdc_lvl_in_avg_bps",
"val1": "192",
"val2": "**160**"
},
{
"tag": "vdc_lvl_out_avg_bps",
"val1": "32",
"val2": "**40**"
},
{
"tag": "vdc_lvl_in_pkts",
"val1": "2994",
"val2": "**3024**"
},
{
"tag": "vdc_lvl_in_ucast",
"val1": "694",
"val2": "**695**"
},
{
"tag": "vdc_lvl_in_mcast",
"val1": "2298",
"val2": "**2327**"
},
{
"tag": "vdc_lvl_in_bytes",
"val1": "1207725",
"val2": "**1218104**"
},
{
"tag": "vdc_lvl_out_pkts",
"val1": "775",
"val2": "**784**"
},
{
"tag": "vdc_lvl_out_ucast",
"val1": "138",
"val2": "**139**"
},
{
"tag": "vdc_lvl_out_mcast",
"val1": "630",
"val2": "**638**"
},
{
"tag": "vdc_lvl_out_bytes",
"val1": "164050",
"val2": "**166016**"
}
]
}
}
}
},
{
"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": null,
"TABLE_subvalue": {
"ROW_subvalue": {
"tag": "ucast_clientname",
"val1": "local",
"val2": "**am**"
}
}
},
{
"subrowkey": "clientname",
"subrowval": null,
"TABLE_subvalue": {
"ROW_subvalue": {
"tag": "ucast_clientname",
"val1": "direct",
"val2": "**am**"
}
}
},
{
"subrowkey": "clientname",
"subrowval": null,
"TABLE_subvalue": {
"ROW_subvalue": {
"tag": "ucast_clientname",
"val1": "static",
"val2": "**am**"
}
}
},
{
"subrowkey": "clientname",
"subrowval": null,
"TABLE_subvalue": {
"ROW_subvalue": [
{
"tag": "ucast_clientname",
"val1": "broadcast",
"val2": "**am**"
},
{
"tag": "best-paths",
"val1": "5",
"val2": "**1**"
}
]
}
}
]
}
}
}
},
{
"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": null,
"TABLE_subvalue": {
"ROW_subvalue": [
{
"tag": "ucast_clientname",
"val1": "discard",
"val2": "**local**"
},
{
"tag": "best-paths",
"val1": "2",
"val2": "**1**"
}
]
}
}
}
}
}
},
{
"feat_name": "route",
"TABLE_element": {
"ROW_element": [
{
"elemkey1": "ipprefix",
"elemval1": "0.0.0.0/32",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H29M20S",
"val2": "**PT10H36M51S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "127.0.0.0/8",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H29M20S",
"val2": "**PT10H36M51S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "255.255.255.255/32",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H27M51S",
"val2": "**PT10H35M22S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "0.0.0.0/32",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H29M20S",
"val2": "**PT10H36M51S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "127.0.0.0/8",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H29M20S",
"val2": "**PT10H36M51S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "255.255.255.255/32",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H27M51S",
"val2": "**PT10H35M22S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "0.0.0.0/0",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT7H8M5S",
"val2": "**PT7H15M36S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "10.6.158.0/24",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H27M45S",
"val2": "**PT10H35M16S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "10.6.158.0/32",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H27M45S",
"val2": "**PT10H35M16S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "10.6.158.75/32",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H27M45S",
"val2": "**PT10H35M16S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "10.6.158.254/32",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT7H8M5S",
"val2": "**PT7H15M36S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "10.6.158.255/32",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H27M45S",
"val2": "**PT10H35M16S**"
}
}
}
]
}
},
{
"feat_name": "routev6",
"TABLE_element": {
"ROW_element": [
{
"elemkey1": "ipprefix",
"elemval1": "ff00::/8",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H29M20S",
"val2": "**PT10H36M52S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "0::/127",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H29M20S",
"val2": "**PT10H36M52S**"
}
}
},
{
"elemkey1": "ipprefix",
"elemval1": "fe80::/10",
"TABLE_value": {
"ROW_value": {
"tag": "uptime",
"val1": "PT10H27M51S",
"val2": "**PT10H35M23S**"
}
}
}
]
}
}
]
}
}
switch# show snapshots compare before_maintenance after_maintenance | xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.1.:snapshot" xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<snapshots>
<compare>
<__XML__PARAM__snapshot-name-T1>
<__XML__value>before_maintenance</__XML__value>
<__XML__PARAM__snapshot-name-T2>
<__XML__value>after_maintenance</__XML__value>
<__readonly__>
<TABLE_feature>
<ROW_feature>
<feat_name>bgp</feat_name>
<feat_state1>enabled</feat_state1>
<feat_state2>**disabled**</feat_state2>
</ROW_feature>
<ROW_feature>
<feat_name>interface</feat_name>
<TABLE_element>
<ROW_element>
<elemkey1>interface</elemkey1>
<elemval1>mgmt0</elemval1>
<TABLE_value>
<ROW_value>
<tag>vdc_lvl_in_avg_bps</tag>
<val1>192</val1>
<val2>**160**</val2>
</ROW_value>
<ROW_value>
<tag>vdc_lvl_out_avg_bps</tag>
<val1>32</val1>
<val2>**40**</val2>
</ROW_value>
<ROW_value>
<tag>vdc_lvl_in_pkts</tag>
<val1>2994</val1>
<val2>**3024**</val2>
</ROW_value>
<ROW_value>
<tag>vdc_lvl_in_ucast</tag>
<val1>694</val1>
<val2>**695**</val2>
</ROW_value>
<ROW_value>
<tag>vdc_lvl_in_mcast</tag>
<val1>2298</val1>
<val2>**2327**</val2>
</ROW_value>
<ROW_value>
<tag>vdc_lvl_in_bytes</tag>
<val1>1207725</val1>
<val2>**1218104**</val2>
</ROW_value>
<ROW_value>
<tag>vdc_lvl_out_pkts</tag>
<val1>775</val1>
<val2>**784**</val2>
</ROW_value>
<ROW_value>
<tag>vdc_lvl_out_ucast</tag>
<val1>138</val1>
<val2>**139**</val2>
</ROW_value>
<ROW_value>
<tag>vdc_lvl_out_mcast</tag>
<val1>630</val1>
<val2>**638**</val2>
</ROW_value>
<ROW_value>
<tag>vdc_lvl_out_bytes</tag>
<val1>164050</val1>
<val2>**166016**</val2>
</ROW_value>
</TABLE_value>
</ROW_element>
</TABLE_element>
</ROW_feature>
<ROW_feature>
<feat_name>route-summary</feat_name>
<TABLE_element>
<ROW_element>
<elemkey1>vrf-name-out</elemkey1>
<elemval1>management</elemval1>
<elemkey3>addrf</elemkey3>
<elemval3>ipv4</elemval3>
<TABLE_subrow>
<ROW_subrow>
<subrowkey>clientname</subrowkey>
<subrowval></subrowval>
<TABLE_subvalue>
<ROW_subvalue>
<tag>ucast_clientname</tag>
<val1>local</val1>
<val2>**am**</val2>
</ROW_subvalue>
</TABLE_subvalue>
</ROW_subrow>
<ROW_subrow>
<subrowkey>clientname</subrowkey>
<subrowval></subrowval>
<TABLE_subvalue>
<ROW_subvalue>
<tag>ucast_clientname</tag>
<val1>direct</val1>
<val2>**am**</val2>
</ROW_subvalue>
</TABLE_subvalue>
</ROW_subrow>
<ROW_subrow>
<subrowkey>clientname</subrowkey>
<subrowval></subrowval>
<TABLE_subvalue>
<ROW_subvalue>
<tag>ucast_clientname</tag>
<val1>static</val1>
<val2>**am**</val2>
</ROW_subvalue>
</TABLE_subvalue>
</ROW_subrow>
<ROW_subrow>
<subrowkey>clientname</subrowkey>
<subrowval></subrowval>
<TABLE_subvalue>
<ROW_subvalue>
<tag>ucast_clientname</tag>
<val1>broadcast</val1>
<val2>**am**</val2>
</ROW_subvalue>
<ROW_subvalue>
<tag>best-paths</tag>
<val1>5</val1>
<val2>**1**</val2>
</ROW_subvalue>
</TABLE_subvalue>
</ROW_subrow>
</TABLE_subrow>
</ROW_element>
</TABLE_element>
</ROW_feature>
<ROW_feature>
<feat_name>routev6-summary</feat_name>
<TABLE_element>
<ROW_element>
<elemkey1>vrf-name-out</elemkey1>
<elemval1>default</elemval1>
<elemkey3>addrf</elemkey3>
<elemval3>ipv6</elemval3>
<TABLE_subrow>
<ROW_subrow>
<subrowkey>clientname</subrowkey>
<subrowval></subrowval>
<TABLE_subvalue>
<ROW_subvalue>
<tag>ucast_clientname</tag>
<val1>discard</val1>
<val2>**local**</val2>
</ROW_subvalue>
<ROW_subvalue>
<tag>best-paths</tag>
<val1>2</val1>
<val2>**1**</val2>
</ROW_subvalue>
</TABLE_subvalue>
</ROW_subrow>
</TABLE_subrow>
</ROW_element>
</TABLE_element>
</ROW_feature>
<ROW_feature>
<feat_name>route</feat_name>
<TABLE_element>
<ROW_element>
<elemkey1>ipprefix</elemkey1>
]]>]]>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
show snapshots dump
show snapshots dump <snapshot-name> <section-name>
import requests
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 dump new routev6",
"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)
{
"TABLE_snapshot": {
"ROW_snapshot": {
"file_name": "routev6-ext.xml",
"snap_name": "new"
}
}
}
switch# show snapshots dump new routev6 | xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.1.:snapshot" xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<snapshots>
<dump>
<__XML__PARAM__snapshot-name>
<__XML__value>new</__XML__value>
<__XML__PARAM__section-name>
<__XML__value>routev6</__XML__value>
<__readonly__>
<TABLE_snapshot>
<ROW_snapshot>
<file_name>routev6-ext.xml</file_name>
<snap_name>new</snap_name>
</ROW_snapshot>
</TABLE_snapshot>
</__readonly__>
</__XML__PARAM__section-name>
</__XML__PARAM__snapshot-name>
</dump>
</snapshots>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
<__readonly__>
show snapshots dump
show snapshots dump <snapshot-name>
import requests
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 dump new",
"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)
{
"TABLE_snapshot": {
"ROW_snapshot": [
{
"file_name": "interface.xml",
"snap_name": "new"
},
{
"file_name": "route-summary.xml",
"snap_name": "new"
},
{
"file_name": "routev6-summary.xml",
"snap_name": "new"
},
{
"file_name": "route-ext.xml",
"snap_name": "new"
},
{
"file_name": "routev6-ext.xml",
"snap_name": "new"
}
]
}
}
switch# show snapshots dump new | xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.1.:snapshot" xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<snapshots>
<dump>
<__XML__PARAM__snapshot-name>
<__XML__value>new</__XML__value>
<__readonly__>
<TABLE_snapshot>
<ROW_snapshot>
<file_name>interface.xml</file_name>
<snap_name>new</snap_name>
</ROW_snapshot>
<ROW_snapshot>
<file_name>route-summary.xml</file_name>
<snap_name>new</snap_name>
</ROW_snapshot>
<ROW_snapshot>
<file_name>routev6-summary.xml</file_name>
<snap_name>new</snap_name>
</ROW_snapshot>
<ROW_snapshot>
<file_name>route-ext.xml</file_name>
<snap_name>new</snap_name>
</ROW_snapshot>
<ROW_snapshot>
<file_name>routev6-ext.xml</file_name>
<snap_name>new</snap_name>
</ROW_snapshot>
</TABLE_snapshot>
</__readonly__>
</__XML__PARAM__snapshot-name>
</dump>
</snapshots>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
<__readonly__>
show snapshots sections
show snapshots sections
import requests
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)
{
"TABLE_snapsection": {
"ROW_snapsection": [
{
"sectname": "route",
"sectcmd": "show ip route detail vrf all",
"sectrow": "ROW_prefix",
"sectkey1": "ipprefix",
"sectkey2": "-"
},
{
"sectname": "routev6",
"sectcmd": "show ipv6 route detail vrf all",
"sectrow": "ROW_prefix",
"sectkey1": "ipprefix",
"sectkey2": "-"
}
]
}
}
switch# show snapshots sections | xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.1.:snapshot" xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<snapshots>
<sections>
<__readonly__>
<TABLE_snapsection>
<ROW_snapsection>
<sectname>route</sectname>
<sectcmd>show ip route detail vrf all</sectcmd>
<sectrow>ROW_prefix</sectrow>
<sectkey1>ipprefix</sectkey1>
<sectkey2>-</sectkey2>
</ROW_snapsection>
<ROW_snapsection>
<sectname>routev6</sectname>
<sectcmd>show ipv6 route detail vrf all</sectcmd>
<sectrow>ROW_prefix</sectrow>
<sectkey1>ipprefix</sectkey1>
<sectkey2>-</sectkey2>
</ROW_snapsection>
</TABLE_snapsection>
</__readonly__>
</sections>
</snapshots>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
[route] show command: show ip route detail vrf all row id: ROW_prefix key1: ipprefix key2: -
[routev6]
show command: show ipv6 route detail vrf all
row id: ROW_prefix
key1: ipprefix
key2: -
show snapshots
show snapshots
import requests
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",
"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)
{
"TABLE_snapshot": {
"ROW_snapshot": [
{
"snap_name": "before_maintenance",
"snap_ctime": "Wed Jul 11 08:44:24 2018",
"description": "system-internal-snapshot"
},
{
"snap_name": "after_maintenance",
"snap_ctime": "Wed Jul 11 08:51:55 2018",
"description": "system-internal-snapshot"
},
{
"snap_name": "before_maint",
"snap_ctime": "Wed Jul 11 08:27:17 2018",
"description": "taken before maint"
},
{
"snap_name": "after_maint",
"snap_ctime": "Wed Jul 11 08:27:52 2018",
"description": "taken after maint"
},
{
"snap_name": "new",
"snap_ctime": "Wed Jul 11 09:03:05 2018",
"description": "\"show int mgmt 0 status\""
},
{
"snap_name": "clock",
"snap_ctime": "Wed Jul 11 09:05:31 2018",
"description": "\"show clock\""
}
]
}
}
switch# show snapshots | xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<nf:rpc-reply xmlns="http://www.cisco.com/nxos:8.3.1.:snapshot" xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0">
<nf:data>
<show>
<snapshots>
<__readonly__>
<TABLE_snapshot>
<ROW_snapshot>
<snap_name>before_maintenance</snap_name>
<snap_ctime>Wed Jul 11 08:44:24 2018</snap_ctime>
<description>system-internal-snapshot</description>
</ROW_snapshot>
<ROW_snapshot>
<snap_name>after_maintenance</snap_name>
<snap_ctime>Wed Jul 11 08:51:55 2018</snap_ctime>
<description>system-internal-snapshot</description>
</ROW_snapshot>
<ROW_snapshot>
<snap_name>before_maint</snap_name>
<snap_ctime>Wed Jul 11 08:27:17 2018</snap_ctime>
<description>taken before maint</description>
</ROW_snapshot>
<ROW_snapshot>
<snap_name>after_maint</snap_name>
<snap_ctime>Wed Jul 11 08:27:52 2018</snap_ctime>
<description>taken after maint</description>
</ROW_snapshot>
<ROW_snapshot>
<snap_name>new</snap_name>
<snap_ctime>Wed Jul 11 09:03:05 2018</snap_ctime>
<description>"show int mgmt 0 status"</description>
</ROW_snapshot>
<ROW_snapshot>
<snap_name>clock</snap_name>
<snap_ctime>Wed Jul 11 09:05:31 2018</snap_ctime>
<description>"show clock"</description>
</ROW_snapshot>
</TABLE_snapshot>
</__readonly__>
</snapshots>
</show>
</nf:data>
</nf:rpc-reply>
]]>]]>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
before_maintenance Wed Jul 11 08:44:24 2018 system-internal-snapshot
after_maintenance Wed Jul 11 08:51:55 2018 system-internal-snapshot
before_maint Wed Jul 11 08:27:17 2018 taken before maint
after_maint Wed Jul 11 08:27:52 2018 taken after maint
new Wed Jul 11 09:03:05 2018 "show int mgmt 0 status"
clock Wed Jul 11 09:05:31 2018 "show clock"