napalm-automation-community / napalm-dellos10

NAPALM Driver for Dell EMC OS10 Enterprise
http://dellos10-napalm.readthedocs.io/en/latest/
Apache License 2.0
10 stars 11 forks source link

Management interface no listed by get_facts/get_interfaces/get_interfaces_ip methods #7

Closed lboue closed 6 years ago

lboue commented 6 years ago

Hello,

The last 'napalm-dellos10' version doesn't report some interfaces type in the interface list table because the 'show interface status' doesn't report it. This is the case for:

OS10# show interface 
  ethernet      Ethernet interface number
  loopback      Loopback interface number
  mgmt          Management interface number
  null          Null interface number
  phy-eth       Ethernet IEEE 802.3
  port-channel  Port-channel number
  status        Show interface status
  vlan          VLAN ID number
OS10# show interface | grep "line protocol"
Ethernet 1/1/1 is up, line protocol is up
Ethernet 1/1/2 is up, line protocol is up
...
Ethernet 1/1/50 is down, line protocol is down
Ethernet 1/1/51 is down, line protocol is down
Ethernet 1/1/52 is down, line protocol is down
Ethernet 1/1/53 is up, line protocol is up
Ethernet 1/1/54 is up, line protocol is up
Management 1/1/1 is up, line protocol is up
Vlan 1 is up, line protocol is down
Port-channel 1 is up, line protocol is up
Port-channel 2 is up, line protocol is up
Port-channel 3 is up, line protocol is up
Port-channel 4 is up, line protocol is up
Port-channel 5 is up, line protocol is up
Port-channel 46 is up, line protocol is down
Port-channel 47 is up, line protocol is down
Port-channel 48 is up, line protocol is down
NULL is up, line protocol is up

This is because of the following command in the code: output = self._send_command('show interface status | display-xml')

So if I change the command to test if againt the management interface, it is reported by the get_interfaces NAPALM method: output = self._send_command('show interface mgmt | display-xml')

Result:

$ python napalm-dellos10-get_interfaces.py
collecting from device 10.0.0.1
{   u'mgmt1/1/1': {   'description': u'',
                      'is_enabled': True,
                      'is_up': True,
                      'last_flapped': -1.0,
                      'mac_address': u'N/A',
                      'speed': -1}} 

Could you add a second loop in the following methods?

Regards, Ludovic

skg-net commented 6 years ago

https://github.com/napalm-automation-community/napalm-dellos10/pull/15 @lboue please verify.

lboue commented 6 years ago

Thanks, I will test 1.0.6 version ASAP.