diff --git a/templates/index b/templates/index index 70e7285b8e..564c0dd34d 100644 --- a/templates/index +++ b/templates/index @@ -380,6 +380,7 @@ 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 diff --git a/templates/paloalto_panos_debug_swm_status.textfsm b/templates/paloalto_panos_debug_swm_status.textfsm new file mode 100644 index 0000000000..d07aade102 --- /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 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_debug_swm_status.yml b/tests/paloalto_panos/debug_swm_status/paloalto_panos_debug_swm_status.yml new file mode 100644 index 0000000000..9f1e2be64d --- /dev/null +++ b/tests/paloalto_panos/debug_swm_status/paloalto_panos_debug_swm_status.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"