Cisco Nexus 9000 Series NX-API CLI, Release 9.3(x)
Latest
- Cisco Nexus 9000 Series NX-API CLI Reference, Release 9.3x
- About NX-API CLI
- New and Changed
- AAA Commands
- Accounting Commands
- Banner Commands
- Bash Shell Commands
- BGP Commands
- Boot Commands
- Callhome Commands
- CDP Commands
- CFS Commands
- Checkpoint Commands
- CLI Commands
- Clock Commands
- Config-Replace Commands
- Diagnostic Commands
- Dot1Q Commands
- Dot1X Commands
- Environment Commands
- Event Manager Commands
- FHRP Commands
- FIPS Commands
- Host Commands
- HSRP Commands
- Install Commands
- Interface Commands
- IP Commands
- IPv6 Commands
- ISIS Commands
- Key Commands
- L2 Protocol Commands
- LACP Commands
- Line Commands
- LLDP Commands
- show lldp all
- show lldp dcbx interface ethernet 1/1
- show lldp entry Spine-0.PI-SEC-DT.com
- show lldp interface ethernet 1/1
- show lldp neighbors
- show lldp neighbors detail
- show lldp neighbors interface ethernet 1/1
- show lldp neighbors interface ethernet 1/1 detail
- show lldp neighbors interface ethernet 1/1 system-detail
- show lldp neighbors system-detail
- show lldp portid-subtype
- show lldp timers
- show lldp tlv-select
- show lldp traffic
- show lldp traffic interface ethernet 1/1
- Logging Commands
- MAC-Address Commands
- Maintenance Commands
- Module Commands
- NAT Commands
- NTP Commands
- NVE Commands
- NXAPI Commands
- OSPF Commands
- Password Commands
- Port-Channel Commands
- Port-Profile Commands
- Port-Security Commands
- Process Commands
- RADIUS Commands
- Redundancy Commands
- RMON Commands
- Role Commands
- Rollback Commands
- Route Map Commands
- Snapshot Commands
- SNMP Commands
- Socket Commands
- Spanning-Tree Commands
- SSH Commands
- Switchname Commands
- Switch-Profile Commands
- System Commands
- TACACS Commands
- Telnet Commands
- Terminal Commands
- Track Commands
- User Account Commands
- User Passphrase Commands
- Users Commands
- Version Commands
- VLAN Commands
- vPC Commands
- VRRPv3 Commands
- VRRS Commands
show lldp all
Python
Copy
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"
}
]
}
}
}
}
}
}