aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2018-10-22 14:11:45 +0200
committerDamjan Marion <dmarion@me.com>2018-10-22 14:33:22 +0000
commita26373bda8aa66cebf03ac092c20fdf4b0a0f625 (patch)
treee92c6f9cbc78ec5c5b8b051dc147fe031968102e
parent73343933c347b598272434b2e5cdbb17fc981886 (diff)
GBP: Revert back to using VppIpPrefix wrapper
Change-Id: I33567b9c5822008e6b75c7cc04f63853dee88654 Signed-off-by: Ole Troan <ot@cisco.com>
-rw-r--r--test/test_gbp.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/test_gbp.py b/test/test_gbp.py
index 8e873f345e7..132bd247dd1 100644
--- a/test/test_gbp.py
+++ b/test/test_gbp.py
@@ -10,7 +10,6 @@ from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable
from vpp_ip import *
from vpp_mac import *
from vpp_papi_provider import L2_PORT_TYPE
-from vpp_papi.vpp_format import VPPFormat
from scapy.packet import Raw
from scapy.layers.l2 import Ether, ARP
@@ -163,7 +162,7 @@ class VppGbpSubnet(VppObject):
sw_if_index=None, epg=None):
self._test = test
self.table_id = table_id
- self.prefix = "{}/{}".format(address, address_len)
+ self.prefix = VppIpPrefix(address, address_len)
self.is_internal = is_internal
self.sw_if_index = sw_if_index
self.epg = epg
@@ -173,7 +172,7 @@ class VppGbpSubnet(VppObject):
1,
self.table_id,
self.is_internal,
- self.prefix,
+ self.prefix.encode(),
sw_if_index=self.sw_if_index if self.sw_if_index else 0xffffffff,
epg_id=self.epg if self.epg else 0xffff)
self._test.registry.register(self, self._test.logger)
@@ -183,7 +182,7 @@ class VppGbpSubnet(VppObject):
0,
self.table_id,
self.is_internal,
- self.prefix)
+ self.prefix.encode())
def __str__(self):
return self.object_id()
@@ -196,7 +195,7 @@ class VppGbpSubnet(VppObject):
ss = self._test.vapi.gbp_subnet_dump()
for s in ss:
if s.subnet.table_id == self.table_id and \
- VPPFormat.unformat(s.subnet.prefix) == self.prefix:
+ s.subnet.prefix == self.prefix:
return True
return False