Mentions légales du service

Skip to content
Snippets Groups Projects
Commit d5a61f37 authored by BADTS Thomas's avatar BADTS Thomas
Browse files

cli helper function

parent e518949d
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,16 @@ def e2c_artifacts(func):
)(func)
def e2c_app_conf(func):
return click.option(
"--app_conf",
type=str,
default="",
callback=parse_comma_list,
help="Application configurations separated by comma.",
)(func)
class E2clabGroup(click.Group):
"""Subclass of click.Group to display pretty ascii art in helper"""
......@@ -130,13 +140,7 @@ def cli(debug: bool, mute_enoslib: bool, mute_ansible: bool):
callback=parse_comma_list,
help="Scenario names separated by comma.",
)
@click.option(
"--app_conf",
type=str,
default="",
callback=parse_comma_list,
help="Application configurations separated by comma.",
)
@e2c_app_conf
@click.option(
"--repeat", default=0, type=int, help="Number of times to repeat the experiment."
)
......@@ -221,13 +225,7 @@ def network(scenario_dir: Path):
@click.argument(
"task", required=True, type=click.Choice(WORKFLOW_TASKS, case_sensitive=False)
)
@click.option(
"--app_conf",
type=str,
default="",
callback=parse_comma_list,
help="App configurations separated by comma",
)
@e2c_app_conf
@click.option(
"--finalize",
is_flag=True,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment