+ def vpp_creates_classify_table_l2(node, direction):
+ """Create classify table for MAC address filtering.
+
+ :param node: VPP node to create classify table.
+ :param direction: Direction of traffic - src/dst.
+ :type node: dict
+ :type direction: str
+ :return (table_index, skip_n, match_n)
+ table_index: Classify table index.
+ skip_n: Number of skip vectors.
+ match_n: Number of match vectors.
+ :rtype: tuple(int, int, int)
+ :raises RuntimeError: If VPP can't create table.
+ """
+ output = VatExecutor.cmd_from_template(node,
+ "classify_add_table_l2.vat",
+ direction=direction)
+
+ if output[0]["retval"] == 0:
+ table_index = output[0]["new_table_index"]
+ skip_n = output[0]["skip_n_vectors"]
+ match_n = output[0]["match_n_vectors"]
+ logger.trace('Classify table with table_index {} created on node {}'
+ .format(table_index, node['host']))
+ else:
+ raise RuntimeError('Unable to create classify table on node {}'
+ .format(node['host']))
+
+ return table_index, skip_n, match_n
+
+ @staticmethod
+ def vpp_creates_classify_table_hex(node, hex_mask):