diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 528ae4093d..eee431b920 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -804,6 +804,7 @@ huawei_vrp_dir.textfsm, .*, huawei_vrp, d[[ir]] ipinfusion_ocnos_show_lldp_table.textfsm, .*, ipinfusion_ocnos, show ll[[dp]] t[[able]] juniper_junos_show_system_configuration_database_usage.textfsm, .*, juniper_junos, sh[[ow]] sys[[tem]] c[[onfiguration]] d[[atabase]] u[[sage]] +juniper_junos_show_ethernet-switching_interfaces.textfsm, .*, juniper_junos, sh[[ow]] et[[hernet-switching]] i[[nterfaces]] juniper_junos_show_chassis_cluster_interfaces.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] c[[luster]] i[[nterface]] juniper_junos_show_ethernet-switching_table.textfsm, .*, juniper_junos, sh[[ow]] et[[hernet-switching]] t[[able]] juniper_junos_show_system_processes_summary.textfsm, .*, juniper_junos, sh[[ow]] sys[[tem]] proc[[esses]] sum[[mary]] diff --git a/ntc_templates/templates/juniper_junos_show_ethernet-switching_interfaces.textfsm b/ntc_templates/templates/juniper_junos_show_ethernet-switching_interfaces.textfsm new file mode 100644 index 0000000000..cb33273e59 --- /dev/null +++ b/ntc_templates/templates/juniper_junos_show_ethernet-switching_interfaces.textfsm @@ -0,0 +1,16 @@ +Value Required INTERFACE (\S+) +Value STATUS (up|down) +Value List VLAN_MEMBER (\S+) +Value List VLAN_ID (\d+) +Value List TAGGING ((un)?tagged) +Value List PORT_ERROR (.*) + +Start + ^\s*Interface\s+State\s+VLAN\s+members\s+Tag\s+Tagging\s+Blocking + ^\S -> Continue.Record + ^${INTERFACE}\s+${STATUS}\s+${VLAN_MEMBER}\s+${VLAN_ID}\s+${TAGGING}\s+${PORT_ERROR} + ^${INTERFACE}\s+${STATUS}\s+${VLAN_MEMBER}\s+${TAGGING}\s+${PORT_ERROR} + ^${INTERFACE}\s+${STATUS}\s+${VLAN_MEMBER}\s+${PORT_ERROR} + ^\s+${VLAN_MEMBER}\s+${VLAN_ID}\s+${TAGGING}\s+${PORT_ERROR} + ^\s*$$ + ^. -> Error diff --git a/tests/juniper_junos/show_ethernet-switching_interfaces/juniper_junos_show_ethernet-switching_interfaces.raw b/tests/juniper_junos/show_ethernet-switching_interfaces/juniper_junos_show_ethernet-switching_interfaces.raw new file mode 100644 index 0000000000..ae1cc2386a --- /dev/null +++ b/tests/juniper_junos/show_ethernet-switching_interfaces/juniper_junos_show_ethernet-switching_interfaces.raw @@ -0,0 +1,17 @@ +Interface State VLAN members Tag Tagging Blocking + +ae0.0 up default untagged unblocked +ge-0/0/2.0 up vlan300 300 untagged blocked by RTG (rtggroup) +ge-0/0/3.0 up default blocked by STP +ge-0/0/4.0 down default MAC limit exceeded +ge-0/0/5.0 down default MAC move limit exceeded +ge-0/0/6.0 down default Storm control in effect +ge-0/0/7.0 down default unblocked +ge-0/0/13.0 up default untagged unblocked +ge-0/0/14.0 up vlan100 100 tagged unblocked + vlan200 200 tagged unblocked +ge-0/0/15.0 up vlan100 100 tagged blocked by STP + vlan200 200 tagged blocked by STP +ge-0/0/16.0 down default untagged unblocked +ge-0/0/17.0 down vlan100 100 tagged Disabled by bpdu-control + vlan200 200 tagged Disabled by bpdu-control diff --git a/tests/juniper_junos/show_ethernet-switching_interfaces/juniper_junos_show_ethernet-switching_interfaces.yml b/tests/juniper_junos/show_ethernet-switching_interfaces/juniper_junos_show_ethernet-switching_interfaces.yml new file mode 100644 index 0000000000..48bf9557d8 --- /dev/null +++ b/tests/juniper_junos/show_ethernet-switching_interfaces/juniper_junos_show_ethernet-switching_interfaces.yml @@ -0,0 +1,121 @@ +--- +parsed_sample: + - interface: "ae0.0" + port_error: + - "unblocked" + status: "up" + tagging: + - "untagged" + vlan_id: [] + vlan_member: + - "default" + - interface: "ge-0/0/2.0" + port_error: + - "blocked by RTG (rtggroup)" + status: "up" + tagging: + - "untagged" + vlan_id: + - "300" + vlan_member: + - "vlan300" + - interface: "ge-0/0/3.0" + port_error: + - "blocked by STP " + status: "up" + tagging: [] + vlan_id: [] + vlan_member: + - "default" + - interface: "ge-0/0/4.0" + port_error: + - "MAC limit exceeded" + status: "down" + tagging: [] + vlan_id: [] + vlan_member: + - "default" + - interface: "ge-0/0/5.0" + port_error: + - "MAC move limit exceeded" + status: "down" + tagging: [] + vlan_id: [] + vlan_member: + - "default" + - interface: "ge-0/0/6.0" + port_error: + - "Storm control in effect" + status: "down" + tagging: [] + vlan_id: [] + vlan_member: + - "default" + - interface: "ge-0/0/7.0" + port_error: + - "unblocked" + status: "down" + tagging: [] + vlan_id: [] + vlan_member: + - "default" + - interface: "ge-0/0/13.0" + port_error: + - "unblocked" + status: "up" + tagging: + - "untagged" + vlan_id: [] + vlan_member: + - "default" + - interface: "ge-0/0/14.0" + port_error: + - "unblocked" + - "unblocked" + status: "up" + tagging: + - "tagged" + - "tagged" + vlan_id: + - "100" + - "200" + vlan_member: + - "vlan100" + - "vlan200" + - interface: "ge-0/0/15.0" + port_error: + - "blocked by STP" + - "blocked by STP" + status: "up" + tagging: + - "tagged" + - "tagged" + vlan_id: + - "100" + - "200" + vlan_member: + - "vlan100" + - "vlan200" + - interface: "ge-0/0/16.0" + port_error: + - "unblocked" + status: "down" + tagging: + - "untagged" + vlan_id: [] + vlan_member: + - "default" + - interface: "ge-0/0/17.0" + port_error: + - "Disabled by bpdu-control" + - "Disabled by bpdu-control" + status: "down" + tagging: + - "tagged" + - "tagged" + vlan_id: + - "100" + - "200" + vlan_member: + - "vlan100" + - "vlan200"