Skip to content

Commit

Permalink
Modified arista_eos_show_vlan to list Ports issue #908
Browse files Browse the repository at this point in the history
  • Loading branch information
bravindranath-bsn authored and jmcgill298 committed Dec 19, 2022
1 parent 1358b6b commit 5a0ad26
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 2 deletions.
134 changes: 132 additions & 2 deletions ntc_templates/templates/arista_eos_show_vlan.textfsm
Original file line number Diff line number Diff line change
@@ -1,6 +1,136 @@
Value VLAN_ID (\d+)
Value Required VLAN_ID (\d+)
Value NAME (\S+)
Value STATUS (active|suspended)
Value List INTERFACES ([\w\./]+)

Start
^${VLAN_ID}\s+${NAME}\s+${STATUS} -> Record
^\s*$$
^\w+\s+[NnAaMmEe]{4}.*$$ -> VLANS

VLANS
^\d+ -> Continue.Record
^${VLAN_ID}\s+${NAME}\s+${STATUS}\s*$$
^${VLAN_ID}\s+${NAME}\s+${STATUS}\s+${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){3}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){4}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){5}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){6}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){7}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){8}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){9}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){10}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){11}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){12}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){13}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){14}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){15}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){16}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){17}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){18}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){19}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){20}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){21}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){22}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){23}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){24}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){25}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){26}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){27}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){28}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){29}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){30}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){31}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){32}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){33}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){34}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){35}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){36}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){37}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){38}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){39}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){40}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){41}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){42}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){43}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){44}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){45}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){46}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){47}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){48}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){49}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){50}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){51}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){52}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){53}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){54}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){55}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){56}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){57}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){58}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){59}${INTERFACES},* -> Continue
^\d+\s+(?:\S+\s+){60}${INTERFACES},* -> Continue
^\s+${INTERFACES},* -> Continue
^\s+\S+\s+${INTERFACES},* -> Continue
^\s+(?:\S+\s+){2}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){3}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){4}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){5}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){6}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){7}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){8}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){9}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){10}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){11}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){12}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){13}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){14}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){15}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){16}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){17}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){18}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){19}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){20}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){21}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){22}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){23}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){24}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){25}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){26}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){27}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){28}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){29}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){30}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){31}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){32}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){33}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){34}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){35}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){36}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){37}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){38}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){39}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){40}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){41}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){42}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){43}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){44}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){45}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){46}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){47}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){48}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){49}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){50}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){51}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){52}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){53}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){54}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){55}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){56}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){57}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){58}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){59}${INTERFACES},* -> Continue
^\s+(?:\S+\s+){60}${INTERFACES},* -> Continue
^\d+
^\s+
^-+
^.+ -> Error
7 changes: 7 additions & 0 deletions tests/arista_eos/show_vlan/arista_eos_show_vlan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@ parsed_sample:
- name: "default"
status: "active"
vlan_id: "1"
interfaces:
- "Et1"
- name: "Test1"
status: "active"
vlan_id: "10"
interfaces:
- "Et1"
- "Et2"
- name: "Test2"
status: "suspended"
vlan_id: "20"
interfaces: []
- name: "VLAN0030"
status: "suspended"
vlan_id: "30"
interfaces: []

0 comments on commit 5a0ad26

Please sign in to comment.