-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New template: Huawei - display arp brief (#1208)
Co-authored-by: Edouard Lavaud <[email protected]>
- Loading branch information
Showing
6 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
ntc_templates/templates/huawei_vrp_display_arp_brief.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,17 @@ | ||
Value IP_ADDRESS (\d+.\d+.\d+.\d+) | ||
Value MAC_ADDRESS ((\w+-?)+) | ||
Value EXPIRE (\d+) | ||
Value TYPE (I\s-|[DS][F-][\d\s]) | ||
Value INTERFACE (\S+) | ||
Value VLAN (\d+/(\d+|-)) | ||
Value PVC (\S+) | ||
|
||
Start | ||
^\s*IP\sADDRESS.+$$ -> Next | ||
^\s+VLAN.+$$ -> Next | ||
^-+ -> Next | ||
^\s*\d+.\d+.\d+.\d+ -> Continue.Record | ||
^\s*${IP_ADDRESS}\s+(${MAC_ADDRESS}\s+)?(${EXPIRE}\s+)?${TYPE}\s+${INTERFACE}(\s+${VLAN})?(\s+${PVC})?\s*$$ | ||
^\s*${VLAN}(\s+${PVC})?\s*$$ | ||
^Total:.+$$ -> Next | ||
^.*$$ -> 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
7 changes: 7 additions & 0 deletions
7
tests/huawei_vrp/display_arp_brief/huawei_vrp_display_arp_brief.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,7 @@ | ||
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VLAN/CEVLAN | ||
------------------------------------------------------------------------------ | ||
192.168.120.251 60de-4474-9640 I - Vlanif1 | ||
192.168.120.1 7054-f5df-9b40 3 D-0 GE0/0/0 1/- | ||
192.168.120.252 04f9-3895-8300 19 D-0 GE0/0/0 1/- | ||
------------------------------------------------------------------------------ | ||
Total:3 Dynamic:2 Static:0 Interface:1 |
23 changes: 23 additions & 0 deletions
23
tests/huawei_vrp/display_arp_brief/huawei_vrp_display_arp_brief.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,23 @@ | ||
--- | ||
parsed_sample: | ||
- ip_address: "192.168.120.251" | ||
mac_address: "60de-4474-9640" | ||
expire: "" | ||
type: "I -" | ||
interface: "Vlanif1" | ||
vlan: "" | ||
pvc: "" | ||
- ip_address: "192.168.120.1" | ||
mac_address: "7054-f5df-9b40" | ||
expire: "3" | ||
type: "D-0" | ||
interface: "GE0/0/0" | ||
vlan: "1/-" | ||
pvc: "" | ||
- ip_address: "192.168.120.252" | ||
mac_address: "04f9-3895-8300" | ||
expire: "19" | ||
type: "D-0" | ||
interface: "GE0/0/0" | ||
vlan: "1/-" | ||
pvc: "" |
10 changes: 10 additions & 0 deletions
10
tests/huawei_vrp/display_arp_brief/huawei_vrp_display_arp_brief2.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 @@ | ||
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE | ||
VLAN/CEVLAN(SIP/DIP) PVC | ||
------------------------------------------------------------------------------ | ||
192.168.1.1 fc73-fb9e-601c I - Vlanif1 | ||
192.168.1.118 a078-17b2-7bc0 20 D-0 Wlan-Bss7 1/- | ||
192.168.120.1 fc73-fb9e-601c I - Vlanif2 | ||
10/- | ||
100.95.15.241 fc73-fb9e-601c I - Vlanif100 | ||
------------------------------------------------------------------------------ | ||
Total:4 Dynamic:1 Static:0 Interface:3 |
30 changes: 30 additions & 0 deletions
30
tests/huawei_vrp/display_arp_brief/huawei_vrp_display_arp_brief2.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,30 @@ | ||
--- | ||
parsed_sample: | ||
- ip_address: "192.168.1.1" | ||
mac_address: "fc73-fb9e-601c" | ||
expire: "" | ||
type: "I -" | ||
interface: "Vlanif1" | ||
vlan: "" | ||
pvc: "" | ||
- ip_address: "192.168.1.118" | ||
mac_address: "a078-17b2-7bc0" | ||
expire: "20" | ||
type: "D-0" | ||
interface: "Wlan-Bss7" | ||
vlan: "1/-" | ||
pvc: "" | ||
- ip_address: "192.168.120.1" | ||
mac_address: "fc73-fb9e-601c" | ||
expire: "" | ||
type: "I -" | ||
interface: "Vlanif2" | ||
vlan: "10/-" | ||
pvc: "" | ||
- ip_address: "100.95.15.241" | ||
mac_address: "fc73-fb9e-601c" | ||
expire: "" | ||
type: "I -" | ||
interface: "Vlanif100" | ||
vlan: "" | ||
pvc: "" |