Skip to content

Commit 6815d9b

Browse files
committed
add @api to a number of functions
1 parent df9f39c commit 6815d9b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/warnet/control.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
COMMANDER_MISSION,
2626
TANK_MISSION,
2727
)
28+
from .hooks import api
2829
from .k8s import (
2930
can_delete_pods,
3031
delete_pod,
@@ -47,6 +48,7 @@
4748

4849
@click.command()
4950
@click.argument("scenario_name", required=False)
51+
@api
5052
def stop(scenario_name):
5153
"""Stop a running scenario or all scenarios"""
5254
active_scenarios = [sc.metadata.name for sc in get_mission("commander")]
@@ -126,6 +128,7 @@ def stop_all_scenarios(scenarios):
126128
help="Skip confirmations",
127129
)
128130
@click.command()
131+
@api
129132
def down(force):
130133
"""Bring down a running warnet quickly"""
131134

@@ -232,6 +235,7 @@ def get_active_network(namespace):
232235
)
233236
@click.argument("additional_args", nargs=-1, type=click.UNPROCESSED)
234237
@click.option("--namespace", default=None, show_default=True)
238+
@api
235239
def run(
236240
scenario_file: str,
237241
debug: bool,

src/warnet/deploy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
NETWORK_FILE,
2323
WARGAMES_NAMESPACE_PREFIX,
2424
)
25+
from .hooks import api
2526
from .k8s import (
2627
get_default_namespace,
2728
get_default_namespace_or,
@@ -56,6 +57,7 @@ def validate_directory(ctx, param, value):
5657
@click.option("--namespace", type=str, help="Specify a namespace in which to deploy the network")
5758
@click.option("--to-all-users", is_flag=True, help="Deploy network to all user namespaces")
5859
@click.argument("unknown_args", nargs=-1)
60+
@api
5961
def deploy(directory, debug, namespace, to_all_users, unknown_args):
6062
"""Deploy a warnet with topology loaded from <directory>"""
6163
if unknown_args:

0 commit comments

Comments
 (0)