Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

get_lldp_neighbors() works but not get_lldp_neighbors_detail() #127

Closed
narJH27 opened this issue Jan 26, 2017 · 6 comments
Closed

get_lldp_neighbors() works but not get_lldp_neighbors_detail() #127

narJH27 opened this issue Jan 26, 2017 · 6 comments
Labels
Milestone

Comments

@narJH27
Copy link
Contributor

narJH27 commented Jan 26, 2017

Description of Issue/Question

I am using get_lldp_neighbors_detail() in my code to gather lldp stats from EOS devices. However, there are challenges in retrieving lldp detail info even though lldp has been enabled on the device and the output can be viewed using the cli command.

Setup

Simple. IP connectivity to the device is available and transport is set to https.

napalm-eos version

(Paste verbatim output from pip freeze | grep napalm-eos between quotes below)

napalm-eos==0.3.0

eOS version

(Paste verbatim output from show version | json between quotes below)
Cannot paste the entire show version output due to legality issues.

"version": "4.15.5FX-7500R"
and
"version": "4.17.3F"

Steps to Reproduce the Issue

Error Traceback

(Paste the complete traceback of the exception between quotes below)

dev.get_lldp_neighbors_detail()

/Library/Python/2.7/site-packages/napalm_eos/eos.pyc in get_lldp_neighbors_detail(self, interface)
    523                         'remote_system_description'     : neighbor.get('systemDescription', u''),
    524                         'remote_chassis_id'             : neighbor.get('chassisId', u''),
--> 525                         'remote_system_capab'           : unicode(', '.join(capabilities)),
    526                         'remote_system_enable_capab'   : unicode(', '.join([capability for capability in capabilities.keys() if capabilities[capability]]))
    527                     }

TypeError: can only join an iterable
@mirceaulinic mirceaulinic added this to the 0.5.3 milestone Jan 26, 2017
@mirceaulinic
Copy link
Member

Hi @narJH27: how does the output look like? Can you please to see what's structurally different?
Thanks!

@narJH27
Copy link
Contributor Author

narJH27 commented Jan 26, 2017

@mirceaulinic you mean the CLI output ?

@mirceaulinic
Copy link
Member

Yes: show lldp neighbors detail | json

@narJH27
Copy link
Contributor Author

narJH27 commented Jan 26, 2017

@mirceaulinic See below ...

The below output is for an interface that has no neighbor attached.

    {
    "lldpNeighbors": {
        "EthernetYY/YY": {
            "lldpNeighborInfo": []
        }
      }
    }

The below output is for an interface that has a neighbor:

{
    "lldpNeighbors": {
        "EthernetYY/YY": {
            "lldpNeighborInfo": [
                {
                    "lastContactTime": xyz, 
                    "chassisId": "<mac_addr>", 
                    "managementAddresses": [], 
                    "lastChangeTime": abcd, 
                    "systemDescription": "<string output>", 
                    "ttl": <ttl>, 
                    "neighborDiscoveryTime": defg, 
                    "neighborInterfaceInfo": {
                        "portAndProtocolVlanEnabled": {}, 
                        "interfaceId": <str>, 
                        "autoNegAdvertisedCapabilities": [], 
                        "vlanNames": {}, 
                        "interfaceIdType": "interfaceName", 
                        "unknownTlvs": [], 
                        "unknownOrgDefinedTlvs": [], 
                        "protocolIdentityInfo": [], 
                        "portAndProtocolVlanSupported": {}
                    }, 
                    "chassisIdType": "<str>"
                }
            ]
        }
     } 

@mirceaulinic mirceaulinic modified the milestones: APPROVED, 0.5.3 Feb 7, 2017
@colinmcintosh
Copy link

colinmcintosh commented Feb 8, 2017

We're encountering this when remote systems don't send the LLDP systemCapabilities TLV (which isn't required by LLDP) but NAPALM expects it to always be there. This PR fixed it for us: #137

@mirceaulinic mirceaulinic modified the milestones: 0.5.5, APPROVED Feb 8, 2017
@mirceaulinic
Copy link
Member

Closed via 492f65b

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants