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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp all
Interface Information: Eth1/8 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/7 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/6 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/5 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/4 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/3 Enable (tx/rx/dcbx): Y/Y/Y
Interface Information: Eth1/2 Enable (tx/rx/dcbx): Y/Y/Y
Interface Information: Eth1/1 Enable (tx/rx/dcbx): Y/Y/Y
Interface Information: mgmt0 Enable (tx/rx/dcbx): Y/Y/Y
Interface Information: Eth1/16 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/15 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/14 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/13 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/12 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/11 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/10 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/9 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/24 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/23 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/22 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/21 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/20 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/19 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/18 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/17 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/32 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/31 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/30 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/29 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/28 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/27 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/26 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/25 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/40 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/39 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/38 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/37 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/36 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/35 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/34 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/33 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/48 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/47 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/46 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/45 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/44 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/43 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/42 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/41 Enable (tx/rx/dcbx): N/N/N
Interface Information: Eth1/54 Enable (tx/rx/dcbx): Y/Y/Y
Interface Information: Eth1/53 Enable (tx/rx/dcbx): Y/Y/Y
Interface Information: Eth1/52 Enable (tx/rx/dcbx): Y/Y/Y
Interface Information: Eth1/51 Enable (tx/rx/dcbx): Y/Y/Y
Interface Information: Eth1/50 Enable (tx/rx/dcbx): Y/Y/Y
Interface Information: Eth1/49 Enable (tx/rx/dcbx): Y/Y/Y









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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp dcbx interface ethernet 1/1
Protocol Versions:-  Configured: Auto-detect, Detected: CEE.

