Skip to content

Commit 9953d4f

Browse files
authored
Fix NXOS 7.x and support VFC interfaces (#2180)
1 parent 5ab8e4b commit 9953d4f

File tree

3 files changed

+149
-5
lines changed

3 files changed

+149
-5
lines changed

ntc_templates/templates/cisco_nxos_show_interface.textfsm

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Start
6363
^admin\s+state\s+is\s+${ADMIN_STATE}
6464
^\s+Hardware(:|\s+is)\s+${HARDWARE_TYPE},\s+address(:|\s+is)\s+${MAC_ADDRESS}(.*bia\s+${BIA})*
6565
^\s+Hardware(:|\s+is)\s+${HARDWARE_TYPE}
66-
^\s+Description:\s+${DESCRIPTION}\s*$$
66+
^\s+(Port\s+)?[Dd]escription(:|\s+is)\s+${DESCRIPTION}\s*$$
6767
^\s+Internet\s+Address\s+is\s+${IP_ADDRESS}\/${PREFIX_LENGTH}
6868
^\s+Port\s+mode\s+is\s+${MODE}
6969
^\s+${DUPLEX},\s+${SPEED}(,\s+media\s+type\s+is\s+${MEDIA_TYPE})?\s*$$
@@ -77,8 +77,8 @@ Start
7777
^\s+${OUTPUT_PACKETS}\s+packets\s+output\s+\d+\s+bytes\s+${UNDERRUN}\s+underruns\s*$$
7878
^\s+input:\s+${INPUT_PACKETS}\s+pkts,\s+\d+\s+bytes\s+-\s+output:\s+${OUTPUT_PACKETS}\s+pkts,\s+\d+\s+bytes\s*$$
7979
^\s+Last\s+link\s+flapped\s+${LAST_LINK_FLAPPED}\s*$$
80-
^\s+\d+\s+(second|minute)s?\s+input\s+rate\s+${BANDWIDTH_INPUT_RATE}\s+bits/sec,\s+${PACKET_INPUT_RATE}\s+packets/sec
81-
^\s+\d+\s+(second|minute)s?\s+output\s+rate\s+${BANDWIDTH_OUTPUT_RATE}\s+bits/sec,\s+${PACKET_OUTPUT_RATE}\s+packets/sec
80+
^\s+\d+\s+(second|minute)s?\s+input\s+rate\s+${BANDWIDTH_INPUT_RATE}\s+bits/sec(,\s+${PACKET_INPUT_RATE}\s+packets/sec)?
81+
^\s+\d+\s+(second|minute)s?\s+output\s+rate\s+${BANDWIDTH_OUTPUT_RATE}\s+bits/sec(,\s+${PACKET_OUTPUT_RATE}\s+packets/sec)?
8282
# RX
8383
^\s+${INPUT_ERRORS}\s+input\s+errors?\s+${SHORT_FRAME}\s+short\s+frame\s+${OVERRUN}\s+overrun\s+${UNDERRUN}\s+underrun\s+${IGNORED}\s+ignored\s*$$
8484
^\s+${INPUT_ERRORS}\s+input\s+errors\s+${SHORT_FRAME}\s+frame\s+${OVERRUN}\s+overrun\s+\d+\s+fifo\s*$$
@@ -112,9 +112,9 @@ Start
112112
^\s+admin\s+fec\s+state\s+is\s+\S+,\s+oper\s+fec\s+state\s+is\s+\S+\s*$$
113113
^\s+Keepalive\s+
114114
^\s+ARP\s+type:\s+\S+\s*$$
115-
^\s+\d+\s+broadcast\s+packets\s+\d+\s+bytes\s*$$
115+
^\s+\d+\s+broadcast\s+packets\s+\d+\s+(bytes|packets/sec)\s*$$
116116
^\s+ucast:\s+\d+\s+pkts,\s+\d+\s+bytes(\s+-\s+mcast:\s+\d+\s+pkts,\s+\d+\s+bytes)?\s*$$
117-
^\s+\d+\s+unicast\s+packets\s+\d+\s+multicast\s+packets\s+\d+\s+broadcast\s+packets\s*$$
117+
^\s+\d+\s+unicast\s+packets\s+\d+\s+multicast\s+packets(\s+\d+\s+broadcast\s+packets)?\s*$$
118118
^\s+(Ha\s+)?input\s+rate\s+\S+\s+\w?bps,\s+\S+\s+\w?pps;\s+output\s+rate\s+\S+\s+\w?bps,\s+\S+\s+\w?pps\s*$$
119119
^\s+Members\s+in\s+this\s+channel:\s+
120120
^\s+No\s+members
@@ -125,4 +125,9 @@ Start
125125
^\s+Input\s+flow-control\s+is\s+\S+,\s+Port\s+mode\s+is\s+\S+\s*$$
126126
^\s+\d+\s+multicast\s+frames\s+\d+\s+compressed\s*$$
127127
^\s+\d+\s+out_carrier_errors\s*$$
128+
^\s+VFC\s+not\s+bound
129+
^\s+Port\s+(WWN|vsan)
130+
^\s+Admin\s+port\s+mode
131+
^\s+snmp\s+link\s+state
132+
^\s+Current\s+counters\s+not\s+available
128133
^. -> Error
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
mgmt0 is up
2+
Hardware: GigabitEthernet, address: 547f.ee64.6681 (bia 547f.ee64.6681)
3+
Internet Address is 192.168.255.253/30
4+
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec
5+
reliability 255/255, txload 1/255, rxload 1/255
6+
Encapsulation ARPA
7+
full-duplex, 1000 Mb/s
8+
EtherType is 0x0000
9+
Rx
10+
58109478 input packets 5334957465 bytes
11+
55337598 unicast packets 2771874 multicast packets
12+
6 broadcast packets 0 packets/sec
13+
1 minute input rate 792 bits/sec
14+
Tx
15+
58088428 output packets 5318342661 bytes
16+
55316528 unicast packets 2771853 multicast packets
17+
47 broadcast packets 0 packets/sec
18+
1 minute output rate 776 bits/sec
19+
vfc248 is down (Error Disabled - VFC not bound)
20+
VFC not bound
21+
Port description is PILLAR_A1
22+
Hardware is Ethernet
23+
Port WWN is 20:f7:54:7f:ee:64:66:bf
24+
Admin port mode is F, trunk mode is on
25+
snmp link state traps are enabled
26+
Port vsan is 1
27+
1 minute input rate 0 bits/sec, 0 bytes/sec, 0 frames/sec
28+
1 minute output rate 0 bits/sec, 0 bytes/sec, 0 frames/sec
29+
Current counters not available
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
parsed_sample:
3+
- admin_state: ""
4+
babble: ""
5+
bad_etype_drop: ""
6+
bad_proto_drop: ""
7+
bandwidth: "1000000 Kbit"
8+
bandwidth_input_rate: "792"
9+
bandwidth_output_rate: "776"
10+
bia: "547f.ee64.6681"
11+
collisions: ""
12+
crc: ""
13+
deferred: ""
14+
delay: "10 usec"
15+
description: ""
16+
dribble: ""
17+
duplex: "full-duplex"
18+
encapsulation: "ARPA"
19+
giants: ""
20+
hardware_type: "GigabitEthernet"
21+
ignored: ""
22+
input_discards: ""
23+
input_errors: ""
24+
input_packets: "58109478"
25+
interface: "mgmt0"
26+
interface_down_drop: ""
27+
ip_address: "192.168.255.253"
28+
last_link_flapped: ""
29+
late_collisions: ""
30+
link_status: "up"
31+
lost_carrier: ""
32+
mac_address: "547f.ee64.6681"
33+
media_type: ""
34+
mode: ""
35+
mtu: "1500"
36+
no_buffer: ""
37+
no_carrier: ""
38+
output_discards: ""
39+
output_errors: ""
40+
output_packets: "58088428"
41+
overrun: ""
42+
packet_input_rate: ""
43+
packet_output_rate: ""
44+
prefix_length: "30"
45+
runts: ""
46+
rx_jumbo_packets: ""
47+
rx_pause: ""
48+
short_frame: ""
49+
speed: "1000 Mb/s"
50+
stomped_crc: ""
51+
storm_suppression_bytes: ""
52+
tx_jumbo_packets: ""
53+
tx_pause: ""
54+
underrun: ""
55+
vlan_id: ""
56+
watchdog: ""
57+
- admin_state: ""
58+
babble: ""
59+
bad_etype_drop: ""
60+
bad_proto_drop: ""
61+
bandwidth: ""
62+
bandwidth_input_rate: "0"
63+
bandwidth_output_rate: "0"
64+
bia: ""
65+
collisions: ""
66+
crc: ""
67+
deferred: ""
68+
delay: ""
69+
description: "PILLAR_A1"
70+
dribble: ""
71+
duplex: ""
72+
encapsulation: ""
73+
giants: ""
74+
hardware_type: "Ethernet "
75+
ignored: ""
76+
input_discards: ""
77+
input_errors: ""
78+
input_packets: ""
79+
interface: "vfc248"
80+
interface_down_drop: ""
81+
ip_address: ""
82+
last_link_flapped: ""
83+
late_collisions: ""
84+
link_status: "down (Error Disabled - VFC not bound)"
85+
lost_carrier: ""
86+
mac_address: ""
87+
media_type: ""
88+
mode: ""
89+
mtu: ""
90+
no_buffer: ""
91+
no_carrier: ""
92+
output_discards: ""
93+
output_errors: ""
94+
output_packets: ""
95+
overrun: ""
96+
packet_input_rate: ""
97+
packet_output_rate: ""
98+
prefix_length: ""
99+
runts: ""
100+
rx_jumbo_packets: ""
101+
rx_pause: ""
102+
short_frame: ""
103+
speed: ""
104+
stomped_crc: ""
105+
storm_suppression_bytes: ""
106+
tx_jumbo_packets: ""
107+
tx_pause: ""
108+
underrun: ""
109+
vlan_id: ""
110+
watchdog: ""

0 commit comments

Comments
 (0)