-# 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:
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'])