Skip to content

Commit

Permalink
Merge pull request #269 from networktocode/ubiquiti_edgeswitch
Browse files Browse the repository at this point in the history
Add new OS and commands: Ubiquiti edgeswitch: show vlan and show arp support
  • Loading branch information
jmcgill298 authored Oct 14, 2018
2 parents 31e8d33 + 898dceb commit d7e7b2d
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 2 deletions.
3 changes: 3 additions & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -262,5 +262,8 @@ paloalto_panos_show_counter_global.template, .*, paloalto_panos, sh[[ow]] coun[[
paloalto_panos_show_system_info.template, .*, paloalto_panos, sh[[ow]] sys[[tem]] in[[fo]]
paloalto_panos_show_jobs_all.template, .*, paloalto_panos, sh[[ow]] jo[[bs]] all

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

vmware_nsxv_show_ip_bgp_neighbors.template, .*, vmware_nsxv, sh[[ow]] ip b[[gp]] n[[eighbors]]
vmware_nsxv_show_ip_route.template, .*, vmware_nsxv, sh[[ow]] ip r[[oute]]
13 changes: 13 additions & 0 deletions templates/ubiquiti_edgeswitch_show_arp.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Value Required ADDRESS (\d+\.\d+\.\d+\.\d+)
Value MAC (\S+)
Value INTERFACE (\S+)
Value TYPE (\S+)
Value AGE (.*)

Start
^${ADDRESS}\s+${MAC}\s+${INTERFACE}\s+${TYPE}\s+${AGE}.*$$ -> Record
^.+\.
^\s+IP\s+Address\s+MAC\s+Address\s+Interface\s+Type\s+Age
^-+\s+-+\s+-+\s+-+\s+-+\s*$$
^\s*$$
^. -> Error
10 changes: 10 additions & 0 deletions templates/ubiquiti_edgeswitch_show_vlan.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Value Required VLAN_ID (\d+)
Value NAME (.*?)
Value TYPE (\S+)

Start
^${VLAN_ID}\s+${NAME}\s+${TYPE}\s*$$ -> Record
^VLAN\s+ID\s+VLAN\s+Name\s+VLAN\s+Type\s*$$
^-+\s+-+\s+-+\s*$$
^\s*$$
^. -> Error
4 changes: 2 additions & 2 deletions tests/test_index_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def test_index_ordering():
'checkpoint_gaia', 'cisco_asa', 'cisco_ios', 'cisco_nxos', 'cisco_s300', 'cisco_wlc',
'cisco_xe', 'cisco_xr', 'dell_force10', 'enterasys', 'extreme', 'f5_ltm', 'fortinet',
'hp_comware', 'hp_procurve', 'huawei', 'juniper', 'juniper_junos', 'juniper_screenos',
'alcatel_sros', 'linux', 'ovs_linux', 'paloalto_panos', 'quanta_mesh', 'vmware_nsxv',
'vyatta_vyos', 'vyos'
'alcatel_sros', 'linux', 'ovs_linux', 'paloalto_panos', 'quanta_mesh',
'ubiquiti_edgeswitch', 'vmware_nsxv', 'vyatta_vyos', 'vyos'
]

prior_os = ""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
parsed_sample:
- address: "172.16.216.1"
age: "0h 0m 10s"
interface: "4/1"
mac: "80:2A:A8:F1:D2:46"
type: "Gateway"
- address: "172.16.216.2"
age: "0h 2m 16s"
interface: "4/1"
mac: "E2:91:F5:CC:E8:19"
type: "Dynamic"
- address: "172.16.216.4"
age: "n/a"
interface: "4/1"
mac: "78:8A:20:44:02:7F"
type: "Local"
- address: "172.16.216.33"
age: "0h 0m 5s"
interface: "4/1"
mac: "00:00:00:00:00:00"
type: "Dynamic"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

Age Time (seconds)............................. 300
Response Time (seconds)........................ 1
Retries........................................ 4
Cache Size..................................... 493
Dynamic Renew Mode ............................ Disable
Total Entry Count Current / Peak .............. 4 / 4
Static Entry Count Configured / Active / Max .. 0 / 0 / 128

IP Address MAC Address Interface Type Age
--------------- ----------------- -------------- -------- -----------
172.16.216.1 80:2A:A8:F1:D2:46 4/1 Gateway 0h 0m 10s
172.16.216.2 E2:91:F5:CC:E8:19 4/1 Dynamic 0h 2m 16s
172.16.216.4 78:8A:20:44:02:7F 4/1 Local n/a
172.16.216.33 00:00:00:00:00:00 4/1 Dynamic 0h 0m 5s
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
parsed_sample:
- name: "default"
type: "Default"
vlan_id: "1"
- name: "ip tv"
type: "Static"
vlan_id: "101"
- name: "internet"
type: "Static"
vlan_id: "102"
- name: "hjemmenett"
type: "Static"
vlan_id: "216"
- name: "server"
type: "Static"
vlan_id: "217"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
VLAN ID VLAN Name VLAN Type
------- -------------------------------- -------------------
1 default Default
101 ip tv Static
102 internet Static
216 hjemmenett Static
217 server Static

0 comments on commit d7e7b2d

Please sign in to comment.