aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-07-27 07:24:04 +0000
committerPeter Mikus <pmikus@cisco.com>2021-07-28 13:41:40 +0000
commit5e470c86572c16a2dbb238d7b5a6682ee7b91aa8 (patch)
tree7cd168c7fa0ef4a9a0ad0f4b7d6a4069df6721c4 /resources
parentb973948f5de5969a7977111770f367b3fa457a0e (diff)
CSIT-1782: 4c AVF tests are failing
+ Implement temporary ugly workaround as I cannot do driver upgrade now after discussions with PTL. Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I400e3b61bd831b9c9820b1fab8852118f2d48f0e (cherry picked from commit 9e86d195050fcd75c20d59f78d6f5a5e379a6a86)
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/InterfaceUtil.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 5f40595132..59652c742c 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -1259,8 +1259,19 @@ class InterfaceUtil:
txq_size=txq_size
)
err_msg = f"Failed to create AVF interface on host {node[u'host']}"
- with PapiSocketExecutor(node) as papi_exec:
- sw_if_index = papi_exec.add(cmd, **args).get_sw_if_index(err_msg)
+
+ # FIXME: Remove once the fw/driver is upgraded.
+ for _ in range(10):
+ with PapiSocketExecutor(node) as papi_exec:
+ try:
+ sw_if_index = papi_exec.add(cmd, **args).get_sw_if_index(
+ err_msg
+ )
+ break
+ except AssertionError:
+ logger.error(err_msg)
+ else:
+ raise AssertionError(err_msg)
InterfaceUtil.add_eth_interface(
node, sw_if_index=sw_if_index, ifc_pfx=u"eth_avf",