summaryrefslogtreecommitdiffstats
path: root/test/vpp_interface.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2018-09-26 11:19:00 +0200
committerDamjan Marion <dmarion@me.com>2018-10-03 17:38:41 +0000
commit611864f4bddf787aff3323f162da589b1b26529c (patch)
tree685ae115de9e2fac60d14002ed748f4379ac8112 /test/vpp_interface.py
parent400ded36422689c1783e220a1846447bc0058234 (diff)
ipsec: add missing ipv6 ah code & ipv6 tests
Change-Id: I89e90193ded1beb6cb0950c15737f9467efac1c3 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/vpp_interface.py')
-rw-r--r--test/vpp_interface.py27
1 files changed, 26 insertions, 1 deletions
diff --git a/test/vpp_interface.py b/test/vpp_interface.py
index 1db34ba7958..65f3c4400da 100644
--- a/test/vpp_interface.py
+++ b/test/vpp_interface.py
@@ -24,6 +24,22 @@ class VppInterface(object):
return self._local_mac
@property
+ def local_addr(self):
+ return self._local_addr
+
+ @property
+ def remote_addr(self):
+ return self._remote_addr
+
+ @property
+ def local_addr_n(self):
+ return self._local_addr_n
+
+ @property
+ def remote_addr_n(self):
+ return self._remote_addr_n
+
+ @property
def local_ip4(self):
"""Local IPv4 address on VPP interface (string)."""
return self._local_ip4
@@ -65,7 +81,7 @@ class VppInterface(object):
@property
def local_ip6_ll(self):
- """Local IPv6 linnk-local address on VPP interface (string)."""
+ """Local IPv6 link-local address on VPP interface (string)."""
return self._local_ip6_ll
@property
@@ -200,6 +216,15 @@ class VppInterface(object):
self.has_ip6_config = False
self.ip6_table_id = 0
+ self._local_addr = {socket.AF_INET: self.local_ip4,
+ socket.AF_INET6: self.local_ip6}
+ self._local_addr_n = {socket.AF_INET: self.local_ip4n,
+ socket.AF_INET6: self.local_ip6n}
+ self._remote_addr = {socket.AF_INET: self.remote_ip4,
+ socket.AF_INET6: self.remote_ip6}
+ self._remote_addr_n = {socket.AF_INET: self.remote_ip4n,
+ socket.AF_INET6: self.remote_ip6n}
+
r = self.test.vapi.sw_interface_dump()
for intf in r:
if intf.sw_if_index == self.sw_if_index: