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

update nxos show interface for vlan #140

Merged
merged 1 commit into from
Jul 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions templates/cisco_nxos_show_interface.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Value Required INTERFACE (\S+)
Value LINK_STATUS (\w+)
Value ADMIN_STATE (\S+)
Value LINK_STATUS (.+?)
Value ADMIN_STATE (.+?)
Value HARDWARE_TYPE (.*)
Value ADDRESS ([a-zA-Z0-9]+.[a-zA-Z0-9]+.[a-zA-Z0-9]+)
Value BIA ([a-zA-Z0-9]+.[a-zA-Z0-9]+.[a-zA-Z0-9]+)
Expand All @@ -14,13 +14,13 @@ Value DELAY (\d+\s+\w+)
Value ENCAPSULATION (\w+)

Start
^${INTERFACE}\s+is\s+${LINK_STATUS}
^${INTERFACE}\s+is\s+${LINK_STATUS},\sline\sprotocol\sis\s${ADMIN_STATE}$$
^${INTERFACE}\s+is\s+${LINK_STATUS}$$
^admin\s+state\s+is\s+${ADMIN_STATE},
^\s+Hardware(:|\s+is)\s+${HARDWARE_TYPE},\s+address(:|\s+is)\s+${ADDRESS}(.*bia\s+${BIA})*
^\s+Description:\s+${DESCRIPTION}
^\s+Internet\s+Address\s+is\s+${IP_ADDRESS}
^\s+${DUPLEX}, ${SPEED}(,|$$)
^\s+MTU\s+${MTU}.*BW\s+${BANDWIDTH}.*DLY\s+${DELAY}
^\s+Encapsulation\s+${ENCAPSULATION}
^\s+Last -> Record
^\s+Rx -> Record
^\s*$$ -> Record
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
parsed_sample:

- address: 5087.89a1.d8d5
admin_state: ''
admin_state: down
bandwidth: 1000000 Kbit
bia: ''
delay: 10 usec
Expand All @@ -12,7 +12,7 @@ parsed_sample:
hardware_type: EtherSVI
interface: Vlan20
ip_address: 10.1.20.3/24
link_status: down
link_status: down (VLAN/BD is down)
mtu: '1500'
speed: ''
- address: 5087.89a1.d8ce
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
parsed_sample:

- address: 00de.fb01.c9bc
admin_state: down
bandwidth: 1000000 Kbit
bia: ''
delay: 10 usec
description: ''
duplex: ''
encapsulation: ''
hardware_type: EtherSVI
interface: Vlan1
ip_address: ''
link_status: down (Administratively down)
mtu: '1500'
speed: ''
- address: 00de.fb01.c921
admin_state: up
bandwidth: 1000000 Kbit
bia: ''
delay: 10 usec
description: ''
duplex: ''
encapsulation: ''
hardware_type: EtherSVI
interface: Vlan330
ip_address: 192.168.1.3/24
link_status: up
mtu: '1500'
speed: ''
- address: 00de.fb01.c933
admin_state: up
bandwidth: 1000000 Kbit
bia: ''
delay: 10 usec
description: ''
duplex: ''
encapsulation: ''
hardware_type: EtherSVI
interface: Vlan336
ip_address: 192.168.2.3/24
link_status: up
mtu: '1500'
speed: ''
- address: 00de.fb01.c9ab
admin_state: up
bandwidth: 1000000 Kbit
bia: ''
delay: 10 usec
description: ''
duplex: ''
encapsulation: ''
hardware_type: EtherSVI
interface: Vlan339
ip_address: 192.168.3.3/24
link_status: up
mtu: '1500'
speed: ''
- address: 00de.fb01.c9ef
admin_state: up
bandwidth: 1000000 Kbit
bia: ''
delay: 10 usec
description: ''
duplex: ''
encapsulation: ''
hardware_type: EtherSVI
interface: Vlan300
ip_address: 192.168.24.1/24
link_status: up
mtu: '1500'
speed: ''
- address: 0000.d200.0000
admin_state: ''
bandwidth: 23 Kbit
bia: 0000.d200.0000
delay: 10 usec
description: ''
duplex: auto-duplex
encapsulation: ARPA
hardware_type: 10/100/1000 Ethernet
interface: Ethernet106/1/1
ip_address: ''
link_status: down (Link not connected)
mtu: '1500'
speed: auto-speed
58 changes: 58 additions & 0 deletions tests/cisco_nxos/show_interface/cisco_nxos_show_interface2.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Vlan1 is down (Administratively down), line protocol is down
Hardware is EtherSVI, address is 00de.fb01.c9bc
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec

Vlan330 is up, line protocol is up
Hardware is EtherSVI, address is 00de.fb01.c921
Internet Address is 192.168.1.3/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec

Vlan336 is up, line protocol is up
Hardware is EtherSVI, address is 00de.fb01.c933
Internet Address is 192.168.2.3/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec

Vlan339 is up, line protocol is up
Hardware is EtherSVI, address is 00de.fb01.c9ab
Internet Address is 192.168.3.3/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec

Vlan300 is up, line protocol is up
Hardware is EtherSVI, address is 00de.fb01.c9ef
Internet Address is 192.168.24.1/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec

Ethernet106/1/1 is down (Link not connected)
Hardware: 10/100/1000 Ethernet, address: 0000.d200.0000 (bia 0000.d200.0000)
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 14week(s) 5day(s)
Last clearing of "show interface" counters never
9 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
18476 unicast packets 506094 multicast packets 362760 broadcast packets
887330 input packets 70500074 bytes
2 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
17841 unicast packets 5660600 multicast packets 339717 broadcast packets
6018158 output packets 711823811 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