Closed ktbyers closed 7 years ago
@mirceaulinic @dbarrosop One of you should probably review this for merge into develop
branch.
I don't have nxos devices so I can't test myself but I will take a general look to the code.
Awesome job :D
@dbarrosop I have a device to test on...if you want to do any testing. Just ping me on slack and I can get you access credentials...of course, fine too just review the code also.
Issues with get_interfaces() on N5548 7.0.8.N1.1.bin. Switch has several FEXes and Ethernet interfaces.
switch# show ver
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html
Copyright (c) 2002-2016, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained herein are owned by
other third parties and are used and distributed under license.
Some parts of this software are covered under the GNU Public
License. A copy of the license is available at
http://www.gnu.org/licenses/gpl.html.
Software
BIOS: version 3.6.0
loader: version N/A
kickstart: version 7.0(8)N1(1)
system: version 7.0(8)N1(1)
Power Sequencer Firmware:
Module 1: version v2.0
Module 3: version v2.0
Microcontroller Firmware: version v1.2.0.1
SFP uC: Module 1: v1.0.0.0
QSFP uC: Module not detected
BIOS compile time: 05/09/2012
kickstart image file is: bootflash:///n5000-uk9-kickstart.7.0.8.N1.1.bin
kickstart compile time: 2/20/2016 21:00:00 [02/21/2016 00:32:37]
system image file is: bootflash:///n5000-uk9.7.0.8.N1.1.bin
system compile time: 2/20/2016 21:00:00 [02/21/2016 03:04:42]
Hardware
cisco Nexus5548 Chassis ("O2 32X10GE/Modular Universal Platform Supervisor")
Intel(R) Xeon(R) CPU with 8253860 kB of memory.
Processor Board ID FOC162616HS
Device name: switch
bootflash: 2007040 kB
Kernel uptime is 495 day(s), 14 hour(s), 16 minute(s), 14 second(s)
Last reset at 914360 usecs after Sat Sep 22 17:54:23 2012
Reason: Reset Requested by CLI command reload
System version: 5.2(1)N1(7)
Service:
plugin
Core Plugin, Ethernet Plugin
In [1]: from napalm_nxos_ssh import NXOSSSHDriver
In [2]: from getpass import getpass
In [3]: d = NXOSSSHDriver("switch", "bewing", getpass())
Password:
In [4]: d.open()
In [5]: d.get_interfaces()
Out[5]:
{'Vlan1': {'description': '',
'is_enabled': False,
'is_up': False,
'last_flapped': -1.0,
'mac_address': '',
'speed': 1000},
'Vlan445': {'description': 'fridays:mgmt:',
'is_enabled': True,
'is_up': True,
'last_flapped': -1.0,
'mac_address': '10:BD:18:91:4C:82',
'speed': 1000}}
Issue appears to be here: https://github.com/napalm-automation/napalm-nxos/blob/nxos_ssh/napalm_nxos_ssh/nxos_ssh.py#L838
My version doesn't have line proto on Ethernet devices. Sample up and down interface:
Ethernet154/1/46 is down (Link not connected)
Hardware: 10/100/1000 Ethernet, address: 0cd9.9608.0d6f (bia 0cd9.9608.0d6f)
MTU 1500 bytes, BW 23 Kbit, DLY 10 usec
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA
Port mode is access
auto-duplex, auto-speed
Beacon is turned off
Input flow-control is off, output flow-control is on
Switchport monitor is off
EtherType is 0x8100
Last link flapped 5week(s) 6day(s)
Last clearing of "show interface" counters never
12 interface resets
30 seconds input rate 0 bits/sec, 0 packets/sec
30 seconds output rate 0 bits/sec, 0 packets/sec
Load-Interval #2: 5 minute (300 seconds)
input rate 0 bps, 0 pps; output rate 0 bps, 0 pps
RX
104751065 unicast packets 856963 multicast packets 501 broadcast packets
105608529 input packets 73128915048 bytes
0 jumbo packets 0 storm suppression bytes
0 runts 0 giants 0 CRC 0 no buffer
0 input error 0 short frame 0 overrun 0 underrun 0 ignored
0 watchdog 0 bad etype drop 0 bad proto drop 0 if down drop
0 input with dribble 0 input discard
0 Rx pause
TX
58291689 unicast packets 32237862 multicast packets 14956712 broadcast packets
105486263 output packets 18381839734 bytes
0 jumbo packets
0 output error 0 collision 0 deferred 0 late collision
0 lost carrier 0 no carrier 0 babble 0 output discard
0 Tx pause
Ethernet154/1/48 is up
Hardware: 10/100/1000 Ethernet, address: 0cd9.9608.0d71 (bia 0cd9.9608.0d71)
MTU 1500 bytes, BW 100000 Kbit, DLY 10 usec
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA
Port mode is access
full-duplex, 100 Mb/s
Beacon is turned off
Input flow-control is off, output flow-control is on
Switchport monitor is off
EtherType is 0x8100
Last link flapped 11week(s) 1day(s)
Last clearing of "show interface" counters never
16 interface resets
30 seconds input rate 0 bits/sec, 0 packets/sec
30 seconds output rate 176 bits/sec, 0 packets/sec
Load-Interval #2: 5 minute (300 seconds)
input rate 336 bps, 0 pps; output rate 480 bps, 0 pps
RX
14005040 unicast packets 299329 multicast packets 160 broadcast packets
14304529 input packets 1462644820 bytes
0 jumbo packets 0 storm suppression bytes
0 runts 0 giants 0 CRC 0 no buffer
0 input error 0 short frame 0 overrun 0 underrun 0 ignored
0 watchdog 0 bad etype drop 0 bad proto drop 0 if down drop
0 input with dribble 0 input discard
0 Rx pause
TX
14095466 unicast packets 15783914 multicast packets 16578099 broadcast packets
46457479 output packets 5193557611 bytes
0 jumbo packets
0 output error 0 collision 0 deferred 0 late collision
0 lost carrier 0 no carrier 0 babble 0 output discard
0 Tx pause
Ethernet154/1/46 is down (Administratively down)
Hardware: 10/100/1000 Ethernet, address: 0cd9.9608.0d6f (bia 0cd9.9608.0d6f)
MTU 1500 bytes, BW 23 Kbit, DLY 10 usec
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA
Port mode is access
auto-duplex, auto-speed
Beacon is turned off
Input flow-control is off, output flow-control is on
Switchport monitor is off
EtherType is 0x8100
Last link flapped 5week(s) 6day(s)
Last clearing of "show interface" counters never
12 interface resets
30 seconds input rate 0 bits/sec, 0 packets/sec
30 seconds output rate 0 bits/sec, 0 packets/sec
Load-Interval #2: 5 minute (300 seconds)
input rate 0 bps, 0 pps; output rate 0 bps, 0 pps
RX
104751065 unicast packets 856963 multicast packets 501 broadcast packets
105608529 input packets 73128915048 bytes
0 jumbo packets 0 storm suppression bytes
0 runts 0 giants 0 CRC 0 no buffer
0 input error 0 short frame 0 overrun 0 underrun 0 ignored
0 watchdog 0 bad etype drop 0 bad proto drop 0 if down drop
0 input with dribble 0 input discard
0 Rx pause
TX
58291689 unicast packets 32237862 multicast packets 14956712 broadcast packets
105486263 output packets 18381839734 bytes
0 jumbo packets
0 output error 0 collision 0 deferred 0 late collision
0 lost carrier 0 no carrier 0 babble 0 output discard
0 Tx pause
Testfsm issues hopefully fixed.
Still need to fix:
get_interfaces issue should be fixed.
Still missing traceroute by name issue
Traceroute by DNS name also fixed.
@bewing Okay, I think the items you brought up in the review are now fixed. Please verify.
This is a terrific job! Awesome all parties involved. We should probably merge it soon and have it in "beta" for more people to test.
@dbarrosop Let's give @bewing a couple of more days to comment, but I think we should try to merge release in the next week roughly.
In other words, I think we will get more valuable data by having it out in use and I think we have done a reasonable job on testing it.
Coverage remained the same at 68.821% when pulling ff02dd95f38dc7f6d5866010ec7870ab9043a63f on nxos_ssh into 83b612b86179ce0bb89cc1f76aed4b63e39728f0 on develop.