aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/InterfaceUtil.py
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-07-25 06:47:34 +0000
committerPeter Mikus <pmikus@cisco.com>2018-07-27 22:21:46 +0000
commit3f074f530223783e9e986dfe2f4b64af93483abc (patch)
treea4b7a3732f7ea5f0ed6cff12349ed00d7870f92b /resources/libraries/python/InterfaceUtil.py
parentc7b2541ae5ff737691547daef2e4b25f9d232eba (diff)
FIX: Interface up handling
- Increase timeout when trying to check interface (this is useful if there are multiple interfaces and dump command take more than TIMEOUT/NR_IF which is happening quite often). - Reverse the order of applying MTU and interface UP to try to prevent API overload during interface initialization phase. Change-Id: I4e8623963d15b3c0d202172b4c58c43a972bb9cb Signed-off-by: Peter Mikus <pmikus@cisco.com> (cherry picked from commit 584345da4f7330f7517e5defd894b4995c2b57b0)
Diffstat (limited to 'resources/libraries/python/InterfaceUtil.py')
-rw-r--r--resources/libraries/python/InterfaceUtil.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index c5223d5496..7286633676 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -68,9 +68,9 @@ class InterfaceUtil(object):
if node['type'] == NodeType.DUT:
if state == 'up':
- state = 'admin-up'
+ state = 'admin-up link-up'
elif state == 'down':
- state = 'admin-down'
+ state = 'admin-down link-down'
else:
raise ValueError('Unexpected interface state: {}'.format(state))
VatExecutor.cmd_from_template(node, 'set_if_state.vat',
@@ -170,7 +170,7 @@ class InterfaceUtil(object):
InterfaceUtil.vpp_set_interfaces_mtu_on_node(node, mtu)
@staticmethod
- def vpp_node_interfaces_ready_wait(node, timeout=10):
+ def vpp_node_interfaces_ready_wait(node, timeout=30):
"""Wait until all interfaces with admin-up are in link-up state.
:param node: Node to wait on.
@@ -205,7 +205,7 @@ class InterfaceUtil(object):
sleep(1)
@staticmethod
- def vpp_nodes_interfaces_ready_wait(nodes, timeout=10):
+ def vpp_nodes_interfaces_ready_wait(nodes, timeout=30):
"""Wait until all interfaces with admin-up are in link-up state for
listed nodes.
@@ -219,7 +219,7 @@ class InterfaceUtil(object):
InterfaceUtil.vpp_node_interfaces_ready_wait(node, timeout)
@staticmethod
- def all_vpp_interfaces_ready_wait(nodes, timeout=10):
+ def all_vpp_interfaces_ready_wait(nodes, timeout=30):
"""Wait until all interfaces with admin-up are in link-up state for all
nodes in the topology.