Local DCBXP CEE/CIN Control Information:
Operating version: 00  Max version: 00  Seq no: 1  Ack no: 0










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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp entry Spine-0.PI-SEC-DT.com
Capability codes:
  (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
  (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID            Local Intf      Hold-time  Capability  Port ID

Chassis id: 88f0.31f9.a340
Port id: Ethernet1/41
Local Port id: Eth1/1
Port Description: Ethernet1/41
System Name: Spine-0.PI-SEC-DT.com
System Description: Cisco Nexus Operating System (NX-OS) Software 9.2(1)
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.
Time remaining: 91 seconds
System Capabilities: B, R
Enabled Capabilities: B, R
Management Address: 10.77.143.43
Management Address IPV6: not advertised
Vlan ID: not advertised


Chassis id: 88f0.31f9.a341
Port id: Ethernet1/42
Local Port id: Eth1/2
Port Description: Ethernet1/42
System Name: Spine-0.PI-SEC-DT.com
System Description: Cisco Nexus Operating System (NX-OS) Software 9.2(1)
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.
Time remaining: 91 seconds
System Capabilities: B, R
Enabled Capabilities: B, R
Management Address: 10.77.143.43
Management Address IPV6: not advertised
Vlan ID: 1024


Chassis id: 88f0.31f9.a342
Port id: Ethernet1/43
Local Port id: Eth1/3
Port Description: Ethernet1/43
System Name: Spine-0.PI-SEC-DT.com
System Description: Cisco Nexus Operating System (NX-OS) Software 9.2(1)
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.
Time remaining: 91 seconds
System Capabilities: B, R
Enabled Capabilities: B, R
Management Address: 10.77.143.43
Management Address IPV6: not advertised
Vlan ID: 1025

Total entries displayed: 3
















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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp interface ethernet 1/1
Interface Information:
  Enable (tx/rx/dcbx): Y/Y/Y    Port Mac address: 64:f6:9d:ef:7a:88

Peer's LLDP TLVs:
Type Length Value
---- ------ -----
001  007    0488f031 f9a340
002  013    05457468 65726e65 74312f34 31
003  002    0078
004  012    45746865 726e6574 312f3431
005  021    5370696e 652d302e 50492d53 45432d44 542e636f 6d
006  156    43697363 6f204e65 78757320 4f706572 6174696e 67205379 7374656d
            20284e58 2d4f5329 20536f66 74776172 6520392e 32283129 0a544143
            20737570 706f7274 3a206874 74703a2f 2f777777 2e636973 636f2e63
            6f6d2f74 61630a43 6f707972 69676874 20286329 20323030 322d3230
            31382c20 43697363 6f205379 7374656d 732c2049 6e632e20 416c6c20
            72696768 74732072 65736572 7665642e
007  004    00140014
008  012    05010a4d 8f2b0205 00000000
127  005    00014201 01
009  014    070688f0 31f9a340 02050000 0000
000  000












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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp neighbors
Capability codes: (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other Device ID Local Intf Hold-time Capability Port ID
SIT2-TAHOE-EOR2 Eth1/10 120 BR Ethernet4/10
SIT2-TAHOE-EOR2 Eth1/11 120 BR Ethernet2/11
Total entries displayed: 2

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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp neighbors detail 

Capability codes:
  (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
  (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID            Local Intf      Hold-time  Capability  Port ID
Chassis id: 003a.7d8d.be9c Port id: Ethernet4/10 Local Port id: Eth1/10 Port Description: Ethernet4/10 System Name: SIT2-TAHOE-EOR2 System Description: Cisco Nexus Operating System (NX-OS) Software 7.0(3)I7(5) TAC support: http://www.cisco.com/tac Copyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved. Time remaining: 106 seconds System Capabilities: B, R Enabled Capabilities: B, R Management Address: 172.31.144.190 Management Address IPV6: not advertised Vlan ID: not advertised Chassis id: 006b.f1be.deb0 Port id: Ethernet2/11 Local Port id: Eth1/11 Port Description: Ethernet2/11 System Name: SIT2-TAHOE-EOR2 System Description: Cisco Nexus Operating System (NX-OS) Software 7.0(3)I7(5) TAC support: http://www.cisco.com/tac Copyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved. Time remaining: 106 seconds System Capabilities: B, R Enabled Capabilities: B, R Management Address: 172.31.144.190 Management Address IPV6: not advertised Vlan ID: 1 Total entries displayed: 2

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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp neighbors interface ethernet 1/1
Capability codes:
  (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
  (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID            Local Intf      Hold-time  Capability  Port ID
Spine-0.PI-SEC-DT.com
                     Eth1/1          120        BR          Ethernet1/41














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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp neighbors interface ethernet 1/1 detail
Capability codes:
  (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
  (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID            Local Intf      Hold-time  Capability  Port ID

Chassis id: 88f0.31f9.a340
Port id: Ethernet1/41
Local Port id: Eth1/1
Port Description: Ethernet1/41
System Name: Spine-0.PI-SEC-DT.com
System Description: Cisco Nexus Operating System (NX-OS) Software 9.2(1)
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.
Time remaining: 106 seconds
System Capabilities: B, R
Enabled Capabilities: B, R
Management Address: 10.77.143.43
Management Address IPV6: not advertised
Vlan ID: not advertised

Total entries displayed: 1















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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp neighbors interface ethernet 1/1 system-detail
Capability codes:
  (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable  Device
  (W) WLAN Access Point, (P) Repeater, (S) Station, (O)    Other
Device ID       Local Intf Chassis ID      PortID            Hold-time  Capability
Spine-0.PI-SEC-DT.com Eth1/1      88f0.31f9.a340 Ethernet1/41      120        BR
Total entries displayed: 1













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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp neighbors system-detail 

Capability codes:
  (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable  Device
  (W) WLAN Access Point, (P) Repeater, (S) Station, (O)    Other
Device ID       Local Intf Chassis ID      PortID            Hold-time  Capability
SIT2-TAHOE-EOR2  Eth1/10     003a.7d8d.be9c Ethernet4/10      120        BR
SIT2-TAHOE-EOR2 Eth1/11 006b.f1be.deb0 Ethernet2/11 120 BR
Total entries displayed: 2

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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp portid-subtype 

LLDP and MIB portid-subtype:

    PortId Subtype: 0

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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp timers
LLDP Timers:

    Holdtime in seconds: 120
    Reinit-time in seconds: 2
    Transmit interval in seconds: 30









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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp tlv-select
   management-address-v4
   management-address-v6
   port-description
   port-vlan
   power-management
   system-capabilities
   system-description
   system-name
   dcbxp
   DCBX ETS Configuration TLV
   DCBX ETS Recommendation TLV
   DCBX PFC Configuration TLV
   DCBX Application Priority TLV












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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp traffic
LLDP traffic statistics:

    Total frames transmitted: 669
    Total entries aged: 0
    Total frames received: 372
    Total frames received in error: 0
    Total frames discarded: 0
    Total unrecognized TLVs: 0











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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show lldp traffic interface ethernet 1/1
LLDP interface traffic statistics:

    Total frames transmitted: 49
    Total entries aged: 0
    Total frames received: 45
    Total frames received in error: 0
    Total frames discarded: 0
    Total unrecognized TLVs: 0