From df42e0d3b6d0cfc4b16aee94051b30e81a4871ce Mon Sep 17 00:00:00 2001 From: eperpinya Date: Tue, 24 Sep 2024 11:17:35 +0200 Subject: [PATCH 1/7] Updated templated with one more use case --- .../huawei_vrp_display_interface.textfsm | 4 +- .../huawei_vrp_display_interface.yml | 20 +++++ .../huawei_vrp_display_interface1.yml | 38 ++++++++++ .../huawei_vrp_display_interface2.raw | 74 +++++++++++++++++++ .../huawei_vrp_display_interface2.yml | 71 ++++++++++++++++++ .../huawei_vrp_display_interface_dhcp.yml | 8 ++ .../huawei_vrp_display_interface_dialer_1.yml | 2 + ..._vrp_display_interface_gigabitethernet.yml | 6 ++ 8 files changed, 222 insertions(+), 1 deletion(-) create mode 100644 tests/huawei_vrp/display_interface/huawei_vrp_display_interface2.raw create mode 100644 tests/huawei_vrp/display_interface/huawei_vrp_display_interface2.yml diff --git a/ntc_templates/templates/huawei_vrp_display_interface.textfsm b/ntc_templates/templates/huawei_vrp_display_interface.textfsm index accf6c71d9..3e7e1fd014 100644 --- a/ntc_templates/templates/huawei_vrp_display_interface.textfsm +++ b/ntc_templates/templates/huawei_vrp_display_interface.textfsm @@ -13,6 +13,7 @@ Value INTERNET_PROTOCOL (disabled|enabled) Value HARDWARE_ADDRESS (\S{4}-\S{4}-\S{4}) Value LAST_PHYSICAL_UP_TIME (\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}|-) Value LAST_PHYSICAL_DOWN_TIME (\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}|-) +Value LAST_LINE_PROTOCOL_UPTIME (\d{4}-\d{2}-\d{2}\s*\d{2}:\d{2}:\d{2}\s*(\S{3}\+\d{2}:\d{2}\s*\S{3})?) Value CURRENT_SYSTEM_TIME (\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}) Value PORT_MODE ([\S\s]*) Value SPEED (\d*) @@ -25,11 +26,12 @@ Start ^\S*\s+current\s+state\s+:.*$$ -> Continue.Record ^${INTERFACE}\s+current\s+state\s+:\s+${LINK_STATUS}\s*$$ ^Line\s+protocol\s+current\s+state\s+:\s+${PROTOCOL_STATUS}\s*$$ - ^Last\sline\sprotocol\sup\stime\s*:\s+(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}|-)\s*$$ + ^Last\s*line\s*protocol\s*up\s*time\s*:\s*(-|${LAST_LINE_PROTOCOL_UPTIME})\s*$$ ^Description:${INTERFACE_DESCRIPTION}\s*$$ ^${PORT_TYPE}\s+Port,\s*Link-type\s*:\s*${LINK_TYPE},\s*$$ ^${PORT_TYPE}\s+Port,\s*The\s+(MTU|Maximum\s+Transmit\s+Unit)\s+is\s+${MTU}(,\s*Hold\s*timer\s*is\s*${HOLD_TIMER}\(sec\))?\s*$$ ^${PORT_TYPE}\s+Port,(\s*PVID\s*:\s*${PVID},)?\s*TPID\s*:\s*${TPID},\s*The\s*Maximum\s*(Frame\s*Length|Transmit\s*Unit)\s*is\s*${MTU}\s*$$ + ^TPID\s*:\s*${TPID},\s*The\s*Maximum\s*Frame\s*Length\s*is\s*${MTU}\s*$$ ^PVID\s*:\s+${PVID},(\s*[^,]+,){0,}\s+The\s+Maximum\s+Frame\s+Length\s+is\s+${MTU} ^Internet\s+Address\s+is\s+allocated\s+by\s+DHCP,\s+${INTERNET_ADDRESS}\s*$$ ^Internet\s+Address\s+is\s+negotiated,\s+${INTERNET_ADDRESS}\s*$$ diff --git a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface.yml b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface.yml index 2a90f8e919..a05d9d7b0b 100644 --- a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface.yml +++ b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface.yml @@ -9,6 +9,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, Cellular0/0/0 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-12 15:43:36" last_physical_up_time: "-" link_status: "DOWN" @@ -31,6 +32,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, Dialer1 Interface" internet_address: "192.214.198.156/32" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -53,6 +55,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP ," @@ -75,6 +78,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, Ethernet0/0/0 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-12 15:43:36" last_physical_up_time: "-" link_status: "DOWN" @@ -97,6 +101,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/0 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-12 15:43:36" last_physical_up_time: "-" link_status: "DOWN" @@ -119,6 +124,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/1 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-12 15:43:36" last_physical_up_time: "-" link_status: "DOWN" @@ -141,6 +147,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/2 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-12 15:44:43" last_physical_up_time: "2022-10-12 15:44:44" link_status: "UP" @@ -163,6 +170,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/3 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-12 15:43:36" last_physical_up_time: "-" link_status: "DOWN" @@ -185,6 +193,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/4 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-12 15:43:36" last_physical_up_time: "2022-10-12 15:44:47" link_status: "UP" @@ -207,6 +216,7 @@ parsed_sample: interface_description: "VirtualPort" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-12 15:43:36" last_physical_up_time: "2022-10-12 15:44:46" link_status: "UP" @@ -229,6 +239,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, NULL0 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -251,6 +262,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, Vlanif1 Interface" internet_address: "192.168.1.1/24" internet_protocol: "" + last_line_protocol_uptime: "2022-10-12 15:44:10" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -273,6 +285,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, Vlanif2 Interface" internet_address: "192.168.120.1/24" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "DOWN" @@ -295,6 +308,7 @@ parsed_sample: interface_description: "DMZ" internet_address: "100.95.15.241/30" internet_protocol: "" + last_line_protocol_uptime: "2022-10-12 15:44:44" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -317,6 +331,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, Wlan-Bss1 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -339,6 +354,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, Wlan-Bss7 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -361,6 +377,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, Wlan-Radio0/0/0 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-12 15:43:36" last_physical_up_time: "2022-10-12 15:44:44" link_status: "UP" @@ -383,6 +400,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, Wlan-Radio0/0/1 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-12 15:43:36" last_physical_up_time: "2022-10-12 15:44:44" link_status: "UP" @@ -405,6 +423,7 @@ parsed_sample: interface_description: "HUAWEI, AC Series, Tunnel0/0/2 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -427,6 +446,7 @@ parsed_sample: interface_description: "HUAWEI, AC Series, Virtual-Ethernet0/0/1 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" diff --git a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface1.yml b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface1.yml index 0867a91371..ef2e93a101 100644 --- a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface1.yml +++ b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface1.yml @@ -11,6 +11,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "DOWN" @@ -33,6 +34,7 @@ parsed_sample: interface_description: "" internet_address: "169.254.1.1/32" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -55,6 +57,7 @@ parsed_sample: interface_description: "" internet_address: "192.168.1.253/24" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:44:55" last_physical_up_time: "-" link_status: "DOWN" @@ -77,6 +80,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -99,6 +103,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -121,6 +126,7 @@ parsed_sample: interface_description: "" internet_address: "10.10.10.1/24" internet_protocol: "" + last_line_protocol_uptime: "2023-11-22 16:26:05" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -143,6 +149,7 @@ parsed_sample: interface_description: "" internet_address: "10.10.20.1/24" internet_protocol: "" + last_line_protocol_uptime: "2023-11-22 16:26:53" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -165,6 +172,7 @@ parsed_sample: interface_description: "" internet_address: "10.10.30.1/24" internet_protocol: "" + last_line_protocol_uptime: "2023-11-22 16:26:54" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -187,6 +195,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:21" last_physical_up_time: "2023-11-22 16:20:13" link_status: "UP" @@ -209,6 +218,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 16:19:55" last_physical_up_time: "2023-11-22 16:10:46" link_status: "DOWN" @@ -231,6 +241,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:22" last_physical_up_time: "-" link_status: "DOWN" @@ -253,6 +264,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:22" last_physical_up_time: "-" link_status: "DOWN" @@ -275,6 +287,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:23" last_physical_up_time: "-" link_status: "DOWN" @@ -297,6 +310,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:23" last_physical_up_time: "-" link_status: "DOWN" @@ -319,6 +333,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:24" last_physical_up_time: "-" link_status: "DOWN" @@ -341,6 +356,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:24" last_physical_up_time: "-" link_status: "DOWN" @@ -363,6 +379,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:25" last_physical_up_time: "-" link_status: "DOWN" @@ -385,6 +402,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:25" last_physical_up_time: "-" link_status: "DOWN" @@ -407,6 +425,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:26" last_physical_up_time: "-" link_status: "DOWN" @@ -429,6 +448,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:26" last_physical_up_time: "-" link_status: "DOWN" @@ -451,6 +471,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:27" last_physical_up_time: "-" link_status: "DOWN" @@ -473,6 +494,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:27" last_physical_up_time: "-" link_status: "DOWN" @@ -495,6 +517,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:28" last_physical_up_time: "-" link_status: "DOWN" @@ -517,6 +540,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:28" last_physical_up_time: "-" link_status: "DOWN" @@ -539,6 +563,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:29" last_physical_up_time: "-" link_status: "DOWN" @@ -561,6 +586,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:29" last_physical_up_time: "-" link_status: "DOWN" @@ -583,6 +609,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:30" last_physical_up_time: "-" link_status: "DOWN" @@ -605,6 +632,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:30" last_physical_up_time: "-" link_status: "DOWN" @@ -627,6 +655,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:31" last_physical_up_time: "-" link_status: "DOWN" @@ -649,6 +678,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:31" last_physical_up_time: "-" link_status: "DOWN" @@ -671,6 +701,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:32" last_physical_up_time: "-" link_status: "DOWN" @@ -693,6 +724,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:32" last_physical_up_time: "-" link_status: "DOWN" @@ -715,6 +747,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:32" last_physical_up_time: "-" link_status: "DOWN" @@ -737,6 +770,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:33" last_physical_up_time: "-" link_status: "DOWN" @@ -759,6 +793,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:34" last_physical_up_time: "-" link_status: "DOWN" @@ -781,6 +816,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:34" last_physical_up_time: "-" link_status: "DOWN" @@ -803,6 +839,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:35" last_physical_up_time: "-" link_status: "DOWN" @@ -825,6 +862,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2023-11-22 15:45:36" last_physical_up_time: "-" link_status: "DOWN" diff --git a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface2.raw b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface2.raw new file mode 100644 index 0000000000..da8362dfaf --- /dev/null +++ b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface2.raw @@ -0,0 +1,74 @@ +GigabitEthernet0/0/00 current state : UP +Line protocol current state : UP +Description:LINK +Switch Port, Link-type : access(negotiated), +TPID : 8100(Hex), The Maximum Frame Length is 10240 +IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is aaaa-aaaa-aaaa +Last physical up time : 2000-01-01 00:00:00 UTC+01:00 DST +Last physical down time : 2000-01-01 00:00:00 UTC+01:00 DST +Current system time: 2000-01-01 01:01:01+00:00 +Port Mode: COMMON FIBER, Transceiver: 1X_CopperPassive_SFP +Speed : 2500, Loopback: NONE +Duplex: FULL, Negotiation: DISABLE +Mdi : -, Flow-control: DISABLE +Last 300 seconds input rate 0 bits/sec, 0 packets/sec +Last 300 seconds output rate 0 bits/sec, 0 packets/sec +Input peak rate 0 bits/sec, Record time: 2024-08-27 23:51:54 +Output peak rate 0 bits/sec, Record time: 2024-08-31 17:30:14 + +Input: 0 packets, 0 bytes + Unicast: 0, Multicast: 0 + Broadcast: 0, Jumbo: 0 + Discard: 0, Pause: 0 + Frames: 0 + + Total Error: 0 + CRC: 0, Giants: 0 + Runts: 0, DropEvents: 0 + Alignments: 0, Symbols: 0 + Ignoreds: 0 + +Output: 0 packets, 0 bytes + Unicast: 0, Multicast: 0 + Broadcast: 0, Jumbo: 0 + Discard: 0, Pause: 0 + + Total Error: 0 + Collisions: 0, Late Collisions: 0 + Deferreds: 0 + + Input bandwidth utilization threshold : 80.00% + Output bandwidth utilization threshold: 80.00% + Input bandwidth utilization : 0.09% + Output bandwidth utilization : 0.12% + +NULL0 current state : UP +Line protocol current state : UP (spoofing) +Description: +Route Port,The Maximum Transmit Unit is 1500 +Internet protocol processing : disabled +Physical is NULL DEV +Current system time: 2024-09-13 17:06:10+01:00 + Last 300 seconds input rate 0 bits/sec, 0 packets/sec + Last 300 seconds output rate 0 bits/sec, 0 packets/sec + Realtime 201 seconds input rate 0 bits/sec, 0 packets/sec + Realtime 201 seconds output rate 0 bits/sec, 0 packets/sec + Input: 0 packets,0 bytes + 0 unicast,0 broadcast,0 multicast + 0 errors,0 unknownprotocol + Output:0 packets,0 bytes + 0 unicast,0 broadcast,0 multicast + 0 errors + Input bandwidth utilization : 0% + Output bandwidth utilization : 0% + +Vlanif01 current state : UP +Line protocol current state : UP +Last line protocol up time : 2000-01-01 00:00:00 UTC+00:00 DST +Description:LINK_VLAN +Route Port,The Maximum Transmit Unit is 1500 +Internet Address is 0.0.0.0/24 +IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is aaaa-aaaa-aaaa +Current system time: 2000-00-00 00:00:00+00:00 + Input bandwidth utilization : -- + Output bandwidth utilization : -- \ No newline at end of file diff --git a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface2.yml b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface2.yml new file mode 100644 index 0000000000..40b777be2d --- /dev/null +++ b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface2.yml @@ -0,0 +1,71 @@ +--- +parsed_sample: + - aggregated_interfaces: [] + current_system_time: "2000-01-01 01:01:01" + duplex: "FULL" + hardware_address: "aaaa-aaaa-aaaa" + hold_timer: "" + interface: "GigabitEthernet0/0/00" + interface_description: "LINK" + internet_address: "" + internet_protocol: "" + last_line_protocol_uptime: "" + last_physical_down_time: "2000-01-01 00:00:00" + last_physical_up_time: "2000-01-01 00:00:00" + link_status: "UP" + link_type: "access(negotiated)" + loopback: "NONE" + mtu: "10240" + negotiation: "DISABLE" + port_mode: "COMMON FIBER, Transceiver: 1X_CopperPassive_SFP" + port_type: "Switch" + protocol_status: "UP" + pvid: "" + speed: "2500" + tpid: "8100(Hex)" + - aggregated_interfaces: [] + current_system_time: "2024-09-13 17:06:10" + duplex: "" + hardware_address: "" + hold_timer: "" + interface: "NULL0" + interface_description: "" + internet_address: "" + internet_protocol: "disabled" + last_line_protocol_uptime: "" + last_physical_down_time: "" + last_physical_up_time: "" + link_status: "UP" + link_type: "" + loopback: "" + mtu: "1500" + negotiation: "" + port_mode: "" + port_type: "Route" + protocol_status: "UP (spoofing)" + pvid: "" + speed: "" + tpid: "" + - aggregated_interfaces: [] + current_system_time: "2000-00-00 00:00:00" + duplex: "" + hardware_address: "aaaa-aaaa-aaaa" + hold_timer: "" + interface: "Vlanif01" + interface_description: "LINK_VLAN" + internet_address: "0.0.0.0/24" + internet_protocol: "" + last_line_protocol_uptime: "2000-01-01 00:00:00 UTC+00:00 DST" + last_physical_down_time: "" + last_physical_up_time: "" + link_status: "UP" + link_type: "" + loopback: "" + mtu: "1500" + negotiation: "" + port_mode: "" + port_type: "Route" + protocol_status: "UP" + pvid: "" + speed: "" + tpid: "" diff --git a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_dhcp.yml b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_dhcp.yml index 976e7281ab..e494d29ef4 100644 --- a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_dhcp.yml +++ b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_dhcp.yml @@ -9,6 +9,7 @@ parsed_sample: interface_description: "WAN" internet_address: "192.168.77.54/24" internet_protocol: "" + last_line_protocol_uptime: "2024-02-08 16:30:21" last_physical_down_time: "2024-02-08 16:30:03" last_physical_up_time: "2024-02-08 16:30:16" link_status: "UP" @@ -31,6 +32,7 @@ parsed_sample: interface_description: "LAN" internet_address: "10.1.1.2/30" internet_protocol: "" + last_line_protocol_uptime: "2024-02-08 16:30:16" last_physical_down_time: "2024-02-08 16:30:03" last_physical_up_time: "2024-02-08 16:30:16" link_status: "UP" @@ -53,6 +55,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/2 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2024-02-08 16:30:03" last_physical_up_time: "2024-02-08 16:30:16" link_status: "UP" @@ -75,6 +78,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/3 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2024-02-08 16:30:03" last_physical_up_time: "2024-02-08 16:30:16" link_status: "UP" @@ -97,6 +101,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/4 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2024-02-08 16:30:03" last_physical_up_time: "2024-02-08 16:30:16" link_status: "UP" @@ -119,6 +124,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/5 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2024-02-08 16:30:03" last_physical_up_time: "2024-02-08 16:30:16" link_status: "UP" @@ -141,6 +147,7 @@ parsed_sample: interface_description: "VirtualPort" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2024-02-08 16:30:03" last_physical_up_time: "2024-02-08 16:30:16" link_status: "UP" @@ -163,6 +170,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, NULL0 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" diff --git a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_dialer_1.yml b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_dialer_1.yml index ae74e70918..9b411754a9 100644 --- a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_dialer_1.yml +++ b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_dialer_1.yml @@ -9,6 +9,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, Dialer1 Interface" internet_address: "192.214.198.156/32" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP" @@ -31,6 +32,7 @@ parsed_sample: interface_description: "" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "" last_physical_up_time: "" link_status: "UP ," diff --git a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_gigabitethernet.yml b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_gigabitethernet.yml index f4fe55f12e..1c73bfd2ba 100644 --- a/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_gigabitethernet.yml +++ b/tests/huawei_vrp/display_interface/huawei_vrp_display_interface_gigabitethernet.yml @@ -9,6 +9,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/0 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-13 09:35:55" last_physical_up_time: "-" link_status: "DOWN" @@ -31,6 +32,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/1 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-13 09:35:55" last_physical_up_time: "-" link_status: "DOWN" @@ -53,6 +55,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/2 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-13 09:37:03" last_physical_up_time: "2022-10-13 09:37:04" link_status: "UP" @@ -75,6 +78,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/3 Interface" internet_address: "" internet_protocol: "" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-13 09:35:55" last_physical_up_time: "-" link_status: "DOWN" @@ -97,6 +101,7 @@ parsed_sample: interface_description: "HUAWEI, AR Series, GigabitEthernet0/0/4 Interface" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-13 09:35:55" last_physical_up_time: "2022-10-13 09:37:06" link_status: "UP" @@ -119,6 +124,7 @@ parsed_sample: interface_description: "VirtualPort" internet_address: "" internet_protocol: "disabled" + last_line_protocol_uptime: "" last_physical_down_time: "2022-10-13 09:35:55" last_physical_up_time: "2022-10-13 09:37:05" link_status: "UP" From 06c6b87b696a40d64896180ac3dcd8bd4a00962f Mon Sep 17 00:00:00 2001 From: eperpinya Date: Wed, 25 Sep 2024 15:16:27 +0200 Subject: [PATCH 2/7] Added template: huawei VRP display http server --- .../huawei_vrp_display_http_server.textfsm | 27 +++++++++++++++++++ ntc_templates/templates/index | 1 + .../huawei_vrp_display_http_server.raw | 13 +++++++++ .../huawei_vrp_display_http_server.yml | 14 ++++++++++ 4 files changed, 55 insertions(+) create mode 100644 ntc_templates/templates/huawei_vrp_display_http_server.textfsm create mode 100644 tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.raw create mode 100644 tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.yml diff --git a/ntc_templates/templates/huawei_vrp_display_http_server.textfsm b/ntc_templates/templates/huawei_vrp_display_http_server.textfsm new file mode 100644 index 0000000000..4f962848fe --- /dev/null +++ b/ntc_templates/templates/huawei_vrp_display_http_server.textfsm @@ -0,0 +1,27 @@ +Value HTTP_SERVER_STATUS (\S+) +Value HTTP_SERVER_PORT (\d+\(\d+\)) +Value HTTP_TIMEOUT_INTERVAL (\d+) +Value CURRENT_ONLINE_USERS (\d+) +Value MAXIMUM_USERS_ALLOWED (\d+) +Value HTTPS_SERVER_STATUS (\S+) +Value HTTPS_SERVER_PORT (\d+\(\d+\)) +Value HTTP_SSL_POLICY (\S+) +Value HTTP_IPV6_SERVER_STATUS (\S+) +Value HTTP_IPV6_SERVER_PORT (\d+\(\d+\)) +Value HTTPS_IPV6_STATUS (\d+\(\d+\)) +Value HTTP_SERVER_SOURCE_ADDRESS (\S+) + +Start + ^\s*HTTP\s*Server\s*Status\s*:\s*${HTTP_SERVER_STATUS} + ^\s*HTTP\s*Server\s*Port\s*:\s*${HTTP_SERVER_PORT} + ^\s*HTTP\s*Timeout\s*Interval\s*:\s*${HTTP_TIMEOUT_INTERVAL} + ^\s*Current\s*Online\s*Users\s*:\s*${CURRENT_ONLINE_USERS} + ^\s*Maximum\s*Users\s*Allowed\s*:\s*${MAXIMUM_USERS_ALLOWED} + ^\s*HTTP\s*Secure-server\s*Status\s*:\s*${HTTPS_SERVER_STATUS} + ^\s*HTTP\s*Secure-server\s*Port\s*:\s*${HTTPS_SERVER_PORT} + ^\s*HTTP\s*SSL\s*Policy\s*:\s*${HTTP_SSL_POLICY} + ^\s*HTTP\s*IPv6\s*Server\s*Status\s*:\s*${HTTP_IPV6_SERVER_STATUS} + ^\s*HTTP\s*IPv6\s*Server\s*Port\s*:\s*${HTTP_IPV6_SERVER_PORT} + ^\s*HTTP\s*IPv6\s*Secure-server\s*Status\s*:\s*${HTTP_IPV6_SERVER_PORT} + ^\s*HTTP\s*IPv6\s*Secure-server\s*Port\s*:\s*${HTTPS_IPV6_STATUS} + ^\s*HTTP\s*server\s*source\s*address\s*:\s*${HTTP_SERVER_SOURCE_ADDRESS} \ No newline at end of file diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 34f8aa33bc..59b7ca4180 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -672,6 +672,7 @@ huawei_vrp_display_service-set_all.textfsm, .*, huawei_vrp, dis[[play]] service- huawei_vrp_display_ipv6_neighbors.textfsm, .*, huawei_vrp, dis[[play]] ipv6 n[[eighbors]] huawei_vrp_display_mpls_te_tunnel.textfsm, .*, huawei_vrp, dis[[play]] mpls te tunnel huawei_vrp_display_lldp_neighbor.textfsm, .*, huawei_vrp, dis[[play]] lldp nei[[ghbor]] +huawei_vrp_display_http_server.textfsm, .*, huawei_vrp, di[[splay]] h[[ttp]] s[[erver]] *$ huawei_vrp_display_mac-address.textfsm, .*, huawei_vrp, disp[[lay]] mac[[-address]] huawei_vrp_display_temperature.textfsm, .*, huawei_vrp, dis[[play]] tem[[perature]] huawei_vrp_display_nat_server.textfsm, .*, huawei_vrp, dis[[play]] na[[t]] ser[[ver]] diff --git a/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.raw b/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.raw new file mode 100644 index 0000000000..b98c81d3ca --- /dev/null +++ b/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.raw @@ -0,0 +1,13 @@ + HTTP Server Status : disabled + HTTP Server Port : 80(80) + HTTP Timeout Interval : 20 + Current Online Users : 0 + Maximum Users Allowed : 1 + HTTP Secure-server Status : disabled + HTTP Secure-server Port : 443(443) + HTTP SSL Policy : Default + HTTP IPv6 Server Status : disabled + HTTP IPv6 Server Port : 80(80) + HTTP IPv6 Secure-server Status : disabled + HTTP IPv6 Secure-server Port : 443(443) + HTTP server source address : 0.0.0.0 \ No newline at end of file diff --git a/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.yml b/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.yml new file mode 100644 index 0000000000..d2d92c6fa1 --- /dev/null +++ b/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.yml @@ -0,0 +1,14 @@ +--- +parsed_sample: + - current_online_users: "0" + http_ipv6_server_port: "80(80)" + http_ipv6_server_status: "disabled" + http_server_port: "80(80)" + http_server_source_address: "0.0.0.0" + http_server_status: "disabled" + http_ssl_policy: "Default" + http_timeout_interval: "20" + https_ipv6_status: "443(443)" + https_server_port: "443(443)" + https_server_status: "disabled" + maximum_users_allowed: "1" From 8d8c7f49ca149460e7c81f2730d324859f05cd5d Mon Sep 17 00:00:00 2001 From: eperpinya Date: Wed, 25 Sep 2024 15:30:06 +0200 Subject: [PATCH 3/7] Added template: huawei_vrp_telnet_server_status --- ...huawei_vrp_display_telnet_server_status.textfsm | 14 ++++++++++++++ ntc_templates/templates/index | 1 + .../huawei_vrp_display_telnet_server_status.raw | 6 ++++++ .../huawei_vrp_display_telnet_server_status.yml | 8 ++++++++ 4 files changed, 29 insertions(+) create mode 100644 ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm create mode 100644 tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.raw create mode 100644 tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.yml diff --git a/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm b/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm new file mode 100644 index 0000000000..18e4bdddfd --- /dev/null +++ b/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm @@ -0,0 +1,14 @@ +Value TELNET_IPV4_SERVER (\S+) +Value TELNET_IPV6_SERVER (\S+) +Value TELNET_SERVICE_PORT (\d+) +Value TELNET_SERVER_SOURCE_ADDRESS (\S+) +Value ACL4_NUMBER (\d+) +Value ACL6_NUMBER (\d+) + +Start + ^\s*TELNET\s*IPv4\s*server\s*:\s*${TELNET_IPV4_SERVER} + ^\s*TELNET\s*IPv6\s*server\s*:\s*${TELNET_IPV6_SERVER} + ^\s*TELNET\s*server\s*port\s*:\s*${TELNET_SERVICE_PORT} + ^\s*TELNET\s*server\s*source\s*address\s*:\s*${TELNET_SERVER_SOURCE_ADDRESS} + ^\s*ACL4\s*number\s*:\s*${ACL4_NUMBER} + ^\s*ACL6\s*number\s*:\s*${ACL6_NUMBER} \ No newline at end of file diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 59b7ca4180..06bf22ea20 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -665,6 +665,7 @@ huawei_vrp_display_ip_vpn-instance_interface.textfsm, .*, huawei_vrp, di[[splay] huawei_vrp_display_snmp-agent_community_read.textfsm, .*, huawei_vrp, dis[[play]] snm[[p-agent]] c[[ommunity]] (r[[ead]]|w[[rite]]) huawei_vrp_display_ip_routing-table_verbose.textfsm, .*, huawei_vrp, dis[[play]] ip(v6)? routi[[ng-table]] ve[[rbose]] huawei_vrp_display_interface_description.textfsm, .*, huawei_vrp, dis[[play]] inter[[face]] des[[cription]] +huawei_vrp_display_telnet_server_status.textfsm, .*, huawei_vrp, di[[splay]] t[[elnet]] s[[erver]] s[[tatus]] huawei_vrp_display_service-set_id_id.textfsm, .*, huawei_vrp, dis[[play]] service-set (id|name) \S+ huawei_vrp_display_interface_brief.textfsm, .*, huawei_vrp, dis[[play]] inter[[face]] br[[ief]] huawei_vrp_display_ip_vpn-instance.textfsm, .*, huawei_vrp, di[[splay]] ip vpn[[-instance]] diff --git a/tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.raw b/tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.raw new file mode 100644 index 0000000000..0016382008 --- /dev/null +++ b/tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.raw @@ -0,0 +1,6 @@ + TELNET IPv4 server :Disable + TELNET IPv6 server :Disable + TELNET server port :23 + TELNET server source address :0.0.0.0 + ACL4 number :0 + ACL6 number :0 \ No newline at end of file diff --git a/tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.yml b/tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.yml new file mode 100644 index 0000000000..f1a083a872 --- /dev/null +++ b/tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.yml @@ -0,0 +1,8 @@ +--- +parsed_sample: + - acl4_number: "0" + acl6_number: "0" + telnet_ipv4_server: "Disable" + telnet_ipv6_server: "Disable" + telnet_server_source_address: "0.0.0.0" + telnet_service_port: "23" From bd62321c8b12dd6684a3fa490458bf6aa0d4aca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enric=20Perpiny=C3=A0=20Pitarch?= Date: Wed, 2 Oct 2024 00:23:56 +0200 Subject: [PATCH 4/7] Update ntc_templates/templates/huawei_vrp_display_http_server.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- .../templates/huawei_vrp_display_http_server.textfsm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ntc_templates/templates/huawei_vrp_display_http_server.textfsm b/ntc_templates/templates/huawei_vrp_display_http_server.textfsm index 4f962848fe..e72d69da34 100644 --- a/ntc_templates/templates/huawei_vrp_display_http_server.textfsm +++ b/ntc_templates/templates/huawei_vrp_display_http_server.textfsm @@ -24,4 +24,6 @@ Start ^\s*HTTP\s*IPv6\s*Server\s*Port\s*:\s*${HTTP_IPV6_SERVER_PORT} ^\s*HTTP\s*IPv6\s*Secure-server\s*Status\s*:\s*${HTTP_IPV6_SERVER_PORT} ^\s*HTTP\s*IPv6\s*Secure-server\s*Port\s*:\s*${HTTPS_IPV6_STATUS} - ^\s*HTTP\s*server\s*source\s*address\s*:\s*${HTTP_SERVER_SOURCE_ADDRESS} \ No newline at end of file + ^\s*HTTP\s*server\s*source\s*address\s*:\s*${HTTP_SERVER_SOURCE_ADDRESS} + ^\s*$$ + ^. -> Error From d07440169119729c28dfab99b553cc444a7e7a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enric=20Perpiny=C3=A0=20Pitarch?= Date: Wed, 2 Oct 2024 00:24:02 +0200 Subject: [PATCH 5/7] Update ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- .../templates/huawei_vrp_display_telnet_server_status.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm b/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm index 18e4bdddfd..344e0547aa 100644 --- a/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm +++ b/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm @@ -11,4 +11,4 @@ Start ^\s*TELNET\s*server\s*port\s*:\s*${TELNET_SERVICE_PORT} ^\s*TELNET\s*server\s*source\s*address\s*:\s*${TELNET_SERVER_SOURCE_ADDRESS} ^\s*ACL4\s*number\s*:\s*${ACL4_NUMBER} - ^\s*ACL6\s*number\s*:\s*${ACL6_NUMBER} \ No newline at end of file + ^\s*ACL6\s*number\s*:\s*${ACL6_NUMBER} From bab7338e79a14642ca1d2bc719ac1f9a6beb4104 Mon Sep 17 00:00:00 2001 From: evilmonkey19 Date: Wed, 2 Oct 2024 21:32:10 +0200 Subject: [PATCH 6/7] fixed template --- .../templates/huawei_vrp_display_http_server.textfsm | 8 ++++---- .../huawei_vrp_display_http_server.raw | 2 +- .../huawei_vrp_display_http_server.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ntc_templates/templates/huawei_vrp_display_http_server.textfsm b/ntc_templates/templates/huawei_vrp_display_http_server.textfsm index e72d69da34..e0e9a3d782 100644 --- a/ntc_templates/templates/huawei_vrp_display_http_server.textfsm +++ b/ntc_templates/templates/huawei_vrp_display_http_server.textfsm @@ -1,14 +1,14 @@ Value HTTP_SERVER_STATUS (\S+) -Value HTTP_SERVER_PORT (\d+\(\d+\)) +Value HTTP_SERVER_PORT (\d+\(\d+\)|disabled) Value HTTP_TIMEOUT_INTERVAL (\d+) Value CURRENT_ONLINE_USERS (\d+) Value MAXIMUM_USERS_ALLOWED (\d+) Value HTTPS_SERVER_STATUS (\S+) -Value HTTPS_SERVER_PORT (\d+\(\d+\)) +Value HTTPS_SERVER_PORT (\d+\(\d+\)|disabled) Value HTTP_SSL_POLICY (\S+) Value HTTP_IPV6_SERVER_STATUS (\S+) -Value HTTP_IPV6_SERVER_PORT (\d+\(\d+\)) -Value HTTPS_IPV6_STATUS (\d+\(\d+\)) +Value HTTP_IPV6_SERVER_PORT (\d+\(\d+\)|disabled) +Value HTTPS_IPV6_STATUS (\d+\(\d+\)|disabled) Value HTTP_SERVER_SOURCE_ADDRESS (\S+) Start diff --git a/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.raw b/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.raw index b98c81d3ca..5cc76bd386 100644 --- a/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.raw +++ b/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.raw @@ -10,4 +10,4 @@ HTTP IPv6 Server Port : 80(80) HTTP IPv6 Secure-server Status : disabled HTTP IPv6 Secure-server Port : 443(443) - HTTP server source address : 0.0.0.0 \ No newline at end of file + HTTP server source address : 0.0.0.0 diff --git a/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.yml b/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.yml index d2d92c6fa1..31f1e29312 100644 --- a/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.yml +++ b/tests/huawei_vrp/display_http_server/huawei_vrp_display_http_server.yml @@ -1,7 +1,7 @@ --- parsed_sample: - current_online_users: "0" - http_ipv6_server_port: "80(80)" + http_ipv6_server_port: "disabled" http_ipv6_server_status: "disabled" http_server_port: "80(80)" http_server_source_address: "0.0.0.0" From 9a8c4ff58e98c90ec18fe38c8ef7d35d29a3ff99 Mon Sep 17 00:00:00 2001 From: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> Date: Thu, 3 Oct 2024 13:17:08 -0400 Subject: [PATCH 7/7] Apply suggestions from code review --- .../templates/huawei_vrp_display_telnet_server_status.textfsm | 2 ++ .../huawei_vrp_display_telnet_server_status.raw | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm b/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm index 344e0547aa..7b01d6eb1a 100644 --- a/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm +++ b/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm @@ -12,3 +12,5 @@ Start ^\s*TELNET\s*server\s*source\s*address\s*:\s*${TELNET_SERVER_SOURCE_ADDRESS} ^\s*ACL4\s*number\s*:\s*${ACL4_NUMBER} ^\s*ACL6\s*number\s*:\s*${ACL6_NUMBER} + ^\s*$$ + ^. -> Error diff --git a/tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.raw b/tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.raw index 0016382008..f5334ea8e6 100644 --- a/tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.raw +++ b/tests/huawei_vrp/display_telnet_server_status/huawei_vrp_display_telnet_server_status.raw @@ -3,4 +3,4 @@ TELNET server port :23 TELNET server source address :0.0.0.0 ACL4 number :0 - ACL6 number :0 \ No newline at end of file + ACL6 number :0