# 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:
# 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:
with VatTerminal(node, json_param=False) as vat:
vat.vat_terminal_exec_cmd_from_template(
'memif_socket_filename_add_del.vat',
add_del='add', id=sid, filename='/tmp/'+filename)
vat.vat_terminal_exec_cmd_from_template(
with VatTerminal(node, json_param=False) as vat:
vat.vat_terminal_exec_cmd_from_template(
'memif_socket_filename_add_del.vat',
add_del='add', id=sid, filename='/tmp/'+filename)
vat.vat_terminal_exec_cmd_from_template(
- 'memif_create.vat', id=mid, socket=sid, rxq=rxq, txq=txq,
+ 'memif_create.vat', id=mid, socket=sid, rx_q=rx_q, tx_q=tx_q,
memif_data = memif_data.replace(garbage, '')
for line in memif_data.splitlines():
memif_data = memif_data.replace(garbage, '')
for line in memif_data.splitlines():
for item in memif_data:
if memif_data[item]['sw_if_index'] == str(sw_if_idx):
return memif_data[item].get('mac', None)
for item in memif_data:
if memif_data[item]['sw_if_index'] == str(sw_if_idx):
return memif_data[item].get('mac', None)
for item in memif_data:
if memif_data[item]['sw_if_index'] == str(sw_if_idx):
return memif_data[item].get('socket', None)
for item in memif_data:
if memif_data[item]['sw_if_index'] == str(sw_if_idx):
return memif_data[item].get('socket', None)
for item in memif_data:
if memif_data[item]['sw_if_index'] == str(sw_if_idx):
return int(memif_data[item].get('id', None))
for item in memif_data:
if memif_data[item]['sw_if_index'] == str(sw_if_idx):
return int(memif_data[item].get('id', None))
for item in memif_data:
if memif_data[item]['sw_if_index'] == str(sw_if_idx):
return memif_data[item].get('role', None)
for item in memif_data:
if memif_data[item]['sw_if_index'] == str(sw_if_idx):
return memif_data[item].get('role', None)