API - LLDP / CDP - Is not providing enough information

Ludwig
Comes here often

API - LLDP / CDP - Is not providing enough information

Hello,

 

i want to see what kind of system / unit is connected by using LLDP.

When i see the example from the API docs (https://developer.cisco.com/meraki/api-v1/#!get-device-lldp-cdp)

it specifies the expected response as example:

"lldp": { "systemName": "Meraki MS350-24X - Phineas", "portId": "11", "managementAddress": "00:11:22:33:44:55", "sourcePort": "12"

 

But!

 

When i actually use the call I do not only lack the information of remote vendor. The address i receive is not a MAC but an IP address.

API call:

response = dashboard.devices.getDeviceLldpCdp(serial)
print(response["ports"]["42"])

Response:

{'lldp': {'sourcePort': '42', 'systemName': 'GS1900', 'managementAddress': '10.72.16.138', 'portId': '23'},

 

So i would like to get additional information from the API call.

Preferably information from the LLDP protocol: (System Description) and (Chassis ID)

Then we can get information about what system is running and if the device fail to provide we can make a MAC lookup from the MAC address delivired by Chassis ID.

 

 

*Edit:
Example of a Juniper device connected which the Dashboard recognizes and lets you see all the "Raw LLDP Data" including MAC adress and system name.

 

 

response = dashboard.devices.getDeviceLldpCdp(serial)
print(response["ports"]["34"])

{'lldp': {'sourcePort': '34', 'systemName': 'XXX-SW11', 'portId': '596'}}

3 Replies 3
Ludwig
Comes here often

Snippet from the Dashboard information.

Ludwig_0-1602146245816.png

 

The API documentation examples and real world return values often don't agree as you noted.  I encountered that also with the LLDPCDP call.  That's why I love the interactive documentation so I can try it and see what the data really looks like before I start writing code to process the return values.  Additionally, the API data does not always match the Dashboard.

 

Take care,

Larry 

Absolutely that might be common for the documentation to be faulty.

I made a wish earlier and made this post with hope for Devs to pick up on it and possibly modify the API call return information.

So in the end we can use it for more practical uses.

Get notified when there are additional replies to this discussion.