From 920d421ad1b3f8820c369645e62bef78b5c1a59d Mon Sep 17 00:00:00 2001 From: Julien Corsini <30651341+juliencorsini@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:58:53 +0100 Subject: [PATCH 1/3] Update hp_comware_display_interface_brief.textfsm Fixed regexp of hp_comware_display_interface_brief.textfsm for duplex value. Fixes https://github.com/networktocode/ntc-templates/issues/1949 --- .../templates/hp_comware_display_interface_brief.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/hp_comware_display_interface_brief.textfsm b/ntc_templates/templates/hp_comware_display_interface_brief.textfsm index 72abbea2f7..43b1c81b61 100644 --- a/ntc_templates/templates/hp_comware_display_interface_brief.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface_brief.textfsm @@ -3,7 +3,7 @@ Value LINK (\S+) Value PROTOCOL ((?:UP|DOWN)(?:\(s\))?) Value MAIN_IP (\S+) Value SPEED (\S+) -Value DUPLEX (A|H|F) +Value DUPLEX (\S+) Value TYPE (A|T|H) Value PVID (\d+) Value DESCRIPTION (.*?) From 44cff27513fa88d0248b846b9468b73e55f8cda2 Mon Sep 17 00:00:00 2001 From: Julien Corsini <30651341+juliencorsini@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:58:53 +0100 Subject: [PATCH 2/3] Update hp_comware_display_interface_brief.textfsm Fixed regexp of hp_comware_display_interface_brief.textfsm for duplex value. Fixes https://github.com/networktocode/ntc-templates/issues/1949 --- .../templates/hp_comware_display_interface_brief.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/hp_comware_display_interface_brief.textfsm b/ntc_templates/templates/hp_comware_display_interface_brief.textfsm index 72abbea2f7..43b1c81b61 100644 --- a/ntc_templates/templates/hp_comware_display_interface_brief.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface_brief.textfsm @@ -3,7 +3,7 @@ Value LINK (\S+) Value PROTOCOL ((?:UP|DOWN)(?:\(s\))?) Value MAIN_IP (\S+) Value SPEED (\S+) -Value DUPLEX (A|H|F) +Value DUPLEX (\S+) Value TYPE (A|T|H) Value PVID (\d+) Value DESCRIPTION (.*?) From 9ca634fb0d9281b23870ee16b5f501e213db281d Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:48:57 -0500 Subject: [PATCH 3/3] Add test data for HP Comware full auto ports (That's ports set to auto-negotiate, but that had negotiated Full duplex) * Test data from issue#1949 --- ...mware_display_interface_brief_fullauto.raw | 15 ++++++ ...mware_display_interface_brief_fullauto.yml | 47 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 tests/hp_comware/display_interface_brief/hp_comware_display_interface_brief_fullauto.raw create mode 100644 tests/hp_comware/display_interface_brief/hp_comware_display_interface_brief_fullauto.yml diff --git a/tests/hp_comware/display_interface_brief/hp_comware_display_interface_brief_fullauto.raw b/tests/hp_comware/display_interface_brief/hp_comware_display_interface_brief_fullauto.raw new file mode 100644 index 0000000000..8b19deaddd --- /dev/null +++ b/tests/hp_comware/display_interface_brief/hp_comware_display_interface_brief_fullauto.raw @@ -0,0 +1,15 @@ +The brief information of interface(s) under route mode: +Link: ADM - administratively down; Stby - standby +Protocol: (s) - spoofing +Interface Link Protocol Main IP Description +M-GE0/0/0 ADM DOWN -- +NULL0 UP UP(s) -- +Vlan1081 UP UP 1.2.3.6 + +The brief information of interface(s) under bridge mode: +Link: ADM - administratively down; Stby - standby +Speed or Duplex: (a)/A - auto; H - half; F - full +Type: A - access; T - trunk; H - hybrid +Interface Link Speed Duplex Type PVID Description +BAGG10 UP 20G(a) F(a) T 4094 mydescr +BAGG11 UP 20G(a) F(a) T 4094 mydescr diff --git a/tests/hp_comware/display_interface_brief/hp_comware_display_interface_brief_fullauto.yml b/tests/hp_comware/display_interface_brief/hp_comware_display_interface_brief_fullauto.yml new file mode 100644 index 0000000000..bac7589da4 --- /dev/null +++ b/tests/hp_comware/display_interface_brief/hp_comware_display_interface_brief_fullauto.yml @@ -0,0 +1,47 @@ +--- +parsed_sample: + - description: "" + duplex: "" + interface: "M-GE0/0/0" + link: "ADM" + main_ip: "--" + protocol: "DOWN" + pvid: "" + speed: "" + type: "" + - description: "" + duplex: "" + interface: "NULL0" + link: "UP" + main_ip: "--" + protocol: "UP(s)" + pvid: "" + speed: "" + type: "" + - description: "" + duplex: "" + interface: "Vlan1081" + link: "UP" + main_ip: "1.2.3.6" + protocol: "UP" + pvid: "" + speed: "" + type: "" + - description: "mydescr" + duplex: "F(a)" + interface: "BAGG10" + link: "UP" + main_ip: "" + protocol: "" + pvid: "4094" + speed: "20G(a)" + type: "T" + - description: "mydescr" + duplex: "F(a)" + interface: "BAGG11" + link: "UP" + main_ip: "" + protocol: "" + pvid: "4094" + speed: "20G(a)" + type: "T"