X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_bond_interface.py;h=8ad7bceac70cde6519d03dc742fe8a82c2d007e7;hb=4c4223edf;hp=4bd7cb8235cb70eaeda1d8db3ff8b9ecde0cd800;hpb=c798bc5b11ad4a0b8673a4a039b448a5c723f17c;p=vpp.git diff --git a/test/vpp_bond_interface.py b/test/vpp_bond_interface.py index 4bd7cb8235c..8ad7bceac70 100644 --- a/test/vpp_bond_interface.py +++ b/test/vpp_bond_interface.py @@ -5,39 +5,40 @@ from vpp_interface import VppInterface class VppBondInterface(VppInterface): """VPP bond interface.""" - def __init__(self, test, mode, lb=0, + def __init__(self, test, mode, lb=0, numa_only=0, use_custom_mac=0, mac_address=''): """ Create VPP Bond interface """ - self._test = test + super(VppBondInterface, self).__init__(test) self.mode = mode self.lb = lb + self.numa_only = numa_only self.use_custom_mac = use_custom_mac self.mac_address = mac_address def add_vpp_config(self): r = self.test.vapi.bond_create(self.mode, self.lb, + self.numa_only, self.use_custom_mac, self.mac_address) - self._sw_if_index = r.sw_if_index - super(VppBondInterface, self).__init__(self._test) + self.set_sw_if_index(r.sw_if_index) def remove_vpp_config(self): self.test.vapi.bond_delete(self.sw_if_index) - def enslave_vpp_bond_interface(self, - sw_if_index, - is_passive, - is_long_timeout): - self.test.vapi.bond_enslave(sw_if_index, - self.sw_if_index, - is_passive, - is_long_timeout) + def add_member_vpp_bond_interface(self, + sw_if_index, + is_passive=0, + is_long_timeout=0): + self.test.vapi.bond_add_member(sw_if_index, + self.sw_if_index, + is_passive, + is_long_timeout) def detach_vpp_bond_interface(self, sw_if_index): - self.test.vapi.bond_detach_slave(sw_if_index) + self.test.vapi.bond_detach_member(sw_if_index) def is_interface_config_in_dump(self, dump): for i in dump: