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

CiscoS300 'show interfaces switchport' template #1524

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
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Value INTERFACE (\S+)
Value INTERFACE_MODE (\S+)
Value GVRP_STATUS (\S+)
Value INGRESS_FILTERING_STATUS (\S+)
Value ACCEPTABLE_FRAME_TYPE (\S+)
Value NATIVE_VLAN (\S+)
Value List VLAN (\d+)
Value List NAME (.*?)
Value List EGRESS_RULE (Untagged|Tagged)
Value List INTERFACE_MEMBERSHIP_TYPE (\S+)
Value List FORBIDDEN_VLAN (\d+)
Value List FORBIDDEN_VLAN_NAME (.*)
Value List MAC_BASED_VLAN_GROUP_ID (\d+)
Value List MAC_BASED_VLAN_ID (\d+)

Start
^\s*Port\s*:\s*${INTERFACE}\s*$$
^\s*Port\s+Mode\s*:\s*${INTERFACE_MODE}\s*$$
^\s*Gvrp\s+Status\s*:\s*${GVRP_STATUS}\s*$$
^\s*Ingress\s+Filtering\s*:\s*${INGRESS_FILTERING_STATUS}\s*$$
^\s*Acceptable\s+Frame\s+Type\s*:\s*${ACCEPTABLE_FRAME_TYPE}\s*$$
^\s*Ingress\s+UnTagged\s+VLAN\s*\(\s*NATIVE\s*\)\s*:\s*${NATIVE_VLAN}\s*$$
^\s*Port\s+is\s+member\s+in:\s*$$ -> PartOfVlan
^\s*$$
^. -> Error

PartOfVlan
^\s*Vlan\s+Name\s+Egress\s+rule\s+Port\s+Membership\s+Type\s*$$
^(\s*-*)*\s*$$
^\s*${VLAN}\s+${NAME}\s+${EGRESS_RULE}\s+${INTERFACE_MEMBERSHIP_TYPE}\s*$$
^\s*Forbidden\s+VLANS:\s*$$ -> ForbiddenVlans
^\s*$$
^. -> Error

ForbiddenVlans
^\s*Vlan\s+Name\s*$$
^(\s*-*)*\s*$$
^\s*${FORBIDDEN_VLAN}\s+${FORBIDDEN_VLAN_NAME}\s*$$
^\s*Classification\s+rules:\s*$$ -> ClassificationRules
^\s*$$
^. -> Error

ClassificationRules
^\s*Mac\s+based\s+VLANs:\s*$$ -> MacBasedVlans
^\s*$$
^. -> Error

MacBasedVlans
^\s*Group\s+ID\s+Vlan\s+ID\s*$$
^(\s*-*)*\s*$$
^\s*${FORBIDDEN_VLAN}\s+${FORBIDDEN_VLAN_NAME}\s*$$
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ cisco_nxos_show_vdc.textfsm, .*, cisco_nxos, sh[[ow]] vdc
cisco_nxos_show_vpc.textfsm, .*, cisco_nxos, sh[[ow]] vpc
cisco_nxos_show_vrf.textfsm, .*, cisco_nxos, sh[[ow]] vrf

cisco_s300_show_interfaces_switchport.textfsm, .*, cisco_s300, sh[[ow]] int[[erfaces]] switchport
cisco_s300_show_interfaces_status.textfsm, .*, cisco_s300, sh[[ow]] int[[erfaces]] st[[atus]]
cisco_s300_show_mac_address-table.textfsm, .*, cisco_s300, sh[[ow]] mac address-[[table]]
cisco_s300_show_lldp_neighbors.textfsm, .*, cisco_s300, sh[[ow]] lld[[p]] neig[[hbors]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Port : fa1
Port Mode: Trunk
Gvrp Status: disabled
Ingress Filtering: true
Acceptable Frame Type: admitAll
Ingress UnTagged VLAN ( NATIVE ): 203

Port is member in:

Vlan Name Egress rule Port Membership Type
---- -------------------------------- ----------- --------------------
203 203 Untagged Static
222 VOIP-1 Tagged Static


Forbidden VLANS:
Vlan Name
---- --------------------------------


Classification rules:

Mac based VLANs:
Group ID Vlan ID
------------ -------
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
parsed_sample:
- acceptable_frame_type: "admitAll"
egress_rule:
- "Untagged"
- "Tagged"
forbidden_vlan: []
forbidden_vlan_name: []
gvrp_status: "disabled"
ingress_filtering_status: "true"
mac_based_vlan_group_id: []
mac_based_vlan_id: []
name:
- "203"
- "VOIP-1"
native_vlan: "203"
interface: "fa1"
interface_membership_type:
- "Static"
- "Static"
interface_mode: "Trunk"
vlan:
- "203"
- "222"
Loading