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

Adjusted hp_procurve_show_vlans.template to account for varying outputs. #148

Merged
merged 6 commits into from
Jan 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions templates/hp_procurve_show_vlans.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Value VLAN_ID (\d+)
Value NAME (\S+)
Value NAME ([\S+\s+].*(?=\|))
Value STATUS (\S+)
Value VOICE (Yes|No)
Value JUMBO (Yes|No)
Expand All @@ -8,4 +8,4 @@ Start
^.*VLAN ID -> VLAN

VLAN
^\s+${VLAN_ID}\s+${NAME}\s+${STATUS}\s+${VOICE}\s+${JUMBO} -> Record
^\s+${VLAN_ID}\s+${NAME}\s+\|?\s?${STATUS}\s+${VOICE}\s+${JUMBO}? -> Record
21 changes: 21 additions & 0 deletions tests/hp_procurve/show_vlans/hp_procurve_show_vlans2.parsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---

parsed_sample:

- name: "DEFAULT_VLAN"
vlan_id: "1"
status: "Port-based"
voice: "No"
jumbo: "No"

- name: "Router Vlan"
vlan_id: "10"
status: "Port-based"
voice: "No"
jumbo: "No"

- name: "Voice"
vlan_id: "50"
status: "Port-based"
voice: "Yes"
jumbo: "No"
11 changes: 11 additions & 0 deletions tests/hp_procurve/show_vlans/hp_procurve_show_vlans2.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Status and Counters - VLAN Information

Maximum VLANs to support : 256
Primary VLAN : DEFAULT_VLAN
Management VLAN :

VLAN ID Name | Status Voice Jumbo
------- -------------------------------- + ---------- ----- -----
1 DEFAULT_VLAN | Port-based No No
10 Router Vlan | Port-based No No
50 Voice | Port-based Yes No
15 changes: 15 additions & 0 deletions tests/hp_procurve/show_vlans/hp_procurve_show_vlans3.parsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---

parsed_sample:

- name: "DEFAULT_VLAN"
jumbo: ""
vlan_id: "1"
status: "Port-based"
voice: "No"

- name: "VoiceVlan"
jumbo: ""
vlan_id: "100"
status: "Port-based"
voice: "Yes"
10 changes: 10 additions & 0 deletions tests/hp_procurve/show_vlans/hp_procurve_show_vlans3.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Status and Counters - VLAN Information

Maximum VLANs to support : 8
Primary VLAN : DEFAULT_VLAN
Management VLAN :

802.1Q VLAN ID Name Status Voice
-------------- ------------ ------------ -----
1 DEFAULT_VLAN Port-based No
100 VoiceVlan Port-based Yes