CiscoTestAutomation / genieparser

sub-component of Genie that parse the device output into structured datastructure
Apache License 2.0
252 stars 387 forks source link

show lldp neighbors detail capitalizing neighboring interface name for Junos devices #287

Closed nniehoff closed 4 years ago

nniehoff commented 4 years ago

When using genie to parse the output of show lldp neighbors detail on a Cisco IOS XR device when the connected device is a Junos device, the Junos interface name is being capitalized:

{
    'interfaces': {
        'TenGigE0/0/0/28/0': {
            'port_id': {
                'Xe-0/1/2': {
                    'neighbors': {
                        'switch1': {
                            'capabilities': {
                                'bridge': {
                                    'enabled': True,
                                    'system': True
                                },
                                'router': {
                                    'enabled': True,
                                    'system': True
                                }
                            },
                            'chassis_id': '6464.9b31.3d00',
                            'hold_time': 120,
                            'neighbor_id': 'switch1',
                            'peer_mac': '64:64:9b:31:3d:35',
                            'port_description': 'port description',
                            'system_description': '',
                            'system_name': 'switch1',
                            'time_remaining': 111
                        }
                    }
                }
            }
        },
    }

In this case interface TenGigE0/0/0/28/0 is connected to interface xe-0/1/2 on "switch1" but the interface name being returned is Xe-0/1/2'. I believe this is from here. Here is the raw output of the command from the ios xr device:

#show lldp neighbors detail TenGigE0/0/0/28/0
Tue Oct  6 13:56:33.804 UTC
Capability codes:
        (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
        (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other

------------------------------------------------
Local Interface: TenGigE0/0/0/28/0
Chassis id: 6464.9b31.3d00
Port id: xe-0/1/2
Port Description: port description
System Name: switch1

System Description:
Juniper Networks, Inc. ex4200-48t , version 12.3R9.4 Build date: 2015-02-12 12:01:56 UTC

Time remaining: 108 seconds
Hold Time: 120 seconds
System Capabilities: B,R
Enabled Capabilities: B,R
Management Addresses - not advertised
Peer MAC Address: 64:64:9b:31:3d:35

Total entries displayed: 1

Please let me know if you need any additional information.

LenzDong commented 4 years ago

Hi,

Thanks for sharing the device output. The fix will be in the next release v20.10.

Thanks,

LenzDong commented 4 years ago

Hi,

We just released a beta package for this issue. Please upgrade the genie parser package by the following

pip install --upgrade --pre genie.libs.parser

Thanks,