I'm working on a script to call the API to get output similar to the CLI command "show lldp neighbor-info". I'd like to get a table similar to the cli output. It appears the API only allows a
per interface call? Is this correct? I'd have to loop through all the interfaces, making multiple calls? I'm looking for a single call with the whole table output.
I'm looking for this:
LOCAL-PORT CHASSIS-ID PORT-ID PORT-DESC TTL SYS-NAME
-----------------------------------------------------------------------------------------------------------
1/3/1 d0:d3:e0:c1:62:e6 d0:d3:e0:c1:62:e6 eth0 120 SEAP11-1-1
1/3/2 d0:d3:e0:c1:61:c6 d0:d3:e0:c1:61:c6 eth0 120 SEAP11-1-2
1/3/3 d0:d3:e0:c1:62:b4 d0:d3:e0:c1:62:b4 eth0 120 SEAP11-1-3
1/3/4 d0:d3:e0:c1:62:2a d0:d3:e0:c1:62:2a eth0 120 SEAP11-1-4
I'm getting this, for one port only. Changing interface to 1/3/1-1/3/4 doesn't work.
/rest/v10.04/system/interfaces/1%2F3%2F1/lldp_neighbors?attributes=neighbor_info&depth=2
{
"d0:d3:e0:c1:62:e6,d0:d3:e0:c1:62:e6": {
"neighbor_info": {
"chassis_capability_available": "Bridge, WLAN",
"chassis_capability_enabled": "WLAN",
"chassis_description": "ArubaOS (MODEL: 535), Version Aruba IAP",
"chassis_id_len": "6",
"chassis_id_subtype": "link_local_addr",
"chassis_index": "36",
"chassis_name": "SEAP11-1-1",
"chassis_protocol": "LLDP",
"chassis_refcount": "1",
"chassis_ttl": "120",
"eee_wake_time_fallback": 0,
"eee_wake_time_rx": 0,
"eee_wake_time_rx_echo": 0,
"eee_wake_time_tx": 0,
"eee_wake_time_tx_echo": 0,
"macphy_autoneg_advertised": "1000 BASE_TFD, 100 BASE_TXFD, Other",
"macphy_autoneg_enabled": "1",
"macphy_autoneg_support": "1",
"macphy_mau_type": " ",
"mgmt_iface_list": "16",
"mgmt_iface_oid_list": "0",
"mgmt_iface_sybtype_list": "2",
"mgmt_ip_list": "10.130.116.69",
"port_description": "eth0",
"port_hidden_in": "0",
"port_hidden_out": "0",
"port_id_len": "6",
"port_id_subtype": "link_local_addr",
"port_lastchange": "61a58710",
"port_lastupdate": "61acbd47",
"port_mfs": "0",
"port_protocol": "LLDP",
"power_allocated": 0,
"power_allocated_pair_a": 0,
"power_allocated_pair_b": 0,
"power_requested": 0,
"power_requested_pair_a": 0,
"power_requested_pair_b": 0,
"power_supported": 0,
"remote_index": 1
}
}
}
------------------------------
Brannen Taylor
------------------------------