Skip to content

Commit

Permalink
New template Alcatel AOS: show mac-address-table (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 authored Nov 27, 2024
1 parent 6697a54 commit d23821d
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ntc_templates/templates/alcatel_aos_show_mac-address-table.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Value VLAN_ID (\d+)
Value ADDRESS_NOT_VALID (\*?)
Value DOMAIN (\S+)
Value MAC (\S+)
Value TYPE (\S+)
Value PROTOCOL (\S+)
Value OPERATION (\S+)
Value INTERFACE (\S+)

Start
^\s*Vlan\s*Mac\s*Address\s*Type\s*Protocol\s*Operation\s*Interface\s*$$
^\s*-+\+
^\s*${ADDRESS_NOT_VALID}${VLAN_ID}\s*${MAC}\s*${TYPE}\s*(---|${PROTOCOL})\s*${OPERATION}\s*${INTERFACE}\s*$$ -> Record
^\s*Domain\s*Vlan\/SrvcId\[ISId\/vnId\]\s*Mac\s*Address\s*Type\s*Operation\s*Interface\s*$$
^\s*${DOMAIN}\s*${VLAN_ID}\s*${MAC}\s*${TYPE}\s*${OPERATION}\s*${INTERFACE}\s*$$ -> Record
^\s*Total\s*number\s*of\s*Valid\s*MAC\s*addresses\s*above\s*=\s*\d+\s*$$ -> Record
^Legend
^\s+Mac\s+Address:
^\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_mac-address-table.textfsm, .*, alcatel_aos, sh[[ow]] (mac-a[[ddress-table]]|mac-l[[earning]])
alcatel_aos_show_vlan_port.textfsm, .*, alcatel_aos, sh[[ow]] vl[[an]] (p[[ort]]|m[[embers]])
alcatel_aos_show_chassis.textfsm, .*, alcatel_aos, sh[[ow]] ch[[assis]]
alcatel_aos_show_system.textfsm, .*, alcatel_aos, sh[[ow]] sy[[stem]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Legend: Mac Address: * = address not valid

Vlan Mac Address Type Protocol Operation Interface
------+-------------------+--------------+-----------+------------+-----------
*1 aa:aa:aa:aa:aa:aa permanent --- bridging 1/1
2 bb:bb:bb:bb:bb:bb learned --- bridging 1/1
3 cc:cc:cc:cc:cc:cc learned --- bridging 1/1
4 dd:dd:dd:dd:dd:dd learned --- bridging 1/1

Total number of Valid MAC addresses above = 4
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
parsed_sample:
- address_not_valid: "*"
domain: ""
interface: "1/1"
mac: "aa:aa:aa:aa:aa:aa"
operation: "bridging"
protocol: ""
type: "permanent"
vlan_id: "1"
- address_not_valid: ""
domain: ""
interface: "1/1"
mac: "bb:bb:bb:bb:bb:bb"
operation: "bridging"
protocol: ""
type: "learned"
vlan_id: "2"
- address_not_valid: ""
domain: ""
interface: "1/1"
mac: "cc:cc:cc:cc:cc:cc"
operation: "bridging"
protocol: ""
type: "learned"
vlan_id: "3"
- address_not_valid: ""
domain: ""
interface: "1/1"
mac: "dd:dd:dd:dd:dd:dd"
operation: "bridging"
protocol: ""
type: "learned"
vlan_id: "4"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Legend: Mac Address: * = address not valid,

Mac Address: & = duplicate static address,

Domain Vlan/SrvcId[ISId/vnId] Mac Address Type Operation Interface
------------+----------------------+-------------------+------------------+-------------+-------------------------
VLAN 1 aa:aa:aa:aa:aa:aa dynamic bridging 1/1/1
VLAN 1 bb:bb:bb:bb:bb:bb dynamic bridging 1/1/1
VLAN 1 cc:cc:cc:cc:cc:cc dynamic bridging 1/1/10
VLAN 1 dd:dd:dd:dd:dd:dd dynamic bridging 1/1/1

Total number of Valid MAC addresses above = 4

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
parsed_sample:
- address_not_valid: ""
domain: "VLAN"
interface: "1/1/1"
mac: "aa:aa:aa:aa:aa:aa"
operation: "bridging"
protocol: ""
type: "dynamic"
vlan_id: "1"
- address_not_valid: ""
domain: "VLAN"
interface: "1/1/1"
mac: "bb:bb:bb:bb:bb:bb"
operation: "bridging"
protocol: ""
type: "dynamic"
vlan_id: "1"
- address_not_valid: ""
domain: "VLAN"
interface: "1/1/10"
mac: "cc:cc:cc:cc:cc:cc"
operation: "bridging"
protocol: ""
type: "dynamic"
vlan_id: "1"
- address_not_valid: ""
domain: "VLAN"
interface: "1/1/1"
mac: "dd:dd:dd:dd:dd:dd"
operation: "bridging"
protocol: ""
type: "dynamic"
vlan_id: "1"

0 comments on commit d23821d

Please sign in to comment.