show interface Eth1/22 counters storm-control
show interface Eth1/22 counters storm-control
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 interface Eth1/22 counters storm-control ",
"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 interface Eth1/22 counters storm-control",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": {
"interface": "Ethernet1/22",
"eth_ucast_supp": "100.00",
"eth_mcast_supp": "100.00",
"eth_bcast_supp": "100.00",
"eth_total_supp": "0",
"supp_action": "[--]"
}}}}}}}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show interface Eth1/22 counters storm-control command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show interface eth1/22 counters trunk
show interface eth1/22 counters trunk
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 interface eth1/22 counters trunk ",
"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 interface eth1/22 counters trunk",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": {
"interface": "Ethernet1/22",
"eth_trunk_frames_tx": "0",
"eth_trunk_frames_rx": "0",
"eth_wrong_encap": "0"
}}}}}}}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show interface eth1/22 counters trunk command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show interface eth1/22 status err-vlans
show interface eth1/22 status err-vlans
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 interface eth1/22 status err-vlans ",
"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 interface eth1/22 status err-vlans",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": {
"interface": "Ethernet1/22"
}}}}}}}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show interface eth1/22 status err-vlans command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show interface eth1/22 switchport
show interface eth1/22 switchport
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 interface eth1/22 switchport ",
"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 interface eth1/22 switchport",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": {
"interface": "Ethernet1/22",
"switchport": "Disabled"
}}}}}}}}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show interface eth1/22 switchport command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show interface eth1/22 mac-address
show interface eth1/22 mac-address
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 interface eth1/22 mac-address ",
"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 interface eth1/22 mac-address",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": {
"interface": "Ethernet1/22",
"address": "2cd0.2d50.beff",
"bia_address": "2cd0.2d50.bf15"
}}}}}}}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show interface eth1/22 mac-address command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show interface nve 1
show interface nve 1
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 interface nve 1",
"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 interface nve 1",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": {
"interface": "nve1",
"state": "up",
"admin_state": "up",
"eth_hw_desc": "NVE",
"eth_mtu": "9216",
"encapsulation": "VXLAN",
"eth_mdix": "off",
"nve_rx_ucastpkts": "15372878",
"nve_rx_ucastbytes": "13784256756",
"nve_rx_mcastpkts": "4428339",
"nve_rx_mcastbytes": "4518481990",
"nve_tx_ucastpkts": "16288676",
"nve_tx_ucastbytes": "14462863192",
"nve_tx_mcastpkts": "16632292",
"nve_tx_mcastbytes": "16948078618"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show interface nve 1 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show interface nve 1 brief
show interface nve 1 brief
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 interface nve 1 brief ",
"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 interface nve 1 brief ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": {
"interface": "nve1",
"state": "up",
"state_rsn": "none"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show interface nve 1 brief command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show interface nve 1 description
show interface nve 1 description
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 interface nve 1 description ",
"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 interface nve 1 description ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": {
"interface": "nve1"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show interface nve 1 description command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show interface nve 1 status ; show interface nve 1 status err-disabled
show interface nve 1 status ; show interface nve 1 status err-disabled
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 interface nve 1 status ; show interface nve 1 status err-disabled",
"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 interface nve 1 status",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": {
"interface": "nve1",
"state": "connected"
}
}
}
},
{
"body": "",
"input": " show interface nve 1 status err-disabled",
"msg": "Success",
"code": "200"
}
]
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show interface nve 1 status ; show interface nve 1 status err-disabled command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|