diff --git a/ntc_templates/templates/huawei_smartax_display_port_info.textfsm b/ntc_templates/templates/huawei_smartax_display_port_info.textfsm new file mode 100644 index 0000000000..71a1376215 --- /dev/null +++ b/ntc_templates/templates/huawei_smartax_display_port_info.textfsm @@ -0,0 +1,51 @@ +Value FSP (\d+\/\d+\/\d+) +Value MIN_DISTANCE_KM (\d+) +Value MAX_DISTANCE_KM (\d+) +Value MAX_GUARANTEED_BANDWIDTH_KBPS (\d*) +Value LEFT_GUARANTEED_BANDWIDTH_KBPS (\d*) +Value NUMBER_OF_T_CONTS (\d+) +Value AUTOFIND (Enable|Disable) +Value FEC_CHECK (Enable|Disable) +Value ADMIN_STATE (\w+) +Value ONT_ENCRYPTION_KEY_SWITCHING_INTERVAL_M (\d+) +Value PON_ID_SWITCH (Disable|Enable) +Value PON_ID_IDENTIFIER (\d+) +Value JUMBO_FRAME_SWITCH (Disable|Enable) +Value PORT_MTU_BYTES (\d+) +Value SURPLUS_BANDWIDTH_ASSIGNMENT (Enable|Disable) +Value BEST_EFFORT_BANDWIDTH_ASSIGNMENT (\w*) +Value TRAFFIC_ALARM_PROFILE_ID (\w*) +Value ONT_ONLINE_POWER_THRESHOLD_DBM (\w*) +Value LOW_LATENCY (yes|no) +Value MULTICHANNEL_LOW_LATENCY (Enable|Disable) +Value OPTICAL_MODULE_WORK_MODE (\w*) +Value CHANNEL_TYPE (\w*) +Value ONLINE_ONT_NUMBER_THRESHOLD (Enable|Disable) + +Start + ^\s*F\/S\/P\s*${FSP} + ^\s*Min\s*distance\(km\)\s*${MIN_DISTANCE_KM} + ^\s*Max\s*distance\(km\)\s*${MAX_DISTANCE_KM} + ^\s*Max\s*guaranteed\s*bandwidth\(kbps\)\s*${MAX_GUARANTEED_BANDWIDTH_KBPS} + ^\s*Left\s*guaranteed\s*bandwidth\(kbps\)\s*${LEFT_GUARANTEED_BANDWIDTH_KBPS} + ^\s*Number\s*of\s*T-CONTs\s*${NUMBER_OF_T_CONTS} + ^\s*Autofind\s*${AUTOFIND} + ^\s*FEC\s*check\s*${FEC_CHECK} + ^\s*Admin\s*State\s*${ADMIN_STATE} + ^\s*ONT\s*encryption\s*key\s*switching\s*interval\(m\)\s*${ONT_ENCRYPTION_KEY_SWITCHING_INTERVAL_M} + ^\s*PON-ID\s*switch\s*${PON_ID_SWITCH} + ^\s*PON-ID\s*identifier\s*${PON_ID_IDENTIFIER} + ^\s*Jumbo\s*frame\s*switch\s*${JUMBO_FRAME_SWITCH} + ^\s*Port\s*MTU\(bytes\)\s*${PORT_MTU_BYTES} + ^\s*Surplus\s*bandwidth\s*assignment\s*${SURPLUS_BANDWIDTH_ASSIGNMENT} + ^\s*Best-effort\s*bandwidth\s*assignment\s*${BEST_EFFORT_BANDWIDTH_ASSIGNMENT} + ^\s*Traffic\s*alarm-profile\s*ID\s*${TRAFFIC_ALARM_PROFILE_ID} + ^\s*ONT\s*online\s*power\s*threshold\(dBm\)\s*${ONT_ONLINE_POWER_THRESHOLD_DBM} + ^\s*Low-latency\s*${LOW_LATENCY} + ^\s*Multichannel\s*low\s*latency\s*${MULTICHANNEL_LOW_LATENCY} + ^\s*Optical\s*module\s*work\s*mode\s*${OPTICAL_MODULE_WORK_MODE} + ^\s*Channel\w*\s*Information\s* + ^\s*Channel\s*Type\s*${CHANNEL_TYPE} + ^\s*Online\s*ONT\s*number\s*threshold\s*${ONLINE_ONT_NUMBER_THRESHOLD} + ^\s* + ^. -> Error \ No newline at end of file diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 17fc4237e9..c34f7be4fa 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -573,6 +573,8 @@ hp_procurve_show_vlans.textfsm, .*, hp_procurve, sh[[ow]] vl[[ans]] hp_procurve_show_arp.textfsm, .*, hp_procurve, sh[[ow]] ar[[p]] hp_procurve_show_ip.textfsm, .*, hp_procurve, sh[[ow]] ip +huawei_smartax_display_port_info.textfsm, .*, huawei_smartax, di[[splay]] port i[[nfo]]\s* + huawei_vrp_display_traffic-filter_applied-record.textfsm, .*, huawei_vrp, dis[[play]] traffic-filter applied-record huawei_vrp_display_ip_vpn-instance_interface.textfsm, .*, huawei_vrp, di[[splay]] ip vpn[[-instance]] interface huawei_vrp_display_snmp-agent_community_read.textfsm, .*, huawei_vrp, dis[[play]] snm[[p-agent]] c[[ommunity]] (r[[ead]]|w[[rite]]) diff --git a/tests/huawei_smartax/display_port_info/huawei_smartax_display_port_info.raw b/tests/huawei_smartax/display_port_info/huawei_smartax_display_port_info.raw new file mode 100644 index 0000000000..a3b0b1ec53 --- /dev/null +++ b/tests/huawei_smartax/display_port_info/huawei_smartax_display_port_info.raw @@ -0,0 +1,28 @@ + ----------------------------------------------------------- + F/S/P 0/0/0 + Min distance(km) 0 + Max distance(km) 20 + Max guaranteed bandwidth(kbps) - + Left guaranteed bandwidth(kbps) 1000000 + Number of T-CONTs 0 + Autofind Enable + FEC check Disable + Admin State On + ONT encryption key switching interval(m) 1440 + PON-ID switch Disable + PON-ID identifier 1 + Jumbo frame switch Disable + Port MTU(bytes) 1024 + Surplus bandwidth assignment Disable + Best-effort bandwidth assignment - + Traffic alarm-profile ID - + ONT online power threshold(dBm) - + Low-latency no + Multichannel low latency Disable + Optical module work mode Standard + ----------------------------------------------------------- + Channel 0 Information + ----------------------------------------------------------- + Channel Type GPON + Online ONT number threshold Disable + ----------------------------------------------------------- \ No newline at end of file diff --git a/tests/huawei_smartax/display_port_info/huawei_smartax_display_port_info.yml b/tests/huawei_smartax/display_port_info/huawei_smartax_display_port_info.yml new file mode 100644 index 0000000000..a0f65f59a1 --- /dev/null +++ b/tests/huawei_smartax/display_port_info/huawei_smartax_display_port_info.yml @@ -0,0 +1,25 @@ +--- +parsed_sample: + - admin_state: "On" + autofind: "Enable" + best_effort_bandwidth_assignment: "" + channel_type: "GPON" + fec_check: "Disable" + fsp: "0/0/0" + jumbo_frame_switch: "Disable" + left_guaranteed_bandwidth_kbps: "1000000" + low_latency: "no" + max_distance_km: "20" + max_guaranteed_bandwidth_kbps: "" + min_distance_km: "0" + multichannel_low_latency: "Disable" + number_of_t_conts: "0" + online_ont_number_threshold: "Disable" + ont_encryption_key_switching_interval_m: "1440" + ont_online_power_threshold_dbm: "" + optical_module_work_mode: "Standard" + pon_id_identifier: "1" + pon_id_switch: "Disable" + port_mtu_bytes: "1024" + surplus_bandwidth_assignment: "Disable" + traffic_alarm_profile_id: "" diff --git a/tests/test_index_order.py b/tests/test_index_order.py index ac11157752..c56b210027 100755 --- a/tests/test_index_order.py +++ b/tests/test_index_order.py @@ -42,6 +42,7 @@ "fortinet", "hp_comware", "hp_procurve", + "huawei_smartax", "huawei_vrp", "ipinfusion_ocnos", "juniper_junos",