From 6679dbbedbb2555b6d1fa97a751d692cbb209196 Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Thu, 9 Apr 2026 12:34:49 -0400 Subject: [PATCH 1/2] Add show port description multiline support --- .../alcatel_sros_show_port_description.textfsm | 2 ++ .../show_port_description_multiline.raw | 17 +++++++++++++++++ .../show_port_description_multiline.yml | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 tests/alcatel_sros/show_port_description/show_port_description_multiline.raw create mode 100644 tests/alcatel_sros/show_port_description/show_port_description_multiline.yml diff --git a/ntc_templates/templates/alcatel_sros_show_port_description.textfsm b/ntc_templates/templates/alcatel_sros_show_port_description.textfsm index 3c6446ed73..7b92ca555e 100644 --- a/ntc_templates/templates/alcatel_sros_show_port_description.textfsm +++ b/ntc_templates/templates/alcatel_sros_show_port_description.textfsm @@ -7,5 +7,7 @@ Start ^Port\s+Descriptions\s+on\s\S+\s+\S+\s*$$ ^Port\s+Id\s+Description\s*$$ ^${PORT_ID}\s+${DESCRIPTION}\s*$$ -> Record + ^${PORT_ID}$$ + ^\s+${DESCRIPTION}$$ -> Record ^-+\s*$$ ^. -> Error \ No newline at end of file diff --git a/tests/alcatel_sros/show_port_description/show_port_description_multiline.raw b/tests/alcatel_sros/show_port_description/show_port_description_multiline.raw new file mode 100644 index 0000000000..41df4ce0a7 --- /dev/null +++ b/tests/alcatel_sros/show_port_description/show_port_description_multiline.raw @@ -0,0 +1,17 @@ + +=============================================================================== +Port Descriptions on Satellite esat-11 +=============================================================================== +Port Id Description +------------------------------------------------------------------------------- +esat-11/1/1 OC_YOOI_yQRJZCQUYJ-RY-65-OFL5 +esat-11/1/4 YOOI-SL0566-65-lep0 +esat-11/1/14 1-Gig/10-Gig Ethernet +esat-11/1/64 1-Gig/10-Gig Ethernet +esat-11/1/c65 QSFP28 Connector +esat-11/1/c65/u1 + 100-Gig Ethernet +esat-11/1/c66 QSFP28 Connector +esat-11/1/c66/u1 + 100-Gig Ethernet +=============================================================================== \ No newline at end of file diff --git a/tests/alcatel_sros/show_port_description/show_port_description_multiline.yml b/tests/alcatel_sros/show_port_description/show_port_description_multiline.yml new file mode 100644 index 0000000000..a917908bb7 --- /dev/null +++ b/tests/alcatel_sros/show_port_description/show_port_description_multiline.yml @@ -0,0 +1,18 @@ +--- +parsed_sample: + - description: "OC_YOOI_yQRJZCQUYJ-RY-65-OFL5" + port_id: "esat-11/1/1" + - description: "YOOI-SL0566-65-lep0" + port_id: "esat-11/1/4" + - description: "1-Gig/10-Gig Ethernet " + port_id: "esat-11/1/14" + - description: "1-Gig/10-Gig Ethernet" + port_id: "esat-11/1/64" + - description: "QSFP28 Connector" + port_id: "esat-11/1/c65" + - description: "100-Gig Ethernet" + port_id: "esat-11/1/c65/u1" + - description: "QSFP28 Connector" + port_id: "esat-11/1/c66" + - description: "100-Gig Ethernet" + port_id: "esat-11/1/c66/u1" From 3765babf4f879ea4b0913b77ed13ba4c4dbb543e Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Thu, 9 Apr 2026 12:46:23 -0400 Subject: [PATCH 2/2] Add support for SROS port cross connects --- .../templates/alcatel_sros_show_port_description.textfsm | 2 +- .../show_port_description_multiline.raw | 8 ++++++++ .../show_port_description_multiline.yml | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ntc_templates/templates/alcatel_sros_show_port_description.textfsm b/ntc_templates/templates/alcatel_sros_show_port_description.textfsm index 7b92ca555e..0ae4686331 100644 --- a/ntc_templates/templates/alcatel_sros_show_port_description.textfsm +++ b/ntc_templates/templates/alcatel_sros_show_port_description.textfsm @@ -4,7 +4,7 @@ Value DESCRIPTION (.+) Start ^=+\s*$$ ^\s*$$ - ^Port\s+Descriptions\s+on\s\S+\s+\S+\s*$$ + ^Port\s+Descriptions\s+on\s\S+\s+\S+(\s*\S*\s*\S*)\s*$$ ^Port\s+Id\s+Description\s*$$ ^${PORT_ID}\s+${DESCRIPTION}\s*$$ -> Record ^${PORT_ID}$$ diff --git a/tests/alcatel_sros/show_port_description/show_port_description_multiline.raw b/tests/alcatel_sros/show_port_description/show_port_description_multiline.raw index 41df4ce0a7..402e5ad94d 100644 --- a/tests/alcatel_sros/show_port_description/show_port_description_multiline.raw +++ b/tests/alcatel_sros/show_port_description/show_port_description_multiline.raw @@ -14,4 +14,12 @@ esat-11/1/c65/u1 esat-11/1/c66 QSFP28 Connector esat-11/1/c66/u1 100-Gig Ethernet +=============================================================================== + +=============================================================================== +Port Descriptions on Port Cross Connect 1 +=============================================================================== +Port Id Description +------------------------------------------------------------------------------- +pxc-1.a Port cross-connect =============================================================================== \ No newline at end of file diff --git a/tests/alcatel_sros/show_port_description/show_port_description_multiline.yml b/tests/alcatel_sros/show_port_description/show_port_description_multiline.yml index a917908bb7..b18b89f061 100644 --- a/tests/alcatel_sros/show_port_description/show_port_description_multiline.yml +++ b/tests/alcatel_sros/show_port_description/show_port_description_multiline.yml @@ -16,3 +16,5 @@ parsed_sample: port_id: "esat-11/1/c66" - description: "100-Gig Ethernet" port_id: "esat-11/1/c66/u1" + - description: "Port cross-connect" + port_id: "pxc-1.a"