diff --git a/ntc_templates/templates/huawei_vrp_display_interface_brief.textfsm b/ntc_templates/templates/huawei_vrp_display_interface_brief.textfsm index aa298fa834..5ca1282261 100644 --- a/ntc_templates/templates/huawei_vrp_display_interface_brief.textfsm +++ b/ntc_templates/templates/huawei_vrp_display_interface_brief.textfsm @@ -10,7 +10,7 @@ Value OUTERRORS (\d+) Start ^\s*${INTERFACE}\s+${PHY}\s+${PROTOCOL}\s+${INUTI}\s+${OUTUTI}\s+${INERRORS}\s+${OUTERRORS} -> Record ^PHY:\s+Physical - ^(?:\*|\^)down: + ^(?:\*|\^|\#)down: ^\(\w+\):\s+\S+ ^InUti/OutUti: ^Interface\s+PHY\s+Protocol\s+InUti\s+OutUti\s+inErrors\s+outErrors\s*$$ diff --git a/ntc_templates/templates/huawei_vrp_display_interface_description.textfsm b/ntc_templates/templates/huawei_vrp_display_interface_description.textfsm new file mode 100644 index 0000000000..c7b9605d66 --- /dev/null +++ b/ntc_templates/templates/huawei_vrp_display_interface_description.textfsm @@ -0,0 +1,18 @@ +Value INTERFACE (\S+) +Value PHY (down|\*down|up|up\(s\)) +Value PROTOCOL (down|\*down|up|up\(s\)) +Value DESCRIPTION (\S+.*?) + + +Start + ^Interface\s+PHY\s+Protocol\s+Description\s*$$ -> Begin + ^\s*$$ + ^PHY:\s+Physical + ^(?:\*|\^|\#)down: + ^\(\w+\):\s+\S+ + ^. -> Error + +Begin + ^${INTERFACE}\s+${PHY}\s+${PROTOCOL}(?:\s+${DESCRIPTION})?\s*$$ -> Record + ^\s*$$ + ^. -> Error \ No newline at end of file diff --git a/ntc_templates/templates/huawei_vrp_display_port_vlan.textfsm b/ntc_templates/templates/huawei_vrp_display_port_vlan.textfsm new file mode 100644 index 0000000000..ba9ca6e3b6 --- /dev/null +++ b/ntc_templates/templates/huawei_vrp_display_port_vlan.textfsm @@ -0,0 +1,137 @@ +Value Required INTERFACE ([\w\.\/]+) +Value LINK_TYPE (trunk|access|auto|hybrid) +Value PVID (\d+) +Value List TRUNK_VLAN_LIST (\d+-\d+|\d+) + + +Start + ^\s*$$ + ^[pPoOrRtT]{4}.*$$ -> VLANS + +VLANS + ^[\w\.\/]+ -> Continue.Record + ^${INTERFACE}\s+${LINK_TYPE}\s+${PVID}\s+${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){3}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){4}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){5}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){6}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){7}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){8}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){9}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){10}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){11}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){12}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){13}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){14}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){15}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){16}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){17}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){18}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){19}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){20}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){21}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){22}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){23}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){24}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){25}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){26}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){27}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){28}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){29}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){30}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){31}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){32}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){33}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){34}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){35}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){36}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){37}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){38}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){39}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){40}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){41}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){42}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){43}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){44}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){45}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){46}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){47}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){48}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){49}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){50}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){51}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){52}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){53}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){54}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){55}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){56}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){57}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){58}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){59}${TRUNK_VLAN_LIST}\s* -> Continue + ^[\w\.\/]+\s+(?:\S+\s+){60}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+\S+\s+${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){2}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){3}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){4}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){5}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){6}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){7}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){8}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){9}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){10}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){11}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){12}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){13}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){14}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){15}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){16}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){17}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){18}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){19}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){20}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){21}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){22}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){23}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){24}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){25}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){26}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){27}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){28}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){29}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){30}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){31}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){32}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){33}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){34}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){35}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){36}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){37}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){38}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){39}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){40}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){41}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){42}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){43}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){44}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){45}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){46}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){47}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){48}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){49}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){50}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){51}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){52}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){53}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){54}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){55}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){56}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){57}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){58}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){59}${TRUNK_VLAN_LIST}\s* -> Continue + ^\s+(?:\S+\s+){60}${TRUNK_VLAN_LIST}\s* -> Continue + ^${INTERFACE}\s+${LINK_TYPE}\s+${PVID}\s+-$$ -> Record + ^[\w\.\/]+ + ^\s+ + ^-+ + ^.+ -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 9ed2eb76f7..8288d3ecbc 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -444,9 +444,11 @@ hp_procurve_show_trunks.textfsm, .*, hp_procurve, sh[[ow]] tr[[unks]] hp_procurve_show_vlans.textfsm, .*, hp_procurve, sh[[ow]] vl[[ans]] hp_procurve_show_arp.textfsm, .*, hp_procurve, sh[[ow]] ar[[p]] +huawei_vrp_display_interface_description.textfsm, .*, huawei_vrp, disp[[lay]] inter[[face]] des[[cription]] huawei_vrp_display_interface_brief.textfsm, .*, huawei_vrp, disp[[lay]] inter[[face]] br[[ief]] huawei_vrp_display_lldp_neighbor.textfsm, .*, huawei_vrp, disp[[lay]] lldp nei[[ghbor]] huawei_vrp_display_temperature.textfsm, .*, huawei_vrp, disp[[lay]] tem[[perature]] +huawei_vrp_display_port_vlan.textfsm, .*, huawei_vrp, disp[[lay]] port vl[[an]] huawei_vrp_display_version.textfsm, .*, huawei_vrp, disp[[lay]] ver[[sion]] juniper_junos_show_chassis_cluster_interfaces.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] c[[luster]] i[[nterface]] diff --git a/tests/huawei_vrp/display_interface_description/huawei_vrp_display_interface_description.raw b/tests/huawei_vrp/display_interface_description/huawei_vrp_display_interface_description.raw new file mode 100644 index 0000000000..ecfa53e6d6 --- /dev/null +++ b/tests/huawei_vrp/display_interface_description/huawei_vrp_display_interface_description.raw @@ -0,0 +1,41 @@ +PHY: Physical +*down: administratively down +#down: LBDT down +(l): loopback +(s): spoofing +(E): E-Trunk down +(b): BFD down +(e): ETHOAM down +(dl): DLDP down +(lb): LBDT block +Interface PHY Protocol Description +GE0/0/1 up up work - station 1 +GE0/0/2 up up work - station 1 +GE0/0/3 up up work - station 1 +GE0/0/4 up up work - station 1 +GE0/0/5 up up work - station 1 +GE0/0/6 up up work - station 1 +GE0/0/7 up up work - station 1 +GE0/0/8 up up work - station 1 +GE0/0/9 up up work - station 1 +GE0/0/10 up up work - station 1 +GE0/0/11 up up work - station 1 +GE0/0/12 up up work - station 1 +GE0/0/13 up up work - station 1 +GE0/0/14 up up work - station 1 +GE0/0/15 up up work - station 1 +GE0/0/16 down down work - station 1 +GE0/0/17 up up work - station 1 +GE0/0/18 up up work - station 1 +GE0/0/19 down down work - station 1 +GE0/0/20 up up work - station 1 +GE0/0/21 down down work - station 1 +GE0/0/22 up up work - station 1 +GE0/0/23 up up work - station 1 +GE0/0/24 up up work - station 1 +GE0/0/25 *down down +GE0/0/26 *down down +GE0/0/27 up up spine Uplink +GE0/0/28 up up spine Uplink 2 +NULL0 up up(s) +Vlanif1 up up \ No newline at end of file diff --git a/tests/huawei_vrp/display_interface_description/huawei_vrp_display_interface_description.yml b/tests/huawei_vrp/display_interface_description/huawei_vrp_display_interface_description.yml new file mode 100644 index 0000000000..930f0ec85d --- /dev/null +++ b/tests/huawei_vrp/display_interface_description/huawei_vrp_display_interface_description.yml @@ -0,0 +1,122 @@ +--- +parsed_sample: + - interface: "GE0/0/1" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/2" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/3" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/4" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/5" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/6" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/7" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/8" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/9" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/10" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/11" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/12" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/13" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/14" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/15" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/16" + phy: "down" + protocol: "down" + description: " work - station 1" + - interface: "GE0/0/17" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/18" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/19" + phy: "down" + protocol: "down" + description: " work - station 1" + - interface: "GE0/0/20" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/21" + phy: "down" + protocol: "down" + description: " work - station 1" + - interface: "GE0/0/22" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/23" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/24" + phy: "up" + protocol: "up" + description: " work - station 1" + - interface: "GE0/0/25" + phy: "*down" + protocol: "down" + description: "" + - interface: "GE0/0/26" + phy: "*down" + protocol: "down" + description: "" + - interface: "GE0/0/27" + phy: "up" + protocol: "up" + description: "spine Uplink" + - interface: "GE0/0/28" + phy: "up" + protocol: "up" + description: "spine Uplink 2" + - interface: "NULL0" + phy: "up" + protocol: "up(s)" + description: "" + - interface: "Vlanif1" + phy: "up" + protocol: "up" + description: "" diff --git a/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example1.raw b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example1.raw new file mode 100644 index 0000000000..9760653402 --- /dev/null +++ b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example1.raw @@ -0,0 +1,30 @@ +Port Link Type PVID Trunk VLAN List +------------------------------------------------------------------------------- +GigabitEthernet0/0/1 hybrid 1 2 +GigabitEthernet0/0/2 hybrid 1 2 +GigabitEthernet0/0/3 hybrid 1 2 +GigabitEthernet0/0/4 hybrid 1 2 +GigabitEthernet0/0/5 hybrid 1 2 +GigabitEthernet0/0/6 hybrid 1 2 +GigabitEthernet0/0/7 hybrid 1 2 +GigabitEthernet0/0/8 hybrid 1 2 +GigabitEthernet0/0/9 hybrid 1 2 +GigabitEthernet0/0/10 hybrid 1 2 +GigabitEthernet0/0/11 hybrid 1 2 +GigabitEthernet0/0/12 hybrid 1 2 +GigabitEthernet0/0/13 hybrid 1 2 +GigabitEthernet0/0/14 hybrid 1 2 +GigabitEthernet0/0/15 hybrid 1 2 +GigabitEthernet0/0/16 hybrid 1 2 +GigabitEthernet0/0/17 hybrid 1 2 +GigabitEthernet0/0/18 hybrid 1 2 +GigabitEthernet0/0/19 hybrid 1 2 +GigabitEthernet0/0/20 hybrid 1 2 +GigabitEthernet0/0/21 hybrid 1 2 +GigabitEthernet0/0/22 hybrid 1 2 +GigabitEthernet0/0/23 hybrid 1 2 +GigabitEthernet0/0/24 hybrid 1 2 +GigabitEthernet0/0/25 auto 1 1-4094 +GigabitEthernet0/0/26 auto 1 1-4094 +GigabitEthernet0/0/27 trunk 1 1-4094 +GigabitEthernet0/0/28 trunk 1 1-4094 diff --git a/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example1.yml b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example1.yml new file mode 100644 index 0000000000..ec5031100d --- /dev/null +++ b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example1.yml @@ -0,0 +1,142 @@ +--- +parsed_sample: + - interface: "GigabitEthernet0/0/1" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/2" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/3" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/4" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/5" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/6" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/7" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/8" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/9" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/10" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/11" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/12" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/13" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/14" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/15" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/16" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/17" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/18" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/19" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/20" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/21" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/22" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/23" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/24" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/25" + link_type: "auto" + pvid: "1" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/26" + link_type: "auto" + pvid: "1" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/27" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/28" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1-4094" diff --git a/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example2.raw b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example2.raw new file mode 100644 index 0000000000..6acd9db916 --- /dev/null +++ b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example2.raw @@ -0,0 +1,30 @@ +Port Link Type PVID Trunk VLAN List +------------------------------------------------------------------------------- +GigabitEthernet0/0/1 trunk 1 1-4094 +GigabitEthernet0/0/2 trunk 1 1 249-255 +GigabitEthernet0/0/3 trunk 999 255 300 999 +GigabitEthernet0/0/4 trunk 999 255 300 999 +GigabitEthernet0/0/5 access 330 - +GigabitEthernet0/0/6 access 330 - +GigabitEthernet0/0/7 access 330 - +GigabitEthernet0/0/8 access 330 - +GigabitEthernet0/0/9 access 330 - +GigabitEthernet0/0/10 access 330 - +GigabitEthernet0/0/11 access 330 - +GigabitEthernet0/0/12 access 330 - +GigabitEthernet0/0/13 access 300 - +GigabitEthernet0/0/14 access 300 - +GigabitEthernet0/0/15 access 300 - +GigabitEthernet0/0/16 access 300 - +GigabitEthernet0/0/17 access 300 - +GigabitEthernet0/0/18 access 300 - +GigabitEthernet0/0/19 access 300 - +GigabitEthernet0/0/20 access 300 - +GigabitEthernet0/0/21 auto 450 1-4094 +GigabitEthernet0/0/22 auto 450 1-4094 +GigabitEthernet0/0/23 auto 254 1-4094 +GigabitEthernet0/0/24 auto 255 1-4094 +GigabitEthernet0/0/25 auto 1 1-4094 +GigabitEthernet0/0/26 auto 1 1-4094 +GigabitEthernet0/0/27 trunk 1 1-4094 +GigabitEthernet0/0/28 trunk 1 1-4094 diff --git a/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example2.yml b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example2.yml new file mode 100644 index 0000000000..318115af60 --- /dev/null +++ b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example2.yml @@ -0,0 +1,131 @@ +--- +parsed_sample: + - interface: "GigabitEthernet0/0/1" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/2" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "249-255" + - interface: "GigabitEthernet0/0/3" + link_type: "trunk" + pvid: "999" + trunk_vlan_list: + - "255" + - "300" + - "999" + - interface: "GigabitEthernet0/0/4" + link_type: "trunk" + pvid: "999" + trunk_vlan_list: + - "255" + - "300" + - "999" + - interface: "GigabitEthernet0/0/5" + link_type: "access" + pvid: "330" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/6" + link_type: "access" + pvid: "330" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/7" + link_type: "access" + pvid: "330" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/8" + link_type: "access" + pvid: "330" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/9" + link_type: "access" + pvid: "330" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/10" + link_type: "access" + pvid: "330" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/11" + link_type: "access" + pvid: "330" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/12" + link_type: "access" + pvid: "330" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/13" + link_type: "access" + pvid: "300" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/14" + link_type: "access" + pvid: "300" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/15" + link_type: "access" + pvid: "300" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/16" + link_type: "access" + pvid: "300" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/17" + link_type: "access" + pvid: "300" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/18" + link_type: "access" + pvid: "300" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/19" + link_type: "access" + pvid: "300" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/20" + link_type: "access" + pvid: "300" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/21" + link_type: "auto" + pvid: "450" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/22" + link_type: "auto" + pvid: "450" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/23" + link_type: "auto" + pvid: "254" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/24" + link_type: "auto" + pvid: "255" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/25" + link_type: "auto" + pvid: "1" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/26" + link_type: "auto" + pvid: "1" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/27" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/28" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1-4094" diff --git a/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example3.raw b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example3.raw new file mode 100644 index 0000000000..09522b8928 --- /dev/null +++ b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example3.raw @@ -0,0 +1,54 @@ +Port Link Type PVID Trunk VLAN List +------------------------------------------------------------------------------- +GigabitEthernet0/0/1 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/2 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/3 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/4 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/5 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/6 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/7 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/8 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/9 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/10 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/11 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/12 trunk 1 1 191 212 214 218 224 238 + 250-255 300-301 303 306 330 + 332-333 335 350 400 450 999 +GigabitEthernet0/0/13 access 2 - +GigabitEthernet0/0/14 access 2 - +GigabitEthernet0/0/15 hybrid 1 2 +GigabitEthernet0/0/16 hybrid 69 2 +GigabitEthernet0/0/17 access 160 - +GigabitEthernet0/0/18 access 160 - +GigabitEthernet0/0/19 access 160 - +GigabitEthernet0/0/20 access 160 - +GigabitEthernet0/0/21 access 160 - +GigabitEthernet0/0/22 hybrid 1 2 +GigabitEthernet0/0/23 hybrid 1 2 +GigabitEthernet0/0/24 hybrid 1 2 +GigabitEthernet0/0/25 auto 1 1-4094 +GigabitEthernet0/0/26 auto 1 1-4094 +GigabitEthernet0/0/27 trunk 1 1-4094 +GigabitEthernet0/0/28 trunk 1 1-4094 diff --git a/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example3.yml b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example3.yml new file mode 100644 index 0000000000..5f144b8bd2 --- /dev/null +++ b/tests/huawei_vrp/display_port_vlan/huawei_vrp_display_port_vlan_example3.yml @@ -0,0 +1,339 @@ +--- +parsed_sample: + - interface: "GigabitEthernet0/0/1" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/2" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/3" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/4" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/5" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/6" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/7" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/8" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/9" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/10" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/11" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/12" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1" + - "191" + - "212" + - "214" + - "218" + - "224" + - "238" + - "250-255" + - "300-301" + - "303" + - "306" + - "330" + - "332-333" + - "335" + - "350" + - "400" + - "450" + - "999" + - interface: "GigabitEthernet0/0/13" + link_type: "access" + pvid: "2" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/14" + link_type: "access" + pvid: "2" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/15" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/16" + link_type: "hybrid" + pvid: "69" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/17" + link_type: "access" + pvid: "160" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/18" + link_type: "access" + pvid: "160" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/19" + link_type: "access" + pvid: "160" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/20" + link_type: "access" + pvid: "160" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/21" + link_type: "access" + pvid: "160" + trunk_vlan_list: [] + - interface: "GigabitEthernet0/0/22" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/23" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/24" + link_type: "hybrid" + pvid: "1" + trunk_vlan_list: + - "2" + - interface: "GigabitEthernet0/0/25" + link_type: "auto" + pvid: "1" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/26" + link_type: "auto" + pvid: "1" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/27" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1-4094" + - interface: "GigabitEthernet0/0/28" + link_type: "trunk" + pvid: "1" + trunk_vlan_list: + - "1-4094"