summaryrefslogtreecommitdiffstats
path: root/test/vpp_l2.py
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-10-25 09:13:00 +0000
committerNeale Ranns <neale@graphiant.com>2021-11-03 10:54:43 +0000
commit61aad0a79198229c1c1d73df7265c882c666bd53 (patch)
treed61ffa830a693b2620fac2fd4434a592ea4f76f8 /test/vpp_l2.py
parent849b474dc4d94570a2df0cee8c7e2504e21c8b6e (diff)
tests: Apply the 'return self' pattern for the L2 objects
Type: test Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I3286fbf09d18719546ba80e9cb81c7e58f87a603
Diffstat (limited to 'test/vpp_l2.py')
-rw-r--r--test/vpp_l2.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/vpp_l2.py b/test/vpp_l2.py
index 114b1c734d7..7307d28ad13 100644
--- a/test/vpp_l2.py
+++ b/test/vpp_l2.py
@@ -86,6 +86,7 @@ class VppBridgeDomain(VppObject):
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 @@ class VppBridgeDomainPort(VppObject):
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 @@ class VppBridgeDomainArpEntry(VppObject):
'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 @@ class VppL2FibEntry(VppObject):
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 @@ class VppL2Vtr(VppObject):
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)