summaryrefslogtreecommitdiffstats
path: root/test/test_gre.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-04-16 07:15:35 +0000
committerDamjan Marion <dmarion@me.com>2019-04-18 07:52:27 +0000
commit5a8844bdbf4b055812cce2d7755a175b2cc90b75 (patch)
tree89a401d65c1d8fd3dd0d29b13ac087fa3e5a48cb /test/test_gre.py
parent06a6a30f911383523931cd05c515f08aead7fbd0 (diff)
GRE: API update
Change-Id: I5010cd34123c6498230dedac6ba8dd774a1085f9 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/test_gre.py')
-rw-r--r--test/test_gre.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/test/test_gre.py b/test/test_gre.py
index 6b3c23f273a..71117ad738c 100644
--- a/test/test_gre.py
+++ b/test/test_gre.py
@@ -11,16 +11,11 @@ from scapy.volatile import RandMAC, RandIP
from framework import VppTestCase, VppTestRunner
from vpp_sub_interface import L2_VTR_OP, VppDot1QSubint
-from vpp_gre_interface import VppGreInterface, VppGre6Interface
+from vpp_gre_interface import VppGreInterface
from vpp_ip import DpoProto
from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable
from util import ppp, ppc
-
-
-class GreTunnelTypes:
- TT_L3 = 0
- TT_TEB = 1
- TT_ERSPAN = 2
+from vpp_papi import VppEnum
class TestGRE(VppTestCase):
@@ -567,9 +562,9 @@ class TestGRE(VppTestCase):
# - assign an IP Address
# - Add a route via the tunnel
#
- gre_if = VppGre6Interface(self,
- self.pg2.local_ip6,
- "1002::1")
+ gre_if = VppGreInterface(self,
+ self.pg2.local_ip6,
+ "1002::1")
gre_if.add_vpp_config()
gre_if.admin_up()
gre_if.config_ip6()
@@ -762,10 +757,12 @@ class TestGRE(VppTestCase):
#
gre_if1 = VppGreInterface(self, self.pg0.local_ip4,
"2.2.2.2",
- type=GreTunnelTypes.TT_TEB)
+ type=(VppEnum.vl_api_gre_tunnel_type_t.
+ GRE_API_TUNNEL_TYPE_TEB))
gre_if2 = VppGreInterface(self, self.pg0.local_ip4,
"2.2.2.3",
- type=GreTunnelTypes.TT_TEB)
+ type=(VppEnum.vl_api_gre_tunnel_type_t.
+ GRE_API_TUNNEL_TYPE_TEB))
gre_if1.add_vpp_config()
gre_if2.add_vpp_config()