-
Notifications
You must be signed in to change notification settings - Fork 732
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New template Alcatel AOS:
show mac-address-table
(#1902)
- Loading branch information
1 parent
6697a54
commit d23821d
Showing
6 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
ntc_templates/templates/alcatel_aos_show_mac-address-table.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/alcatel_aos/show_mac-address-table/alcatel_aos_show_mac-address-table.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
34 changes: 34 additions & 0 deletions
34
tests/alcatel_aos/show_mac-address-table/alcatel_aos_show_mac-address-table.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
13 changes: 13 additions & 0 deletions
13
tests/alcatel_aos/show_mac-address-table/alcatel_aos_show_mac-address-table_2.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
34 changes: 34 additions & 0 deletions
34
tests/alcatel_aos/show_mac-address-table/alcatel_aos_show_mac-address-table_2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |