aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
authorJuraj Linkeš <juraj.linkes@pantheon.tech>2020-10-16 12:57:08 +0200
committerPeter Mikus <pmikus@cisco.com>2020-10-19 09:20:08 +0000
commit94e9a913b562f9f0ebe3ed75ce519b51ee75bde7 (patch)
tree83a879791999827d7d2db0ee3d0ac2151e2a384b /resources/libraries/python
parent1c14952a05b77e96eff4bba9d63f17947440294a (diff)
FIX: disable sending IPv6 RA messages from VMs
There were occasional Router Advertisement packets received in a Traffic Generator in VM testcases. Fix by adding config that disables sending IPv6 RA messages on interfaces in VM VPP config before enabling them. Also rename related keywords and change descriptions based on https://docs.fd.io/vpp/21.01/db/d4c/clicmd_src_vnet_ip6-nd.html#clicmd_ip6_nd Change-Id: I1c2a33337ac91f6039d287b4c2aac388e3a52383 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Diffstat (limited to 'resources/libraries/python')
-rw-r--r--resources/libraries/python/IPv6Util.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/resources/libraries/python/IPv6Util.py b/resources/libraries/python/IPv6Util.py
index 683f892f62..883304487d 100644
--- a/resources/libraries/python/IPv6Util.py
+++ b/resources/libraries/python/IPv6Util.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2020 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -23,8 +23,9 @@ class IPv6Util:
"""IPv6 utilities"""
@staticmethod
- def vpp_ra_suppress_link_layer(node, interface):
- """Suppress ICMPv6 router advertisement message for link scope address.
+ def vpp_interface_ra_suppress(node, interface):
+ """Disable sending ICMPv6 router-advertisement messages on
+ an interface on a VPP node.
:param node: VPP node.
:param interface: Interface name.
@@ -36,8 +37,8 @@ class IPv6Util:
sw_if_index=InterfaceUtil.get_interface_index(node, interface),
suppress=1
)
- err_msg = f"Failed to suppress ICMPv6 router advertisement message " \
- f"on interface {interface}"
+ err_msg = f"Failed to disable sending ICMPv6 router-advertisement " \
+ f"messages on interface {interface}"
with PapiSocketExecutor(node) as papi_exec:
papi_exec.add(cmd, **args).get_reply(err_msg)
@@ -66,9 +67,9 @@ class IPv6Util:
papi_exec.add(cmd, **args).get_reply(err_msg)
@staticmethod
- def vpp_all_ra_suppress_link_layer(nodes):
- """Suppress ICMPv6 router advertisement message for link scope address
- on all VPP nodes in the topology.
+ def vpp_interfaces_ra_suppress_on_all_nodes(nodes):
+ """Disable sending ICMPv6 router-advertisement messages on all
+ IPv6 enabled interfaces on all VPP nodes in the topology.
:param nodes: Nodes of the test topology.
:type nodes: dict
@@ -81,4 +82,4 @@ class IPv6Util:
node, port_k, u"ipv6"
)
if ip6_addr_list:
- IPv6Util.vpp_ra_suppress_link_layer(node, port_k)
+ IPv6Util.vpp_interface_ra_suppress(node, port_k)