Skip to content

Commit

Permalink
Cisco nxos show interfaces switchport (#434)
Browse files Browse the repository at this point in the history
New template: cisco_nxos_show_interfaces_switchport
  • Loading branch information
dainok authored and FragmentedPacket committed Jul 25, 2019
1 parent 88f1b06 commit 47a70f9
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 0 deletions.
18 changes: 18 additions & 0 deletions templates/cisco_nxos_show_interfaces_switchport.template
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
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ cisco_nxos_show_l2rib_internal_permanently-frozen-list.template, .*, cisco_nxos,
cisco_nxos_show_configuration_session_summary.template, .*, cisco_nxos, sh[[ow]] configu[[ration]] s[[ession]] su[[mmary]]
cisco_nxos_show_interface_transceiver_details.template, .*, cisco_nxos, sh[[ow]] int[[erface]] tra[[nsceiver]] de[[tails]]
cisco_nxos_show_environment_temperature.template, .*, cisco_nxos, sh[[ow]] env[[ironment]] t[[emperature]]
cisco_nxos_show_interfaces_switchport.template, .*, cisco_nxos, sh[[ow]] int[[erfaces]] sw[[itchport]]
cisco_nxos_show_ip_dhcp_relay_address.template, .*, cisco_nxos, sh[[ow]] ip dh[[cp]] r[[elay]] a[[ddress]]
cisco_nxos_show_lldp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[ghbors]] d[[etail]]
cisco_nxos_show_cdp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]]
Expand Down
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'
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

0 comments on commit 47a70f9

Please sign in to comment.