Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ruckus_fastiron show arp template #493

Merged
merged 11 commits into from
Oct 15, 2019
4 changes: 3 additions & 1 deletion templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ paloalto_panos_show_jobs_all.template, .*, paloalto_panos, sh[[ow]] jo[[bs]] all
paloalto_panos_show_arp_all.template, .*, paloalto_panos, sh[[ow]] ar[[p]] all
paloalto_panos_show_mac_all.template, .*, paloalto_panos, sh[[ow]] mac all

ruckus_fastiron_show_arp.template, .*, ruckus_fastiron, sh[[ow]] ar[[p]]

ubiquiti_edgeswitch_show_vlan.template, .*, ubiquiti_edgeswitch, sh[[ow]] vl[[an]]
ubiquiti_edgeswitch_show_arp.template, .*, ubiquiti_edgeswitch, sh[[ow]] ar[[p]]

Expand All @@ -332,4 +334,4 @@ vmware_nsxv_show_ip_route.template, .*, vmware_nsxv, sh[[ow]] ip r[[oute]]
vyatta_vyos_show_interfaces.template, .*, .*vyos.*, sh[[ow]] int[[erfaces]]
vyatta_vyos_show_arp.template, .*, .*vyos.*, sh[[ow]] a[[rp]]

watchguard_firebox_show_arp.template, .*, watchguard_firebox, sh[[ow]] arp
watchguard_firebox_show_arp.template, .*, watchguard_firebox, sh[[ow]] arp
28 changes: 28 additions & 0 deletions templates/ruckus_fastiron_show_arp.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Value NUMBER (\S+)
Value Required IP_ADDRESS ([A-Fa-f0-9:\.]+)
Value Required MAC_ADDRESS (([A-Fa-f0-9\.]{14}|None))
Value TYPE (\S+)
Value AGE (\S+)
Value Required PORT (\S+)
Value STATUS (\S+)
Value VLAN (\S+)

Start
^All\s+ARPs:\s+\d+,\s+maximum\s+capacity:\s+\d+
^Total\s+number\s+of\s+ARP\s+entries\s*:\s+\d+
^Entries\s+in\s+default\s+routing\s+instance:
^No\.\s+(IP\s+Address|IP)\s+(MAC\s+Address|MAC)\s+Type\s+Age\s+Port\s+Status\s+VLAN -> Layer2
^No\.\s+(IP\s+Address|IP)\s+(MAC\s+Address|MAC)\s+Type\s+Age\s+Port\s+Status -> Layer3
^\s*$$
^. -> Error

Layer2
^${NUMBER}\s+${IP_ADDRESS}\s+${MAC_ADDRESS}\s+${TYPE}\s+${AGE}\s+${PORT}\s+${STATUS}\s+${VLAN} -> Record
QuasarKid marked this conversation as resolved.
Show resolved Hide resolved
^Total\s+ARP\s+Entries\s*:\s+\d+
^\s*$$
^. -> Error

Layer3
^${NUMBER}\s+${IP_ADDRESS}\s+${MAC_ADDRESS}\s+${TYPE}\s+${AGE}\s+${PORT}\s+${STATUS} -> Record
^\s*$$
^. -> Error
28 changes: 28 additions & 0 deletions tests/ruckus_fastiron/show_arp/ruckus_fastiron_show_arp.parsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
parsed_sample:

- age: '0'
ip_address: 10.103.3.1
mac_address: 70db.9862.224c
number: '1'
port: 1/2/1
status: Valid
type: Dynamic
vlan: '1'
- age: '4'
ip_address: 10.103.3.10
mac_address: c81f.6603.c442
number: '2'
port: 1/1/8
status: Valid
type: Dynamic
vlan: '1'
- age: '4'
ip_address: 10.103.3.4
mac_address: f8bc.1294.dd30
number: '3'
port: 1/1/6
status: Valid
type: Dynamic
vlan: '1'

6 changes: 6 additions & 0 deletions tests/ruckus_fastiron/show_arp/ruckus_fastiron_show_arp.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
All ARPs: 3, maximum capacity: 4096
No. IP MAC Type Age Port Status VLAN
1 10.103.3.1 70db.9862.224c Dynamic 0 1/2/1 Valid 1
2 10.103.3.10 c81f.6603.c442 Dynamic 4 1/1/8 Valid 1
3 10.103.3.4 f8bc.1294.dd30 Dynamic 4 1/1/6 Valid 1
Total ARP Entries : 3
Loading