From efd7bc2b1c8db160933ed3e9ab3cde0d07aaf863 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Mon, 11 Nov 2019 08:32:34 +0000 Subject: tests: Remove the unrequired VPP IP address/prefix class wrappers Type: refactor Change-Id: I204f3f8eebc5f5d5a377e91262f91c615fd00168 Signed-off-by: Neale Ranns --- src/plugins/memif/test/vpp_memif.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/plugins/memif/test/vpp_memif.py') diff --git a/src/plugins/memif/test/vpp_memif.py b/src/plugins/memif/test/vpp_memif.py index 9bcac1fd5b6..3ccbb68970b 100644 --- a/src/plugins/memif/test/vpp_memif.py +++ b/src/plugins/memif/test/vpp_memif.py @@ -1,9 +1,9 @@ import socket +from ipaddress import IPv4Network import six from vpp_object import VppObject -from vpp_ip import VppIpPrefix from vpp_papi import VppEnum @@ -74,8 +74,9 @@ class VppMemif(VppObject): self.buffer_size = buffer_size self.hw_addr = hw_addr self.sw_if_index = None - self.ip_prefix = VppIpPrefix("192.168.%d.%d" % - (self.if_id + 1, self.role + 1), 24) + self.ip_prefix = IPv4Network("192.168.%d.%d/24" % + (self.if_id + 1, self.role + 1), + strict=False) def add_vpp_config(self): rv = self._test.vapi.memif_create( @@ -125,7 +126,7 @@ class VppMemif(VppObject): def config_ip4(self): return self._test.vapi.sw_interface_add_del_address( - sw_if_index=self.sw_if_index, prefix=self.ip_prefix.encode()) + sw_if_index=self.sw_if_index, prefix=self.ip_prefix) def remove_vpp_config(self): self._test.vapi.memif_delete(self.sw_if_index) -- cgit 1.2.3-korg