Skip to content

Commit

Permalink
Alcatel aos show vlan port members (networktocode#1899)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 authored Nov 20, 2024
1 parent ffb6ef4 commit 9140fef
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ntc_templates/templates/alcatel_aos_show_vlan_port.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Value VLAN_ID (\d+)
Value PORT ((\d+\/?)+)
Value TYPE (\S+)
Value STATUS (\S+)

Start
^\s*vlan\s*port\s*type\s*status\s*$$
^\s*[-+]+\s*$$
^\s*${VLAN_ID}\s*${PORT}\s*${TYPE}\s*${STATUS}\s*$$ -> Record
^\s*
^.*$$ -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#
Template, Hostname, Platform, Command

alcatel_aos_show_vlan_port.textfsm, .*, alcatel_aos, sh[[ow]] vl[[an]] (p[[ort]]|m[[embers]])
alcatel_aos_show_vlan.textfsm, .*, alcatel_aos, show vlan

alcatel_sros_show_router_bgp_routes_vpn-ipv4.textfsm, .*, alcatel_sros, sh[[ow]] router bgp rou[[tes]] vpn-ipv4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
vlan port type status
--------+------------+------------+--------------
1 1/1/23 default inactive
1 1/1/25 qtagged forwarding
10 changes: 10 additions & 0 deletions tests/alcatel_aos/show_vlan_port/alcatel_aos_show_vlan_port_1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
parsed_sample:
- port: "1/1/23"
status: "inactive"
type: "default"
vlan_id: "1"
- port: "1/1/25"
status: "forwarding"
type: "qtagged"
vlan_id: "1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
vlan port type status
------+-------+---------+-------------
1 1/25 default inactive
1 1/26 qtagged forwarding
10 changes: 10 additions & 0 deletions tests/alcatel_aos/show_vlan_port/alcatel_aos_show_vlan_port_2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
parsed_sample:
- port: "1/25"
status: "inactive"
type: "default"
vlan_id: "1"
- port: "1/26"
status: "forwarding"
type: "qtagged"
vlan_id: "1"

0 comments on commit 9140fef

Please sign in to comment.