aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/InterfaceUtil.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python/InterfaceUtil.py')
-rw-r--r--resources/libraries/python/InterfaceUtil.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 939d8083dc..a1a9b739e0 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 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:
@@ -1644,8 +1644,9 @@ class InterfaceUtil(object):
cmd=cmd, host=node['host'])
with PapiExecutor(node) as papi_exec:
for ifc in node['interfaces'].values():
- papi_exec.add(cmd, sw_if_index=ifc['vpp_sw_index'])
- papi_resp = papi_exec.execute_should_pass(err_msg)
+ if ifc['vpp_sw_index'] is not None:
+ papi_exec.add(cmd, sw_if_index=ifc['vpp_sw_index'])
+ papi_resp = papi_exec.get_dump(err_msg)
thr_mapping = [s[cmd_reply] for r in papi_resp.reply
for s in r['api_reply']]
return sorted(thr_mapping, key=lambda k: k['sw_if_index'])