diff --git a/templates/index b/templates/index index 6a411e7ca6..18b37ad593 100644 --- a/templates/index +++ b/templates/index @@ -365,6 +365,7 @@ huawei_vrp_display_temperature.textfsm, .*, huawei_vrp, disp[[lay]] tem[[peratur 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]] +juniper_junos_show_ethernet-switching_table.textfsm, .*, juniper_junos, sh[[ow]] et[[hernet-switching]] t[[able]] juniper_junos_show_chassis_cluster_status.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] c[[luster]] s[[tatus]] juniper_junos_show_chassis_firmware.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] fi[[rmware]] juniper_junos_show_arp_no-resolve.textfsm, .*, juniper_junos, sh[[ow]] a[[rp]] n[[o-resolve]] diff --git a/templates/juniper_junos_show_ethernet-switching_table.textfsm b/templates/juniper_junos_show_ethernet-switching_table.textfsm new file mode 100644 index 0000000000..67bcf6685e --- /dev/null +++ b/templates/juniper_junos_show_ethernet-switching_table.textfsm @@ -0,0 +1,19 @@ +Value VLAN (\S+) +Value MAC_ADDRESS (\S+) +Value MAC_FLAG (\S+) +Value AGE (\S+) +Value LOGICAL_INTERFACE (\S+) + +Start + ^MAC\sflags\s\(S\s-\sstatic\sMAC,\sD\s-\sdynamic\sMAC,\sL\s-\slocally\slearned,\sP\s-\sPersistent\sstatic\S*\s*\S*\s*\S*\s*\S*\s*\S*$$ + ^\s+SE\s-\sstatistics\senabled,\sNM\s-\snon\sconfigured\sMAC,\sR\s-\sremote\sPE\sMAC,\sO\s-\sovsdb\sMAC\)$$ + ^Ethernet\sswitching\stable\s:\s\d+\sentries,\s\d+\slearned$$ + ^Routing\sinstance\s:\sdefault-switch$$ + ^\s+Vlan\s+MAC\s+MAC\s+Age\s+Logical\s*\S*\s*\S*\s*$$ + ^\s+name\s+address\s+flags\s+interface\s*\S*\s*\S*\s*$$ + ^\s+Vlan${VLAN}\s+${MAC_ADDRESS}\s+${MAC_FLAG}\s+${AGE}\s+${LOGICAL_INTERFACE}\s*\S*\s*\S* -> Record + ^\s*$$ + ^{master:\d+} + ^. -> Error + +EOF diff --git a/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table.raw b/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table.raw new file mode 100644 index 0000000000..f1e50751e5 --- /dev/null +++ b/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table.raw @@ -0,0 +1,14 @@ + +MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static, C - Control MAC + SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC) + + +Ethernet switching table : 3 entries, 3 learned +Routing instance : default-switch + Vlan MAC MAC Age Logical NH RTR + name address flags interface Index ID + Vlan2 bc:ac:0a:ca:ca:30 DR - ae3.0 0 0 + Vlan100 2c:5a:0f:bc:a3:cd DL - xe-0/0/51:0.0 0 0 + Vlan1011 ca:fe:ca:fe:00:07 DL - ae100.0 0 0 + +{master:0} diff --git a/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table.yml b/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table.yml new file mode 100644 index 0000000000..ff620a1c3f --- /dev/null +++ b/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table.yml @@ -0,0 +1,17 @@ +--- +parsed_sample: + - vlan: "2" + mac_address: "bc:ac:0a:ca:ca:30" + mac_flag: "DR" + age: "-" + logical_interface: "ae3.0" + - vlan: "100" + mac_address: "2c:5a:0f:bc:a3:cd" + mac_flag: "DL" + age: "-" + logical_interface: "xe-0/0/51:0.0" + - vlan: "1011" + mac_address: "ca:fe:ca:fe:00:07" + mac_flag: "DL" + age: "-" + logical_interface: "ae100.0" diff --git a/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table1.raw b/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table1.raw new file mode 100644 index 0000000000..e205f2fbd7 --- /dev/null +++ b/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table1.raw @@ -0,0 +1,13 @@ + +MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static + SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC) + + +Ethernet switching table : 2 entries, 2 learned +Routing instance : default-switch + Vlan MAC MAC Age Logical + name address flags interface + Vlan100 2c:5a:0f:bc:a3:cd DL - ae112.0 + Vlan100 ca:fe:ca:fe:00:07 DL - ae112.0 + +{master:0} diff --git a/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table1.yml b/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table1.yml new file mode 100644 index 0000000000..4afaaa7aa3 --- /dev/null +++ b/tests/juniper_junos/show_ethernet-switching_table/juniper_junos_show_ethernet-switching_table1.yml @@ -0,0 +1,12 @@ +--- +parsed_sample: + - vlan: "100" + mac_address: "2c:5a:0f:bc:a3:cd" + mac_flag: "DL" + age: "-" + logical_interface: "ae112.0" + - vlan: "100" + mac_address: "ca:fe:ca:fe:00:07" + mac_flag: "DL" + age: "-" + logical_interface: "ae112.0"