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..13737b428a --- /dev/null +++ b/ntc_templates/templates/huawei_vrp_display_http_server.textfsm @@ -0,0 +1,29 @@ +Value HTTP_SERVER_STATUS (\S+) +Value HTTP_SERVER_PORT (disabled|\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 (disabled|\d+\(\d+\)) +Value HTTP_SSL_POLICY (\S+) +Value HTTP_IPV6_SERVER_STATUS (\S+) +Value HTTP_IPV6_SERVER_PORT (disabled|\d+\(\d+\)) +Value HTTPS_IPV6_STATUS (disabled|\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} + ^\s*$$ + ^. -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index b125624364..98a3208e2b 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -673,6 +673,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..5cc76bd386 --- /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 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..31f1e29312 --- /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: "disabled" + 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"