aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/InterfaceUtil.py
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2019-10-03 19:42:34 +0200
committerJan Gelety <jgelety@cisco.com>2019-10-04 09:27:51 +0000
commit3691bd34143ff6e725c3be5cfee7d2539f84169f (patch)
treebf7bc5a635aad10894952bf904576c44fe4bc042 /resources/libraries/python/InterfaceUtil.py
parentae3d6241590b521cfec350dfa73c78f043466938 (diff)
FIX: use int of sw_if_index in call of sw_interface_set_flags api
- it will avoid situation that corresponding port is not up and its sw_if_index value in topology file is None that is interpreted as 0 in vpp api so it set flag for local0 interface Change-Id: I9145077d787ddde50a29bcd4091035e95077f946 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/InterfaceUtil.py')
-rw-r--r--resources/libraries/python/InterfaceUtil.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index b25e70bd6e..1d1d669556 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -193,7 +193,7 @@ class InterfaceUtil(object):
err_msg = 'Failed to set interface state on host {host}'.format(
host=node['host'])
args = dict(
- sw_if_index=sw_if_index,
+ sw_if_index=int(sw_if_index),
flags=flags)
with PapiSocketExecutor(node) as papi_exec:
papi_exec.add(cmd, **args).get_reply(err_msg)