Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

get_lldp_neighbors_detail() doesn't support displaying parent interface #2

Open
ggiesen opened this issue Jun 10, 2020 · 0 comments
Open

Comments

@ggiesen
Copy link
Owner

ggiesen commented Jun 10, 2020

parent_interface is hard-coded to be empty.

        lldp = {}
        for lldp_entry in show_lldp_remote_device_all:
            lldp[lldp_entry['interface']] = {}
            raw_show_lldp_remote_device_detail = self._send_command("show lldp remote-device detail " + lldp_entry['interface'])
            show_lldp_remote_device_detail = textfsm_extractor(
                self, "show_lldp_remote-device_detail", raw_show_lldp_remote_device_detail
            )
            print(raw_show_lldp_remote_device_detail)
            print(show_lldp_remote_device_detail)
**            parent_interface = ''**
            remote_chassis_id = lldp_entry['chassis_id']
            remote_system_name = show_lldp_remote_device_detail[0]['host_name']
            remote_port = show_lldp_remote_device_detail[0]['port_id']
            remote_port_description = show_lldp_remote_device_detail[0]['port_desc']
            remote_system_description = show_lldp_remote_device_detail[0]['sys_desc']
            if show_lldp_remote_device_detail[0]['sys_cap_sup']:
                remote_system_capab = show_lldp_remote_device_detail[0]['sys_cap_sup'].replace(" ", "").split(",")
            else:
                remote_system_capab = []
            if show_lldp_remote_device_detail[0]['sys_cap_oper']:
                remote_system_enable_capab = show_lldp_remote_device_detail[0]['sys_cap_oper'].replace(" ", "").split(",")
            else:
                remote_system_enable_capab = []

            lldp[lldp_entry['interface']] = {
                "parent_interface": parent_interface,
                "remote_chassis_id": remote_chassis_id,
                "remote_system_name": remote_system_name,
                "remote_port": remote_port,
                "remote_port_description": remote_port_description,
                "remote_system_description": remote_system_description,
                "remote_system_capab": remote_system_capab,
                "remote_system_enable_capab": remote_system_enable_capab,
            }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant