From e941654d90306a87cb0ed96c78c0ea24fe354914 Mon Sep 17 00:00:00 2001 From: Anton Coleman Date: Tue, 19 May 2020 14:17:52 -0500 Subject: [PATCH 1/5] update index to support panos_debug_swm_status and add the template file --- templates/index | 1 + templates/paloalto_panos_debug_swm_status.textfsm | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 templates/paloalto_panos_debug_swm_status.textfsm diff --git a/templates/index b/templates/index index 70e7285b8e..393faeb899 100644 --- a/templates/index +++ b/templates/index @@ -384,6 +384,7 @@ paloalto_panos_show_system_info.textfsm, .*, paloalto_panos, sh[[ow]] sys[[tem]] paloalto_panos_show_jobs_all.textfsm, .*, paloalto_panos, sh[[ow]] jo[[bs]] all paloalto_panos_show_arp_all.textfsm, .*, paloalto_panos, sh[[ow]] ar[[p]] all paloalto_panos_show_mac_all.textfsm, .*, paloalto_panos, sh[[ow]] mac all +paloalto_panos_debug_swm_status.textfsm, .*, paloalto_panos, de[[bug]] s[[wm]] status ruckus_fastiron_show_arp.textfsm, .*, ruckus_fastiron, sh[[ow]] ar[[p]] diff --git a/templates/paloalto_panos_debug_swm_status.textfsm b/templates/paloalto_panos_debug_swm_status.textfsm new file mode 100644 index 0000000000..8de89bc111 --- /dev/null +++ b/templates/paloalto_panos_debug_swm_status.textfsm @@ -0,0 +1,10 @@ +Value PART (\S+) +Value STATE (\S+) +Value VERSION (\S+) + +Start + ^Partition\s+State\s+Version + ^-+$$ + ^${PART}\s+${STATE}\s+${VERSION} -> Record + ^\s*$$ + ^. -> Error \ No newline at end of file From 9a8617f819c36f82a591be0598773e0fe6e8115f Mon Sep 17 00:00:00 2001 From: Anton Coleman Date: Tue, 19 May 2020 14:19:06 -0500 Subject: [PATCH 2/5] add new line to template file --- templates/paloalto_panos_debug_swm_status.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/paloalto_panos_debug_swm_status.textfsm b/templates/paloalto_panos_debug_swm_status.textfsm index 8de89bc111..d07aade102 100644 --- a/templates/paloalto_panos_debug_swm_status.textfsm +++ b/templates/paloalto_panos_debug_swm_status.textfsm @@ -7,4 +7,4 @@ Start ^-+$$ ^${PART}\s+${STATE}\s+${VERSION} -> Record ^\s*$$ - ^. -> Error \ No newline at end of file + ^. -> Error From bfd471755f8fc007d166a6de4731fe29b0ef14f3 Mon Sep 17 00:00:00 2001 From: Anton Coleman Date: Tue, 19 May 2020 14:47:14 -0500 Subject: [PATCH 3/5] update index order for paloalto_panos_debug_swm_status, add test demo data --- templates/index | 3 ++- .../paloalto_panos_debug_swm_status.raw | 6 ++++++ .../debug_swm_status/paloalto_panos_show_arp_all.yml | 11 +++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/paloalto_panos/debug_swm_status/paloalto_panos_debug_swm_status.raw create mode 100644 tests/paloalto_panos/debug_swm_status/paloalto_panos_show_arp_all.yml diff --git a/templates/index b/templates/index index 393faeb899..a256067d6b 100644 --- a/templates/index +++ b/templates/index @@ -380,11 +380,12 @@ paloalto_panos_show_interface_hardware.textfsm, .*, paloalto_panos, sh[[ow]] int paloalto_panos_show_running_nat-policy.textfsm, .*, paloalto_panos, sh[[ow]] runn[[ing]] nat[[-policy]] paloalto_panos_show_interface_logical.textfsm, .*, paloalto_panos, sh[[ow]] int[[erface]] logi[[cal]] paloalto_panos_show_counter_global.textfsm, .*, paloalto_panos, sh[[ow]] coun[[ter]] glo[[bal]] +paloalto_panos_debug_swm_status.textfsm, .*, paloalto_panos, de[[bug]] s[[wm]] status paloalto_panos_show_system_info.textfsm, .*, paloalto_panos, sh[[ow]] sys[[tem]] in[[fo]] paloalto_panos_show_jobs_all.textfsm, .*, paloalto_panos, sh[[ow]] jo[[bs]] all paloalto_panos_show_arp_all.textfsm, .*, paloalto_panos, sh[[ow]] ar[[p]] all paloalto_panos_show_mac_all.textfsm, .*, paloalto_panos, sh[[ow]] mac all -paloalto_panos_debug_swm_status.textfsm, .*, paloalto_panos, de[[bug]] s[[wm]] status + ruckus_fastiron_show_arp.textfsm, .*, ruckus_fastiron, sh[[ow]] ar[[p]] diff --git a/tests/paloalto_panos/debug_swm_status/paloalto_panos_debug_swm_status.raw b/tests/paloalto_panos/debug_swm_status/paloalto_panos_debug_swm_status.raw new file mode 100644 index 0000000000..dc6517a766 --- /dev/null +++ b/tests/paloalto_panos/debug_swm_status/paloalto_panos_debug_swm_status.raw @@ -0,0 +1,6 @@ + +Partition State Version +-------------------------------------------------------------------------------- +sysroot0 RUNNING-ACTIVE 9.0.5.xfr +sysroot1 PENDING-CHANGE 9.1.2 +maint READY 9.1.2 diff --git a/tests/paloalto_panos/debug_swm_status/paloalto_panos_show_arp_all.yml b/tests/paloalto_panos/debug_swm_status/paloalto_panos_show_arp_all.yml new file mode 100644 index 0000000000..9f1e2be64d --- /dev/null +++ b/tests/paloalto_panos/debug_swm_status/paloalto_panos_show_arp_all.yml @@ -0,0 +1,11 @@ +--- +parsed_sample: + - part: "sysroot0" + state: "RUNNING-ACTIVE" + version: "9.0.5.xfr" + - part: "sysroot1" + state: "PENDING-CHANGE" + version: "9.1.2" + - part: "maint" + state: "READY" + version: "9.1.2" From d085281a8a81f53ea39e5b04f8b7a43aa6bf5564 Mon Sep 17 00:00:00 2001 From: Anton Coleman Date: Tue, 19 May 2020 14:48:43 -0500 Subject: [PATCH 4/5] remove blank line from index --- templates/index | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/index b/templates/index index a256067d6b..564c0dd34d 100644 --- a/templates/index +++ b/templates/index @@ -386,7 +386,6 @@ paloalto_panos_show_jobs_all.textfsm, .*, paloalto_panos, sh[[ow]] jo[[bs]] all paloalto_panos_show_arp_all.textfsm, .*, paloalto_panos, sh[[ow]] ar[[p]] all paloalto_panos_show_mac_all.textfsm, .*, paloalto_panos, sh[[ow]] mac all - ruckus_fastiron_show_arp.textfsm, .*, ruckus_fastiron, sh[[ow]] ar[[p]] ubiquiti_edgeswitch_show_vlan.textfsm, .*, ubiquiti_edgeswitch, sh[[ow]] vl[[an]] From 2bb8ae89745e6c2e7babc449b95bb47a15904684 Mon Sep 17 00:00:00 2001 From: Anton Coleman Date: Tue, 19 May 2020 14:53:32 -0500 Subject: [PATCH 5/5] update test yml for paloalto_panos_debug_swm_status with proper filename --- ...panos_show_arp_all.yml => paloalto_panos_debug_swm_status.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/paloalto_panos/debug_swm_status/{paloalto_panos_show_arp_all.yml => paloalto_panos_debug_swm_status.yml} (100%) diff --git a/tests/paloalto_panos/debug_swm_status/paloalto_panos_show_arp_all.yml b/tests/paloalto_panos/debug_swm_status/paloalto_panos_debug_swm_status.yml similarity index 100% rename from tests/paloalto_panos/debug_swm_status/paloalto_panos_show_arp_all.yml rename to tests/paloalto_panos/debug_swm_status/paloalto_panos_debug_swm_status.yml