diff options
author | Juraj Sloboda <jsloboda@cisco.com> | 2018-02-01 15:18:49 +0100 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2018-03-16 20:07:51 +0000 |
commit | c03742346f0f3f08b83b0d2944bf72e19ea26191 (patch) | |
tree | 124cb6dc5cd45d070d2649bcf64916b27bf7bd01 /test/vpp_interface.py | |
parent | ff92efe1074e338f91e59d9c27125d102516e7bf (diff) |
IPv6 ND Router discovery control plane (VPP-1095)
Change-Id: I4b5b60e7c6f618bb935eab1e96a2e79bbb14f58f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'test/vpp_interface.py')
-rw-r--r-- | test/vpp_interface.py | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/test/vpp_interface.py b/test/vpp_interface.py index 8891dde6afe..194a0c4fb32 100644 --- a/test/vpp_interface.py +++ b/test/vpp_interface.py @@ -55,6 +55,16 @@ class VppInterface(object): return socket.inet_pton(socket.AF_INET6, self.local_ip6) @property + def remote_ip6(self): + """IPv6 address of remote peer "connected" to this interface.""" + return self._remote_hosts[0].ip6 + + @property + def remote_ip6n(self): + """IPv6 address of remote peer - raw, suitable as API parameter""" + return socket.inet_pton(socket.AF_INET6, self.remote_ip6) + + @property def local_ip6_ll(self): """Local IPv6 linnk-local address on VPP interface (string).""" return self._local_ip6_ll @@ -62,17 +72,19 @@ class VppInterface(object): @property def local_ip6n_ll(self): """Local IPv6 link-local address - raw, suitable as API parameter.""" - return self.local_ip6n_ll + return self._local_ip6n_ll @property - def remote_ip6(self): - """IPv6 address of remote peer "connected" to this interface.""" - return self._remote_hosts[0].ip6 + def remote_ip6_ll(self): + """Link-local IPv6 address of remote peer + "connected" to this interface.""" + return self._remote_ip6_ll @property - def remote_ip6n(self): - """IPv6 address of remote peer - raw, suitable as API parameter""" - return socket.inet_pton(socket.AF_INET6, self.remote_ip6) + def remote_ip6n_ll(self): + """Link-local IPv6 address of remote peer + - raw, suitable as API parameter""" + return self._remote_ip6n_ll @property def name(self): @@ -196,6 +208,9 @@ class VppInterface(object): self._local_ip6_ll = mk_ll_addr(self.local_mac) self._local_ip6n_ll = socket.inet_pton(socket.AF_INET6, self.local_ip6_ll) + self._remote_ip6_ll = mk_ll_addr(self.remote_mac) + self._remote_ip6n_ll = socket.inet_pton(socket.AF_INET6, + self.remote_ip6_ll) def config_ip4(self): """Configure IPv4 address on the VPP interface.""" |