summaryrefslogtreecommitdiffstats
path: root/test/vpp_ip_route.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-04-23 07:36:12 +0000
committerOle Trøan <otroan@employees.org>2020-04-24 09:24:43 +0000
commitec40a7d2bce4bba67af3b3d971547d40e90fdf97 (patch)
tree8cab359d02dfce38d57f7d9b2e741e7a406ef6b1 /test/vpp_ip_route.py
parent82b62bbf58bc3d1143a359d8f58f7be2f473cddd (diff)
ip: Setting the Link-Local address from the API enables IPv6 on the
interface Type: fix Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I0b7c189006e30a357cd6be4f3c9c61fded4157cb
Diffstat (limited to 'test/vpp_ip_route.py')
-rw-r--r--test/vpp_ip_route.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/vpp_ip_route.py b/test/vpp_ip_route.py
index d871f7a0b11..4bb6c9320d3 100644
--- a/test/vpp_ip_route.py
+++ b/test/vpp_ip_route.py
@@ -303,6 +303,31 @@ class VppIpInterfaceAddress(VppObject):
self.prefix)
+class VppIp6LinkLocalAddress(VppObject):
+
+ def __init__(self, test, intf, addr):
+ self._test = test
+ self.intf = intf
+ self.addr = addr
+
+ def add_vpp_config(self):
+ self._test.vapi.sw_interface_ip6_set_link_local_address(
+ sw_if_index=self.intf.sw_if_index, ip=self.addr)
+ self._test.registry.register(self, self._test.logger)
+ return self
+
+ def remove_vpp_config(self):
+ # link locals can't be removed, only changed
+ pass
+
+ def query_vpp_config(self):
+ # no API to query
+ return False
+
+ def object_id(self):
+ return "ip6-link-local-%s-%s" % (self.intf, self.addr)
+
+
class VppIpInterfaceBind(VppObject):
def __init__(self, test, intf, table):