diff options
author | Neale Ranns <nranns@cisco.com> | 2019-11-11 08:32:34 +0000 |
---|---|---|
committer | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-11-15 13:19:20 +0000 |
commit | efd7bc2b1c8db160933ed3e9ab3cde0d07aaf863 (patch) | |
tree | dcd284e6b8fb5aa37cccc912fd3009fd5fd77365 /test/vpp_vxlan_gbp_tunnel.py | |
parent | 5ae7f0db43928a9a043e1e4a53871219060d259d (diff) |
tests: Remove the unrequired VPP IP address/prefix class wrappers
Type: refactor
Change-Id: I204f3f8eebc5f5d5a377e91262f91c615fd00168
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/vpp_vxlan_gbp_tunnel.py')
-rw-r--r-- | test/vpp_vxlan_gbp_tunnel.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/test/vpp_vxlan_gbp_tunnel.py b/test/vpp_vxlan_gbp_tunnel.py index 5352d6ebf31..22555858d12 100644 --- a/test/vpp_vxlan_gbp_tunnel.py +++ b/test/vpp_vxlan_gbp_tunnel.py @@ -1,6 +1,5 @@ from vpp_interface import VppInterface -from vpp_ip import VppIpAddress from vpp_papi import VppEnum @@ -8,13 +7,10 @@ INDEX_INVALID = 0xffffffff def find_vxlan_gbp_tunnel(test, src, dst, vni): - vsrc = VppIpAddress(src) - vdst = VppIpAddress(dst) - ts = test.vapi.vxlan_gbp_tunnel_dump(INDEX_INVALID) for t in ts: - if vsrc == t.tunnel.src and \ - vdst == t.tunnel.dst and \ + if src == str(t.tunnel.src) and \ + dst == str(t.tunnel.dst) and \ t.tunnel.vni == vni: return t.tunnel.sw_if_index return INDEX_INVALID @@ -29,8 +25,8 @@ class VppVxlanGbpTunnel(VppInterface): is_ipv6=None, encap_table_id=None, instance=0xffffffff): """ Create VXLAN-GBP Tunnel interface """ super(VppVxlanGbpTunnel, self).__init__(test) - self.src = VppIpAddress(src) - self.dst = VppIpAddress(dst) + self.src = src + self.dst = dst self.vni = vni self.mcast_itf = mcast_itf self.ipv6 = is_ipv6 @@ -49,8 +45,8 @@ class VppVxlanGbpTunnel(VppInterface): reply = self.test.vapi.vxlan_gbp_tunnel_add_del( is_add=1, tunnel={ - 'src': self.src.encode(), - 'dst': self.dst.encode(), + 'src': self.src, + 'dst': self.dst, 'mode': self.mode, 'vni': self.vni, 'mcast_sw_if_index': mcast_sw_if_index, @@ -67,8 +63,8 @@ class VppVxlanGbpTunnel(VppInterface): self.test.vapi.vxlan_gbp_tunnel_add_del( is_add=0, tunnel={ - 'src': self.src.encode(), - 'dst': self.dst.encode(), + 'src': self.src, + 'dst': self.dst, 'mode': self.mode, 'vni': self.vni, 'mcast_sw_if_index': mcast_sw_if_index, |