- with PapiExecutor(node) as papi_exec:
- papi_resp = papi_exec.add(cmd, **args).execute_should_pass(err_msg)
-
- papi_if_dump = papi_resp.reply[0]['api_reply']
-
- if_data = list()
- for item in papi_if_dump:
- data = item[cmd_reply]
- data['interface_name'] = data['interface_name'].rstrip('\x00')
- data['tag'] = data['tag'].rstrip('\x00')
- data['l2_address'] = str(':'.join(binascii.hexlify(
- data['l2_address'])[i:i + 2] for i in range(0, 12, 2)).
- decode('ascii'))
- if_data.append(data)
- # TODO: return only base data
- logger.trace('Interface data of host {host}:\n{if_data}'.format(
- host=node['host'], if_data=if_data))
-
- @staticmethod
- def vpp_show_crypto_device_mapping(node):
- """Run "show crypto device mapping" CLI command.
+ with PapiSocketExecutor(node) as papi_exec:
+ details = papi_exec.add(cmd, **args).get_details(err_msg)