aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_ipsec.py
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-06-07 09:34:07 +0000
committerOle Tr�an <otroan@employees.org>2021-06-14 13:13:13 +0000
commit89d939e52c999edec66194c60bc5afb2397a2842 (patch)
tree00e8ec98863ead022c30e8619b45a7585fc7a5de /test/vpp_ipsec.py
parent6197cb730e1571ca69859489c0ae7ea90a5c5fd4 (diff)
linux-cp: Add tests for tun devices
Type: test Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Iec69d8624b15766ed65e7d09777819d2242dee17
Diffstat (limited to 'test/vpp_ipsec.py')
-rw-r--r--test/vpp_ipsec.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/vpp_ipsec.py b/test/vpp_ipsec.py
index aa2a05d1068..2bf7eda4c23 100644
--- a/test/vpp_ipsec.py
+++ b/test/vpp_ipsec.py
@@ -412,6 +412,8 @@ class VppIpsecInterface(VppInterface):
})
self.set_sw_if_index(r.sw_if_index)
self.test.registry.register(self, self.test.logger)
+ ts = self.test.vapi.ipsec_itf_dump(sw_if_index=self._sw_if_index)
+ self.instance = ts[0].itf.user_instance
return self
def remove_vpp_config(self):
@@ -420,7 +422,7 @@ class VppIpsecInterface(VppInterface):
def query_vpp_config(self):
ts = self.test.vapi.ipsec_itf_dump(sw_if_index=0xffffffff)
for t in ts:
- if t.tunnel.sw_if_index == self._sw_if_index:
+ if t.itf.sw_if_index == self._sw_if_index:
return True
return False
@@ -428,4 +430,4 @@ class VppIpsecInterface(VppInterface):
return self.object_id()
def object_id(self):
- return "ipsec-%d" % self._sw_if_index
+ return "ipsec%d" % self.instance