From 182c3db9725a9f8b076ba89248dba9e21ca17109 Mon Sep 17 00:00:00 2001 From: eperpinya Date: Wed, 9 Oct 2024 12:24:29 +0200 Subject: [PATCH 1/5] New template: Aruba OS `show version` --- .../templates/aruba_os_show_version.textfsm | 18 ++++++++++++++++++ ntc_templates/templates/index | 1 + .../show_version/aruba_os_show_version.raw | 9 +++++++++ .../show_version/aruba_os_show_version.yml | 8 ++++++++ 4 files changed, 36 insertions(+) create mode 100644 ntc_templates/templates/aruba_os_show_version.textfsm create mode 100644 tests/aruba_os/show_version/aruba_os_show_version.raw create mode 100644 tests/aruba_os/show_version/aruba_os_show_version.yml diff --git a/ntc_templates/templates/aruba_os_show_version.textfsm b/ntc_templates/templates/aruba_os_show_version.textfsm new file mode 100644 index 0000000000..da047283c2 --- /dev/null +++ b/ntc_templates/templates/aruba_os_show_version.textfsm @@ -0,0 +1,18 @@ +Value MODEL (\S+) +Value VERSION (\d+.\d+.\d+.\d+\s*\S+) +Value COMPILATION (.+) +Value FIPS_MODE (\S+) +Value UPTIME (.+) +Value REBOOT_CAUSE (.+) + +Start + ^\s*Aruba\s*Operating\s*System\s*Software + ^\s*ArubaOS\s*\(MODEL:\s*${MODEL}\),\s*Version\s*${VERSION} + ^\s*Website:\s*http://www.arubanetworks.com + ^\s*\(c\)\s*Copyright\s*\d+\s*Hewlett\s*Packard\s*Enterprise\s*Development\s*LP\. + ^\s*Compiled\s*on\s*${COMPILATION} + ^\s*FIPS\s*Mode\s*:\s*${FIPS_MODE} + ^\s*AP\s*uptime\s*is\s*${UPTIME} + ^\s*Reboot\s*Time\s*and\s*Cause\s*:\s*${REBOOT_CAUSE} + ^\s*$$ + ^.*$$ -> Error \ No newline at end of file diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 2298eca7f7..f6835ca12c 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -112,6 +112,7 @@ aruba_os_show_ip_interface_brief.textfsm, .*, aruba_os, sh[[ow]] ip in[[terface] aruba_os_show_ap_radio-database.textfsm, .*, aruba_os, show ap radio-database aruba_os_show_ap_database_long.textfsm, .*, aruba_os, show ap database long aruba_os_show_ap_database.textfsm, .*, aruba_os, show ap database +aruba_os_show_version.textfsm, .*, aruba_os, sh[[ow]] ve[[rsion]] aruba_os_show_arp.textfsm, .*, aruba_os, sh[[ow]] arp avaya_ers_show_mac-address-table.textfsm, .*, avaya_ers, sh[[ow]] mac-a[[ddress-table]] diff --git a/tests/aruba_os/show_version/aruba_os_show_version.raw b/tests/aruba_os/show_version/aruba_os_show_version.raw new file mode 100644 index 0000000000..63467cd865 --- /dev/null +++ b/tests/aruba_os/show_version/aruba_os_show_version.raw @@ -0,0 +1,9 @@ +Aruba Operating System Software. +ArubaOS (MODEL: 310), Version 01.01.0.1 SSR +Website: http://www.arubanetworks.com +(c) Copyright 2001 Hewlett Packard Enterprise Development LP. +Compiled on 2001-01-01 at 01:01:01 UTC (build 00001) by jenkins +FIPS Mode :disabled + +AP uptime is 01 hours 01 minutes 01 seconds +Reboot Time and Cause: AP rebooted caused by cold HW reset(power loss) diff --git a/tests/aruba_os/show_version/aruba_os_show_version.yml b/tests/aruba_os/show_version/aruba_os_show_version.yml new file mode 100644 index 0000000000..6db9c09561 --- /dev/null +++ b/tests/aruba_os/show_version/aruba_os_show_version.yml @@ -0,0 +1,8 @@ +--- +parsed_sample: + - compilation: "2001-01-01 at 01:01:01 UTC (build 00001) by jenkins" + fips_mode: "disabled" + model: "310" + reboot_cause: "AP rebooted caused by cold HW reset(power loss)" + uptime: "01 hours 01 minutes 01 seconds" + version: "01.01.0.1 SSR" From 256d441fe2023bbc15e2a45e8b5e9dcb4dc9f9b1 Mon Sep 17 00:00:00 2001 From: eperpinya Date: Wed, 9 Oct 2024 12:37:41 +0200 Subject: [PATCH 2/5] change from aruba_os to aruba_procurve --- ...how_version.textfsm => aruba_procurve_show_version.textfsm} | 0 ntc_templates/templates/index | 3 ++- .../show_version/aruba_procurve_show_version.raw} | 0 .../show_version/aruba_procurve_show_version.yml} | 0 tests/test_index_order.py | 1 + 5 files changed, 3 insertions(+), 1 deletion(-) rename ntc_templates/templates/{aruba_os_show_version.textfsm => aruba_procurve_show_version.textfsm} (100%) rename tests/{aruba_os/show_version/aruba_os_show_version.raw => aruba_procurve/show_version/aruba_procurve_show_version.raw} (100%) rename tests/{aruba_os/show_version/aruba_os_show_version.yml => aruba_procurve/show_version/aruba_procurve_show_version.yml} (100%) diff --git a/ntc_templates/templates/aruba_os_show_version.textfsm b/ntc_templates/templates/aruba_procurve_show_version.textfsm similarity index 100% rename from ntc_templates/templates/aruba_os_show_version.textfsm rename to ntc_templates/templates/aruba_procurve_show_version.textfsm diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index f6835ca12c..4985048c76 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -112,9 +112,10 @@ aruba_os_show_ip_interface_brief.textfsm, .*, aruba_os, sh[[ow]] ip in[[terface] aruba_os_show_ap_radio-database.textfsm, .*, aruba_os, show ap radio-database aruba_os_show_ap_database_long.textfsm, .*, aruba_os, show ap database long aruba_os_show_ap_database.textfsm, .*, aruba_os, show ap database -aruba_os_show_version.textfsm, .*, aruba_os, sh[[ow]] ve[[rsion]] aruba_os_show_arp.textfsm, .*, aruba_os, sh[[ow]] arp +aruba_procurve_show_version.textfsm, .*, aruba_procurve, sh[[ow]] ve[[rsion]] + avaya_ers_show_mac-address-table.textfsm, .*, avaya_ers, sh[[ow]] mac-a[[ddress-table]] avaya_ers_show_mlt_all-members.textfsm, .*, avaya_ers, sh[[ow]] ml[[t]] a[[ll-members]] avaya_ers_show_interface_name.textfsm, .*, avaya_ers, sh[[ow]] in[[terfaces]] n[[ames]] diff --git a/tests/aruba_os/show_version/aruba_os_show_version.raw b/tests/aruba_procurve/show_version/aruba_procurve_show_version.raw similarity index 100% rename from tests/aruba_os/show_version/aruba_os_show_version.raw rename to tests/aruba_procurve/show_version/aruba_procurve_show_version.raw diff --git a/tests/aruba_os/show_version/aruba_os_show_version.yml b/tests/aruba_procurve/show_version/aruba_procurve_show_version.yml similarity index 100% rename from tests/aruba_os/show_version/aruba_os_show_version.yml rename to tests/aruba_procurve/show_version/aruba_procurve_show_version.yml diff --git a/tests/test_index_order.py b/tests/test_index_order.py index 18ebd41e59..0412450eaf 100755 --- a/tests/test_index_order.py +++ b/tests/test_index_order.py @@ -13,6 +13,7 @@ "arista_eos", "aruba_aoscx", "aruba_os", + "aruba_procurve", "avaya_ers", "avaya_vsp", "broadcom_icos", From b141af2e83addb733fbee525fd282e3e86b472cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enric=20Perpiny=C3=A0=20Pitarch?= Date: Wed, 9 Oct 2024 17:28:19 +0200 Subject: [PATCH 3/5] Update ntc_templates/templates/aruba_procurve_show_version.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- ntc_templates/templates/aruba_procurve_show_version.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/aruba_procurve_show_version.textfsm b/ntc_templates/templates/aruba_procurve_show_version.textfsm index da047283c2..b1857091fe 100644 --- a/ntc_templates/templates/aruba_procurve_show_version.textfsm +++ b/ntc_templates/templates/aruba_procurve_show_version.textfsm @@ -15,4 +15,4 @@ Start ^\s*AP\s*uptime\s*is\s*${UPTIME} ^\s*Reboot\s*Time\s*and\s*Cause\s*:\s*${REBOOT_CAUSE} ^\s*$$ - ^.*$$ -> Error \ No newline at end of file + ^.*$$ -> Error From 2ff7cac40a215e40a434776311021dbfa9fd5198 Mon Sep 17 00:00:00 2001 From: eperpinya Date: Wed, 9 Oct 2024 17:39:49 +0200 Subject: [PATCH 4/5] change to hp_procurve --- ...e_show_version.textfsm => hp_procurve_show_version.textfsm} | 0 ntc_templates/templates/index | 3 +-- .../show_version/hp_procurve_show_version.raw} | 0 .../show_version/hp_procurve_show_version.yml} | 0 tests/test_index_order.py | 1 - 5 files changed, 1 insertion(+), 3 deletions(-) rename ntc_templates/templates/{aruba_procurve_show_version.textfsm => hp_procurve_show_version.textfsm} (100%) rename tests/{aruba_procurve/show_version/aruba_procurve_show_version.raw => hp_procurve/show_version/hp_procurve_show_version.raw} (100%) rename tests/{aruba_procurve/show_version/aruba_procurve_show_version.yml => hp_procurve/show_version/hp_procurve_show_version.yml} (100%) diff --git a/ntc_templates/templates/aruba_procurve_show_version.textfsm b/ntc_templates/templates/hp_procurve_show_version.textfsm similarity index 100% rename from ntc_templates/templates/aruba_procurve_show_version.textfsm rename to ntc_templates/templates/hp_procurve_show_version.textfsm diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 4985048c76..9a872a2105 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -114,8 +114,6 @@ aruba_os_show_ap_database_long.textfsm, .*, aruba_os, show ap database long aruba_os_show_ap_database.textfsm, .*, aruba_os, show ap database aruba_os_show_arp.textfsm, .*, aruba_os, sh[[ow]] arp -aruba_procurve_show_version.textfsm, .*, aruba_procurve, sh[[ow]] ve[[rsion]] - avaya_ers_show_mac-address-table.textfsm, .*, avaya_ers, sh[[ow]] mac-a[[ddress-table]] avaya_ers_show_mlt_all-members.textfsm, .*, avaya_ers, sh[[ow]] ml[[t]] a[[ll-members]] avaya_ers_show_interface_name.textfsm, .*, avaya_ers, sh[[ow]] in[[terfaces]] n[[ames]] @@ -632,6 +630,7 @@ hp_procurve_show_tech_buffers.textfsm, .*, hp_procurve, sh[[ow]] tec[[h]] buf[[f hp_procurve_show_mac-address.textfsm, .*, hp_procurve, sh[[ow]] mac-a[[ddress]] hp_procurve_show_interfaces.textfsm, .*, hp_procurve, sh[[ow]] int[[erfaces]] hp_procurve_show_ip_route.textfsm, .*, hp_procurve, sh[[ow]] ip ro[[ute]] +hp_procurve_show_version.textfsm, .*, hp_procurve, sh[[ow]] ve[[rsion]] hp_procurve_show_system.textfsm, .*, hp_procurve, sh[[ow]] syst[[em]] hp_procurve_show_trunks.textfsm, .*, hp_procurve, sh[[ow]] tr[[unks]] hp_procurve_show_vlans.textfsm, .*, hp_procurve, sh[[ow]] vl[[ans]] diff --git a/tests/aruba_procurve/show_version/aruba_procurve_show_version.raw b/tests/hp_procurve/show_version/hp_procurve_show_version.raw similarity index 100% rename from tests/aruba_procurve/show_version/aruba_procurve_show_version.raw rename to tests/hp_procurve/show_version/hp_procurve_show_version.raw diff --git a/tests/aruba_procurve/show_version/aruba_procurve_show_version.yml b/tests/hp_procurve/show_version/hp_procurve_show_version.yml similarity index 100% rename from tests/aruba_procurve/show_version/aruba_procurve_show_version.yml rename to tests/hp_procurve/show_version/hp_procurve_show_version.yml diff --git a/tests/test_index_order.py b/tests/test_index_order.py index 0412450eaf..18ebd41e59 100755 --- a/tests/test_index_order.py +++ b/tests/test_index_order.py @@ -13,7 +13,6 @@ "arista_eos", "aruba_aoscx", "aruba_os", - "aruba_procurve", "avaya_ers", "avaya_vsp", "broadcom_icos", From 8dc584c94413acc68260fadc4f5f8f0d389c9969 Mon Sep 17 00:00:00 2001 From: evilmonkey19 Date: Sat, 12 Oct 2024 00:43:16 +0200 Subject: [PATCH 5/5] added support for aruba_procurve --- ntc_templates/templates/index | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 9a872a2105..86ae369e2b 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -621,21 +621,21 @@ hp_comware_display_vlan_all.textfsm, .*, hp_comware, di[[splay]] v[[lan]] a[[ll] hp_comware_display_clock.textfsm, .*, hp_comware, di[[splay]] clo[[ck]] hp_comware_display_arp.textfsm, .*, hp_comware, di[[splay]] a[[rp]] -hp_procurve_show_lldp_info_remote-device_detail.textfsm, .*, hp_procurve, sh[[ow]] ll[[dp]] i[[nfo]] r[[emote-device]] .+ -hp_procurve_show_lldp_info_remote-device.textfsm, .*, hp_procurve, sh[[ow]] ll[[dp]] i[[nfo]] r[[emote-device]] -hp_procurve_show_cdp_neighbors_detail.textfsm, .*, hp_procurve, sh[[ow]] cd[[p]] nei[[ghbors]] d[[etail]] -hp_procurve_show_interfaces_brief.textfsm, .*, hp_procurve, sh[[ow]] int[[erfaces]] b[[rief]] -hp_procurve_show_port-security.textfsm, .*, hp_procurve, sh[[ow]] port-s[[ecurity]] -hp_procurve_show_tech_buffers.textfsm, .*, hp_procurve, sh[[ow]] tec[[h]] buf[[ffers]] -hp_procurve_show_mac-address.textfsm, .*, hp_procurve, sh[[ow]] mac-a[[ddress]] -hp_procurve_show_interfaces.textfsm, .*, hp_procurve, sh[[ow]] int[[erfaces]] -hp_procurve_show_ip_route.textfsm, .*, hp_procurve, sh[[ow]] ip ro[[ute]] -hp_procurve_show_version.textfsm, .*, hp_procurve, sh[[ow]] ve[[rsion]] -hp_procurve_show_system.textfsm, .*, hp_procurve, sh[[ow]] syst[[em]] -hp_procurve_show_trunks.textfsm, .*, hp_procurve, sh[[ow]] tr[[unks]] -hp_procurve_show_vlans.textfsm, .*, hp_procurve, sh[[ow]] vl[[ans]] -hp_procurve_show_arp.textfsm, .*, hp_procurve, sh[[ow]] ar[[p]] -hp_procurve_show_ip.textfsm, .*, hp_procurve, sh[[ow]] ip +hp_procurve_show_lldp_info_remote-device_detail.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ll[[dp]] i[[nfo]] r[[emote-device]] .+ +hp_procurve_show_lldp_info_remote-device.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ll[[dp]] i[[nfo]] r[[emote-device]] +hp_procurve_show_cdp_neighbors_detail.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] cd[[p]] nei[[ghbors]] d[[etail]] +hp_procurve_show_interfaces_brief.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] int[[erfaces]] b[[rief]] +hp_procurve_show_port-security.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] port-s[[ecurity]] +hp_procurve_show_tech_buffers.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] tec[[h]] buf[[ffers]] +hp_procurve_show_mac-address.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] mac-a[[ddress]] +hp_procurve_show_interfaces.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] int[[erfaces]] +hp_procurve_show_ip_route.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ip ro[[ute]] +hp_procurve_show_version.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ve[[rsion]] +hp_procurve_show_system.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] syst[[em]] +hp_procurve_show_trunks.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] tr[[unks]] +hp_procurve_show_vlans.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] vl[[ans]] +hp_procurve_show_arp.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ar[[p]] +hp_procurve_show_ip.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ip huawei_smartax_display_ont_info_summary_ont.textfsm:huawei_smartax_display_ont_info_summary_sn.textfsm, .*, huawei_smartax, di[[splay]] ont i[[nfo]] su[[mmary]] \S+ *$ huawei_smartax_display_ont_info_0_1_2.textfsm:huawei_smartax_display_ont_info_description.textfsm, .*, huawei_smartax, di[[splay]] ont i[[nfo]] (\d+\s*|\d+ \d+ \d+\s*)\s*[[all]] *$