summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Peim <mpeim@cisco.com>2024-04-05 14:16:39 +0200
committerBeno�t Ganne <bganne@cisco.com>2024-04-23 08:52:48 +0000
commitf13534e79d532458fc6629c8c84f6720ceefba85 (patch)
tree71f4b997dd9c7da85534edf81e6d10f0cfc0dca0
parent07b227407329e9a1ad5d8c949278a747be93b7ee (diff)
tests: allow ip table name
Type: refactor Change-Id: I4abbc77a447358f4beaa05505299cae732a3f374 Signed-off-by: Maxime Peim <mpeim@cisco.com>
-rw-r--r--test/vpp_ip_route.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/vpp_ip_route.py b/test/vpp_ip_route.py
index 9b3a138a81c..d36c56761e3 100644
--- a/test/vpp_ip_route.py
+++ b/test/vpp_ip_route.py
@@ -169,15 +169,17 @@ def fib_interface_ip_prefix(test, addr, len, sw_if_index):
class VppIpTable(VppObject):
- def __init__(self, test, table_id, is_ip6=0, register=True):
+ def __init__(self, test, table_id, is_ip6=0, register=True, name=""):
self._test = test
+ self.name = name
self.table_id = table_id
self.is_ip6 = is_ip6
self.register = register
def add_vpp_config(self):
self._test.vapi.ip_table_add_del(
- is_add=1, table={"is_ip6": self.is_ip6, "table_id": self.table_id}
+ is_add=1,
+ table={"is_ip6": self.is_ip6, "table_id": self.table_id, "name": self.name},
)
if self.register:
self._test.registry.register(self, self._test.logger)