GBP: redirect contracts
[vpp.git] / test / vpp_bond_interface.py
index 1c33e1c..153f114 100644 (file)
@@ -9,20 +9,18 @@ class VppBondInterface(VppInterface):
                  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.use_custom_mac = use_custom_mac
         self.mac_address = mac_address
-        self._sw_if_index = 0
-        super(VppBondInterface, self).__init__(test)
 
     def add_vpp_config(self):
         r = self.test.vapi.bond_create(self.mode,
                                        self.lb,
                                        self.use_custom_mac,
                                        self.mac_address)
-        self._sw_if_index = r.sw_if_index
+        self.set_sw_if_index(r.sw_if_index)
 
     def remove_vpp_config(self):
         self.test.vapi.bond_delete(self.sw_if_index)