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

Cisco xr show interfaces duplex and mac for bundle ethernet #389

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
6 changes: 3 additions & 3 deletions templates/cisco_xr_show_interfaces.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Value DESCRIPTION (.*?)
Value IP_ADDRESS (.*?)
Value MTU (\d+)
Value DUPLEX (.+?)
Value SPEED (.+?)
Value SPEED (.+?b/s)
Value BANDWIDTH (\d+\s+\w+)
Value ENCAPSULATION (\w+)

Start
^\S+\s+is -> Continue.Record
^${INTERFACE}\sis\s+${LINK_STATUS},\s+line\sprotocol\sis\s+${ADMIN_STATE}\s*$$
^\s+Hardware\s+is\s+${HARDWARE_TYPE}(?:,\s+address\s+is\s+${ADDRESS}\s+\(bia\s+${BIA}\)\s*$$|\s.+|\s*$$)
^\s+Hardware\s+is\s+${HARDWARE_TYPE}(?:\s+interface\(s\)|)(?:,\s+address\s+is\s+${ADDRESS}(?:\s+\(bia\s+${BIA}\)\s*)*$$|\s.+|\s*$$)
^\s+Description:\s+${DESCRIPTION}\s*$$
^\s+[Ii]nternet\s+[Aa]ddress\s+is\s+${IP_ADDRESS}\s*$$
^\s+MTU\s+${MTU}.*BW\s+${BANDWIDTH}
^\s+Encapsulation\s+${ENCAPSULATION}
^\s+(?:[Dd]uplex\s+|)${DUPLEX}(?:-[Dd]uplex|),\s+${SPEED},.+link
^\s+(?:[Dd]uplex\s+|)${DUPLEX}(?:-[Dd]uplex|),\s+${SPEED}
13 changes: 13 additions & 0 deletions tests/cisco_xr/show_interfaces/cisco_xr_show_interfaces.parsed
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,16 @@ parsed_sample:
link_status: "administratively down"
mtu: "1514"
speed: "10000Mb/s"
- address: "aaaa.bbbb.cccc"
admin_state: "up"
bandwidth: "10000000 Kbit"
bia: ""
description: "Bundle_example"
duplex: "Full"
encapsulation: "ARPA"
hardware_type: "Aggregated Ethernet"
interface: "Bundle-Ether123456"
ip_address: "Unknown"
link_status: "up"
mtu: "1514"
speed: "10000Mb/s"
28 changes: 28 additions & 0 deletions tests/cisco_xr/show_interfaces/cisco_xr_show_interfaces.raw
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,31 @@ TenGigE0/3/0/4 is administratively down, line protocol is administratively down
0 output errors, 0 underruns, 0 applique, 0 resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions

Bundle-Ether123456 is up, line protocol is up
Interface state transitions: 1
Hardware is Aggregated Ethernet interface(s), address is aaaa.bbbb.cccc
Description: Bundle_example
Internet address is Unknown
MTU 1514 bytes, BW 10000000 Kbit (Max: 10000000 Kbit)
reliability 255/255, txload 0/255, rxload 0/255
Encapsulation ARPA,
Full-duplex, 10000Mb/s
loopback not set,
Last link flapped 3w1d
No. of members in this bundle: 1
TenGigE0/3/0/4 Full-duplex 10000Mb/s Active
Last input 00:00:00, output 00:00:00
Last clearing of "show interface" counters never
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 total input drops
0 drops for unrecognized upper-level protocol
Received 0 broadcast packets, 0 multicast packets
0 runts, 0 giants, 0 throttles, 0 parity
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 packets output, 0 bytes, 0 total output drops
Output 0 broadcast packets, 0 multicast packets
0 output errors, 0 underruns, 0 applique, 0 resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions