diff options
author | Neale Ranns <nranns@cisco.com> | 2019-01-24 04:52:25 -0800 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-01-25 19:54:49 +0000 |
commit | 311124e21b9b8ca11073d82408ffb81d98790969 (patch) | |
tree | 22b615488ec5bf0c9aac73a6716bcdeeccd5d80b /test/test_ipsec_tun_if_esp.py | |
parent | 9e47ac54c9fbc6eb7caf0998df50a3114b64ee11 (diff) |
IPSEC: tests use opbject registry
this means we test the dumps - to some extent
Change-Id: I8d90745701012012b41a7b3aaf9be97b4dd2bdf8
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/test_ipsec_tun_if_esp.py')
-rw-r--r-- | test/test_ipsec_tun_if_esp.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test_ipsec_tun_if_esp.py b/test/test_ipsec_tun_if_esp.py index 561f1099715..2734908e7a1 100644 --- a/test/test_ipsec_tun_if_esp.py +++ b/test/test_ipsec_tun_if_esp.py @@ -4,6 +4,7 @@ from scapy.layers.ipsec import ESP from framework import VppTestRunner from template_ipsec import TemplateIpsec, IpsecTun4Tests, IpsecTcpTests from vpp_ipsec_tun_interface import VppIpsecTunInterface +from vpp_ip_route import VppIpRoute, VppRoutePath class TemplateIpsecTunIfEsp(TemplateIpsec): @@ -25,8 +26,10 @@ class TemplateIpsecTunIfEsp(TemplateIpsec): tun_if.add_vpp_config() tun_if.admin_up() tun_if.config_ip4() - src4 = socket.inet_pton(socket.AF_INET, p.remote_tun_if_host) - self.vapi.ip_add_del_route(src4, 32, tun_if.remote_ip4n) + + VppIpRoute(self, p.remote_tun_if_host, 32, + [VppRoutePath(tun_if.remote_ip4, + 0xffffffff)]).add_vpp_config() def tearDown(self): if not self.vpp_dead: |