Skip to content

Update Huawei VRP display vlan #2016

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
21 changes: 19 additions & 2 deletions ntc_templates/templates/huawei_vrp_display_vlan.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@ Value Filldown VLAN_ID (\d+)
Value Filldown VLAN_TYPE (\w+)
Value Filldown MODE ((TG|UT))
Value INTERFACE ([A-Z0-9/th\-runk]+)
Value VLAN_NAME (.+)
Value VLAN_NAME (\S+|\S.+\S)
Value VLAN_STATUS (\S+)
Value VLAN_AP (\d+)
Value VLAN_TYPE_AP (\w+)
Value MAC_LEARNING (\S+)
Value BROADCAST (\S+)
Value MULTICAST (\S+)
Value UNICAST (\S+)
Value VLAN_PROPERTY (\S+)

Start
^The\s+total\s+number\s+of\s+VLANs
^\s*\*\s+:\s+management-vlan\s*$$ -> VLANS_AP
^The\s+total\s+number\s+of\s+VLANs\s+is:\s+\d+\s*$$
^-+$$
^U:\s+Up;\s+D:\s+Down;\s+TG:\s+Tagged;\s+UT:\s+Untagged;
^MP:\s+Vlan-mapping;\s+ST:\s+Vlan-stacking;
Expand Down Expand Up @@ -40,3 +48,12 @@ STATUS
^${VLAN_ID}\s+${VLAN_STATUS}\s+\S+\s+\S+\s+\S+\s+${VLAN_NAME} -> Continue.Record
^\d+ -> Clearall
^. -> Error


VLANS_AP
^\s*-+$$
^\s*The\s+total\s+number\s+of\s+vlans\s+is\s+:\s+\d+\s*$$
^\s*VLAN\s+ID\s+Type\s+Status\s+MAC\s+Learning\s+Broadcast\/Multicast\/Unicast\s+Property\s*$$
# ^\s*${VLAN_ID}\s+${VLAN_TYPE}\s+${VLAN_STATUS}?\s+${MAC_LEARNING}\s+${BROADCAST}\s+${MULTICAST}\s+${UNICAST}\s+${VLAN_PROPERTY}\s*$$ -> Record
^\s*${VLAN_AP}\s+${VLAN_TYPE_AP}\s+${VLAN_STATUS}?\s+${MAC_LEARNING}?\s+${BROADCAST}?\s+${MULTICAST}?\s+${UNICAST}?\s+${VLAN_PROPERTY}?\s*$$ -> Record
^. -> Error
Loading