-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cisco nxos show interfaces switchport (#434)
New template: cisco_nxos_show_interfaces_switchport
- Loading branch information
1 parent
88f1b06
commit 47a70f9
Showing
4 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Value Required INTERFACE (\S+) | ||
Value SWITCHPORT (.+) | ||
Value SWITCHPORT_MONITOR (.+) | ||
Value MODE (.+) | ||
Value ACCESS_VLAN (\d+) | ||
Value NATIVE_VLAN (\d+) | ||
Value TRUNKING_VLANS (\S+) | ||
|
||
Start | ||
^Name: ${INTERFACE} | ||
^\s*Switchport: ${SWITCHPORT} | ||
^\s*Switchport Monitor: ${SWITCHPORT_MONITOR} | ||
^\s*Operational Mode: ${MODE} | ||
^\s*Access Mode VLAN: ${ACCESS_VLAN} | ||
^\s*Trunking Native Mode VLAN: ${NATIVE_VLAN} | ||
^\s*Trunking VLANs Allowed: ${TRUNKING_VLANS} -> Record | ||
^.+$$ | ||
^. -> Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.parsed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
parsed_sample: | ||
|
||
- interface: Ethernet1/1 | ||
switchport: Enabled | ||
switchport_monitor: Not enabled | ||
mode: access | ||
access_vlan: '3' | ||
native_vlan: '1' | ||
trunking_vlans: '1-4094' | ||
- interface: Ethernet1/2 | ||
switchport: Enabled | ||
switchport_monitor: Not enabled | ||
mode: trunk | ||
access_vlan: '1' | ||
native_vlan: '5' | ||
trunking_vlans: '1-4094' | ||
- interface: Ethernet1/3 | ||
switchport: Enabled | ||
switchport_monitor: Not enabled | ||
mode: trunk | ||
access_vlan: '1' | ||
native_vlan: '1' | ||
trunking_vlans: '1-4094' |
63 changes: 63 additions & 0 deletions
63
tests/cisco_nxos/show_interfaces_switchport/cisco_nxos_show_interfaces_switchport.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
Name: Ethernet1/1 | ||
Switchport: Enabled | ||
Switchport Monitor: Not enabled | ||
Switchport Isolated : Not enabled | ||
Switchport Block Multicast: Not enabled | ||
Switchport Block Unicast: Not enabled | ||
Operational Mode: access | ||
Access Mode VLAN: 3 (Vlan not created) | ||
Trunking Native Mode VLAN: 1 (default) | ||
Trunking VLANs Allowed: 1-4094 | ||
Voice VLAN: none | ||
Extended Trust State : not trusted [COS = 0] | ||
Administrative private-vlan primary host-association: none | ||
Administrative private-vlan secondary host-association: none | ||
Administrative private-vlan primary mapping: none | ||
Administrative private-vlan secondary mapping: none | ||
Administrative private-vlan trunk native VLAN: none | ||
Administrative private-vlan trunk encapsulation: dot1q | ||
Administrative private-vlan trunk normal VLANs: none | ||
Administrative private-vlan trunk private VLANs: none | ||
Operational private-vlan: none | ||
Name: Ethernet1/2 | ||
Switchport: Enabled | ||
Switchport Monitor: Not enabled | ||
Switchport Isolated : Not enabled | ||
Switchport Block Multicast: Not enabled | ||
Switchport Block Unicast: Not enabled | ||
Operational Mode: trunk | ||
Access Mode VLAN: 1 (default) | ||
Trunking Native Mode VLAN: 5 (Vlan not created) | ||
Trunking VLANs Allowed: 1-4094 | ||
Voice VLAN: none | ||
Extended Trust State : not trusted [COS = 0] | ||
Administrative private-vlan primary host-association: none | ||
Administrative private-vlan secondary host-association: none | ||
Administrative private-vlan primary mapping: none | ||
Administrative private-vlan secondary mapping: none | ||
Administrative private-vlan trunk native VLAN: none | ||
Administrative private-vlan trunk encapsulation: dot1q | ||
Administrative private-vlan trunk normal VLANs: none | ||
Administrative private-vlan trunk private VLANs: none | ||
Operational private-vlan: none | ||
Name: Ethernet1/3 | ||
Switchport: Enabled | ||
Switchport Monitor: Not enabled | ||
Switchport Isolated : Not enabled | ||
Switchport Block Multicast: Not enabled | ||
Switchport Block Unicast: Not enabled | ||
Operational Mode: trunk | ||
Access Mode VLAN: 1 (default) | ||
Trunking Native Mode VLAN: 1 (default) | ||
Trunking VLANs Allowed: 1-4094 | ||
Voice VLAN: none | ||
Extended Trust State : not trusted [COS = 0] | ||
Administrative private-vlan primary host-association: none | ||
Administrative private-vlan secondary host-association: none | ||
Administrative private-vlan primary mapping: none | ||
Administrative private-vlan secondary mapping: none | ||
Administrative private-vlan trunk native VLAN: none | ||
Administrative private-vlan trunk encapsulation: dot1q | ||
Administrative private-vlan trunk normal VLANs: none | ||
Administrative private-vlan trunk private VLANs: none | ||
Operational private-vlan: none |