Commit 1d563f98 authored by Federico Sismondi's avatar Federico Sismondi

allow <ioppytest_cli download_network_traces> command receive --destination...

allow <ioppytest_cli download_network_traces> command receive --destination option for indicating the destination folder for the pcaps
parent 1fdb8107
......@@ -153,7 +153,8 @@ def exit():
@cli.command()
def download_network_traces():
@click.option('--destination', default=TEMP_DIR, help='Destination directory.', show_default=True)
def download_network_traces(destination):
"""
Downloads all networks traces generated during the session
"""
......@@ -169,8 +170,8 @@ def download_network_traces():
response = _amqp_request(msg, COMPONENT_ID)
if response.ok:
_save_file_from_base64(response.filename, response.value, TEMP_DIR)
_echo_input("downloaded network trace %s , into dir: %s" % (response.filename, TEMP_DIR))
_save_file_from_base64(response.filename, response.value, destination)
_echo_input("downloaded network trace %s , into dir: %s" % (response.filename, destination))
else:
raise Exception(response.error_message)
......
......@@ -5,7 +5,7 @@ from setuptools import setup
MAJOR = 1
MINOR = 2
PATCH = 6
PATCH = 7
VERSION = "{}.{}.{}".format(MAJOR, MINOR, PATCH)
name = 'ioppytest-utils'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment