From 7011b35afb6a3a09ee2ce9dd5f05f28717af39c6 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Sat, 3 Dec 2022 12:56:25 +0100 Subject: [PATCH 01/25] edit index --- ntc_templates/templates/index | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 38e23a9600..2f6e63d387 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -443,11 +443,15 @@ fortinet_get_system_arp.textfsm, .*, fortinet, g[[et]] sy[[stem]] arp hp_comware_display_lldp_neighbor-information_verbose.textfsm, .*, hp_comware, di[[splay]] ll[[dp]] n[[eighbor-information]] v[[erbose]] hp_comware_display_counters_bound_interface.textfsm, .*, hp_comware, di[[splay]] cou[[nters]] (\S+) i[[nterface]] +hp_comware_display_link-aggregation_summary.textfsm, .*, hp_comware, di[[splay]] link-a[[ggregation]] s[[ummary]] hp_comware_display_ip_routing-table.textfsm, .*, hp_comware, di[[splay]] ip r[[outing-table]] +hp_comware_display_ip_vpn-instance.textfsm, .*, hp_comware, di[[splay]] ip vpn-[[instance]] hp_comware_display_device_manuinfo.textfsm, .*, hp_comware, di[[splay]] dev[[ice]] m[[anuinfo]] hp_comware_display_ip_interface.textfsm, .*, hp_comware, dis[[play]] ip i[[nterface]] hp_comware_display_mac-address.textfsm, .*, hp_comware, di[[splay]] mac-ad[[dress]] +hp_comware_display_port_trunk.textfsm, .*, hp_comware, di[[splay]] po[[rt]] tr[[unk]] hp_comware_display_vlan_brief.textfsm, .*, hp_comware, di[[splay]] v[[lan]] b[[rief]] +hp_comware_display_interface.textfsm, .*, hp_comware, di[[splay]] i[[nterface]] hp_comware_display_clock.textfsm, .*, hp_comware, di[[splay]] clo[[ck]] hp_comware_display_arp.textfsm, .*, hp_comware, di[[splay]] a[[rp]] From 566702639ac588d5953f33f07db2b4ebabe31db6 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Sat, 3 Dec 2022 12:58:12 +0100 Subject: [PATCH 02/25] edit index --- ntc_templates/templates/index | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 2f6e63d387..5c7da446ed 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -443,15 +443,15 @@ fortinet_get_system_arp.textfsm, .*, fortinet, g[[et]] sy[[stem]] arp hp_comware_display_lldp_neighbor-information_verbose.textfsm, .*, hp_comware, di[[splay]] ll[[dp]] n[[eighbor-information]] v[[erbose]] hp_comware_display_counters_bound_interface.textfsm, .*, hp_comware, di[[splay]] cou[[nters]] (\S+) i[[nterface]] -hp_comware_display_link-aggregation_summary.textfsm, .*, hp_comware, di[[splay]] link-a[[ggregation]] s[[ummary]] +hp_comware_display_link-aggregation_summary.textfsm, .*, hp_comware, dis[[play]] link[[-aggregation]] s[[ummary]] hp_comware_display_ip_routing-table.textfsm, .*, hp_comware, di[[splay]] ip r[[outing-table]] -hp_comware_display_ip_vpn-instance.textfsm, .*, hp_comware, di[[splay]] ip vpn-[[instance]] +hp_comware_display_ip_vpn-instance.textfsm, .*, hp_comware, dis[[play]] ip vpn[[-instance]] hp_comware_display_device_manuinfo.textfsm, .*, hp_comware, di[[splay]] dev[[ice]] m[[anuinfo]] hp_comware_display_ip_interface.textfsm, .*, hp_comware, dis[[play]] ip i[[nterface]] hp_comware_display_mac-address.textfsm, .*, hp_comware, di[[splay]] mac-ad[[dress]] -hp_comware_display_port_trunk.textfsm, .*, hp_comware, di[[splay]] po[[rt]] tr[[unk]] +hp_comware_display_port_trunk.textfsm, .*, hp_comware, dis[[play]] po[[rt]] tr[[unk]] hp_comware_display_vlan_brief.textfsm, .*, hp_comware, di[[splay]] v[[lan]] b[[rief]] -hp_comware_display_interface.textfsm, .*, hp_comware, di[[splay]] i[[nterface]] +hp_comware_display_interface.textfsm, .*, hp_comware, dis[[play]] int[[erface]] hp_comware_display_clock.textfsm, .*, hp_comware, di[[splay]] clo[[ck]] hp_comware_display_arp.textfsm, .*, hp_comware, di[[splay]] a[[rp]] From b777fcfe49b15906ed591f98bbcf8a65cd0db1ec Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Sat, 3 Dec 2022 16:27:11 +0100 Subject: [PATCH 03/25] update --- ntc_templates/templates/hp_comware_display_interface.textfsm | 0 .../templates/hp_comware_display_ip_vpn-instance.textfsm | 0 .../templates/hp_comware_display_link-aggregation_summary.textfsm | 0 ntc_templates/templates/hp_comware_display_port_trunk.textfsm | 0 .../hp_comware/display_interface/hp_comware_display_interface.raw | 0 .../hp_comware/display_interface/hp_comware_display_interface.yml | 0 .../hp_comware_display_ip_vpn-instance.raw | 0 .../hp_comware_display_ip_vpn-instance.yaml | 0 .../hp_comware_display_link-aggregation_summary.raw | 0 .../hp_comware_display_link-aggregation_summary.yaml | 0 .../display_port_trunk/hp_comware_display_port_trunk.raw | 0 .../display_port_trunk/hp_comware_display_port_trunk.yaml | 0 12 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 ntc_templates/templates/hp_comware_display_interface.textfsm create mode 100644 ntc_templates/templates/hp_comware_display_ip_vpn-instance.textfsm create mode 100644 ntc_templates/templates/hp_comware_display_link-aggregation_summary.textfsm create mode 100644 ntc_templates/templates/hp_comware_display_port_trunk.textfsm create mode 100644 tests/hp_comware/display_interface/hp_comware_display_interface.raw create mode 100644 tests/hp_comware/display_interface/hp_comware_display_interface.yml create mode 100644 tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw create mode 100644 tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml create mode 100644 tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw create mode 100644 tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml create mode 100644 tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw create mode 100644 tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ntc_templates/templates/hp_comware_display_ip_vpn-instance.textfsm b/ntc_templates/templates/hp_comware_display_ip_vpn-instance.textfsm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ntc_templates/templates/hp_comware_display_link-aggregation_summary.textfsm b/ntc_templates/templates/hp_comware_display_link-aggregation_summary.textfsm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ntc_templates/templates/hp_comware_display_port_trunk.textfsm b/ntc_templates/templates/hp_comware_display_port_trunk.textfsm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.raw b/tests/hp_comware/display_interface/hp_comware_display_interface.raw new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.yml b/tests/hp_comware/display_interface/hp_comware_display_interface.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw b/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml b/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw b/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml b/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml new file mode 100644 index 0000000000..e69de29bb2 From 7a5a0c29eaefde1623d0758db3b57fa58fa8e416 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Sat, 3 Dec 2022 18:55:54 +0100 Subject: [PATCH 04/25] update --- .../hp_comware_display_interface.raw | 88 +++++++++++++++++++ .../hp_comware_display_ip_vpn-instance.raw | 3 + ...mware_display_link-aggregation_summary.raw | 16 ++++ .../hp_comware_display_port_trunk.raw | 17 ++++ 4 files changed, 124 insertions(+) diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.raw b/tests/hp_comware/display_interface/hp_comware_display_interface.raw index e69de29bb2..32259cada5 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface.raw +++ b/tests/hp_comware/display_interface/hp_comware_display_interface.raw @@ -0,0 +1,88 @@ + + Bridge-Aggregation10 + Current state: UP + Line protocol state: UP + IP packet frame type: Ethernet II, hardware address: 7848-5933-6485 + Description: TO_DIST_01_GND_FLOOR + Bandwidth: 40000000 kbps + 40Gbps-speed mode, full-duplex mode + Link speed type is autonegotiation, link duplex type is autonegotiation + PVID: 1 + Port link-type: Trunk + VLAN Passing: 1(default vlan), 4001 + VLAN permitted: 1(default vlan), 2001-2020, 2056, 2190, 4001 + Trunk port encapsulation: IEEE 802.1q + Last clearing of counters: Never + Last 300 seconds input: 198 packets/sec 55873 bytes/sec 0% + Last 300 seconds output: 283 packets/sec 242533 bytes/sec 0% + Input (total): 2584125930 packets, 964139691145 bytes + 2576964392 unicasts, 36 broadcasts, 7161502 multicasts, 0 pauses + Input (normal): 2584125930 packets, - bytes + 2576964392 unicasts, 36 broadcasts, 7161502 multicasts, 0 pauses + Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, - overruns, 0 aborts + - ignored, - parity errors + Output (total): 4390318003 packets, 3699857154010 bytes + 4378526539 unicasts, 4672 broadcasts, 11786792 multicasts, 0 pauses + Output (normal): 4390318003 packets, - bytes + 4378526539 unicasts, 4672 broadcasts, 11786792 multicasts, 0 pauses + Output: 0 output errors, - underruns, - buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, - no carrier + + + GigabitEthernet1/1/0/1 + Current state: UP + Line protocol state: UP + IP packet frame type: Ethernet II, hardware address: 7848-5933-6485 + Description: GigabitEthernet1/1/0/1 Interface + Bandwidth: 1000000 kbps + Loopback is not set + Media type is twisted pair, port hardware type is 1000_BASE_T + 1000Mbps-speed mode, full-duplex mode + Link speed type is autonegotiation, link duplex type is autonegotiation + Flow-control is not enabled + Maximum frame length: 9216 + Allow jumbo frames to pass + Broadcast max-ratio: 100% + Multicast max-ratio: 100% + Unicast max-ratio: 100% + PVID: 2000 + MDI type: Automdix + Port link-type: Access + Tagged VLANs: None + Untagged VLANs: 2000 + Port priority: 0 + Last link flapping: 11 weeks 6 days 13 hours 16 minutes + Last clearing of counters: Never + Current system time:2022-11-23 06:46:56 SAR+03:00:00 + Last time when physical state changed to up:2022-08-31 17:29:38 SAR+03:00:00 + Last time when physical state changed to down:2022-08-31 17:29:08 SAR+03:00:00 + Peak input rate: 92112 bytes/sec, at 2022-09-07 15:31:54 + Peak output rate: 2529797 bytes/sec, at 2022-11-09 06:50:46 + Last 300 seconds input: 1 packets/sec 383 bytes/sec 0% + Last 300 seconds output: 2 packets/sec 337 bytes/sec 0% + Input (total): 11737127 packets, 2195295590 bytes + 11623808 unicasts, 112822 broadcasts, 497 multicasts, 0 pauses + Input (normal): 11737127 packets, - bytes + 11623808 unicasts, 112822 broadcasts, 497 multicasts, 0 pauses + Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, - overruns, 0 aborts + - ignored, - parity errors + Output (total): 23383663 packets, 5411926528 bytes + 11082589 unicasts, 7724789 broadcasts, 4576285 multicasts, 0 pauses + Output (normal): 23383663 packets, - bytes + 11082589 unicasts, 7724789 broadcasts, 4576285 multicasts, 0 pauses + Output: 0 output errors, - underruns, - buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, - no carrier + IPv4 traffic statistics: + Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec + Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec + Input: 0 packets, 0 bytes + Output: 0 packets, 0 bytes + IPv6 traffic statistics: + Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec + Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec + Input: 0 packets, 0 bytes + Output: 0 packets, 0 bytes diff --git a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw index e69de29bb2..868d0b8eb3 100644 --- a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw +++ b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw @@ -0,0 +1,3 @@ + Total VPN-Instances configured : 1 + VPN-Instance Name RD Create time + abc 1:1 2017/05/18 05:48:17 diff --git a/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw b/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw index e69de29bb2..dc2c6bb6e9 100644 --- a/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw +++ b/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw @@ -0,0 +1,16 @@ +Aggregation Interface Type: +BAGG -- Bridge-Aggregation, BLAGG -- Blade-Aggregation, RAGG -- Route-Aggregation +Aggregation Mode: S -- Static, D -- Dynamic +Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing +Actor System ID: 0x8000, bcea-fa19-655a + +AGG AGG Partner ID Selected Unselected Individual Share +Interface Mode Ports Ports Ports Type +-------------------------------------------------------------------------------- +BAGG50 D 0x8000, 7848-5933-6485 3 0 0 Shar +BAGG91 D 0x8000, 943f-c2b8-8526 2 0 0 Shar +BAGG92 D 0x8000, 943f-c2b8-e5d6 2 0 0 Shar +BAGG93 D 0x8000, 943f-c2b8-c4ee 2 0 0 Shar +BAGG94 D 0x8000, 943f-c2b8-99de 2 0 0 Shar +BAGG101 D 0x8000, 943f-c2b8-f2d6 2 0 0 Shar +BAGG102 D 0x8000, 943f-c2b8-93c6 2 0 0 Shar diff --git a/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw b/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw index e69de29bb2..735930f78e 100644 --- a/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw +++ b/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw @@ -0,0 +1,17 @@ +Interface PVID VLAN Passing +BAGG50 1 4005 +BAGG91 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111 + +BAGG92 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, + 1185, 2195, 3235, 4005 +BAGG93 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, + 1185, 2195, 3235, 4005 +BAGG94 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, + 1185, 2195 +BAGG101 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, + 1185, 2195, 3235, 4005 +BAGG102 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, + 1185, 2195, 3235, 4005 +BAGG103 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, + 1185, 2195, 3235, 4005 +BAGG104 1 1, 1009-1011, 1035, From 5ac716565483793e189e97056eb70d4ecee73591 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Sat, 3 Dec 2022 19:36:18 +0100 Subject: [PATCH 05/25] update --- .../hp_comware_display_interface.yml | 40 +++++++++++++++++++ .../hp_comware_display_ip_vpn-instance.yaml | 4 ++ 2 files changed, 44 insertions(+) diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.yml b/tests/hp_comware/display_interface/hp_comware_display_interface.yml index e69de29bb2..799075a8c5 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface.yml +++ b/tests/hp_comware/display_interface/hp_comware_display_interface.yml @@ -0,0 +1,40 @@ +--- +parsed_sample: + - interface: "Bridge-Aggregation10" + state: "UP" + link_protocol: "UP" + hw_address: "7848-5933-6485" + description: "TO_DIST_01_GND_FLOOR" + bandwidth: "40000000 kbps" + mtu: "" + pvid: "1" + port_link_type: "Trunk" + vlan_passing: + - "1(default vlan)" + - "4001" + vlan_permitted: + - "1(default vlan)" + - "2001-2020" + - "2056" + - "2190" + - "4001" + - interface: "GigabitEthernet1/1/0/1" + state: "UP" + link_protocol: "UP" + hw_address: "7848-5933-6485" + description: "GigabitEthernet1/1/0/1 Interface" + bandwidth: "1000000 kbps" + mtu: "9216" + pvid: "2000" + port_link_type: "Access" + vlan_tagged: "None" + vlan_native: "2000" + vlan_passing: + - "1(default vlan)" + - "4001" + vlan_permitted: + - "1(default vlan)" + - "2001-2020" + - "2056" + - "2190" + - "4001" diff --git a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml index e69de29bb2..20b8d4155d 100644 --- a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml +++ b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml @@ -0,0 +1,4 @@ +--- +parsed_sample: + - name: "abc" + rd: "1:1" From 2ff9b68cea7d646af515ff158ea4c3dfe9b05521 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Tue, 6 Dec 2022 15:16:41 +0100 Subject: [PATCH 06/25] update --- disp int details.txt | 109 ++++++++++++++++++ display ip vpn-instance.txt | 21 ++++ display lin-agg detailed.txt | 77 +++++++++++++ .../hp_comware_display_ip_vpn-instance.raw | 4 +- .../hp_comware_display_ip_vpn-instance.yaml | 6 +- ...ware_display_link-aggregation_summary.yaml | 5 + .../hp_comware_display_port_trunk.yaml | 5 + 7 files changed, 225 insertions(+), 2 deletions(-) create mode 100644 disp int details.txt create mode 100644 display ip vpn-instance.txt create mode 100644 display lin-agg detailed.txt diff --git a/disp int details.txt b/disp int details.txt new file mode 100644 index 0000000000..9d4201b62d --- /dev/null +++ b/disp int details.txt @@ -0,0 +1,109 @@ +disp inter vlan 2000 +Vlan-interface2000 +Current state: UP +Line protocol state: UP +Description: Servers-VLAN +Bandwidth: 10000000 kbps +Maximum transmission unit: 1500 +Internet address: 10.1.200.1/24 (Primary) +IP packet frame type: Ethernet II, hardware address: abab-cdcd-6486 +IPv6 packet frame type: Ethernet II, hardware address: abab-cdcd-6486 +Last clearing of counters: Never +Last 300 seconds input rate: 7 bytes/sec, 56 bits/sec, 0 packets/sec +Last 300 seconds output rate: 16 bytes/sec, 128 bits/sec, 0 packets/sec +Input: 9103 packets, 611444 bytes, 0 drops +Output: 18587 packets, 1143610 bytes, 0 drops + + +disp inter Bridge-Aggregation 20 +Bridge-Aggregation20 +Current state: UP +Line protocol state: UP +IP packet frame type: Ethernet II, hardware address: abab-cdcd-6485 +Description: TO_DIST_02_3rd_FLOOR +Bandwidth: 40000000 kbps +40Gbps-speed mode, full-duplex mode +Link speed type is autonegotiation, link duplex type is autonegotiation +PVID: 1 +Port link-type: Trunk + VLAN Passing: 1(default vlan), 4001-4002 + VLAN permitted: 1(default vlan), 2001-2020, 2190, 4001-4002 + Trunk port encapsulation: IEEE 802.1q +Last clearing of counters: Never +Last 300 seconds input: 3143 packets/sec 929430 bytes/sec 0% +Last 300 seconds output: 5674 packets/sec 5945156 bytes/sec 0% +Input (total): 80274398 packets, 24384580165 bytes + 80218843 unicasts, 12 broadcasts, 55543 multicasts, 0 pauses +Input (normal): 80274398 packets, - bytes + 80218843 unicasts, 12 broadcasts, 55543 multicasts, 0 pauses +Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, - overruns, 0 aborts + - ignored, - parity errors +Output (total): 110103849 packets, 90115617821 bytes + 109953707 unicasts, 9 broadcasts, 150133 multicasts, 0 pauses +Output (normal): 110103849 packets, - bytes + 109953707 unicasts, 9 broadcasts, 150133 multicasts, 0 pauses +Output: 0 output errors, - underruns, - buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, - no carrier + + +disp int GE1/1/0/31 +GigabitEthernet1/1/0/31 +Current state: DOWN +Line protocol state: DOWN +IP packet frame type: Ethernet II, hardware address: abab-cdcd-6485 +Description: Aruba-WLC +Bandwidth: 1000000 kbps +Loopback is not set +Media type is twisted pair, port hardware type is 1000_BASE_T +Unknown-speed mode, unknown-duplex mode +Link speed type is autonegotiation, link duplex type is autonegotiation +Flow-control is not enabled +Maximum frame length: 9216 +Allow jumbo frames to pass +Broadcast max-ratio: 100% +Multicast max-ratio: 100% +Unicast max-ratio: 100% +PVID: 2190 +MDI type: Automdix +Port link-type: Trunk + VLAN Passing: 2000, 3230, 4001-4005, 4049-4052 + VLAN permitted: 2-4094 + Trunk port encapsulation: IEEE 802.1q +Port priority: 0 +Last link flapping: Never +Last clearing of counters: Never +Current system time:2022-12-04 09:59:42 SAR+03:00:00 +Last time when physical state changed to up:- +Last time when physical state changed to down:2022-12-03 14:48:11 SAR+03:00:00 + Peak input rate: 0 bytes/sec, at 2022-12-03 14:48:40 + Peak output rate: 0 bytes/sec, at 2022-12-03 14:48:40 + Last 300 seconds input: 0 packets/sec 0 bytes/sec -% + Last 300 seconds output: 0 packets/sec 0 bytes/sec -% + Input (total): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Input (normal): 0 packets, - bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, - overruns, 0 aborts + - ignored, - parity errors + Output (total): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Output (normal): 0 packets, - bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Output: 0 output errors, - underruns, - buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, - no carrier +IPv4 traffic statistics: + Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec + Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec + Input: 0 packets, 0 bytes + Output: 0 packets, 0 bytes +IPv6 traffic statistics: + Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec + Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec + Input: 0 packets, 0 bytes + Output: 0 packets, 0 bytes + + \ No newline at end of file diff --git a/display ip vpn-instance.txt b/display ip vpn-instance.txt new file mode 100644 index 0000000000..99ae7d423f --- /dev/null +++ b/display ip vpn-instance.txt @@ -0,0 +1,21 @@ + display ip vpn-instance instance-name vpn1 + VPN-Instance Name and ID : vpn1, 1 + Create time : 2012/04/26 12:03:26 + Up time : 0 days, 00 hours, 03 minutes and 30 seconds + Route Distinguisher : 100:1 + Export VPN Targets : 100:1 + Import VPN Targets : 100:1 + Import Route Policy : policy2 + Export Route Policy : policy3 + Tunnel Policy : policy1 + Description : vpn1 + Maximum Routes Limit : 600 + Threshold Value(%): 30 + IPv6 Export VPN Targets : 100:1 + IPv6 Import VPN Targets : 100:1 + IPv6 Import Route Policy : policy2 + IPv6 Export Route Policy : policy3 + IPv6 Tunnel Policy : policy1 + IPv6 Maximum Routes Limit : 600 + IPv6 Threshold Value(%): 30 + Interfaces : Vlan-interface10 \ No newline at end of file diff --git a/display lin-agg detailed.txt b/display lin-agg detailed.txt new file mode 100644 index 0000000000..913deba989 --- /dev/null +++ b/display lin-agg detailed.txt @@ -0,0 +1,77 @@ +disp link-a s[[ummary]] +Aggregation Interface Type: +BAGG -- Bridge-Aggregation, RAGG -- Route-Aggregation +Aggregation Mode: S -- Static, D -- Dynamic +Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing +Actor System ID: 0x8000, 5c8a-3830-e4fe + +AGG AGG Partner ID Select Unselect Share +Interface Mode Ports Ports Type +------------------------------------------------------------------------------- +BAGG1 D 0x8000, bcea-fa19-8be8 2 0 Shar + + + +disp link-a m[[ember-port]] +Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, + D -- Synchronization, E -- Collecting, F -- Distributing, + G -- Defaulted, H -- Expired + +Ten-GigabitEthernet1/0/29: +Aggregation Interface: Bridge-Aggregation1 +Local: + Port Number: 31 + Port Priority: 32768 + Oper-Key: 1 + Flag: {ACDEF} +Remote: + System ID: 0x8000, bcea-fa19-8be8 + Port Number: 17 + Port Priority: 32768 + Oper-Key: 2 + Flag: {ACDEF} +Received LACP Packets: 40197 packet(s) +Illegal: 0 packet(s) +Sent LACP Packets: 35217 packet(s) + +Ten-GigabitEthernet1/0/30: +Aggregation Interface: Bridge-Aggregation1 +Local: + Port Number: 32 + Port Priority: 32768 + Oper-Key: 1 + Flag: {ACDEF} +Remote: + System ID: 0x8000, bcea-fa19-8be8 + Port Number: 222 + Port Priority: 32768 + Oper-Key: 2 + Flag: {ACDEF} +Received LACP Packets: 40207 packet(s) +Illegal: 0 packet(s) +Sent LACP Packets: 35245 packet(s) + + + +disp link-aggregation v[[erbose]] +Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing +Port Status: S -- Selected, U -- Unselected +Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, + D -- Synchronization, E -- Collecting, F -- Distributing, + G -- Defaulted, H -- Expired + +Aggregation Interface: Bridge-Aggregation1 +Aggregation Mode: Dynamic +Loadsharing Type: Shar +System ID: 0x8000, 5c8a-3830-e4fe +Local: + Port Status Priority Oper-Key Flag +-------------------------------------------------------------------------------- + XGE1/0/29 S 32768 1 {ACDEF} + XGE1/0/30 S 32768 1 {ACDEF} +Remote: + Actor Partner Priority Oper-Key SystemID Flag +-------------------------------------------------------------------------------- + XGE1/0/29 17 32768 2 0x8000, bcea-fa19-8be8 {ACDEF} + XGE1/0/30 222 32768 2 0x8000, bcea-fa19-8be8 {ACDEF} + \ No newline at end of file diff --git a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw index 868d0b8eb3..bcf5c204ae 100644 --- a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw +++ b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw @@ -1,3 +1,5 @@ Total VPN-Instances configured : 1 VPN-Instance Name RD Create time - abc 1:1 2017/05/18 05:48:17 + red 1:1 2017/05/18 05:48:17 + green 2:4 2017/05/18 05:48:21 + blue 5:7 2017/05/18 05:48:47 diff --git a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml index 20b8d4155d..43d001f7ac 100644 --- a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml +++ b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml @@ -1,4 +1,8 @@ --- parsed_sample: - - name: "abc" + - name: "red" rd: "1:1" + - name: "green" + rd: "2:4" + - name: "blue" + rd: "5:7" diff --git a/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml b/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml index e69de29bb2..fe385b5482 100644 --- a/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml +++ b/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml @@ -0,0 +1,5 @@ +--- +parsed_sample: + - chassis_id: "1" + slot_type: "Chassis" + slot_id: "self" \ No newline at end of file diff --git a/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml b/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml index e69de29bb2..fe385b5482 100644 --- a/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml +++ b/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml @@ -0,0 +1,5 @@ +--- +parsed_sample: + - chassis_id: "1" + slot_type: "Chassis" + slot_id: "self" \ No newline at end of file From 4fe35b0c5e92f1ee218a35282d9a45ee3e6492ec Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Tue, 6 Dec 2022 15:33:03 +0100 Subject: [PATCH 07/25] update --- disp int details.txt | 109 ---------- display ip vpn-instance.txt | 21 -- ntc_templates/templates/index | 5 +- .../hp_comware_display_interface.raw | 188 ++++++++++-------- .../hp_comware_display_interface.yml | 63 +++--- ...mware_display_link-aggregation_summary.raw | 16 -- ...ware_display_link-aggregation_summary.yaml | 5 - ...mware_display_link-aggregation_verbose.raw | 20 ++ ...ware_display_link-aggregation_verbose.yaml | 6 + .../hp_comware_display_port_trunk.raw | 17 -- .../hp_comware_display_port_trunk.yaml | 5 - 11 files changed, 165 insertions(+), 290 deletions(-) delete mode 100644 disp int details.txt delete mode 100644 display ip vpn-instance.txt delete mode 100644 tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw delete mode 100644 tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml create mode 100644 tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.raw create mode 100644 tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml delete mode 100644 tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw delete mode 100644 tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml diff --git a/disp int details.txt b/disp int details.txt deleted file mode 100644 index 9d4201b62d..0000000000 --- a/disp int details.txt +++ /dev/null @@ -1,109 +0,0 @@ -disp inter vlan 2000 -Vlan-interface2000 -Current state: UP -Line protocol state: UP -Description: Servers-VLAN -Bandwidth: 10000000 kbps -Maximum transmission unit: 1500 -Internet address: 10.1.200.1/24 (Primary) -IP packet frame type: Ethernet II, hardware address: abab-cdcd-6486 -IPv6 packet frame type: Ethernet II, hardware address: abab-cdcd-6486 -Last clearing of counters: Never -Last 300 seconds input rate: 7 bytes/sec, 56 bits/sec, 0 packets/sec -Last 300 seconds output rate: 16 bytes/sec, 128 bits/sec, 0 packets/sec -Input: 9103 packets, 611444 bytes, 0 drops -Output: 18587 packets, 1143610 bytes, 0 drops - - -disp inter Bridge-Aggregation 20 -Bridge-Aggregation20 -Current state: UP -Line protocol state: UP -IP packet frame type: Ethernet II, hardware address: abab-cdcd-6485 -Description: TO_DIST_02_3rd_FLOOR -Bandwidth: 40000000 kbps -40Gbps-speed mode, full-duplex mode -Link speed type is autonegotiation, link duplex type is autonegotiation -PVID: 1 -Port link-type: Trunk - VLAN Passing: 1(default vlan), 4001-4002 - VLAN permitted: 1(default vlan), 2001-2020, 2190, 4001-4002 - Trunk port encapsulation: IEEE 802.1q -Last clearing of counters: Never -Last 300 seconds input: 3143 packets/sec 929430 bytes/sec 0% -Last 300 seconds output: 5674 packets/sec 5945156 bytes/sec 0% -Input (total): 80274398 packets, 24384580165 bytes - 80218843 unicasts, 12 broadcasts, 55543 multicasts, 0 pauses -Input (normal): 80274398 packets, - bytes - 80218843 unicasts, 12 broadcasts, 55543 multicasts, 0 pauses -Input: 0 input errors, 0 runts, 0 giants, 0 throttles - 0 CRC, 0 frame, - overruns, 0 aborts - - ignored, - parity errors -Output (total): 110103849 packets, 90115617821 bytes - 109953707 unicasts, 9 broadcasts, 150133 multicasts, 0 pauses -Output (normal): 110103849 packets, - bytes - 109953707 unicasts, 9 broadcasts, 150133 multicasts, 0 pauses -Output: 0 output errors, - underruns, - buffer failures - 0 aborts, 0 deferred, 0 collisions, 0 late collisions - 0 lost carrier, - no carrier - - -disp int GE1/1/0/31 -GigabitEthernet1/1/0/31 -Current state: DOWN -Line protocol state: DOWN -IP packet frame type: Ethernet II, hardware address: abab-cdcd-6485 -Description: Aruba-WLC -Bandwidth: 1000000 kbps -Loopback is not set -Media type is twisted pair, port hardware type is 1000_BASE_T -Unknown-speed mode, unknown-duplex mode -Link speed type is autonegotiation, link duplex type is autonegotiation -Flow-control is not enabled -Maximum frame length: 9216 -Allow jumbo frames to pass -Broadcast max-ratio: 100% -Multicast max-ratio: 100% -Unicast max-ratio: 100% -PVID: 2190 -MDI type: Automdix -Port link-type: Trunk - VLAN Passing: 2000, 3230, 4001-4005, 4049-4052 - VLAN permitted: 2-4094 - Trunk port encapsulation: IEEE 802.1q -Port priority: 0 -Last link flapping: Never -Last clearing of counters: Never -Current system time:2022-12-04 09:59:42 SAR+03:00:00 -Last time when physical state changed to up:- -Last time when physical state changed to down:2022-12-03 14:48:11 SAR+03:00:00 - Peak input rate: 0 bytes/sec, at 2022-12-03 14:48:40 - Peak output rate: 0 bytes/sec, at 2022-12-03 14:48:40 - Last 300 seconds input: 0 packets/sec 0 bytes/sec -% - Last 300 seconds output: 0 packets/sec 0 bytes/sec -% - Input (total): 0 packets, 0 bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Input (normal): 0 packets, - bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Input: 0 input errors, 0 runts, 0 giants, 0 throttles - 0 CRC, 0 frame, - overruns, 0 aborts - - ignored, - parity errors - Output (total): 0 packets, 0 bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Output (normal): 0 packets, - bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Output: 0 output errors, - underruns, - buffer failures - 0 aborts, 0 deferred, 0 collisions, 0 late collisions - 0 lost carrier, - no carrier -IPv4 traffic statistics: - Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec - Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec - Input: 0 packets, 0 bytes - Output: 0 packets, 0 bytes -IPv6 traffic statistics: - Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec - Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec - Input: 0 packets, 0 bytes - Output: 0 packets, 0 bytes - - \ No newline at end of file diff --git a/display ip vpn-instance.txt b/display ip vpn-instance.txt deleted file mode 100644 index 99ae7d423f..0000000000 --- a/display ip vpn-instance.txt +++ /dev/null @@ -1,21 +0,0 @@ - display ip vpn-instance instance-name vpn1 - VPN-Instance Name and ID : vpn1, 1 - Create time : 2012/04/26 12:03:26 - Up time : 0 days, 00 hours, 03 minutes and 30 seconds - Route Distinguisher : 100:1 - Export VPN Targets : 100:1 - Import VPN Targets : 100:1 - Import Route Policy : policy2 - Export Route Policy : policy3 - Tunnel Policy : policy1 - Description : vpn1 - Maximum Routes Limit : 600 - Threshold Value(%): 30 - IPv6 Export VPN Targets : 100:1 - IPv6 Import VPN Targets : 100:1 - IPv6 Import Route Policy : policy2 - IPv6 Export Route Policy : policy3 - IPv6 Tunnel Policy : policy1 - IPv6 Maximum Routes Limit : 600 - IPv6 Threshold Value(%): 30 - Interfaces : Vlan-interface10 \ No newline at end of file diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 5c7da446ed..1f691676f8 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -443,13 +443,12 @@ fortinet_get_system_arp.textfsm, .*, fortinet, g[[et]] sy[[stem]] arp hp_comware_display_lldp_neighbor-information_verbose.textfsm, .*, hp_comware, di[[splay]] ll[[dp]] n[[eighbor-information]] v[[erbose]] hp_comware_display_counters_bound_interface.textfsm, .*, hp_comware, di[[splay]] cou[[nters]] (\S+) i[[nterface]] -hp_comware_display_link-aggregation_summary.textfsm, .*, hp_comware, dis[[play]] link[[-aggregation]] s[[ummary]] +hp_comware_display_link-aggregation_verbose.textfsm, .*, hp_comware, di[[splay]] link[[-aggregation]] v[[erbose]] hp_comware_display_ip_routing-table.textfsm, .*, hp_comware, di[[splay]] ip r[[outing-table]] -hp_comware_display_ip_vpn-instance.textfsm, .*, hp_comware, dis[[play]] ip vpn[[-instance]] +hp_comware_display_ip_vpn-instance.textfsm, .*, hp_comware, di[[splay]] ip vpn[[-instance]] hp_comware_display_device_manuinfo.textfsm, .*, hp_comware, di[[splay]] dev[[ice]] m[[anuinfo]] hp_comware_display_ip_interface.textfsm, .*, hp_comware, dis[[play]] ip i[[nterface]] hp_comware_display_mac-address.textfsm, .*, hp_comware, di[[splay]] mac-ad[[dress]] -hp_comware_display_port_trunk.textfsm, .*, hp_comware, dis[[play]] po[[rt]] tr[[unk]] hp_comware_display_vlan_brief.textfsm, .*, hp_comware, di[[splay]] v[[lan]] b[[rief]] hp_comware_display_interface.textfsm, .*, hp_comware, dis[[play]] int[[erface]] hp_comware_display_clock.textfsm, .*, hp_comware, di[[splay]] clo[[ck]] diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.raw b/tests/hp_comware/display_interface/hp_comware_display_interface.raw index 32259cada5..0d916e5a8a 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface.raw +++ b/tests/hp_comware/display_interface/hp_comware_display_interface.raw @@ -1,88 +1,102 @@ +Vlan-interface2000 +Current state: UP +Line protocol state: UP +Description: Servers-VLAN +Bandwidth: 10000000 kbps +Maximum transmission unit: 1500 +Internet address: 10.1.200.1/24 (Primary) +IP packet frame type: Ethernet II, hardware address: abab-cdcd-6486 +IPv6 packet frame type: Ethernet II, hardware address: abab-cdcd-6486 +Last clearing of counters: Never +Last 300 seconds input rate: 7 bytes/sec, 56 bits/sec, 0 packets/sec +Last 300 seconds output rate: 16 bytes/sec, 128 bits/sec, 0 packets/sec +Input: 9103 packets, 611444 bytes, 0 drops +Output: 18587 packets, 1143610 bytes, 0 drops - Bridge-Aggregation10 - Current state: UP - Line protocol state: UP - IP packet frame type: Ethernet II, hardware address: 7848-5933-6485 - Description: TO_DIST_01_GND_FLOOR - Bandwidth: 40000000 kbps - 40Gbps-speed mode, full-duplex mode - Link speed type is autonegotiation, link duplex type is autonegotiation - PVID: 1 - Port link-type: Trunk - VLAN Passing: 1(default vlan), 4001 - VLAN permitted: 1(default vlan), 2001-2020, 2056, 2190, 4001 - Trunk port encapsulation: IEEE 802.1q - Last clearing of counters: Never - Last 300 seconds input: 198 packets/sec 55873 bytes/sec 0% - Last 300 seconds output: 283 packets/sec 242533 bytes/sec 0% - Input (total): 2584125930 packets, 964139691145 bytes - 2576964392 unicasts, 36 broadcasts, 7161502 multicasts, 0 pauses - Input (normal): 2584125930 packets, - bytes - 2576964392 unicasts, 36 broadcasts, 7161502 multicasts, 0 pauses - Input: 0 input errors, 0 runts, 0 giants, 0 throttles - 0 CRC, 0 frame, - overruns, 0 aborts - - ignored, - parity errors - Output (total): 4390318003 packets, 3699857154010 bytes - 4378526539 unicasts, 4672 broadcasts, 11786792 multicasts, 0 pauses - Output (normal): 4390318003 packets, - bytes - 4378526539 unicasts, 4672 broadcasts, 11786792 multicasts, 0 pauses - Output: 0 output errors, - underruns, - buffer failures - 0 aborts, 0 deferred, 0 collisions, 0 late collisions - 0 lost carrier, - no carrier - - - GigabitEthernet1/1/0/1 - Current state: UP - Line protocol state: UP - IP packet frame type: Ethernet II, hardware address: 7848-5933-6485 - Description: GigabitEthernet1/1/0/1 Interface - Bandwidth: 1000000 kbps - Loopback is not set - Media type is twisted pair, port hardware type is 1000_BASE_T - 1000Mbps-speed mode, full-duplex mode - Link speed type is autonegotiation, link duplex type is autonegotiation - Flow-control is not enabled - Maximum frame length: 9216 - Allow jumbo frames to pass - Broadcast max-ratio: 100% - Multicast max-ratio: 100% - Unicast max-ratio: 100% - PVID: 2000 - MDI type: Automdix - Port link-type: Access - Tagged VLANs: None - Untagged VLANs: 2000 - Port priority: 0 - Last link flapping: 11 weeks 6 days 13 hours 16 minutes - Last clearing of counters: Never - Current system time:2022-11-23 06:46:56 SAR+03:00:00 - Last time when physical state changed to up:2022-08-31 17:29:38 SAR+03:00:00 - Last time when physical state changed to down:2022-08-31 17:29:08 SAR+03:00:00 - Peak input rate: 92112 bytes/sec, at 2022-09-07 15:31:54 - Peak output rate: 2529797 bytes/sec, at 2022-11-09 06:50:46 - Last 300 seconds input: 1 packets/sec 383 bytes/sec 0% - Last 300 seconds output: 2 packets/sec 337 bytes/sec 0% - Input (total): 11737127 packets, 2195295590 bytes - 11623808 unicasts, 112822 broadcasts, 497 multicasts, 0 pauses - Input (normal): 11737127 packets, - bytes - 11623808 unicasts, 112822 broadcasts, 497 multicasts, 0 pauses - Input: 0 input errors, 0 runts, 0 giants, 0 throttles - 0 CRC, 0 frame, - overruns, 0 aborts - - ignored, - parity errors - Output (total): 23383663 packets, 5411926528 bytes - 11082589 unicasts, 7724789 broadcasts, 4576285 multicasts, 0 pauses - Output (normal): 23383663 packets, - bytes - 11082589 unicasts, 7724789 broadcasts, 4576285 multicasts, 0 pauses - Output: 0 output errors, - underruns, - buffer failures - 0 aborts, 0 deferred, 0 collisions, 0 late collisions - 0 lost carrier, - no carrier - IPv4 traffic statistics: - Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec - Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec - Input: 0 packets, 0 bytes - Output: 0 packets, 0 bytes - IPv6 traffic statistics: - Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec - Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec - Input: 0 packets, 0 bytes - Output: 0 packets, 0 bytes +Bridge-Aggregation20 +Current state: UP +Line protocol state: UP +IP packet frame type: Ethernet II, hardware address: abab-cdcd-6485 +Description: TO_DIST_02_3rd_FLOOR +Bandwidth: 40000000 kbps +40Gbps-speed mode, full-duplex mode +Link speed type is autonegotiation, link duplex type is autonegotiation +PVID: 1 +Port link-type: Trunk + VLAN Passing: 1(default vlan), 4001-4002 + VLAN permitted: 1(default vlan), 2001-2020, 2190, 4001-4002 + Trunk port encapsulation: IEEE 802.1q +Last clearing of counters: Never +Last 300 seconds input: 3143 packets/sec 929430 bytes/sec 0% +Last 300 seconds output: 5674 packets/sec 5945156 bytes/sec 0% +Input (total): 80274398 packets, 24384580165 bytes + 80218843 unicasts, 12 broadcasts, 55543 multicasts, 0 pauses +Input (normal): 80274398 packets, - bytes + 80218843 unicasts, 12 broadcasts, 55543 multicasts, 0 pauses +Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, - overruns, 0 aborts + - ignored, - parity errors +Output (total): 110103849 packets, 90115617821 bytes + 109953707 unicasts, 9 broadcasts, 150133 multicasts, 0 pauses +Output (normal): 110103849 packets, - bytes + 109953707 unicasts, 9 broadcasts, 150133 multicasts, 0 pauses +Output: 0 output errors, - underruns, - buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, - no carrier + +GigabitEthernet1/1/0/31 +Current state: DOWN +Line protocol state: DOWN +IP packet frame type: Ethernet II, hardware address: abab-cdcd-6485 +Description: Aruba-WLC +Bandwidth: 1000000 kbps +Loopback is not set +Media type is twisted pair, port hardware type is 1000_BASE_T +Unknown-speed mode, unknown-duplex mode +Link speed type is autonegotiation, link duplex type is autonegotiation +Flow-control is not enabled +Maximum frame length: 9216 +Allow jumbo frames to pass +Broadcast max-ratio: 100% +Multicast max-ratio: 100% +Unicast max-ratio: 100% +PVID: 2190 +MDI type: Automdix +Port link-type: Trunk + VLAN Passing: 2000, 3230, 4001-4005, 4049-4052 + VLAN permitted: 2-4094 + Trunk port encapsulation: IEEE 802.1q +Port priority: 0 +Last link flapping: Never +Last clearing of counters: Never +Current system time:2022-12-04 09:59:42 SAR+03:00:00 +Last time when physical state changed to up:- +Last time when physical state changed to down:2022-12-03 14:48:11 SAR+03:00:00 + Peak input rate: 0 bytes/sec, at 2022-12-03 14:48:40 + Peak output rate: 0 bytes/sec, at 2022-12-03 14:48:40 + Last 300 seconds input: 0 packets/sec 0 bytes/sec -% + Last 300 seconds output: 0 packets/sec 0 bytes/sec -% + Input (total): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Input (normal): 0 packets, - bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, - overruns, 0 aborts + - ignored, - parity errors + Output (total): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Output (normal): 0 packets, - bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Output: 0 output errors, - underruns, - buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, - no carrier +IPv4 traffic statistics: + Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec + Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec + Input: 0 packets, 0 bytes + Output: 0 packets, 0 bytes +IPv6 traffic statistics: + Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec + Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec + Input: 0 packets, 0 bytes + Output: 0 packets, 0 bytes diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.yml b/tests/hp_comware/display_interface/hp_comware_display_interface.yml index 799075a8c5..b76d38908d 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface.yml +++ b/tests/hp_comware/display_interface/hp_comware_display_interface.yml @@ -1,40 +1,49 @@ --- parsed_sample: - - interface: "Bridge-Aggregation10" + - interface: "Vlan-interface2000" state: "UP" link_protocol: "UP" - hw_address: "7848-5933-6485" - description: "TO_DIST_01_GND_FLOOR" + hw_address: "" + description: "Servers-VLAN" + bandwidth: "10000000 kbps" + mtu: "1500" + pvid: "" + ip_address: "10.1.200.1/24" + port_link_type: "" + vlan_passing: + vlan_permitted: + - interface: "Bridge-Aggregation20" + state: "UP" + link_protocol: "UP" + hw_address: "abab-cdcd-6485" + description: "TO_DIST_02_3rd_FLOOR" bandwidth: "40000000 kbps" mtu: "" pvid: "1" + ip_address: "10.1.200.1/24" port_link_type: "Trunk" - vlan_passing: - - "1(default vlan)" - - "4001" + vlan_passing: + - "1" + - "4001-4002" vlan_permitted: - - "1(default vlan)" - - "2001-2020" - - "2056" + - "1" + - "2021-2020" - "2190" - - "4001" - - interface: "GigabitEthernet1/1/0/1" - state: "UP" - link_protocol: "UP" - hw_address: "7848-5933-6485" - description: "GigabitEthernet1/1/0/1 Interface" + - "4001-4002" + - interface: "GigabitEthernet1/1/0/31" + state: "DOWN" + link_protocol: "DOWN" + hw_address: "abab-cdcd-6485" + description: "Aruba-WLC" bandwidth: "1000000 kbps" mtu: "9216" - pvid: "2000" - port_link_type: "Access" - vlan_tagged: "None" - vlan_native: "2000" - vlan_passing: - - "1(default vlan)" - - "4001" + pvid: "2190" + ip_address: "10.1.200.1/24" + port_link_type: "Trunk" + vlan_passing: + - "2000" + - "3230" + - "4001-4005" + - "4049-4052" vlan_permitted: - - "1(default vlan)" - - "2001-2020" - - "2056" - - "2190" - - "4001" + - "2-4094" diff --git a/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw b/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw deleted file mode 100644 index dc2c6bb6e9..0000000000 --- a/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.raw +++ /dev/null @@ -1,16 +0,0 @@ -Aggregation Interface Type: -BAGG -- Bridge-Aggregation, BLAGG -- Blade-Aggregation, RAGG -- Route-Aggregation -Aggregation Mode: S -- Static, D -- Dynamic -Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing -Actor System ID: 0x8000, bcea-fa19-655a - -AGG AGG Partner ID Selected Unselected Individual Share -Interface Mode Ports Ports Ports Type --------------------------------------------------------------------------------- -BAGG50 D 0x8000, 7848-5933-6485 3 0 0 Shar -BAGG91 D 0x8000, 943f-c2b8-8526 2 0 0 Shar -BAGG92 D 0x8000, 943f-c2b8-e5d6 2 0 0 Shar -BAGG93 D 0x8000, 943f-c2b8-c4ee 2 0 0 Shar -BAGG94 D 0x8000, 943f-c2b8-99de 2 0 0 Shar -BAGG101 D 0x8000, 943f-c2b8-f2d6 2 0 0 Shar -BAGG102 D 0x8000, 943f-c2b8-93c6 2 0 0 Shar diff --git a/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml b/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml deleted file mode 100644 index fe385b5482..0000000000 --- a/tests/hp_comware/display_link-aggregation_summary/hp_comware_display_link-aggregation_summary.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -parsed_sample: - - chassis_id: "1" - slot_type: "Chassis" - slot_id: "self" \ No newline at end of file diff --git a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.raw b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.raw new file mode 100644 index 0000000000..59aafad89b --- /dev/null +++ b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.raw @@ -0,0 +1,20 @@ +Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing +Port Status: S -- Selected, U -- Unselected +Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, + D -- Synchronization, E -- Collecting, F -- Distributing, + G -- Defaulted, H -- Expired + +Aggregation Interface: Bridge-Aggregation1 +Aggregation Mode: Dynamic +Loadsharing Type: Shar +System ID: 0x8000, 5c8a-3830-e4fe +Local: + Port Status Priority Oper-Key Flag +-------------------------------------------------------------------------------- + XGE1/0/29 S 32768 1 {ACDEF} + XGE1/0/30 S 32768 1 {ACDEF} +Remote: + Actor Partner Priority Oper-Key SystemID Flag +-------------------------------------------------------------------------------- + XGE1/0/29 17 32768 2 0x8000, bcea-fa19-8be8 {ACDEF} + XGE1/0/30 222 32768 2 0x8000, bcea-fa19-8be8 {ACDEF} diff --git a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml new file mode 100644 index 0000000000..fa22201aee --- /dev/null +++ b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml @@ -0,0 +1,6 @@ +--- +parsed_sample: + - interface: "Bridge-Aggregation1" + local_interfaces: + - "XGE1/0/29" + - "XGE1/0/30" diff --git a/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw b/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw deleted file mode 100644 index 735930f78e..0000000000 --- a/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.raw +++ /dev/null @@ -1,17 +0,0 @@ -Interface PVID VLAN Passing -BAGG50 1 4005 -BAGG91 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111 - -BAGG92 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, - 1185, 2195, 3235, 4005 -BAGG93 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, - 1185, 2195, 3235, 4005 -BAGG94 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, - 1185, 2195 -BAGG101 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, - 1185, 2195, 3235, 4005 -BAGG102 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, - 1185, 2195, 3235, 4005 -BAGG103 1 1, 1009-1011, 1035, 1055, 1075, 1109-1111, - 1185, 2195, 3235, 4005 -BAGG104 1 1, 1009-1011, 1035, diff --git a/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml b/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml deleted file mode 100644 index fe385b5482..0000000000 --- a/tests/hp_comware/display_port_trunk/hp_comware_display_port_trunk.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -parsed_sample: - - chassis_id: "1" - slot_type: "Chassis" - slot_id: "self" \ No newline at end of file From aa61f8c3d2335c8aaf35260e08ba1eed303becc8 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Tue, 6 Dec 2022 16:03:52 +0100 Subject: [PATCH 08/25] update --- .../hp_comware_display_ip_vpn-instance.textfsm | 11 +++++++++++ .../hp_comware_display_ip_vpn-instance.raw | 1 + .../hp_comware_display_ip_vpn-instance.yaml | 2 ++ 3 files changed, 14 insertions(+) diff --git a/ntc_templates/templates/hp_comware_display_ip_vpn-instance.textfsm b/ntc_templates/templates/hp_comware_display_ip_vpn-instance.textfsm index e69de29bb2..f7e9ce232b 100644 --- a/ntc_templates/templates/hp_comware_display_ip_vpn-instance.textfsm +++ b/ntc_templates/templates/hp_comware_display_ip_vpn-instance.textfsm @@ -0,0 +1,11 @@ +Value Required NAME (\S+) +Value RD (\d+:\d+) + +Start + ^\s*VPN-Instance Name -> VPNInstances + +VPNInstances + ^\s*${NAME}\s+${RD}\s+.* -> Record + ^\s*${NAME}\s+.* -> Record + ^\s*$$ + ^. -> Error diff --git a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw index bcf5c204ae..9809b0853d 100644 --- a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw +++ b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.raw @@ -3,3 +3,4 @@ red 1:1 2017/05/18 05:48:17 green 2:4 2017/05/18 05:48:21 blue 5:7 2017/05/18 05:48:47 + black 2017/05/18 05:48:53 diff --git a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml index 43d001f7ac..8b6d326da1 100644 --- a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml +++ b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml @@ -6,3 +6,5 @@ parsed_sample: rd: "2:4" - name: "blue" rd: "5:7" + - name: "black" + rd: "" From e8ef6a36bb96bb6072b6f0e3544155a55f2f8925 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Tue, 6 Dec 2022 16:07:06 +0100 Subject: [PATCH 09/25] update --- .../templates/hp_comware_display_link-aggregation_summary.textfsm | 0 ntc_templates/templates/hp_comware_display_port_trunk.textfsm | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ntc_templates/templates/hp_comware_display_link-aggregation_summary.textfsm delete mode 100644 ntc_templates/templates/hp_comware_display_port_trunk.textfsm diff --git a/ntc_templates/templates/hp_comware_display_link-aggregation_summary.textfsm b/ntc_templates/templates/hp_comware_display_link-aggregation_summary.textfsm deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ntc_templates/templates/hp_comware_display_port_trunk.textfsm b/ntc_templates/templates/hp_comware_display_port_trunk.textfsm deleted file mode 100644 index e69de29bb2..0000000000 From b4b86ceb7ce653921dacf335109571b37afdef74 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Thu, 8 Dec 2022 21:33:33 +0100 Subject: [PATCH 10/25] update --- .../hp_comware_display_interface.textfsm | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm index e69de29bb2..870deabda6 100644 --- a/ntc_templates/templates/hp_comware_display_interface.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface.textfsm @@ -0,0 +1,41 @@ +Value Required INTF (\S+) +Value LINE_STATUS (UP|DOWN|Administratively DOWN) +Value PROTOCOL_STATUS (UP(\(spoofing\))?|DOWN) +Value List IPADDR (\S+) +Value MTU (\d+) +Value List HW_ADDRESS ([a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+) +Value DESCRIPTION (.*) +Value BANDWIDTH (.*) +Value DUPLEX (\S+) +Value SPEED (\S+) +Value PORT_LINK_TYPE (\S+) +Value TRUNK_MODE (.*) +Value VLAN_PASSING (.*) +Value VLAN_PERMITTED (.*) + +Start + ^\S+$$ -> Continue.Record + ^${INTF}$$ + ^Current\s+state:\s+${LINE_STATUS} + ^Line\s+protocol\s+state:\s+${PROTOCOL_STATUS} + ^Description:\s+${DESCRIPTION} + ^Bandwidth:\s+${BANDWIDTH} + ^Maximum\s+transmission\s+unit:\s+${MTU} + ^Internet\s+address:\s+${IPADDR}\s+\(Primary\) + ^Internet\s+address:\s+${IPADDR}\s+\(Sub\) + ^IP\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} + ^IPv6\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} + ^${SPEED}\s+mode,\s+${DUPLEX}\s+mode + ^Port\s+link-type:\s+${PORT_LINK_TYPE} + ^\s+VLAN\s+Passing:\s+${VLAN_PASSING} + ^\s+VLAN\s+permitted:\s+${VLAN_PERMITTED} + ^\s+Trunk\s+port\s+encapsulation:\s+${TRUNK_MODE} + ^\s*\S+\s+\S+.* + ^\s*$$ + ^. -> Error + +Trunk + ^Port\s+link-type:\s+${PORT_LINK_TYPE} + ^\s+VLAN\s+Passing:\s+${VLAN_PASSING} + ^\s+VLAN\s+permitted:\s+${VLAN_PERMITTED} + ^\s+Trunk\s+port\s+encapsulation:\s+${TRUNK_MODE} From c474992a6a81a6cc4b1b5d12f189f82957f7a8de Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Thu, 15 Dec 2022 09:54:30 +0100 Subject: [PATCH 11/25] update --- .../hp_comware_display_interface.textfsm | 22 ++++++++++++------- ...e_display_link-aggregation_verbose.textfsm | 0 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm index 870deabda6..9788ce1557 100644 --- a/ntc_templates/templates/hp_comware_display_interface.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface.textfsm @@ -10,8 +10,9 @@ Value DUPLEX (\S+) Value SPEED (\S+) Value PORT_LINK_TYPE (\S+) Value TRUNK_MODE (.*) -Value VLAN_PASSING (.*) -Value VLAN_PERMITTED (.*) +Value VLAN_NATIVE (\d+) +Value List VLAN_PASSING ([^,]+) +Value List VLAN_PERMITTED ([^,]+) Start ^\S+$$ -> Continue.Record @@ -26,16 +27,21 @@ Start ^IP\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} ^IPv6\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} ^${SPEED}\s+mode,\s+${DUPLEX}\s+mode + ^PVID:\s+${VLAN_NATIVE} ^Port\s+link-type:\s+${PORT_LINK_TYPE} - ^\s+VLAN\s+Passing:\s+${VLAN_PASSING} + ^\s+VLAN\s+Passing: -> PassedVLAN ^\s+VLAN\s+permitted:\s+${VLAN_PERMITTED} ^\s+Trunk\s+port\s+encapsulation:\s+${TRUNK_MODE} ^\s*\S+\s+\S+.* ^\s*$$ ^. -> Error -Trunk - ^Port\s+link-type:\s+${PORT_LINK_TYPE} - ^\s+VLAN\s+Passing:\s+${VLAN_PASSING} - ^\s+VLAN\s+permitted:\s+${VLAN_PERMITTED} - ^\s+Trunk\s+port\s+encapsulation:\s+${TRUNK_MODE} +PassedVLAN + ^\s+VLAN\s+Passing:\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){2}\s+${VLAN_PASSING},* -> Continue + ^\S+ -> Done + ^\sVLAN -> Done + ^. -> Error + +Done + ^.* diff --git a/ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm b/ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm new file mode 100644 index 0000000000..e69de29bb2 From 1101f534ed34edd2e0aeda1c81ff1dd0d9898dd8 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Thu, 15 Dec 2022 16:21:39 +0100 Subject: [PATCH 12/25] update --- .../hp_comware_display_interface.textfsm | 105 +++++++++++++++--- .../hp_comware_display_interface.raw | 43 +++++++ .../hp_comware_display_interface1.raw | 72 ++++++++++++ 3 files changed, 202 insertions(+), 18 deletions(-) create mode 100644 tests/hp_comware/display_interface/hp_comware_display_interface1.raw diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm index 9788ce1557..4a5f6d5b25 100644 --- a/ntc_templates/templates/hp_comware_display_interface.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface.textfsm @@ -15,33 +15,102 @@ Value List VLAN_PASSING ([^,]+) Value List VLAN_PERMITTED ([^,]+) Start - ^\S+$$ -> Continue.Record + #^\S+$$.Record ^${INTF}$$ ^Current\s+state:\s+${LINE_STATUS} ^Line\s+protocol\s+state:\s+${PROTOCOL_STATUS} ^Description:\s+${DESCRIPTION} ^Bandwidth:\s+${BANDWIDTH} ^Maximum\s+transmission\s+unit:\s+${MTU} - ^Internet\s+address:\s+${IPADDR}\s+\(Primary\) - ^Internet\s+address:\s+${IPADDR}\s+\(Sub\) + ^Internet\s+address:\s+${IPADDR},\s+\(Primary\) + ^Internet\s+address:\s+${IPADDR},\s+\(Sub\) ^IP\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} ^IPv6\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} - ^${SPEED}\s+mode,\s+${DUPLEX}\s+mode + ^${SPEED},\s+mode,\s+${DUPLEX},\s+mode ^PVID:\s+${VLAN_NATIVE} + #^Port\s+link-type: -> PortType ^Port\s+link-type:\s+${PORT_LINK_TYPE} - ^\s+VLAN\s+Passing: -> PassedVLAN - ^\s+VLAN\s+permitted:\s+${VLAN_PERMITTED} - ^\s+Trunk\s+port\s+encapsulation:\s+${TRUNK_MODE} - ^\s*\S+\s+\S+.* - ^\s*$$ - ^. -> Error - -PassedVLAN + # Trunk - Passing VLANs ^\s+VLAN\s+Passing:\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){2}\s+${VLAN_PASSING},* -> Continue - ^\S+ -> Done - ^\sVLAN -> Done + # Skip initial VLANs and read the Nth + #^\s+VLAN\s+Passing:(\s+[^,]+,){1} -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){0},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){1},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){2},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){3},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){4},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){5},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){6},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){7},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){8},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){9},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){10},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){11},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){12},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){13},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){14},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){15},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){16},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){17},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){18},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){19},\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(\s+[^,]+,){20},\s+${VLAN_PASSING},* + # Trunk - Permitted VLANs + ^\s+VLAN\s+permitted:\s+${VLAN_PERMITTED},* -> Continue + # Skip initial VLANs and read the Nth + ^\s+VLAN\s+permitted:(\s+[^,]+,){1},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){2},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){3},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){4},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){5},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){6},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){7},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){8},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){9},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){10},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){11},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){12},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){13},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){14},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){15},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){16},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){17},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){18},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){19},\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(\s+[^,]+,){20},\s+${VLAN_PERMITTED},* + # Dropping other items (e.g. Last Input...) + #^\S+\s+.* + # Testing + #^\s{2,},\s+.* + ^\s+VLAN\s+perm + ^\s+Trunk + ^\s+Inpu + ^\s+\d+ + ^\s+- + ^\s+Peak + ^\s+Last + ^\s+Out + ^\s+Tagge + ^\s+UnTa + ^Last + ^\d+ + ^Inpu + ^Outp + ^Link + ^Loop + ^Media + ^Flow + ^Max + ^Allo + ^Broa + ^Multi + ^Uni + ^MDI + ^Port + ^Curren + ^IP + ^Inter + ^Unk + # End Testing + ^$$ -> Next.Record ^. -> Error - -Done - ^.* diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.raw b/tests/hp_comware/display_interface/hp_comware_display_interface.raw index 0d916e5a8a..4ca5849941 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface.raw +++ b/tests/hp_comware/display_interface/hp_comware_display_interface.raw @@ -100,3 +100,46 @@ IPv6 traffic statistics: Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec Input: 0 packets, 0 bytes Output: 0 packets, 0 bytes + +Ten-GigabitEthernet1/0/1 +Current state: DOWN +Line protocol state: DOWN +IP packet frame type: Ethernet II, hardware address: 000c-2963-b767 +Description: Ten-GigabitEthernet1/0/1 Interface +Bandwidth: 100000 kbps +Loopback is not set +Media type is twisted pair, port hardware type is 1000_BASE_T_AN_SFP +Unknown-speed mode, unknown-duplex mode +Link speed type is autonegotiation, link duplex type is autonegotiation +Flow-control is not enabled +Maximum frame length: 9216 +Allow jumbo frame to pass +Broadcast max-ratio: 100% +Multicast max-ratio: 100% +Unicast max-ratio: 100% +PVID: 1 +MDI type: Automdix +Port link-type: Access + Tagged VLANs: None + UnTagged VLANs: 1 +Port priority: 2 +Last link flapping: 6 hours 39 minutes 25 seconds +Last clearing of counters: 14:34:09 Tue 11/01/2011 + Peak input rate: 0 bytes/sec, at 2013-07-17 22:06:19 + Peak output rate: 0 bytes/sec, at 2013-07-17 22:06:19 + Last 300 second input: 0 packets/sec 0 bytes/sec -% + Last 300 second output: 0 packets/sec 0 bytes/sec -% + Input (total): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Input (normal): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, 0 overruns, 0 aborts + 0 ignored, 0 parity errors + Output (total): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Output (normal): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses + Output: 0 output errors, 0 underruns, 0 buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, 0 no carrier diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface1.raw b/tests/hp_comware/display_interface/hp_comware_display_interface1.raw new file mode 100644 index 0000000000..d4123a0311 --- /dev/null +++ b/tests/hp_comware/display_interface/hp_comware_display_interface1.raw @@ -0,0 +1,72 @@ +Bridge-Aggregation41 +Current state: UP +IP packet frame type: Ethernet II, hardware address: aaaa-bbbb-0200 +Description: Agg41-to-VBLOCK-14 +Bandwidth: 160000000 kbps +160Gbps-speed mode, full-duplex mode +Link speed type is autonegotiation, link duplex type is autonegotiation +PVID: 1 +Port link-type: Trunk + VLAN Passing: 2-31, 40-45, 49, 60-64, 66, 80-81, 98-104, 107, 110, 119-127 + 140-144, 160-164, 180, 182-193, 200-201, 213-222, 225-240, 243 + 250, 255, 411-413, 460, 555, 702, 777, 825, 829, 832, 836-837 + 845, 849, 852, 856-857, 865, 869, 872, 876-877, 1000-1002 + 1005-1006, 1011, 1013, 1020-1021, 1025-1026, 1028-1029 + 1031-1034, 1036-1037, 1039-1041, 1046, 1048, 1050, 1061-1063 + 1066-1067, 1069, 1071-1081, 1085-1090, 1095-1103, 1105-1136 + 1996-1999, 2017, 2501-2502, 2510, 2521, 2541, 2561, 2602, 2621 + 2641, 2661, 2701-2800, 3088, 3090-3093, 3260, 3280, 4000 + VLAN permitted: 2-4094 + Trunk port encapsulation: IEEE 802.1q +Last clearing of counters: 13:42:38 Sun 11/27/2022 +Last 300 seconds input: 653795 packets/sec 620328920 bytes/sec 3% +Last 300 seconds output: 752413 packets/sec 767574527 bytes/sec 3% +Input (total): 1378318211088 packets, 1485686536611046 bytes + 1378272321334 unicasts, 43421092 broadcasts, 2468662 multicasts, 0 pauses +Input (normal): 1378318204300 packets, - bytes + 1378272321256 unicasts, 43421092 broadcasts, 2468662 multicasts, 0 pauses +Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, - overruns, 0 aborts + - ignored, - parity errors +Output (total): 1492615088260 packets, 1670292936644909 bytes + 1492073645475 unicasts, 395257295 broadcasts, 146185490 multicasts, 0 pauses +Output (normal): 1492615087837 packets, - bytes + 1492073645355 unicasts, 395257296 broadcasts, 146185490 multicasts, 0 pauses +Output: 0 output errors, - underruns, 0 buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, - no carrier + +Ten-GigabitEthernet2/0/0/48 +Current state: UP +IP packet frame type: Ethernet II, hardware address: aaaa-bbbb-cdcd +Description: Ten-GigabitEthernet2/0/0/48 Interface +Bandwidth: 10000000 kbps +Loopback is not set +Media type is optical fiber, port hardware type is 10G_BASE_SR_SFP +10Gbps-speed mode, full-duplex mode +Link speed type is autonegotiation, link duplex type is autonegotiation +Maximum frame length: 9216 +MDI type: Automdix +Last link flapping: 1 weeks 4 days 1 hours 18 minutes +Last clearing of counters: Never +Current system time:2022-12-14 16:05:22 SAR+03:00:00 +Last time when physical state changed to up:2022-12-03 14:46:58 SAR+03:00:00 +Last time when physical state changed to down:2022-12-03 14:46:07 SAR+03:00:00 + Peak input rate: 121060 bytes/sec, at 2022-12-03 14:51:15 + Peak output rate: 28103 bytes/sec, at 2022-12-03 14:52:19 + Last 300 seconds input: 44 packets/sec 24328 bytes/sec 0% + Last 300 seconds output: 36 packets/sec 10419 bytes/sec 0% + Input (total): 30504263 packets, 11903620816 bytes + 3695347 unicasts, 0 broadcasts, 26808916 multicasts, 0 pauses + Input (normal): 30504263 packets, - bytes + 3695347 unicasts, 0 broadcasts, 26808916 multicasts, 0 pauses + Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, - overruns, 0 aborts + - ignored, - parity errors + Output (total): 36247403 packets, 10258414619 bytes + 23819222 unicasts, 0 broadcasts, 12428181 multicasts, 0 pauses + Output (normal): 36247403 packets, - bytes + 23819222 unicasts, 0 broadcasts, 12428181 multicasts, 0 pauses + Output: 0 output errors, - underruns, - buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, - no carrier From 52a190b6097a7b9244be93c3f6aab2f4cd5c8603 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Thu, 15 Dec 2022 16:38:29 +0100 Subject: [PATCH 13/25] Update hp_comware_display_interface.textfsm --- .../hp_comware_display_interface.textfsm | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm index 4a5f6d5b25..5d7c1cc4d1 100644 --- a/ntc_templates/templates/hp_comware_display_interface.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface.textfsm @@ -28,56 +28,56 @@ Start ^IPv6\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} ^${SPEED},\s+mode,\s+${DUPLEX},\s+mode ^PVID:\s+${VLAN_NATIVE} - #^Port\s+link-type: -> PortType ^Port\s+link-type:\s+${PORT_LINK_TYPE} - # Trunk - Passing VLANs + # Trunk - Passing VLANs (parsing multiple times with Continue) ^\s+VLAN\s+Passing:\s+${VLAN_PASSING},* -> Continue - # Skip initial VLANs and read the Nth - #^\s+VLAN\s+Passing:(\s+[^,]+,){1} -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){0},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){1},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){2},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){3},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){4},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){5},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){6},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){7},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){8},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){9},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){10},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){11},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){12},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){13},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){14},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){15},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){16},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){17},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){18},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){19},\s+${VLAN_PASSING},* -> Continue - ^\s+VLAN\s+Passing:(\s+[^,]+,){20},\s+${VLAN_PASSING},* - # Trunk - Permitted VLANs + # Skip initial VLANs and read the Nth + 1 + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){1}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){2}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){3}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){4}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){5}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){6}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){7}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){8}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){9}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){10}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){11}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){12}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){13}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){14}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){15}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){16}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){17}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){18}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){19}\s+${VLAN_PASSING},* -> Continue + ^\s+VLAN\s+Passing:(?:\s+[^,]+,){20}\s+${VLAN_PASSING},* -> Continue + # Clearing the line + ^\s+VLAN\s+Passing: + # Trunk - Permitted VLANs (parsing multiple times with Continue) ^\s+VLAN\s+permitted:\s+${VLAN_PERMITTED},* -> Continue - # Skip initial VLANs and read the Nth - ^\s+VLAN\s+permitted:(\s+[^,]+,){1},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){2},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){3},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){4},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){5},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){6},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){7},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){8},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){9},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){10},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){11},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){12},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){13},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){14},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){15},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){16},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){17},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){18},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){19},\s+${VLAN_PERMITTED},* -> Continue - ^\s+VLAN\s+permitted:(\s+[^,]+,){20},\s+${VLAN_PERMITTED},* + # Skip initial VLANs and read the Nth + 1 + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){1}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){2}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){3}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){4}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){5}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){6}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){7}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){8}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){9}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){10}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){11}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){12}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){13}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){14}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){15}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){16}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){17}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){18}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){19}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted:(?:\s+[^,]+,){20}\s+${VLAN_PERMITTED},* -> Continue + ^\s+VLAN\s+permitted: # Dropping other items (e.g. Last Input...) #^\S+\s+.* # Testing From c234d3473ccd8785843cfc51fbc0b06caf97e67c Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Thu, 15 Dec 2022 16:46:15 +0100 Subject: [PATCH 14/25] Update hp_comware_display_interface.yml --- .../hp_comware_display_interface.yml | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.yml b/tests/hp_comware/display_interface/hp_comware_display_interface.yml index b76d38908d..b74c91bab2 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface.yml +++ b/tests/hp_comware/display_interface/hp_comware_display_interface.yml @@ -3,22 +3,27 @@ parsed_sample: - interface: "Vlan-interface2000" state: "UP" link_protocol: "UP" - hw_address: "" + hw_address: + - "abab-cdcd-6486" + - "abab-cdcd-6486" description: "Servers-VLAN" bandwidth: "10000000 kbps" mtu: "1500" + l2mtu: "" pvid: "" ip_address: "10.1.200.1/24" port_link_type: "" - vlan_passing: - vlan_permitted: + vlan_passing: [] + vlan_permitted: [] - interface: "Bridge-Aggregation20" state: "UP" link_protocol: "UP" - hw_address: "abab-cdcd-6485" + hw_address: + - "abab-cdcd-6485" description: "TO_DIST_02_3rd_FLOOR" bandwidth: "40000000 kbps" mtu: "" + l2mtu: "" pvid: "1" ip_address: "10.1.200.1/24" port_link_type: "Trunk" @@ -33,10 +38,12 @@ parsed_sample: - interface: "GigabitEthernet1/1/0/31" state: "DOWN" link_protocol: "DOWN" - hw_address: "abab-cdcd-6485" + hw_address: + - "abab-cdcd-6485" description: "Aruba-WLC" bandwidth: "1000000 kbps" - mtu: "9216" + mtu: "" + l2mtu: "9216" pvid: "2190" ip_address: "10.1.200.1/24" port_link_type: "Trunk" @@ -47,3 +54,17 @@ parsed_sample: - "4049-4052" vlan_permitted: - "2-4094" + - interface: "GigabitEthernet1/1/0/1" + state: "DOWN" + link_protocol: "DOWN" + hw_address: + - "000c-2963-b767" + description: "Ten-GigabitEthernet1/0/1 Interface" + bandwidth: "100000 kbps" + mtu: "" + l2mtu: "9216" + pvid: "1" + ip_address: "" + port_link_type: "Access" + vlan_passing: [] + vlan_permitted: [] From 1c844954deea12779d55e91f369c9013a3135074 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Thu, 15 Dec 2022 16:50:18 +0100 Subject: [PATCH 15/25] Update hp_comware_display_interface.textfsm --- .../templates/hp_comware_display_interface.textfsm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm index 5d7c1cc4d1..0555c60102 100644 --- a/ntc_templates/templates/hp_comware_display_interface.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface.textfsm @@ -1,8 +1,9 @@ Value Required INTF (\S+) Value LINE_STATUS (UP|DOWN|Administratively DOWN) Value PROTOCOL_STATUS (UP(\(spoofing\))?|DOWN) -Value List IPADDR (\S+) +Value List IP_ADDRESS (\S+) Value MTU (\d+) +Value L2MTU (\d+) Value List HW_ADDRESS ([a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+) Value DESCRIPTION (.*) Value BANDWIDTH (.*) @@ -22,8 +23,9 @@ Start ^Description:\s+${DESCRIPTION} ^Bandwidth:\s+${BANDWIDTH} ^Maximum\s+transmission\s+unit:\s+${MTU} - ^Internet\s+address:\s+${IPADDR},\s+\(Primary\) - ^Internet\s+address:\s+${IPADDR},\s+\(Sub\) + ^Maximum\s+frame\s+length:\s+${L2MTU} + ^Internet\s+address:\s+${IP_ADDRESS}\s+\(Primary\) + ^Internet\s+address:\s+${IP_ADDRESS}\s+\(Sub\) ^IP\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} ^IPv6\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} ^${SPEED},\s+mode,\s+${DUPLEX},\s+mode From f47e3d6fdc0bfe5635e5f1f508c6bc0525acb140 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Thu, 15 Dec 2022 16:57:50 +0100 Subject: [PATCH 16/25] update --- .../hp_comware_display_interface.yml | 11 ++-- .../hp_comware_display_interface1.raw | 40 -------------- .../hp_comware_display_interface1.yml | 55 +++++++++++++++++++ 3 files changed, 62 insertions(+), 44 deletions(-) create mode 100644 tests/hp_comware/display_interface/hp_comware_display_interface1.yml diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.yml b/tests/hp_comware/display_interface/hp_comware_display_interface.yml index b74c91bab2..88ffcd3c67 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface.yml +++ b/tests/hp_comware/display_interface/hp_comware_display_interface.yml @@ -11,7 +11,8 @@ parsed_sample: mtu: "1500" l2mtu: "" pvid: "" - ip_address: "10.1.200.1/24" + ip_address: + - "10.1.200.1/24" port_link_type: "" vlan_passing: [] vlan_permitted: [] @@ -25,7 +26,8 @@ parsed_sample: mtu: "" l2mtu: "" pvid: "1" - ip_address: "10.1.200.1/24" + ip_address: + - "10.1.200.1/24" port_link_type: "Trunk" vlan_passing: - "1" @@ -45,7 +47,8 @@ parsed_sample: mtu: "" l2mtu: "9216" pvid: "2190" - ip_address: "10.1.200.1/24" + ip_address: + - "10.1.200.1/24" port_link_type: "Trunk" vlan_passing: - "2000" @@ -64,7 +67,7 @@ parsed_sample: mtu: "" l2mtu: "9216" pvid: "1" - ip_address: "" + ip_address: [] port_link_type: "Access" vlan_passing: [] vlan_permitted: [] diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface1.raw b/tests/hp_comware/display_interface/hp_comware_display_interface1.raw index d4123a0311..1227a02f7d 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface1.raw +++ b/tests/hp_comware/display_interface/hp_comware_display_interface1.raw @@ -11,11 +11,6 @@ Port link-type: Trunk 140-144, 160-164, 180, 182-193, 200-201, 213-222, 225-240, 243 250, 255, 411-413, 460, 555, 702, 777, 825, 829, 832, 836-837 845, 849, 852, 856-857, 865, 869, 872, 876-877, 1000-1002 - 1005-1006, 1011, 1013, 1020-1021, 1025-1026, 1028-1029 - 1031-1034, 1036-1037, 1039-1041, 1046, 1048, 1050, 1061-1063 - 1066-1067, 1069, 1071-1081, 1085-1090, 1095-1103, 1105-1136 - 1996-1999, 2017, 2501-2502, 2510, 2521, 2541, 2561, 2602, 2621 - 2641, 2661, 2701-2800, 3088, 3090-3093, 3260, 3280, 4000 VLAN permitted: 2-4094 Trunk port encapsulation: IEEE 802.1q Last clearing of counters: 13:42:38 Sun 11/27/2022 @@ -35,38 +30,3 @@ Output (normal): 1492615087837 packets, - bytes Output: 0 output errors, - underruns, 0 buffer failures 0 aborts, 0 deferred, 0 collisions, 0 late collisions 0 lost carrier, - no carrier - -Ten-GigabitEthernet2/0/0/48 -Current state: UP -IP packet frame type: Ethernet II, hardware address: aaaa-bbbb-cdcd -Description: Ten-GigabitEthernet2/0/0/48 Interface -Bandwidth: 10000000 kbps -Loopback is not set -Media type is optical fiber, port hardware type is 10G_BASE_SR_SFP -10Gbps-speed mode, full-duplex mode -Link speed type is autonegotiation, link duplex type is autonegotiation -Maximum frame length: 9216 -MDI type: Automdix -Last link flapping: 1 weeks 4 days 1 hours 18 minutes -Last clearing of counters: Never -Current system time:2022-12-14 16:05:22 SAR+03:00:00 -Last time when physical state changed to up:2022-12-03 14:46:58 SAR+03:00:00 -Last time when physical state changed to down:2022-12-03 14:46:07 SAR+03:00:00 - Peak input rate: 121060 bytes/sec, at 2022-12-03 14:51:15 - Peak output rate: 28103 bytes/sec, at 2022-12-03 14:52:19 - Last 300 seconds input: 44 packets/sec 24328 bytes/sec 0% - Last 300 seconds output: 36 packets/sec 10419 bytes/sec 0% - Input (total): 30504263 packets, 11903620816 bytes - 3695347 unicasts, 0 broadcasts, 26808916 multicasts, 0 pauses - Input (normal): 30504263 packets, - bytes - 3695347 unicasts, 0 broadcasts, 26808916 multicasts, 0 pauses - Input: 0 input errors, 0 runts, 0 giants, 0 throttles - 0 CRC, 0 frame, - overruns, 0 aborts - - ignored, - parity errors - Output (total): 36247403 packets, 10258414619 bytes - 23819222 unicasts, 0 broadcasts, 12428181 multicasts, 0 pauses - Output (normal): 36247403 packets, - bytes - 23819222 unicasts, 0 broadcasts, 12428181 multicasts, 0 pauses - Output: 0 output errors, - underruns, - buffer failures - 0 aborts, 0 deferred, 0 collisions, 0 late collisions - 0 lost carrier, - no carrier diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface1.yml b/tests/hp_comware/display_interface/hp_comware_display_interface1.yml new file mode 100644 index 0000000000..e841fb143e --- /dev/null +++ b/tests/hp_comware/display_interface/hp_comware_display_interface1.yml @@ -0,0 +1,55 @@ +--- +parsed_sample: + - interface: "Bridge-Aggregation20" + state: "UP" + link_protocol: "UP" + hw_address: + - "aaaa-bbbb-0200" + description: "Agg41-to-VBLOCK-14" + bandwidth: "160000000 kbps" + mtu: "" + l2mtu: "" + pvid: "1" + ip_address: [] + port_link_type: "Trunk" + vlan_passing: + - "2-31" + - "40-45" + - "49" + - "60-64" + - "66" + - "80-81" + - "98-104" + - "107" + - "110" + - "119-127" + - "140-144" + - "160-164" + - "180" + - "182-193" + - "200-201" + - "213-222" + - "225-240" + - "243" + - "250" + - "255" + - "411-413" + - "460" + - "555" + - "702" + - "777" + - "825" + - "829" + - "832" + - "836-837" + - "845" + - "849" + - "852" + - "856-857" + - "865" + - "869" + - "872" + - "876-877" + - "1000-1002" + vlan_permitted: + - "2-4094" From cef354da5e3b60379b5dce7c58cba8d1edc62ac7 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Thu, 15 Dec 2022 17:01:24 +0100 Subject: [PATCH 17/25] Update hp_comware_display_interface.textfsm --- .../hp_comware_display_interface.textfsm | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm index 0555c60102..8db9b6079b 100644 --- a/ntc_templates/templates/hp_comware_display_interface.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface.textfsm @@ -54,6 +54,27 @@ Start ^\s+VLAN\s+Passing:(?:\s+[^,]+,){18}\s+${VLAN_PASSING},* -> Continue ^\s+VLAN\s+Passing:(?:\s+[^,]+,){19}\s+${VLAN_PASSING},* -> Continue ^\s+VLAN\s+Passing:(?:\s+[^,]+,){20}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){1}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){2}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){3}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){4}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){5}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){6}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){7}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){8}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){9}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){10}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){11}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){12}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){13}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){14}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){15}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){16}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){17}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){18}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){19}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){20}\s+${VLAN_PASSING},* -> Continue # Clearing the line ^\s+VLAN\s+Passing: # Trunk - Permitted VLANs (parsing multiple times with Continue) @@ -79,6 +100,28 @@ Start ^\s+VLAN\s+permitted:(?:\s+[^,]+,){18}\s+${VLAN_PERMITTED},* -> Continue ^\s+VLAN\s+permitted:(?:\s+[^,]+,){19}\s+${VLAN_PERMITTED},* -> Continue ^\s+VLAN\s+permitted:(?:\s+[^,]+,){20}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){1}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){2}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){3}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){4}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){5}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){6}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){7}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){8}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){9}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){10}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){11}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){12}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){13}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){14}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){15}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){16}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){17}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){18}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){19}\s+${VLAN_PASSING},* -> Continue + ^\s{14,}(?:\s+[^,]+,){20}\s+${VLAN_PASSING},* -> Continue + # Clearing the line ^\s+VLAN\s+permitted: # Dropping other items (e.g. Last Input...) #^\S+\s+.* From 25cfdd729a905c2140cee5d9b551d34c8e537f79 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Fri, 16 Dec 2022 15:24:20 +0100 Subject: [PATCH 18/25] update --- .../hp_comware_display_interface.textfsm | 85 ++++++------------- .../hp_comware_display_interface.raw | 72 ++++++++-------- 2 files changed, 64 insertions(+), 93 deletions(-) diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm index 8db9b6079b..a4ca8ca320 100644 --- a/ntc_templates/templates/hp_comware_display_interface.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface.textfsm @@ -75,8 +75,9 @@ Start ^\s{14,}(?:\s+[^,]+,){18}\s+${VLAN_PASSING},* -> Continue ^\s{14,}(?:\s+[^,]+,){19}\s+${VLAN_PASSING},* -> Continue ^\s{14,}(?:\s+[^,]+,){20}\s+${VLAN_PASSING},* -> Continue - # Clearing the line + # End od VLAN Passing ^\s+VLAN\s+Passing: + ^\s{14,} # Trunk - Permitted VLANs (parsing multiple times with Continue) ^\s+VLAN\s+permitted:\s+${VLAN_PERMITTED},* -> Continue # Skip initial VLANs and read the Nth + 1 @@ -100,62 +101,32 @@ Start ^\s+VLAN\s+permitted:(?:\s+[^,]+,){18}\s+${VLAN_PERMITTED},* -> Continue ^\s+VLAN\s+permitted:(?:\s+[^,]+,){19}\s+${VLAN_PERMITTED},* -> Continue ^\s+VLAN\s+permitted:(?:\s+[^,]+,){20}\s+${VLAN_PERMITTED},* -> Continue - ^\s{14,}${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){1}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){2}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){3}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){4}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){5}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){6}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){7}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){8}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){9}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){10}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){11}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){12}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){13}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){14}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){15}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){16}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){17}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){18}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){19}\s+${VLAN_PASSING},* -> Continue - ^\s{14,}(?:\s+[^,]+,){20}\s+${VLAN_PASSING},* -> Continue - # Clearing the line + ^\s{14,}${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){1}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){2}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){3}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){4}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){5}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){6}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){7}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){8}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){9}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){10}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){11}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){12}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){13}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){14}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){15}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){16}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){17}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){18}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){19}\s+${VLAN_PERMITTED},* -> Continue + ^\s{14,}(?:\s+[^,]+,){20}\s+${VLAN_PERMITTED},* -> Continue + # End od VLAN Passing ^\s+VLAN\s+permitted: - # Dropping other items (e.g. Last Input...) - #^\S+\s+.* - # Testing - #^\s{2,},\s+.* - ^\s+VLAN\s+perm - ^\s+Trunk - ^\s+Inpu - ^\s+\d+ - ^\s+- - ^\s+Peak - ^\s+Last - ^\s+Out - ^\s+Tagge - ^\s+UnTa - ^Last - ^\d+ - ^Inpu - ^Outp - ^Link - ^Loop - ^Media - ^Flow - ^Max - ^Allo - ^Broa - ^Multi - ^Uni - ^MDI - ^Port - ^Curren - ^IP - ^Inter - ^Unk - # End Testing + ^\s{14,} + # Next ^$$ -> Next.Record + # Drop + ^.* ^. -> Error diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.raw b/tests/hp_comware/display_interface/hp_comware_display_interface.raw index 4ca5849941..425d14fbd5 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface.raw +++ b/tests/hp_comware/display_interface/hp_comware_display_interface.raw @@ -72,24 +72,24 @@ Last clearing of counters: Never Current system time:2022-12-04 09:59:42 SAR+03:00:00 Last time when physical state changed to up:- Last time when physical state changed to down:2022-12-03 14:48:11 SAR+03:00:00 - Peak input rate: 0 bytes/sec, at 2022-12-03 14:48:40 - Peak output rate: 0 bytes/sec, at 2022-12-03 14:48:40 - Last 300 seconds input: 0 packets/sec 0 bytes/sec -% - Last 300 seconds output: 0 packets/sec 0 bytes/sec -% - Input (total): 0 packets, 0 bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Input (normal): 0 packets, - bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Input: 0 input errors, 0 runts, 0 giants, 0 throttles - 0 CRC, 0 frame, - overruns, 0 aborts - - ignored, - parity errors - Output (total): 0 packets, 0 bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Output (normal): 0 packets, - bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Output: 0 output errors, - underruns, - buffer failures - 0 aborts, 0 deferred, 0 collisions, 0 late collisions - 0 lost carrier, - no carrier +Peak input rate: 0 bytes/sec, at 2022-12-03 14:48:40 +Peak output rate: 0 bytes/sec, at 2022-12-03 14:48:40 +Last 300 seconds input: 0 packets/sec 0 bytes/sec -% +Last 300 seconds output: 0 packets/sec 0 bytes/sec -% +Input (total): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses +Input (normal): 0 packets, - bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses +Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, - overruns, 0 aborts + - ignored, - parity errors +Output (total): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses +Output (normal): 0 packets, - bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses +Output: 0 output errors, - underruns, - buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, - no carrier IPv4 traffic statistics: Last 300 seconds input rate: 0 packets/sec, 0 bytes/sec Last 300 seconds output rate: 0 packets/sec, 0 bytes/sec @@ -125,21 +125,21 @@ Port link-type: Access Port priority: 2 Last link flapping: 6 hours 39 minutes 25 seconds Last clearing of counters: 14:34:09 Tue 11/01/2011 - Peak input rate: 0 bytes/sec, at 2013-07-17 22:06:19 - Peak output rate: 0 bytes/sec, at 2013-07-17 22:06:19 - Last 300 second input: 0 packets/sec 0 bytes/sec -% - Last 300 second output: 0 packets/sec 0 bytes/sec -% - Input (total): 0 packets, 0 bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Input (normal): 0 packets, 0 bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Input: 0 input errors, 0 runts, 0 giants, 0 throttles - 0 CRC, 0 frame, 0 overruns, 0 aborts - 0 ignored, 0 parity errors - Output (total): 0 packets, 0 bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Output (normal): 0 packets, 0 bytes - 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses - Output: 0 output errors, 0 underruns, 0 buffer failures - 0 aborts, 0 deferred, 0 collisions, 0 late collisions - 0 lost carrier, 0 no carrier +Peak input rate: 0 bytes/sec, at 2013-07-17 22:06:19 +Peak output rate: 0 bytes/sec, at 2013-07-17 22:06:19 +Last 300 second input: 0 packets/sec 0 bytes/sec -% +Last 300 second output: 0 packets/sec 0 bytes/sec -% +Input (total): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses +Input (normal): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses +Input: 0 input errors, 0 runts, 0 giants, 0 throttles + 0 CRC, 0 frame, 0 overruns, 0 aborts + 0 ignored, 0 parity errors +Output (total): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses +Output (normal): 0 packets, 0 bytes + 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses +Output: 0 output errors, 0 underruns, 0 buffer failures + 0 aborts, 0 deferred, 0 collisions, 0 late collisions + 0 lost carrier, 0 no carrier From a6e51061050f599c081917b3ada025bb7afa64d6 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Mon, 19 Dec 2022 09:03:27 +0100 Subject: [PATCH 19/25] update --- ...mware_display_link-aggregation_verbose.raw | 77 ++++++++++++++---- ...ware_display_link-aggregation_verbose.yaml | 80 ++++++++++++++++++- ...ware_display_link-aggregation_verbose1.raw | 20 +++++ ...are_display_link-aggregation_verbose1.yaml | 18 +++++ 4 files changed, 175 insertions(+), 20 deletions(-) create mode 100644 tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.raw create mode 100644 tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yaml diff --git a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.raw b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.raw index 59aafad89b..b8b41cefb6 100644 --- a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.raw +++ b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.raw @@ -1,20 +1,63 @@ -Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing -Port Status: S -- Selected, U -- Unselected -Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, - D -- Synchronization, E -- Collecting, F -- Distributing, - G -- Defaulted, H -- Expired +Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing +Port Status: S -- Selected, U -- Unselected, I -- Individual +Port: A -- Auto port, M -- Management port, R -- Reference port +Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, + D -- Synchronization, E -- Collecting, F -- Distributing, + G -- Defaulted, H -- Expired -Aggregation Interface: Bridge-Aggregation1 +Aggregate Interface: Bridge-Aggregation10 +Creation Mode: Manual Aggregation Mode: Dynamic Loadsharing Type: Shar -System ID: 0x8000, 5c8a-3830-e4fe -Local: - Port Status Priority Oper-Key Flag --------------------------------------------------------------------------------- - XGE1/0/29 S 32768 1 {ACDEF} - XGE1/0/30 S 32768 1 {ACDEF} -Remote: - Actor Partner Priority Oper-Key SystemID Flag --------------------------------------------------------------------------------- - XGE1/0/29 17 32768 2 0x8000, bcea-fa19-8be8 {ACDEF} - XGE1/0/30 222 32768 2 0x8000, bcea-fa19-8be8 {ACDEF} +Management VLANs: None +System ID: 0x8000, 7848-5933-6485 +Local: + Port Status Priority Index Oper-Key Flag + XGE1/0/0/1(R) S 32768 1 1 {ACDEF} + XGE1/0/0/2 S 32768 6 1 {ACDEF} + XGE2/0/0/1 S 32768 11 1 {ACDEF} + XGE2/0/0/2 S 32768 16 1 {ACDEF} +Remote: + Actor Priority Index Oper-Key SystemID Flag + XGE1/0/0/1 32768 47 9 0x8000, aaaa-bbbb-8be8 {ACDEF} + XGE1/0/0/2 32768 252 9 0x8000, aaaa-bbbb-8be8 {ACDEF} + XGE2/0/0/1 32768 48 9 0x8000, aaaa-bbbb-8be8 {ACDEF} + XGE2/0/0/2 32768 253 9 0x8000, aaaa-bbbb-8be8 {ACDEF} + +Aggregate Interface: Bridge-Aggregation20 +Creation Mode: Manual +Aggregation Mode: Dynamic +Loadsharing Type: Shar +Management VLANs: None +System ID: 0x8000, 7848-5933-6485 +Local: + Port Status Priority Index Oper-Key Flag + XGE1/0/0/5(R) S 32768 2 2 {ACDEF} + XGE1/0/0/6 S 32768 7 2 {ACDEF} + XGE2/0/0/5 S 32768 12 2 {ACDEF} + XGE2/0/0/6 S 32768 17 2 {ACDEF} +Remote: + Actor Priority Index Oper-Key SystemID Flag + XGE1/0/0/5 32768 47 13 0x8000, bcea-fa0d-b0e0 {ACDEF} + XGE1/0/0/6 32768 48 13 0x8000, bcea-fa0d-b0e0 {ACDEF} + XGE2/0/0/5 32768 252 13 0x8000, bcea-fa0d-b0e0 {ACDEF} + XGE2/0/0/6 32768 253 13 0x8000, bcea-fa0d-b0e0 {ACDEF} + +Aggregate Interface: Bridge-Aggregation30 +Creation Mode: Manual +Aggregation Mode: Dynamic +Loadsharing Type: Shar +Management VLANs: None +System ID: 0x8000, 7848-5933-6485 +Local: + Port Status Priority Index Oper-Key Flag + XGE1/0/0/9(R) S 32768 3 3 {ACDEF} + XGE1/0/0/10 S 32768 8 3 {ACDEF} + XGE2/0/0/9 S 32768 13 3 {ACDEF} + XGE2/0/0/10 S 32768 18 3 {ACDEF} +Remote: + Actor Priority Index Oper-Key SystemID Flag + XGE1/0/0/9 32768 252 13 0x8000, bcea-fa0d-c7d8 {ACDEF} + XGE1/0/0/10 32768 253 13 0x8000, bcea-fa0d-c7d8 {ACDEF} + XGE2/0/0/9 32768 47 13 0x8000, bcea-fa0d-c7d8 {ACDEF} + XGE2/0/0/10 32768 48 13 0x8000, bcea-fa0d-c7d8 {ACDEF} diff --git a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml index fa22201aee..5417f620f5 100644 --- a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml +++ b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml @@ -1,6 +1,80 @@ --- parsed_sample: - - interface: "Bridge-Aggregation1" + - interface: "Bridge-Aggregation10" + creation_mode: "Manual" + aggregation_mode: "Dynamic" + loadsharing: "Shar" local_interfaces: - - "XGE1/0/29" - - "XGE1/0/30" + - port: "XGE1/0/0/1" + status: "S" + flag: "ACDEF" + - port: "XGE1/0/0/2" + status: "S" + flag: "ACDEF" + - port: "XGE2/0/0/1" + status: "S" + flag: "ACDEF" + - port: "XGE2/0/0/2" + status: "S" + flag: "ACDEF" + remote_interfaces: + - port: "XGE1/0/0/1" + flag: "ACDEF" + - port: "XGE1/0/0/2" + flag: "ACDEF" + - port: "XGE2/0/0/1" + flag: "ACDEF" + - port: "XGE2/0/0/2" + flag: "ACDEF" + - interface: "Bridge-Aggregation20" + creation_mode: "Manual" + aggregation_mode: "Dynamic" + loadsharing: "Shar" + local_interfaces: + - port: "XGE1/0/0/5" + status: "S" + flag: "ACDEF" + - port: "XGE1/0/0/6" + status: "S" + flag: "ACDEF" + - port: "XGE2/0/0/5" + status: "S" + flag: "ACDEF" + - port: "XGE2/0/0/6" + status: "S" + flag: "ACDEF" + remote_interfaces: + - port: "XGE1/0/0/5" + flag: "ACDEF" + - port: "XGE1/0/0/6" + flag: "ACDEF" + - port: "XGE2/0/0/5" + flag: "ACDEF" + - port: "XGE2/0/0/6" + flag: "ACDEF" + - interface: "Bridge-Aggregation30" + creation_mode: "Manual" + aggregation_mode: "Dynamic" + loadsharing: "Shar" + local_interfaces: + - port: "XGE1/0/0/9" + status: "S" + flag: "ACDEF" + - port: "XGE1/0/0/10" + status: "S" + flag: "ACDEF" + - port: "XGE2/0/0/9" + status: "S" + flag: "ACDEF" + - port: "XGE2/0/0/10" + status: "S" + flag: "ACDEF" + remote_interfaces: + - port: "XGE1/0/0/9" + flag: "ACDEF" + - port: "XGE1/0/0/10" + flag: "ACDEF" + - port: "XGE2/0/0/9" + flag: "ACDEF" + - port: "XGE2/0/0/10" + flag: "ACDEF" diff --git a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.raw b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.raw new file mode 100644 index 0000000000..6059fe5ae2 --- /dev/null +++ b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.raw @@ -0,0 +1,20 @@ +Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing +Port Status: S -- Selected, U -- Unselected +Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, + D -- Synchronization, E -- Collecting, F -- Distributing, + G -- Defaulted, H -- Expired + +Aggregation Interface: Route-Aggregation1 +Aggregation Mode: Dynamic +Loadsharing Type: Shar +System ID: 0x8000, aaaa-bbbb-75bc +Local: + Port Status Priority Oper-Key Flag +-------------------------------------------------------------------------------- + GE0/0/0 S 32768 1 {ACDEF} + GE0/0/1 S 32768 1 {ACDEF} +Remote: + Actor Partner Priority Oper-Key SystemID Flag +-------------------------------------------------------------------------------- + GE0/0/0 21 32768 7 0x8000, aaaa-bbbb-6485 {ACDEF} + GE0/0/1 23 32768 7 0x8000, aaaa-bbbb-6485 {ACDEF} diff --git a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yaml b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yaml new file mode 100644 index 0000000000..f86b929aa2 --- /dev/null +++ b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yaml @@ -0,0 +1,18 @@ +--- +parsed_sample: + - interface: "Route-Aggregation1" + creation_mode: "" + aggregation_mode: "Dynamic" + loadsharing: "Shar" + local_interfaces: + - port: "GE0/0/0" + status: "S" + flag: "ACDEF" + - port: "GE0/0/1" + status: "S" + flag: "ACDEF" + remote_interfaces: + - port: "GE0/0/0" + flag: "ACDEF" + - port: "GE0/0/1" + flag: "ACDEF" From 11efc3ba9e41044f70f95293bc06df2368bf7b7a Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Mon, 19 Dec 2022 10:15:47 +0100 Subject: [PATCH 20/25] implement displ aggreg --- ...e_display_link-aggregation_verbose.textfsm | 30 +++++++ ...ware_display_link-aggregation_verbose.yaml | 84 ++++++------------- ...are_display_link-aggregation_verbose1.yaml | 14 +--- 3 files changed, 58 insertions(+), 70 deletions(-) diff --git a/ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm b/ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm index e69de29bb2..394ae94a10 100644 --- a/ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm +++ b/ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm @@ -0,0 +1,30 @@ +Value Required INTERFACE (\S+) +Value CREATION_MODE (.+) +Value AGGREGATION_MODE (.+) +Value LOADSHARING (.+) +Value List LOCAL_INTERFACES (\S+) +Value List REMOTE_INTERFACES (\S+) + +Start + ^Aggregat\S+\s+Interface:\s+${INTERFACE} + ^Creation\s+Mode:\s+${CREATION_MODE} + ^Aggregation\s+Mode:\s+${AGGREGATION_MODE} + ^Loadsharing\s+Type:\s+${LOADSHARING} + ^Local: -> LocalPorts + +LocalPorts + ^\s+Port + ^\s*--- + ^\s+${LOCAL_INTERFACES}\s+.* + # Start of remote block port + ^Remote: -> RemotePorts + ^. -> Error + +RemotePorts + ^\s+Actor + ^\s*--- + ^\s+${REMOTE_INTERFACES}\s+.* + # New item, restart from the beginning + ^Aggregat -> Continue.Record + ^Aggregat\S+\s+Interface:\s+${INTERFACE} -> Start + ^. -> Error diff --git a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml index 5417f620f5..7ddc2408c5 100644 --- a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml +++ b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml @@ -5,76 +5,40 @@ parsed_sample: aggregation_mode: "Dynamic" loadsharing: "Shar" local_interfaces: - - port: "XGE1/0/0/1" - status: "S" - flag: "ACDEF" - - port: "XGE1/0/0/2" - status: "S" - flag: "ACDEF" - - port: "XGE2/0/0/1" - status: "S" - flag: "ACDEF" - - port: "XGE2/0/0/2" - status: "S" - flag: "ACDEF" + - "XGE1/0/0/1" + - "XGE1/0/0/2" + - "XGE2/0/0/1" + - "XGE2/0/0/2" remote_interfaces: - - port: "XGE1/0/0/1" - flag: "ACDEF" - - port: "XGE1/0/0/2" - flag: "ACDEF" - - port: "XGE2/0/0/1" - flag: "ACDEF" - - port: "XGE2/0/0/2" - flag: "ACDEF" + - "XGE1/0/0/1" + - "XGE1/0/0/2" + - "XGE2/0/0/1" + - "XGE2/0/0/2" - interface: "Bridge-Aggregation20" creation_mode: "Manual" aggregation_mode: "Dynamic" loadsharing: "Shar" local_interfaces: - - port: "XGE1/0/0/5" - status: "S" - flag: "ACDEF" - - port: "XGE1/0/0/6" - status: "S" - flag: "ACDEF" - - port: "XGE2/0/0/5" - status: "S" - flag: "ACDEF" - - port: "XGE2/0/0/6" - status: "S" - flag: "ACDEF" + - "XGE1/0/0/5" + - "XGE1/0/0/6" + - "XGE2/0/0/5" + - "XGE2/0/0/6" remote_interfaces: - - port: "XGE1/0/0/5" - flag: "ACDEF" - - port: "XGE1/0/0/6" - flag: "ACDEF" - - port: "XGE2/0/0/5" - flag: "ACDEF" - - port: "XGE2/0/0/6" - flag: "ACDEF" + - "XGE1/0/0/5" + - "XGE1/0/0/6" + - "XGE2/0/0/5" + - "XGE2/0/0/6" - interface: "Bridge-Aggregation30" creation_mode: "Manual" aggregation_mode: "Dynamic" loadsharing: "Shar" local_interfaces: - - port: "XGE1/0/0/9" - status: "S" - flag: "ACDEF" - - port: "XGE1/0/0/10" - status: "S" - flag: "ACDEF" - - port: "XGE2/0/0/9" - status: "S" - flag: "ACDEF" - - port: "XGE2/0/0/10" - status: "S" - flag: "ACDEF" + - "XGE1/0/0/9" + - "XGE1/0/0/10" + - "XGE2/0/0/9" + - "XGE2/0/0/10" remote_interfaces: - - port: "XGE1/0/0/9" - flag: "ACDEF" - - port: "XGE1/0/0/10" - flag: "ACDEF" - - port: "XGE2/0/0/9" - flag: "ACDEF" - - port: "XGE2/0/0/10" - flag: "ACDEF" + - "XGE1/0/0/9" + - "XGE1/0/0/10" + - "XGE2/0/0/9" + - "XGE2/0/0/10" diff --git a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yaml b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yaml index f86b929aa2..f170ca0738 100644 --- a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yaml +++ b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yaml @@ -5,14 +5,8 @@ parsed_sample: aggregation_mode: "Dynamic" loadsharing: "Shar" local_interfaces: - - port: "GE0/0/0" - status: "S" - flag: "ACDEF" - - port: "GE0/0/1" - status: "S" - flag: "ACDEF" + - "GE0/0/0" + - "GE0/0/1" remote_interfaces: - - port: "GE0/0/0" - flag: "ACDEF" - - port: "GE0/0/1" - flag: "ACDEF" + - "GE0/0/0" + - "GE0/0/1" From 2510eed241fa9b5a4e98a059d5882d13d5e09e0e Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Mon, 19 Dec 2022 11:37:58 +0100 Subject: [PATCH 21/25] fix tests --- .../hp_comware_display_interface.textfsm | 3 +- ntc_templates/templates/index | 2 +- .../hp_comware_display_interface.yml | 74 ++++++++++--------- .../hp_comware_display_interface1.yml | 10 ++- ...=> hp_comware_display_ip_vpn-instance.yml} | 0 ...ware_display_link-aggregation_verbose.yml} | 6 +- ...are_display_link-aggregation_verbose1.yml} | 0 7 files changed, 51 insertions(+), 44 deletions(-) rename tests/hp_comware/display_ip_vpn-instance/{hp_comware_display_ip_vpn-instance.yaml => hp_comware_display_ip_vpn-instance.yml} (100%) rename tests/hp_comware/display_link-aggregation_verbose/{hp_comware_display_link-aggregation_verbose.yaml => hp_comware_display_link-aggregation_verbose.yml} (93%) rename tests/hp_comware/display_link-aggregation_verbose/{hp_comware_display_link-aggregation_verbose1.yaml => hp_comware_display_link-aggregation_verbose1.yml} (100%) diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm index a4ca8ca320..5f338fb22f 100644 --- a/ntc_templates/templates/hp_comware_display_interface.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface.textfsm @@ -10,7 +10,6 @@ Value BANDWIDTH (.*) Value DUPLEX (\S+) Value SPEED (\S+) Value PORT_LINK_TYPE (\S+) -Value TRUNK_MODE (.*) Value VLAN_NATIVE (\d+) Value List VLAN_PASSING ([^,]+) Value List VLAN_PERMITTED ([^,]+) @@ -28,7 +27,7 @@ Start ^Internet\s+address:\s+${IP_ADDRESS}\s+\(Sub\) ^IP\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} ^IPv6\s+packet\s+frame\s+type:\s+Ethernet\s+II,\s+hardware\s+address:\s+${HW_ADDRESS} - ^${SPEED},\s+mode,\s+${DUPLEX},\s+mode + ^${SPEED}\s+mode,\s+${DUPLEX}\s+mode ^PVID:\s+${VLAN_NATIVE} ^Port\s+link-type:\s+${PORT_LINK_TYPE} # Trunk - Passing VLANs (parsing multiple times with Continue) diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 1f691676f8..07d6c177fe 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -445,8 +445,8 @@ hp_comware_display_lldp_neighbor-information_verbose.textfsm, .*, hp_comware, di hp_comware_display_counters_bound_interface.textfsm, .*, hp_comware, di[[splay]] cou[[nters]] (\S+) i[[nterface]] hp_comware_display_link-aggregation_verbose.textfsm, .*, hp_comware, di[[splay]] link[[-aggregation]] v[[erbose]] hp_comware_display_ip_routing-table.textfsm, .*, hp_comware, di[[splay]] ip r[[outing-table]] -hp_comware_display_ip_vpn-instance.textfsm, .*, hp_comware, di[[splay]] ip vpn[[-instance]] hp_comware_display_device_manuinfo.textfsm, .*, hp_comware, di[[splay]] dev[[ice]] m[[anuinfo]] +hp_comware_display_ip_vpn-instance.textfsm, .*, hp_comware, di[[splay]] ip vpn[[-instance]] hp_comware_display_ip_interface.textfsm, .*, hp_comware, dis[[play]] ip i[[nterface]] hp_comware_display_mac-address.textfsm, .*, hp_comware, di[[splay]] mac-ad[[dress]] hp_comware_display_vlan_brief.textfsm, .*, hp_comware, di[[splay]] v[[lan]] b[[rief]] diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.yml b/tests/hp_comware/display_interface/hp_comware_display_interface.yml index 88ffcd3c67..95cd18a251 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface.yml +++ b/tests/hp_comware/display_interface/hp_comware_display_interface.yml @@ -1,54 +1,58 @@ --- parsed_sample: - - interface: "Vlan-interface2000" - state: "UP" - link_protocol: "UP" + - intf: "Vlan-interface2000" + line_status: "UP" + protocol_status: "UP" + ip_address: + - "10.1.200.1/24" + mtu: "1500" + l2mtu: "" hw_address: - "abab-cdcd-6486" - "abab-cdcd-6486" description: "Servers-VLAN" bandwidth: "10000000 kbps" - mtu: "1500" - l2mtu: "" - pvid: "" - ip_address: - - "10.1.200.1/24" + duplex: "" + speed: "" port_link_type: "" + vlan_native: "" vlan_passing: [] vlan_permitted: [] - - interface: "Bridge-Aggregation20" - state: "UP" - link_protocol: "UP" + - intf: "Bridge-Aggregation20" + line_status: "UP" + protocol_status: "UP" + ip_address: [] + mtu: "" + l2mtu: "" hw_address: - "abab-cdcd-6485" description: "TO_DIST_02_3rd_FLOOR" bandwidth: "40000000 kbps" - mtu: "" - l2mtu: "" - pvid: "1" - ip_address: - - "10.1.200.1/24" + duplex: "full-duplex" + speed: "40Gbps-speed" port_link_type: "Trunk" + vlan_native: "1" vlan_passing: - - "1" + - "1(default vlan)" - "4001-4002" vlan_permitted: - - "1" - - "2021-2020" + - "1(default vlan)" + - "2001-2020" - "2190" - "4001-4002" - - interface: "GigabitEthernet1/1/0/31" - state: "DOWN" - link_protocol: "DOWN" + - intf: "GigabitEthernet1/1/0/31" + line_status: "DOWN" + protocol_status: "DOWN" + ip_address: [] hw_address: - "abab-cdcd-6485" - description: "Aruba-WLC" - bandwidth: "1000000 kbps" mtu: "" l2mtu: "9216" - pvid: "2190" - ip_address: - - "10.1.200.1/24" + description: "Aruba-WLC" + bandwidth: "1000000 kbps" + duplex: "unknown-duplex" + speed: "Unknown-speed" + vlan_native: "2190" port_link_type: "Trunk" vlan_passing: - "2000" @@ -57,17 +61,19 @@ parsed_sample: - "4049-4052" vlan_permitted: - "2-4094" - - interface: "GigabitEthernet1/1/0/1" - state: "DOWN" - link_protocol: "DOWN" + - intf: "Ten-GigabitEthernet1/0/1" + line_status: "DOWN" + protocol_status: "DOWN" + ip_address: [] hw_address: - "000c-2963-b767" - description: "Ten-GigabitEthernet1/0/1 Interface" - bandwidth: "100000 kbps" mtu: "" l2mtu: "9216" - pvid: "1" - ip_address: [] + description: "Ten-GigabitEthernet1/0/1 Interface" + bandwidth: "100000 kbps" + duplex: "unknown-duplex" + speed: "Unknown-speed" + vlan_native: "1" port_link_type: "Access" vlan_passing: [] vlan_permitted: [] diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface1.yml b/tests/hp_comware/display_interface/hp_comware_display_interface1.yml index e841fb143e..a579d90a87 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface1.yml +++ b/tests/hp_comware/display_interface/hp_comware_display_interface1.yml @@ -1,15 +1,17 @@ --- parsed_sample: - - interface: "Bridge-Aggregation20" - state: "UP" - link_protocol: "UP" + - intf: "Bridge-Aggregation41" + line_status: "UP" + protocol_status: "" hw_address: - "aaaa-bbbb-0200" description: "Agg41-to-VBLOCK-14" bandwidth: "160000000 kbps" + speed: "160Gbps-speed" + duplex: "full-duplex" mtu: "" l2mtu: "" - pvid: "1" + vlan_native: "1" ip_address: [] port_link_type: "Trunk" vlan_passing: diff --git a/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml b/tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yml similarity index 100% rename from tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yaml rename to tests/hp_comware/display_ip_vpn-instance/hp_comware_display_ip_vpn-instance.yml diff --git a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yml similarity index 93% rename from tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml rename to tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yml index 7ddc2408c5..12c073b4b7 100644 --- a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yaml +++ b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose.yml @@ -5,7 +5,7 @@ parsed_sample: aggregation_mode: "Dynamic" loadsharing: "Shar" local_interfaces: - - "XGE1/0/0/1" + - "XGE1/0/0/1(R)" - "XGE1/0/0/2" - "XGE2/0/0/1" - "XGE2/0/0/2" @@ -19,7 +19,7 @@ parsed_sample: aggregation_mode: "Dynamic" loadsharing: "Shar" local_interfaces: - - "XGE1/0/0/5" + - "XGE1/0/0/5(R)" - "XGE1/0/0/6" - "XGE2/0/0/5" - "XGE2/0/0/6" @@ -33,7 +33,7 @@ parsed_sample: aggregation_mode: "Dynamic" loadsharing: "Shar" local_interfaces: - - "XGE1/0/0/9" + - "XGE1/0/0/9(R)" - "XGE1/0/0/10" - "XGE2/0/0/9" - "XGE2/0/0/10" diff --git a/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yaml b/tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yml similarity index 100% rename from tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yaml rename to tests/hp_comware/display_link-aggregation_verbose/hp_comware_display_link-aggregation_verbose1.yml From 60ef49b88f53d896d4832871d720add440d10638 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Mon, 19 Dec 2022 11:47:08 +0100 Subject: [PATCH 22/25] fix yamllint --- .../display_interface/hp_comware_display_interface.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hp_comware/display_interface/hp_comware_display_interface.yml b/tests/hp_comware/display_interface/hp_comware_display_interface.yml index 95cd18a251..3db00c4a29 100644 --- a/tests/hp_comware/display_interface/hp_comware_display_interface.yml +++ b/tests/hp_comware/display_interface/hp_comware_display_interface.yml @@ -7,7 +7,7 @@ parsed_sample: - "10.1.200.1/24" mtu: "1500" l2mtu: "" - hw_address: + hw_address: - "abab-cdcd-6486" - "abab-cdcd-6486" description: "Servers-VLAN" From 6a0dd8c5b34991ea00dc271a384bc7c280cd3a01 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Mon, 19 Dec 2022 15:49:30 +0100 Subject: [PATCH 23/25] add error management --- ntc_templates/templates/hp_comware_display_interface.textfsm | 1 + .../hp_comware_display_link-aggregation_verbose.textfsm | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm index 5f338fb22f..5b7c5e0c54 100644 --- a/ntc_templates/templates/hp_comware_display_interface.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface.textfsm @@ -129,3 +129,4 @@ Start # Drop ^.* ^. -> Error + ^\s*$$ ^. -> Error diff --git a/ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm b/ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm index 394ae94a10..dd13c21631 100644 --- a/ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm +++ b/ntc_templates/templates/hp_comware_display_link-aggregation_verbose.textfsm @@ -11,6 +11,7 @@ Start ^Aggregation\s+Mode:\s+${AGGREGATION_MODE} ^Loadsharing\s+Type:\s+${LOADSHARING} ^Local: -> LocalPorts + ^\s*$$ ^. -> Error LocalPorts ^\s+Port @@ -19,6 +20,7 @@ LocalPorts # Start of remote block port ^Remote: -> RemotePorts ^. -> Error + ^\s*$$ ^. -> Error RemotePorts ^\s+Actor @@ -28,3 +30,4 @@ RemotePorts ^Aggregat -> Continue.Record ^Aggregat\S+\s+Interface:\s+${INTERFACE} -> Start ^. -> Error + ^\s*$$ ^. -> Error From e3b81256ef1b9ed6259b6270f112685f85e21bc4 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Wed, 21 Dec 2022 12:42:37 +0100 Subject: [PATCH 24/25] Remove catch all --- .../hp_comware_display_interface.textfsm | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/ntc_templates/templates/hp_comware_display_interface.textfsm b/ntc_templates/templates/hp_comware_display_interface.textfsm index 5b7c5e0c54..998daf0520 100644 --- a/ntc_templates/templates/hp_comware_display_interface.textfsm +++ b/ntc_templates/templates/hp_comware_display_interface.textfsm @@ -127,6 +127,30 @@ Start # Next ^$$ -> Next.Record # Drop - ^.* + ^\s*Link + ^\s*Last + ^\s*Trunk\s+port + ^\s*Loopback + ^\s*Media + ^\s*Flow + ^\s*Allow\s+jumbo + ^\s*Broadcast + ^\s*Multicast + ^\s*Unicast + ^\s*MDI\s+type + ^\s*Port\s+priority + ^\s*Current\s*system + ^\s*Peak + ^\s*IPv4\s+traffic + ^\s*IPv6\s+traffic + ^\s+Tagged\s+VLAN + ^\s+UnTagged\s+VLAN + ^\s*Input + ^\s*Output + ^\s{6,}\d+\s+unicasts + ^\s{6,}\d+\s+CRC + ^\s{6,}\d+\s+aborts + ^\s{6,}\d+\s+lost + ^\s{6,}.*ignored ^. -> Error ^\s*$$ ^. -> Error From 148cceabdae676219c4221bc2218eda7df5df47c Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Sat, 24 Dec 2022 11:25:05 +0100 Subject: [PATCH 25/25] Delete display lin-agg detailed.txt --- display lin-agg detailed.txt | 77 ------------------------------------ 1 file changed, 77 deletions(-) delete mode 100644 display lin-agg detailed.txt diff --git a/display lin-agg detailed.txt b/display lin-agg detailed.txt deleted file mode 100644 index 913deba989..0000000000 --- a/display lin-agg detailed.txt +++ /dev/null @@ -1,77 +0,0 @@ -disp link-a s[[ummary]] -Aggregation Interface Type: -BAGG -- Bridge-Aggregation, RAGG -- Route-Aggregation -Aggregation Mode: S -- Static, D -- Dynamic -Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing -Actor System ID: 0x8000, 5c8a-3830-e4fe - -AGG AGG Partner ID Select Unselect Share -Interface Mode Ports Ports Type -------------------------------------------------------------------------------- -BAGG1 D 0x8000, bcea-fa19-8be8 2 0 Shar - - - -disp link-a m[[ember-port]] -Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, - D -- Synchronization, E -- Collecting, F -- Distributing, - G -- Defaulted, H -- Expired - -Ten-GigabitEthernet1/0/29: -Aggregation Interface: Bridge-Aggregation1 -Local: - Port Number: 31 - Port Priority: 32768 - Oper-Key: 1 - Flag: {ACDEF} -Remote: - System ID: 0x8000, bcea-fa19-8be8 - Port Number: 17 - Port Priority: 32768 - Oper-Key: 2 - Flag: {ACDEF} -Received LACP Packets: 40197 packet(s) -Illegal: 0 packet(s) -Sent LACP Packets: 35217 packet(s) - -Ten-GigabitEthernet1/0/30: -Aggregation Interface: Bridge-Aggregation1 -Local: - Port Number: 32 - Port Priority: 32768 - Oper-Key: 1 - Flag: {ACDEF} -Remote: - System ID: 0x8000, bcea-fa19-8be8 - Port Number: 222 - Port Priority: 32768 - Oper-Key: 2 - Flag: {ACDEF} -Received LACP Packets: 40207 packet(s) -Illegal: 0 packet(s) -Sent LACP Packets: 35245 packet(s) - - - -disp link-aggregation v[[erbose]] -Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing -Port Status: S -- Selected, U -- Unselected -Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, - D -- Synchronization, E -- Collecting, F -- Distributing, - G -- Defaulted, H -- Expired - -Aggregation Interface: Bridge-Aggregation1 -Aggregation Mode: Dynamic -Loadsharing Type: Shar -System ID: 0x8000, 5c8a-3830-e4fe -Local: - Port Status Priority Oper-Key Flag --------------------------------------------------------------------------------- - XGE1/0/29 S 32768 1 {ACDEF} - XGE1/0/30 S 32768 1 {ACDEF} -Remote: - Actor Partner Priority Oper-Key SystemID Flag --------------------------------------------------------------------------------- - XGE1/0/29 17 32768 2 0x8000, bcea-fa19-8be8 {ACDEF} - XGE1/0/30 222 32768 2 0x8000, bcea-fa19-8be8 {ACDEF} - \ No newline at end of file