Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What version of ftos is currently supported? #2

Closed
johnhenriksson opened this issue Mar 31, 2019 · 6 comments
Closed

What version of ftos is currently supported? #2

johnhenriksson opened this issue Mar 31, 2019 · 6 comments

Comments

@johnhenriksson
Copy link

johnhenriksson commented Mar 31, 2019

What version is supported?

We're currently running Version 9.10(0.1P15) and all I can do is the get_config..

When I try to do get_facts I get an error of failed to detect EUI version: ''

I'm running:

napalm==2.4.0
napalm-ftos==0.1.1

I also run netbox and try to get the integration working..

print(device.get_facts())
Traceback (most recent call last):
File "", line 1, in
File "/home/netbox/.local/lib/python3.6/site-packages/napalm_ftos/ftos.py", line 261, in get_facts
facts['interface_list'] = sorted(self.get_interfaces().keys())
File "/home/netbox/.local/lib/python3.6/site-packages/napalm_ftos/ftos.py", line 372, in get_interfaces
'mac_address': mac(entry['mac_address']),
File "/home/netbox/.local/lib/python3.6/site-packages/napalm/base/helpers.py", line 241, in mac
return py23_compat.text_type(EUI(raw, dialect=_MACFormat))
File "/home/netbox/.local/lib/python3.6/site-packages/netaddr/eui/init.py", line 387, in init
self.value = addr
File "/home/netbox/.local/lib/python3.6/site-packages/netaddr/eui/init.py", line 437, in _set_value
% value)
netaddr.core.AddrFormatError: failed to detect EUI version: ''

@skoef
Copy link
Collaborator

skoef commented Apr 1, 2019

So it seems like the output of show interfaces results in an interface with a MAC address that is not parseable by napalm's mac helper function. In order to fix this, having the output of your device's show interfaces would really help. If you don't want to share this publicly (preferably in a gist) you could send this output to reinier@skoef.nl. I'll investigate and try to fix/work around this issue.

@wrgeorge1983
Copy link

wrgeorge1983 commented May 29, 2019

I'm getting the same error, so I can chime in with what I think is going on:

The MAC address format in the show interfaces output is standard ':' separated bytes... but FTOS includes a bunch of non-existent Management Interfaces.

For instance this switch has one actual management interface (ManagementInterface 0/0), but it also has entries for non-existent interfaces up to Management 11/0 that give output like this:

LAB_101#show interfaces Managementethernet 1/0
ManagementEthernet 1/0 is up, line protocol is not present
Hardware is DellEth, address is not set
Interface index is 14680065
Internet address is not set
Mode of IPv4 Address Assignment : NONE
DHCP Client-ID :0001e88bf9a3
MTU 1554 bytes, IP MTU 1500 bytes
LineSpeed auto, Mode full duplex
ARP type: ARPA, ARP Timeout 04:00:00
Queueing strategy: fifo
Time since last interface status change: 05:18:35

I don't know what the right default value should be for a non-existent MAC, but probably this can be solved with something like:

iface = { ... }  # don't init 'mac_address' at all here

try:
    iface['mac_address'] = mac(entry['mac_address'])
except netaddr.core.AddrFormatError:
    this_mac = None  # or False, or '', or whatever the rest of NAPALM would expect, 
                                 # or just pass here if that's better

@skoef
Copy link
Collaborator

skoef commented May 30, 2019

Thanks @wrgeorge1983, that snippet of output really helps! I’ll add that to one of the testcases and fix the problem accordingly. Perhaps @johnhenriksson can confirm he has similar output on his equipment?

@skoef
Copy link
Collaborator

skoef commented Jun 3, 2019

@wrgeorge1983 if you could confirm your problem is solved with this patch, I'll proceed to merge and release it.

@wrgeorge1983
Copy link

wrgeorge1983 commented Jun 3, 2019 via email

@wrgeorge1983
Copy link

Yep, it worked!

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

No branches or pull requests

3 participants