summaryrefslogtreecommitdiffstats
path: root/test/vpp_ip_route.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/vpp_ip_route.py')
-rw-r--r--test/vpp_ip_route.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/vpp_ip_route.py b/test/vpp_ip_route.py
index 5175de7dd0f..031415e9ee0 100644
--- a/test/vpp_ip_route.py
+++ b/test/vpp_ip_route.py
@@ -149,6 +149,7 @@ def fib_interface_ip_prefix(test, address, length, sw_if_index):
prefix = IPv6Network("%s/%d" % (text_type(address), length),
strict=False)
+ # TODO: refactor this to VppIpPrefix.__eq__
for a in addrs:
if a.sw_if_index == sw_if_index and \
a.prefix == prefix:
@@ -426,6 +427,7 @@ class VppIpRoute(VppObject):
self.table_id = table_id
self.prefix = VppIpPrefix(dest_addr, dest_addr_len)
self.register = register
+ self.stats_index = None
self.encoded_paths = []
for path in self.paths:
@@ -482,10 +484,11 @@ class VppIpRoute(VppObject):
self.table_id)
def object_id(self):
- return ("%d:%s/%d"
- % (self.table_id,
- self.prefix.address,
- self.prefix.len))
+ return ("%s:table-%d-%s/%d" % (
+ 'ip6-route' if self.prefix.addr.version == 6 else 'ip-route',
+ self.table_id,
+ self.prefix.address,
+ self.prefix.len))
def get_stats_to(self):
c = self._test.statistics.get_counter("/net/route/to")
@@ -721,7 +724,7 @@ class VppMplsRoute(VppObject):
self.local_label, self.eos_bit)
def object_id(self):
- return ("%d:%s/%d"
+ return ("mpls-route-%d:%s/%d"
% (self.table_id,
self.local_label,
20 + self.eos_bit))