summaryrefslogtreecommitdiffstats
path: root/test/template_ipsec.py
diff options
context:
space:
mode:
authorKingwel Xie <kingwel.xie@ericsson.com>2019-03-20 07:21:58 -0400
committerNeale Ranns <nranns@cisco.com>2019-03-21 07:42:09 +0000
commit1ba5bc8d888d0164dd6e38857cbed09ab7ce1d8b (patch)
treeea87c57b0db7f981878e2cdb66f7f650cbc71447 /test/template_ipsec.py
parenta5efca30f569ff93cfb85ed1bc7742cee824426d (diff)
ipsec: add ipv6 support for ipsec tunnel interface
Change-Id: I6a76907dc7bed2a81282b63669bea2219d6903c9 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com> Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'test/template_ipsec.py')
-rw-r--r--test/template_ipsec.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/template_ipsec.py b/test/template_ipsec.py
index 68f1183fbc2..483699c2eac 100644
--- a/test/template_ipsec.py
+++ b/test/template_ipsec.py
@@ -477,14 +477,15 @@ class IpsecTun6Tests(object):
self.logger.info(self.vapi.ppcli("show error"))
self.logger.info(self.vapi.ppcli("show ipsec"))
- pkts = p.tun_sa_in.get_stats()['packets']
- self.assertEqual(pkts, count,
- "incorrect SA in counts: expected %d != %d" %
- (count, pkts))
- pkts = p.tun_sa_out.get_stats()['packets']
- self.assertEqual(pkts, count,
- "incorrect SA out counts: expected %d != %d" %
- (count, pkts))
+ if (hasattr(p, "tun_sa_in")):
+ pkts = p.tun_sa_in.get_stats()['packets']
+ self.assertEqual(pkts, count,
+ "incorrect SA in counts: expected %d != %d" %
+ (count, pkts))
+ pkts = p.tun_sa_out.get_stats()['packets']
+ self.assertEqual(pkts, count,
+ "incorrect SA out counts: expected %d != %d" %
+ (count, pkts))
self.assert_packet_counter_equal(self.tun6_encrypt_node_name, count)
self.assert_packet_counter_equal(self.tun6_decrypt_node_name, count)