aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-10-18 14:54:30 +0200
committerNeale Ranns <nranns@cisco.com>2019-10-18 13:44:32 +0000
commit197573320de2c8760d79ce9c6195f9d294fdb215 (patch)
tree56d6ffe74f0bb7505f5e1a65359615f487e795b2 /test
parent5dc5fcf14c5b841cc02f016c2cc31ff23fcd32e8 (diff)
ip: ip vrf tests python3 support
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ie23c9d2d7325be62ef33df2f0562ab41518f7bf4
Diffstat (limited to 'test')
-rw-r--r--test/test_ip4_vrf_multi_instance.py8
-rw-r--r--test/test_ip6_vrf_multi_instance.py2
2 files changed, 2 insertions, 8 deletions
diff --git a/test/test_ip4_vrf_multi_instance.py b/test/test_ip4_vrf_multi_instance.py
index 1004814b8f1..b659ed7064f 100644
--- a/test/test_ip4_vrf_multi_instance.py
+++ b/test/test_ip4_vrf_multi_instance.py
@@ -108,7 +108,7 @@ class TestIp4VrfMultiInst(VppTestCase):
# Packet flows mapping pg0 -> pg1, pg2 etc.
cls.flows = dict()
for i in range(len(cls.pg_interfaces)):
- multiplicand = i / cls.pg_ifs_per_vrf
+ multiplicand = i // cls.pg_ifs_per_vrf
pg_list = [
cls.pg_interfaces[multiplicand * cls.pg_ifs_per_vrf + j]
for j in range(cls.pg_ifs_per_vrf)
@@ -351,12 +351,6 @@ class TestIp4VrfMultiInst(VppTestCase):
vrf_count += 1
found = True
break
- for host in pg_if.remote_hosts:
- if scapy.compat.raw(addr) == \
- scapy.compat.raw(host.ip4):
- vrf_count += 1
- found = True
- break
if not vrf_exist and vrf_count == 0:
self.logger.info("IPv4 VRF ID %d is not configured" % vrf_id)
return VRFState.not_configured
diff --git a/test/test_ip6_vrf_multi_instance.py b/test/test_ip6_vrf_multi_instance.py
index 88aed978d97..49e5cab5f6a 100644
--- a/test/test_ip6_vrf_multi_instance.py
+++ b/test/test_ip6_vrf_multi_instance.py
@@ -120,7 +120,7 @@ class TestIP6VrfMultiInst(VppTestCase):
# Packet flows mapping pg0 -> pg1, pg2 etc.
cls.flows = dict()
for i in range(len(cls.pg_interfaces)):
- multiplicand = i / cls.pg_ifs_per_vrf
+ multiplicand = i // cls.pg_ifs_per_vrf
pg_list = [
cls.pg_interfaces[multiplicand * cls.pg_ifs_per_vrf + j]
for j in range(cls.pg_ifs_per_vrf)