+ @staticmethod
+ def vpp_enslave_physical_interface(node, interface, bond_interface):
+ """Enslave physical interface to bond interface on VPP node.
+
+ :param node: DUT node from topology.
+ :param interface: Physical interface key from topology file.
+ :param bond_interface: Load balance
+ :type node: dict
+ :type interface: str
+ :type bond_interface: str
+ :raises RuntimeError: If it is not possible to enslave physical
+ interface to bond interface on the node.
+ """
+ ifc = Topology.get_interface_sw_index(node, interface)
+ bond_ifc = Topology.get_interface_sw_index(node, bond_interface)
+
+ output = VatExecutor.cmd_from_template(
+ node, 'enslave_physical_interface.vat', p_int=ifc, b_int=bond_ifc)
+
+ retval = output[0].get('retval', None)
+ if retval is None or int(retval) != 0:
+ raise RuntimeError('Enslave physical interface {ifc} to bond '
+ 'interface {bond} failed on node "{n}"'
+ .format(ifc=interface, bond=bond_interface,
+ n=node['host']))
+
+ @staticmethod
+ def vpp_show_bond_data_on_node(node, details=False):
+ """Show (detailed) bond information on VPP node.
+
+ :param node: DUT node from topology.
+ :param details: If detailed information is required or not.
+ :type node: dict
+ :type details: bool
+ """
+ cmd = 'exec show bond details' if details else 'exec show bond'
+ with VatTerminal(node, json_param=False) as vat:
+ vat.vat_terminal_exec_cmd(cmd)
+
+ @staticmethod
+ def vpp_show_bond_data_on_all_nodes(nodes, details=False):
+ """Show (detailed) bond information on all VPP nodes in DICT__nodes.
+
+ :param nodes: Nodes in the topology.
+ :param details: If detailed information is required or not.
+ :type nodes: dict
+ :type details: bool
+ """
+ for node_data in nodes.values():
+ if node_data['type'] == NodeType.DUT:
+ InterfaceUtil.vpp_show_bond_data_on_node(node_data, details)
+