Open alphabet5 opened 3 years ago
Note: Please check https://guides.github.com/features/mastering-markdown/ to see how to properly format your request.
(Place an x between the square brackets where applicable)
x
{ "uptime": 1212540, "vendor": "Cisco", "os_version": "IE4000 Software (IE4000-UNIVERSALK9-M), Version 15.2(4)EA9, RELEASE SOFTWARE (fc2)", "serial_number": "REMOVED", "model": "IE-4000-4TC4G-E", "hostname": "Switch", "fqdn": "Switch", "interface_list": [ "Vlan1", "GigabitEthernet1/1", "GigabitEthernet1/2", "GigabitEthernet1/3", "GigabitEthernet1/4", "FastEthernet1/5", "FastEthernet1/6", "FastEthernet1/7", "FastEthernet1/8" ] }
(Paste verbatim output from pip freeze | grep napalm between quotes below)
pip freeze | grep napalm
napalm==3.2.0
(Paste verbatim output from show version - or equivalent - between quotes below)
show version
IE4000 Software (IE4000-UNIVERSALK9-M), Version 15.2(4)EA9, RELEASE SOFTWARE (fc2)
Looking at sh vlan br from the switch
Switch#sh vlan br VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Gi1/3, Gi1/4 10 PLC CONTROL NETWORK active Fa1/6, Fa1/7 14 OTHER IO NETWORK active Gi1/2, Fa1/5, Fa1/8 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup
Looking at device.get_vlans()
{ "1": { "name": "default", "interfaces": [ "GigabitEthernet1/1", "GigabitEthernet1/3", "GigabitEthernet1/4" ] }, "10": { "name": "PLC", "interfaces": [] }, "14": { "name": "OTHER", "interfaces": [] }, "1002": { "name": "fddi-default", "interfaces": [ "GigabitEthernet1/1" ] }, "1003": { "name": "token-ring-default", "interfaces": [ "GigabitEthernet1/1" ] }, "1004": { "name": "fddinet-default", "interfaces": [ "GigabitEthernet1/1" ] }, "1005": { "name": "trnet-default", "interfaces": [ "GigabitEthernet1/1" ] } }
I've traced it down to the regex on line ~3589 of _get_vlans_by_id in napalm/napalm/ios/ios.py, which doesn't support spaces in the vlan names.
_get_vlans_by_id
interface_regex = r"{}\s+{}\s+\S+\s+([A-Z][a-z].*)$".format( vlan_id, vlan_name )
(Paste the complete traceback of the exception between quotes below)
N/A
@alphabet5 Can you check the latest napalm version , if this works for you ? I have fixed it in https://github.com/napalm-automation/napalm/pull/2010
Description of Issue/Question
Note: Please check https://guides.github.com/features/mastering-markdown/ to see how to properly format your request.
Did you follow the steps from https://github.com/napalm-automation/napalm#faq
(Place an
x
between the square brackets where applicable)Setup
napalm version
(Paste verbatim output from
pip freeze | grep napalm
between quotes below)Network operating system version
(Paste verbatim output from
show version
- or equivalent - between quotes below)Steps to Reproduce the Issue
Looking at sh vlan br from the switch
Looking at device.get_vlans()
I've traced it down to the regex on line ~3589 of
_get_vlans_by_id
in napalm/napalm/ios/ios.py, which doesn't support spaces in the vlan names.Error Traceback
(Paste the complete traceback of the exception between quotes below)