napalm-automation-community / napalm-ftos

NAPALM Driver for Dell/Force10 FTOS
Apache License 2.0
9 stars 7 forks source link

What version of ftos is currently supported? #2

Closed johnhenriksson closed 5 years ago

johnhenriksson commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

wrgeorge1983 commented 5 years ago

I'll give it a shot tonight, thanks!

On Mon, Jun 3, 2019, 2:42 AM Reinier Schoof notifications@github.com wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/napalm-automation-community/napalm-ftos/issues/2?email_source=notifications&email_token=ACTX7ZPWHW2YU5M7KL2E5XDPYTDOTA5CNFSM4HCRPITKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWYSHTI#issuecomment-498148301, or mute the thread https://github.com/notifications/unsubscribe-auth/ACTX7ZPMASZBAQI7MAWPO5LPYTDOTANCNFSM4HCRPITA .

wrgeorge1983 commented 5 years ago

Yep, it worked!