show lldp all
show lldp all
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 lldp all",
"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 lldp all",
"msg": "Success",
"code": "200",
"body": {
"TABLE_lldp_all": {
"ROW_lldp_all": [
{
"intf_desc": "Eth1/8",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/7",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/6",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/5",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/4",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/3",
"lldp_tx": "Y",
"lldp_rx": "Y",
"lldp_dcbx": "Y"
},
{
"intf_desc": "Eth1/2",
"lldp_tx": "Y",
"lldp_rx": "Y",
"lldp_dcbx": "Y"
},
{
"intf_desc": "Eth1/1",
"lldp_tx": "Y",
"lldp_rx": "Y",
"lldp_dcbx": "Y"
},
{
"intf_desc": "mgmt0",
"lldp_tx": "Y",
"lldp_rx": "Y",
"lldp_dcbx": "Y"
},
{
"intf_desc": "Eth1/16",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/15",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/14",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/13",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/12",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/11",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/10",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/9",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/24",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/23",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/22",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/21",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/20",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/19",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/18",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/17",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/32",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/31",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/30",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/29",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/28",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/27",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/26",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/25",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/40",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/39",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/38",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/37",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/36",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/35",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/34",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/33",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/48",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/47",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/46",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/45",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/44",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/43",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/42",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/41",
"lldp_tx": "N",
"lldp_rx": "N",
"lldp_dcbx": "N"
},
{
"intf_desc": "Eth1/54",
"lldp_tx": "Y",
"lldp_rx": "Y",
"lldp_dcbx": "Y"
},
{
"intf_desc": "Eth1/53",
"lldp_tx": "Y",
"lldp_rx": "Y",
"lldp_dcbx": "Y"
},
{
"intf_desc": "Eth1/52",
"lldp_tx": "Y",
"lldp_rx": "Y",
"lldp_dcbx": "Y"
},
{
"intf_desc": "Eth1/51",
"lldp_tx": "Y",
"lldp_rx": "Y",
"lldp_dcbx": "Y"
},
{
"intf_desc": "Eth1/50",
"lldp_tx": "Y",
"lldp_rx": "Y",
"lldp_dcbx": "Y"
},
{
"intf_desc": "Eth1/49",
"lldp_tx": "Y",
"lldp_rx": "Y",
"lldp_dcbx": "Y"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp dcbx interface ethernet 1/1
show lldp dcbx interface ethernet 1/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 lldp dcbx interface ethernet 1/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 lldp dcbx interface ethernet 1/1",
"msg": "Success",
"code": "200",
"body": {
"if_out": "Ethernet1/1",
"cfg_proto": "Auto-detect",
"det_proto": "CEE",
"l_op_ver": "0",
"l_max_ver": "0",
"l_seq_no": "1",
"l_ack_no": "0"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp dcbx interface ethernet 1/1 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp entry Spine-0.PI-SEC-DT.com
show lldp entry Spine-0.PI-SEC-DT.com
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 lldp entry Spine-0.PI-SEC-DT.com",
"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 lldp entry Spine-0.PI-SEC-DT.com",
"msg": "Success",
"code": "200",
"body": {
"neigh_hdr": "neigh_hdr",
"neigh_count": "3",
"TABLE_entry": {
"ROW_entry": [
{
"chassis_type": "Mac Address",
"chassis_id": "88f0.31f9.a340",
"port_type": "Interface Name",
"port_id": "Ethernet1/41",
"l_port_id": "Eth1/1",
"port_desc": "Ethernet1/41",
"sys_name": "Spine-0.PI-SEC-DT.com",
"sys_desc": "Cisco Nexus Operating System (NX-OS) Software 9.2(1)\nTAC support: http://www.cisco.com/tac\nCopyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.",
"ttl": "118",
"capability": "1310740",
"mgmt_addr_type": "IPV4",
"mgmt_addr": "10.77.143.43",
"mgmt_addr_ipv6_type": "802",
"mgmt_addr_ipv6": "not advertised",
"vlan_id": "not advertised"
},
{
"chassis_type": "Mac Address",
"chassis_id": "88f0.31f9.a341",
"port_type": "Interface Name",
"port_id": "Ethernet1/42",
"l_port_id": "Eth1/2",
"port_desc": "Ethernet1/42",
"sys_name": "Spine-0.PI-SEC-DT.com",
"sys_desc": "Cisco Nexus Operating System (NX-OS) Software 9.2(1)\nTAC support: http://www.cisco.com/tac\nCopyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.",
"ttl": "118",
"capability": "1310740",
"mgmt_addr_type": "IPV4",
"mgmt_addr": "10.77.143.43",
"mgmt_addr_ipv6_type": "802",
"mgmt_addr_ipv6": "not advertised",
"vlan_id": "1024 "
},
{
"chassis_type": "Mac Address",
"chassis_id": "88f0.31f9.a342",
"port_type": "Interface Name",
"port_id": "Ethernet1/43",
"l_port_id": "Eth1/3",
"port_desc": "Ethernet1/43",
"sys_name": "Spine-0.PI-SEC-DT.com",
"sys_desc": "Cisco Nexus Operating System (NX-OS) Software 9.2(1)\nTAC support: http://www.cisco.com/tac\nCopyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.",
"ttl": "118",
"capability": "1310740",
"mgmt_addr_type": "IPV4",
"mgmt_addr": "10.77.143.43",
"mgmt_addr_ipv6_type": "802",
"mgmt_addr_ipv6": "not advertised",
"vlan_id": "1025 "
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp entry Spine-0.PI-SEC-DT.com command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp interface ethernet 1/1
show lldp interface ethernet 1/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 lldp interface ethernet 1/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 lldp interface ethernet 1/1",
"msg": "Success",
"code": "200",
"body": {
"interface": "Ethernet1/1",
"tx_en": "Y",
"rx_en": "Y",
"dcbx_en": "Y",
"port_mac": "64:f6:9d:ef:7a:88",
"tlv_type": [
"1",
"2",
"3",
"4292804612",
"4131717125",
"4131717126",
"589831",
"4292804616",
"4292804735",
"284229641",
"0"
],
"tlv_len": [
"4292804615",
"4292804621",
"1734672386",
"12",
"4131717141",
"282919068",
"4",
"12",
"5",
"4143579150",
"0"
],
"tlv_value": [
"837847044",
"1752450309",
"4132141056",
"1701344325",
"1852403795",
"1668507971",
"335549440",
"1292501253",
"21102848",
"4035446279"
]
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp interface ethernet 1/1 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp neighbors
show lldp neighbors
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 lldp neighbors ",
"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)
{
"neigh_hdr": "neigh_hdr",
"TABLE_nbor": {
"ROW_nbor": [
{
"chassis_type": "Locally Assigned",
"chassis_id": "SIT2-TAHOE-EOR2",
"l_port_id": "Eth1/10",
"hold_time": "120",
"system_capability": "BR",
"enabled_capability": "BR",
"port_type": "Interface Name",
"port_id": "Ethernet4/10",
"mgmt_addr_type": "IPV4",
"mgmt_addr": "172.31.144.190",
"mgmt_addr_ipv6_type": "802",
"mgmt_addr_ipv6": "003a.7d8d.be9c"
},
{
"chassis_type": "Locally Assigned",
"chassis_id": "SIT2-TAHOE-EOR2",
"l_port_id": "Eth1/11",
"hold_time": "120",
"system_capability": "BR",
"enabled_capability": "BR",
"port_type": "Interface Name",
"port_id": "Ethernet2/11",
"mgmt_addr_type": "IPV4",
"mgmt_addr": "172.31.144.190",
"mgmt_addr_ipv6_type": "802",
"mgmt_addr_ipv6": "006b.f1be.deb0"
}
]
},
"neigh_count": "2"
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp neighbors command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp neighbors detail
show lldp neighbors detail
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 lldp neighbors detail ",
"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)
{
"neigh_hdr": "neigh_hdr",
"TABLE_nbor_detail": {
"ROW_nbor_detail": [
{
"chassis_type": "Mac Address",
"chassis_id": "003a.7d8d.be9c",
"port_type": "Interface Name",
"port_id": "Ethernet4/10",
"l_port_id": "Eth1/10",
"port_desc": "Ethernet4/10",
"sys_name": "SIT2-TAHOE-EOR2",
"sys_desc": "Cisco Nexus Operating System (NX-OS) Software 7.0(3)I7(5)\nTAC support: http://www.cisco.com/tac\nCopyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.",
"ttl": "106",
"system_capability": "BR",
"enabled_capability": "BR",
"mgmt_addr_type": "IPV4",
"mgmt_addr": "172.31.144.190",
"mgmt_addr_ipv6_type": "802",
"mgmt_addr_ipv6": "not advertised",
"vlan_id": "not advertised"
},
{
"chassis_type": "Mac Address",
"chassis_id": "006b.f1be.deb0",
"port_type": "Interface Name",
"port_id": "Ethernet2/11",
"l_port_id": "Eth1/11",
"port_desc": "Ethernet2/11",
"sys_name": "SIT2-TAHOE-EOR2",
"sys_desc": "Cisco Nexus Operating System (NX-OS) Software 7.0(3)I7(5)\nTAC support: http://www.cisco.com/tac\nCopyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.",
"ttl": "106",
"system_capability": "BR",
"enabled_capability": "BR",
"mgmt_addr_type": "IPV4",
"mgmt_addr": "172.31.144.190",
"mgmt_addr_ipv6_type": "802",
"mgmt_addr_ipv6": "not advertised",
"vlan_id": "1"
}
]
},
"neigh_count": "2"
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp neighbors detail command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp neighbors interface ethernet 1/1
show lldp neighbors interface ethernet 1/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 lldp neighbors interface ethernet 1/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 lldp neighbors interface ethernet 1/1",
"msg": "Success",
"code": "200",
"body": {
"neigh_hdr": "neigh_hdr",
"neigh_count": "1",
"TABLE_nbor": {
"ROW_nbor": {
"chassis_type": "Locally Assigned",
"chassis_id": "Spine-0.PI-SEC-DT.com",
"l_port_id": "Eth1/1",
"hold_time": "120",
"system_capability": "BR",
"enabled_capability": "BR",
"port_type": "Interface Name",
"port_id": "Ethernet1/41",
"mgmt_addr_type": "IPV4",
"mgmt_addr": "10.77.143.43",
"mgmt_addr_ipv6_type": "802",
"mgmt_addr_ipv6": "88f0.31f9.a340"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp neighbors interface ethernet 1/1 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp neighbors interface ethernet 1/1 detail
show lldp neighbors interface ethernet 1/1 detail
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 lldp neighbors interface ethernet 1/1 detail",
"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 lldp neighbors interface ethernet 1/1 detail",
"msg": "Success",
"code": "200",
"body": {
"neigh_hdr": "neigh_hdr",
"neigh_count": "1",
"TABLE_nbor_detail": {
"ROW_nbor_detail": {
"chassis_type": "Mac Address",
"chassis_id": "88f0.31f9.a340",
"port_type": "Interface Name",
"port_id": "Ethernet1/41",
"l_port_id": "Eth1/1",
"port_desc": "Ethernet1/41",
"sys_name": "Spine-0.PI-SEC-DT.com",
"sys_desc": "Cisco Nexus Operating System (NX-OS) Software 9.2(1)\nTAC support: http://www.cisco.com/tac\nCopyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.",
"ttl": "109",
"system_capability": "B, R",
"enabled_capability": "B, R",
"mgmt_addr_type": "IPV4",
"mgmt_addr": "10.77.143.43",
"mgmt_addr_ipv6_type": "802",
"mgmt_addr_ipv6": "not advertised",
"vlan_id": "not advertised"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp neighbors interface ethernet 1/1 detail command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp neighbors interface ethernet 1/1 system-detail
show lldp neighbors interface ethernet 1/1 system-detail
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 lldp neighbors interface ethernet 1/1 system-detail",
"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 lldp neighbors interface ethernet 1/1 system-detail",
"msg": "Success",
"code": "200",
"body": {
"neigh_hdr": "neigh_hdr",
"neigh_count": "1",
"TABLE_nbor_sys_detail": {
"ROW_nbor_sys_detail": {
"sys_type": "Locally Assigned",
"sys_name": "Spine-0.PI-SEC-DT.com",
"l_port_id": "Eth1/1",
"chassis_type": "Mac Address",
"chassis_id": "88f0.31f9.a340",
"port_type": "Interface Name",
"port_id": "Ethernet1/41",
"ttl": "120",
"capability": "1310740",
"mgmt_addr_type": "",
"mgmt_addr": ""
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp neighbors interface ethernet 1/1 system-detail command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp neighbors system-detail
show lldp neighbors system-detail
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 lldp neighbors system-detail ",
"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)
{
"neigh_hdr": "neigh_hdr",
"TABLE_nbor_sys_detail": {
"ROW_nbor_sys_detail": [
{
"sys_type": "Locally Assigned",
"sys_name": "SIT2-TAHOE-EOR2",
"l_port_id": "Eth1/10",
"chassis_type": "Mac Address",
"chassis_id": "003a.7d8d.be9c",
"port_type": "Interface Name",
"port_id": "Ethernet4/10",
"ttl": "120",
"capability": "1310740",
"mgmt_addr_type": null,
"mgmt_addr": null
},
{
"sys_type": "Locally Assigned",
"sys_name": "SIT2-TAHOE-EOR2",
"l_port_id": "Eth1/11",
"chassis_type": "Mac Address",
"chassis_id": "006b.f1be.deb0",
"port_type": "Interface Name",
"port_id": "Ethernet2/11",
"ttl": "120",
"capability": "1310740",
"mgmt_addr_type": null,
"mgmt_addr": null
}
]
},
"neigh_count": "2"
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp neighbors system-detail command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp portid-subtype
show lldp portid-subtype
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 lldp portid-subtype ",
"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)
{
"portid_subtype": "0"
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp portid-subtype command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp timers
show lldp timers
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 lldp timers",
"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 lldp timers",
"msg": "Success",
"code": "200",
"body": {
"ttl": "120",
"reinit": "2",
"tx_interval": "30",
"tx_delay": "2",
"hold_mplier": "4",
"notification_interval": "5"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp timers command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp tlv-select
show lldp tlv-select
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 lldp tlv-select",
"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 lldp tlv-select",
"msg": "Success",
"code": "200",
"body": {
"management-address-v4": "management-address-v4",
"management-address-v6": "management-address-v6",
"port-description": "port-description",
"port-vlan": "port-vlan",
"power-management": "power-management",
"system-capabilities": "system-capabilities",
"system-description": "system-description",
"system-name": "system-name",
"dcbxp-cin-cee": "dcbxp",
"dcbxp-ets-cfg": "DCBX ETS Configuration TLV",
"dcbxp-ets-reco": "DCBX ETS Recommendation TLV",
"dcbxp-pfc-cfg": "DCBX PFC Configuration TLV",
"dcbxp-app-pri": "DCBX Application Priority TLV"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp tlv-select command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp traffic
show lldp traffic
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 lldp traffic",
"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 lldp traffic",
"msg": "Success",
"code": "200",
"body": {
"tx_cnt": "673",
"aged_cnt": "0",
"rx_cnt": "375",
"rx_err": "0",
"disc_cnt": "0",
"unrecognized_tlv": "0"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp traffic command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lldp traffic interface ethernet 1/1
show lldp traffic interface ethernet 1/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 lldp traffic interface ethernet 1/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 lldp traffic interface ethernet 1/1",
"msg": "Success",
"code": "200",
"body": {
"interface": "Ethernet1/1",
"tx_cnt": "50",
"aged_cnt": "0",
"rx_cnt": "46",
"rx_err": "0",
"disc_cnt": "0",
"unrecognized_tlv": "0"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lldp traffic interface ethernet 1/1 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|