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..7b01d6eb1a --- /dev/null +++ b/ntc_templates/templates/huawei_vrp_display_telnet_server_status.textfsm @@ -0,0 +1,16 @@ +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} + ^\s*$$ + ^. -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 98a3208e2b..2298eca7f7 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -666,6 +666,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..f5334ea8e6 --- /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 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"