aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/IPv6Setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python/IPv6Setup.py')
-rw-r--r--resources/libraries/python/IPv6Setup.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/resources/libraries/python/IPv6Setup.py b/resources/libraries/python/IPv6Setup.py
index 94c95e552f..e0de406a4a 100644
--- a/resources/libraries/python/IPv6Setup.py
+++ b/resources/libraries/python/IPv6Setup.py
@@ -221,10 +221,11 @@ class IPv6Setup(object):
:type interface: str
"""
sw_if_index = Topology.get_interface_sw_index(node, interface)
- VatExecutor.cmd_from_template(node,
- 'sw_interface_ip6nd_ra_config.vat',
- sw_if_id=sw_if_index,
- param='surpress')
+ if sw_if_index:
+ VatExecutor.cmd_from_template(node,
+ 'sw_interface_ip6nd_ra_config.vat',
+ sw_if_id=sw_if_index,
+ param='surpress')
@staticmethod
def vpp_ra_send_after_interval(node, interface, interval=2):
@@ -239,10 +240,11 @@ class IPv6Setup(object):
:type interval: int
"""
sw_if_index = Topology.get_interface_sw_index(node, interface)
- VatExecutor.cmd_from_template(node,
- 'sw_interface_ip6nd_ra_config.vat',
- sw_if_id=sw_if_index,
- param='interval {0}'.format(interval))
+ if sw_if_index:
+ VatExecutor.cmd_from_template(node,
+ 'sw_interface_ip6nd_ra_config.vat',
+ sw_if_id=sw_if_index,
+ param='interval {0}'.format(interval))
def vpp_all_ra_suppress_link_layer(self, nodes):
"""Suppress ICMPv6 router advertisement message for link scope address