From 5a53caa37558744480774943c01d0611f1906dac Mon Sep 17 00:00:00 2001 From: eperpinya Date: Fri, 22 Nov 2024 14:04:24 +0100 Subject: [PATCH 01/11] Added template for Alcatel AOS: `show interfaces port` --- .../alcatel_aos_show_interfaces_port.textfsm | 16 +++++ ntc_templates/templates/index | 1 + .../alcatel_aos_show_interfaces_port_R6.raw | 14 ++++ .../alcatel_aos_show_interfaces_port_R6.yml | 72 +++++++++++++++++++ 4 files changed, 103 insertions(+) create mode 100644 ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm create mode 100644 tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw create mode 100644 tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml diff --git a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm new file mode 100644 index 0000000000..f11f100fd9 --- /dev/null +++ b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm @@ -0,0 +1,16 @@ +Value PORT ((\d+\/?)+) +Value WTR_RUNNING (\#?) +Value PERMANENT_SHUTDOWN (\*?) +Value ADMIN_STATUS (\S+) +Value LINK_STATUS (\S+) +Value VIOLATIONS (\S+) +Value RECOVERY_TIME (\d+) +Value RECOVERY_MAX (\d+) +Value WTR (\d+) +Value ALIAS (\S+) + +Start + ^\s*[-+]+\s*$$ + ^\s*${WTR_RUNNING}${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR}\s+${ALIAS}\s*$$ -> Record + ^\s* + ^.*$$ -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 27f940e99f..e0d2e4b1ea 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -11,6 +11,7 @@ # Template, Hostname, Platform, Command +alcatel_aos_show_interfaces_port.textfsm, .*, alcatel_aos, sh[[ow]] in[[terfaces]] p[[ort]] alcatel_aos_show_vlan_port.textfsm, .*, alcatel_aos, sh[[ow]] vl[[an]] (p[[ort]]|m[[embers]]) alcatel_aos_show_vlan.textfsm, .*, alcatel_aos, show vlan diff --git a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw new file mode 100644 index 0000000000..ffb4074abe --- /dev/null +++ b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw @@ -0,0 +1,14 @@ +Legends: WTR - Wait To Restore + # - WTR Timer is Running & Port is in wait-to-restore state + * - Permanent Shutdown + +Slot/ Admin Link Violations Recovery Recovery WTR Alias +Port Status Status Time Max (sec) +------+----------+---------+----------+----------+----------+----------+----------------------------------------- + *1/1 enable up none 300 10 0 "" + 1/2 enable down none 300 10 0 "" + 1/17 disable down none 300 10 0 "" + 1/23 disable down none 300 10 0 "" + 1/25 enable up none 300 10 0 "" + 1/26 enable down none 300 10 0 "" + 1/28 enable down none 0 0 0 "" \ No newline at end of file diff --git a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml new file mode 100644 index 0000000000..d302c5c3ec --- /dev/null +++ b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml @@ -0,0 +1,72 @@ +--- +parsed_sample: + - admin_status: "enable" + alias: "\"\"" + link_status: "up" + permanent_shutdown: "*" + port: "1/1" + recovery_max: "10" + recovery_time: "300" + violations: "none" + wtr: "0" + wtr_running: "" + - admin_status: "enable" + alias: "\"\"" + link_status: "down" + permanent_shutdown: "" + port: "1/2" + recovery_max: "10" + recovery_time: "300" + violations: "none" + wtr: "0" + wtr_running: "" + - admin_status: "disable" + alias: "\"\"" + link_status: "down" + permanent_shutdown: "" + port: "1/17" + recovery_max: "10" + recovery_time: "300" + violations: "none" + wtr: "0" + wtr_running: "" + - admin_status: "disable" + alias: "\"\"" + link_status: "down" + permanent_shutdown: "" + port: "1/23" + recovery_max: "10" + recovery_time: "300" + violations: "none" + wtr: "0" + wtr_running: "" + - admin_status: "enable" + alias: "\"\"" + link_status: "up" + permanent_shutdown: "" + port: "1/25" + recovery_max: "10" + recovery_time: "300" + violations: "none" + wtr: "0" + wtr_running: "" + - admin_status: "enable" + alias: "\"\"" + link_status: "down" + permanent_shutdown: "" + port: "1/26" + recovery_max: "10" + recovery_time: "300" + violations: "none" + wtr: "0" + wtr_running: "" + - admin_status: "enable" + alias: "\"\"" + link_status: "down" + permanent_shutdown: "" + port: "1/28" + recovery_max: "0" + recovery_time: "0" + violations: "none" + wtr: "0" + wtr_running: "" From 466fe6a4749a515bc226ab432dcf38b2ca607c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enric=20Perpiny=C3=A0=20Pitarch?= Date: Mon, 25 Nov 2024 11:34:34 +0100 Subject: [PATCH 02/11] Update ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm Co-authored-by: Michael Bear <38406045+mjbear@users.noreply.github.com> --- .../templates/alcatel_aos_show_interfaces_port.textfsm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm index f11f100fd9..425acf1a5b 100644 --- a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm +++ b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm @@ -6,11 +6,11 @@ Value LINK_STATUS (\S+) Value VIOLATIONS (\S+) Value RECOVERY_TIME (\d+) Value RECOVERY_MAX (\d+) -Value WTR (\d+) +Value WTR_TIME (\d+) Value ALIAS (\S+) Start - ^\s*[-+]+\s*$$ - ^\s*${WTR_RUNNING}${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR}\s+${ALIAS}\s*$$ -> Record + ^\s*-+\+ + ^\s*${WTR_RUNNING}${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR_TIME}\s+${ALIAS}\s*$$ -> Record ^\s* ^.*$$ -> Error From 30fb6bfe394c25c2b141d843ee82903adf5b3a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enric=20Perpiny=C3=A0=20Pitarch?= Date: Mon, 25 Nov 2024 11:34:44 +0100 Subject: [PATCH 03/11] Update tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml Co-authored-by: Michael Bear <38406045+mjbear@users.noreply.github.com> --- .../alcatel_aos_show_interfaces_port_R6.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml index d302c5c3ec..dbcce7861d 100644 --- a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml +++ b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml @@ -8,8 +8,8 @@ parsed_sample: recovery_max: "10" recovery_time: "300" violations: "none" - wtr: "0" wtr_running: "" + wtr_time: "0" - admin_status: "enable" alias: "\"\"" link_status: "down" @@ -18,8 +18,8 @@ parsed_sample: recovery_max: "10" recovery_time: "300" violations: "none" - wtr: "0" wtr_running: "" + wtr_time: "0" - admin_status: "disable" alias: "\"\"" link_status: "down" @@ -28,8 +28,8 @@ parsed_sample: recovery_max: "10" recovery_time: "300" violations: "none" - wtr: "0" wtr_running: "" + wtr_time: "0" - admin_status: "disable" alias: "\"\"" link_status: "down" @@ -38,8 +38,8 @@ parsed_sample: recovery_max: "10" recovery_time: "300" violations: "none" - wtr: "0" wtr_running: "" + wtr_time: "0" - admin_status: "enable" alias: "\"\"" link_status: "up" @@ -48,8 +48,8 @@ parsed_sample: recovery_max: "10" recovery_time: "300" violations: "none" - wtr: "0" wtr_running: "" + wtr_time: "0" - admin_status: "enable" alias: "\"\"" link_status: "down" @@ -58,8 +58,8 @@ parsed_sample: recovery_max: "10" recovery_time: "300" violations: "none" - wtr: "0" wtr_running: "" + wtr_time: "0" - admin_status: "enable" alias: "\"\"" link_status: "down" @@ -68,5 +68,5 @@ parsed_sample: recovery_max: "0" recovery_time: "0" violations: "none" - wtr: "0" wtr_running: "" + wtr_time: "0" From ac9465b077c420a85fec923ac49ab474cd2ba939 Mon Sep 17 00:00:00 2001 From: eperpinya Date: Mon, 25 Nov 2024 11:35:52 +0100 Subject: [PATCH 04/11] fixing bug on alias --- .../alcatel_aos_show_interfaces_port.textfsm | 4 ++-- .../alcatel_aos_show_interfaces_port_R6.raw | 2 +- .../alcatel_aos_show_interfaces_port_R6.yml | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm index f11f100fd9..ca46ce9431 100644 --- a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm +++ b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm @@ -7,10 +7,10 @@ Value VIOLATIONS (\S+) Value RECOVERY_TIME (\d+) Value RECOVERY_MAX (\d+) Value WTR (\d+) -Value ALIAS (\S+) +Value ALIAS (\S.+\S) Start ^\s*[-+]+\s*$$ - ^\s*${WTR_RUNNING}${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR}\s+${ALIAS}\s*$$ -> Record + ^\s*${WTR_RUNNING}${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR}\s+(""|"${ALIAS}")\s*$$ -> Record ^\s* ^.*$$ -> Error diff --git a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw index ffb4074abe..d6a513dbae 100644 --- a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw +++ b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw @@ -5,7 +5,7 @@ Legends: WTR - Wait To Restore Slot/ Admin Link Violations Recovery Recovery WTR Alias Port Status Status Time Max (sec) ------+----------+---------+----------+----------+----------+----------+----------------------------------------- - *1/1 enable up none 300 10 0 "" + *1/1 enable up none 300 10 0 "Hello" 1/2 enable down none 300 10 0 "" 1/17 disable down none 300 10 0 "" 1/23 disable down none 300 10 0 "" diff --git a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml index d302c5c3ec..9ba747248e 100644 --- a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml +++ b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml @@ -1,7 +1,7 @@ --- parsed_sample: - admin_status: "enable" - alias: "\"\"" + alias: "Hello" link_status: "up" permanent_shutdown: "*" port: "1/1" @@ -11,7 +11,7 @@ parsed_sample: wtr: "0" wtr_running: "" - admin_status: "enable" - alias: "\"\"" + alias: "" link_status: "down" permanent_shutdown: "" port: "1/2" @@ -21,7 +21,7 @@ parsed_sample: wtr: "0" wtr_running: "" - admin_status: "disable" - alias: "\"\"" + alias: "" link_status: "down" permanent_shutdown: "" port: "1/17" @@ -31,7 +31,7 @@ parsed_sample: wtr: "0" wtr_running: "" - admin_status: "disable" - alias: "\"\"" + alias: "" link_status: "down" permanent_shutdown: "" port: "1/23" @@ -41,7 +41,7 @@ parsed_sample: wtr: "0" wtr_running: "" - admin_status: "enable" - alias: "\"\"" + alias: "" link_status: "up" permanent_shutdown: "" port: "1/25" @@ -51,7 +51,7 @@ parsed_sample: wtr: "0" wtr_running: "" - admin_status: "enable" - alias: "\"\"" + alias: "" link_status: "down" permanent_shutdown: "" port: "1/26" @@ -61,7 +61,7 @@ parsed_sample: wtr: "0" wtr_running: "" - admin_status: "enable" - alias: "\"\"" + alias: "" link_status: "down" permanent_shutdown: "" port: "1/28" From c21755c052b479bed510ce28a886eb9b1ce6986f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enric=20Perpiny=C3=A0=20Pitarch?= Date: Tue, 26 Nov 2024 16:04:13 +0100 Subject: [PATCH 05/11] Update ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm Co-authored-by: Michael Bear <38406045+mjbear@users.noreply.github.com> --- .../templates/alcatel_aos_show_interfaces_port.textfsm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm index 2edbf0ca52..2e060e9a2b 100644 --- a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm +++ b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm @@ -7,10 +7,10 @@ Value VIOLATIONS (\S+) Value RECOVERY_TIME (\d+) Value RECOVERY_MAX (\d+) Value WTR_TIME (\d+) -Value ALIAS (\S.+\S) +Value ALIAS (.*) Start ^\s*-+\+ - ^\s*${WTR_RUNNING}${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR_TIME}\s+(""|"${ALIAS}")\s*$$ -> Record + ^\s*${WTR_RUNNING}${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR_TIME}\s+"${ALIAS}"\s*$$ -> Record ^\s* ^.*$$ -> Error From 194d04d3be75582a5457306ce938419b0974ad23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enric=20Perpiny=C3=A0=20Pitarch?= Date: Thu, 28 Nov 2024 14:53:35 +0100 Subject: [PATCH 06/11] Update ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- .../templates/alcatel_aos_show_interfaces_port.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm index 2e060e9a2b..1660925cbf 100644 --- a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm +++ b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm @@ -12,5 +12,5 @@ Value ALIAS (.*) Start ^\s*-+\+ ^\s*${WTR_RUNNING}${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR_TIME}\s+"${ALIAS}"\s*$$ -> Record - ^\s* + ^\s*$$ ^.*$$ -> Error From 5d0f8b3305436ec63e1e0bf6349d91ac7b367da9 Mon Sep 17 00:00:00 2001 From: eperpinya Date: Mon, 9 Dec 2024 11:15:18 +0100 Subject: [PATCH 07/11] Updated templates and tests adding the `Wait To Restore` option --- .../templates/alcatel_aos_show_interfaces_port.textfsm | 8 +++++--- .../alcatel_aos_show_interfaces_port_R6.raw | 3 ++- .../alcatel_aos_show_interfaces_port_R6.yml | 10 ++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm index 1660925cbf..8e0beb1468 100644 --- a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm +++ b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm @@ -1,16 +1,18 @@ Value PORT ((\d+\/?)+) -Value WTR_RUNNING (\#?) Value PERMANENT_SHUTDOWN (\*?) Value ADMIN_STATUS (\S+) Value LINK_STATUS (\S+) Value VIOLATIONS (\S+) Value RECOVERY_TIME (\d+) Value RECOVERY_MAX (\d+) +Value WTR_RUNNING (\#?) Value WTR_TIME (\d+) Value ALIAS (.*) Start - ^\s*-+\+ - ^\s*${WTR_RUNNING}${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+${WTR_TIME}\s+"${ALIAS}"\s*$$ -> Record + ^\s*-+\+ -> Table + +Table + ^\s*${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+(?:${WTR_RUNNING}\s+)?${WTR_TIME}\s+"${ALIAS}"\s*$$ -> Record ^\s*$$ ^.*$$ -> Error diff --git a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw index d6a513dbae..a0e26aed65 100644 --- a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw +++ b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.raw @@ -7,8 +7,9 @@ Port Status Status Time Max (sec) ------+----------+---------+----------+----------+----------+----------+----------------------------------------- *1/1 enable up none 300 10 0 "Hello" 1/2 enable down none 300 10 0 "" + 1/11 enable down none 300 10 # 10 "" 1/17 disable down none 300 10 0 "" 1/23 disable down none 300 10 0 "" 1/25 enable up none 300 10 0 "" 1/26 enable down none 300 10 0 "" - 1/28 enable down none 0 0 0 "" \ No newline at end of file + 1/28 enable down none 0 0 0 "" diff --git a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml index f6f75b32fb..ce2ae5bc42 100644 --- a/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml +++ b/tests/alcatel_aos/show_interfaces_port/alcatel_aos_show_interfaces_port_R6.yml @@ -20,6 +20,16 @@ parsed_sample: violations: "none" wtr_running: "" wtr_time: "0" + - admin_status: "enable" + alias: "" + link_status: "down" + permanent_shutdown: "" + port: "1/11" + recovery_max: "10" + recovery_time: "300" + violations: "none" + wtr_running: "#" + wtr_time: "10" - admin_status: "disable" alias: "" link_status: "down" From 885a8c68cb7684fa45482143cf6f93717e0d65af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enric=20Perpiny=C3=A0=20Pitarch?= Date: Tue, 10 Dec 2024 09:30:56 +0100 Subject: [PATCH 08/11] Update ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- .../templates/alcatel_aos_show_interfaces_port.textfsm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm index 8e0beb1468..806f45ce16 100644 --- a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm +++ b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm @@ -11,6 +11,11 @@ Value ALIAS (.*) Start ^\s*-+\+ -> Table + ^Legends: WTR - Wait To Restore + ^\s+# + ^\s+* + ^\s*Slot/\s+Admin\s+Link\s+Violations\s+Recovery\s+Recovery\s+WTR\s+Alias\s*$$ + ^\s*Port\s+Status\s+Status\s+Time\s+Max\s+(sec)\s*$$ Table ^\s*${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+(?:${WTR_RUNNING}\s+)?${WTR_TIME}\s+"${ALIAS}"\s*$$ -> Record From 6c590defa97fed38451bc94e266cc48d10ff7a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enric=20Perpiny=C3=A0=20Pitarch?= Date: Tue, 10 Dec 2024 09:39:24 +0100 Subject: [PATCH 09/11] Update ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm Co-authored-by: Michael Bear <38406045+mjbear@users.noreply.github.com> --- ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm | 1 + 1 file changed, 1 insertion(+) diff --git a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm index 806f45ce16..f9e491d2a7 100644 --- a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm +++ b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm @@ -16,6 +16,7 @@ Start ^\s+* ^\s*Slot/\s+Admin\s+Link\s+Violations\s+Recovery\s+Recovery\s+WTR\s+Alias\s*$$ ^\s*Port\s+Status\s+Status\s+Time\s+Max\s+(sec)\s*$$ + ^.*$$ -> Error Table ^\s*${PERMANENT_SHUTDOWN}${PORT}\s+${ADMIN_STATUS}\s+${LINK_STATUS}\s+${VIOLATIONS}\s+${RECOVERY_TIME}\s+${RECOVERY_MAX}\s+(?:${WTR_RUNNING}\s+)?${WTR_TIME}\s+"${ALIAS}"\s*$$ -> Record From 4ec956f5380378171d7a08da1cda1bec8b156f76 Mon Sep 17 00:00:00 2001 From: eperpinya Date: Tue, 10 Dec 2024 09:40:52 +0100 Subject: [PATCH 10/11] Fixing tests in case of a space --- .../templates/alcatel_aos_show_interfaces_port.textfsm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm index f9e491d2a7..faf717ba65 100644 --- a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm +++ b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm @@ -13,9 +13,10 @@ Start ^\s*-+\+ -> Table ^Legends: WTR - Wait To Restore ^\s+# - ^\s+* + ^\s+\* ^\s*Slot/\s+Admin\s+Link\s+Violations\s+Recovery\s+Recovery\s+WTR\s+Alias\s*$$ - ^\s*Port\s+Status\s+Status\s+Time\s+Max\s+(sec)\s*$$ + ^\s*Port\s+Status\s+Status\s+Time\s+Max\s+\(sec\)\s*$$ + ^\s*$$ ^.*$$ -> Error Table From 709ae992767fed342943c7eaff29bac1a5cc5f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enric=20Perpiny=C3=A0=20Pitarch?= Date: Tue, 10 Dec 2024 16:12:03 +0100 Subject: [PATCH 11/11] Update ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm Co-authored-by: Michael Bear <38406045+mjbear@users.noreply.github.com> --- .../templates/alcatel_aos_show_interfaces_port.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm index faf717ba65..70e30f49f9 100644 --- a/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm +++ b/ntc_templates/templates/alcatel_aos_show_interfaces_port.textfsm @@ -1,4 +1,4 @@ -Value PORT ((\d+\/?)+) +Value PORT (\S+) Value PERMANENT_SHUTDOWN (\*?) Value ADMIN_STATUS (\S+) Value LINK_STATUS (\S+)