tests: Apply the 'return self' pattern for the L2 objects
Type: test
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3286fbf09d18719546ba80e9cb81c7e58f87a603
diff --git a/test/vpp_l2.py b/test/vpp_l2.py
index 114b1c7..7307d28 100644
--- a/test/vpp_l2.py
+++ b/test/vpp_l2.py
@@ -86,6 +86,7 @@
arp_ufwd=self.arp_ufwd,
is_add=1)
self._test.registry.register(self, self._test.logger)
+ return self
def remove_vpp_config(self):
self._test.vapi.bridge_domain_add_del(bd_id=self.bd_id, is_add=0)
@@ -111,6 +112,7 @@
rx_sw_if_index=self.itf.sw_if_index, bd_id=self.bd.bd_id,
port_type=self.port_type, enable=1)
self._test.registry.register(self, self._test.logger)
+ return self
def remove_vpp_config(self):
self._test.vapi.sw_interface_set_l2_bridge(
@@ -141,6 +143,7 @@
'ip': self.ip,
'mac': self.mac})
self._test.registry.register(self, self._test.logger)
+ return self
def remove_vpp_config(self):
self._test.vapi.bd_ip_mac_add_del(is_add=0,
@@ -184,6 +187,7 @@
filter_mac=self.filter_mac,
bvi_mac=self.bvi_mac)
self._test.registry.register(self, self._test.logger)
+ return self
def remove_vpp_config(self):
self._test.vapi.l2fib_add_del(
@@ -212,6 +216,7 @@
def add_vpp_config(self):
self.itf.set_vtr(self.op)
self._test.registry.register(self, self._test.logger)
+ return self
def remove_vpp_config(self):
self.itf.set_vtr(L2_VTR_OP.L2_DISABLED)