From c4b39d16ab278ab5cdeabedd400e12e54b08b586 Mon Sep 17 00:00:00 2001 From: Jacob McGill Date: Fri, 11 May 2018 12:30:19 -0400 Subject: [PATCH 1/2] Fix HP Procurve show_vlans template (failing py.test) --- templates/hp_procurve_show_vlans.template | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/hp_procurve_show_vlans.template b/templates/hp_procurve_show_vlans.template index 0000531e57..23524275b6 100644 --- a/templates/hp_procurve_show_vlans.template +++ b/templates/hp_procurve_show_vlans.template @@ -1,5 +1,5 @@ Value VLAN_ID (\d+) -Value NAME ([\S+\s+].*(?=\|)) +Value NAME (.*?) Value STATUS (\S+) Value VOICE (Yes|No) Value JUMBO (Yes|No) @@ -8,4 +8,6 @@ Start ^.*VLAN ID -> VLAN VLAN - ^\s+${VLAN_ID}\s+${NAME}\s+\|?\s?${STATUS}\s+${VOICE}\s+${JUMBO}? -> Record + ^\s+${VLAN_ID}\s+${NAME}\s+(\|\s+|)${STATUS}\s+${VOICE}(\s+${JUMBO}|)\s*$$ -> Record + ^\s+-+\s+-+\s+(\+\s+|)-+\s+-+(\s+-+|)\s*$$ + ^.*$$ -> Error \ No newline at end of file From ae200dc9156e4b4f304959533b77b713f1a731fc Mon Sep 17 00:00:00 2001 From: Jacob McGill Date: Fri, 11 May 2018 12:39:23 -0400 Subject: [PATCH 2/2] Add trailing newline --- templates/hp_procurve_show_vlans.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/hp_procurve_show_vlans.template b/templates/hp_procurve_show_vlans.template index 23524275b6..aff0f9d0eb 100644 --- a/templates/hp_procurve_show_vlans.template +++ b/templates/hp_procurve_show_vlans.template @@ -10,4 +10,4 @@ Start VLAN ^\s+${VLAN_ID}\s+${NAME}\s+(\|\s+|)${STATUS}\s+${VOICE}(\s+${JUMBO}|)\s*$$ -> Record ^\s+-+\s+-+\s+(\+\s+|)-+\s+-+(\s+-+|)\s*$$ - ^.*$$ -> Error \ No newline at end of file + ^.*$$ -> Error