-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcli.py
59 lines (46 loc) · 1.31 KB
/
cli.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import click
from resources.scenes.jvm_inject import case14, case12, case13, case15
from resources.scenes.resource import case8, case9, case11
from resources.scenes.service_dns import case6, case6_1
from resources.scenes.network_policy import case5
from resources.scenes.service_loss import case3, case4
from resources.scenes.service_slow import case2, case1
from resources.scenes_instance.cloud_instance import *
from spacecapsule.history import list_experiment, show_experiment, undo_experiment
@click.group()
def cli():
pass
@click.command()
def history():
list_experiment()
@click.command()
@click.argument('experiment')
def show(experiment):
show_experiment(experiment)
@click.command()
@click.argument('experiment')
def undo(experiment):
undo_experiment(experiment)
cli.add_command(history)
cli.add_command(show)
cli.add_command(undo)
cli.add_command(case1)
cli.add_command(case2)
cli.add_command(case3)
cli.add_command(case4)
cli.add_command(case5)
cli.add_command(case6)
cli.add_command(case8)
cli.add_command(case9)
cli.add_command(case11)
cli.add_command(case12)
cli.add_command(case13)
cli.add_command(case14)
cli.add_command(case15)
cli.add_command(case1_vm)
cli.add_command(case3_vm)
cli.add_command(case8_vm)
cli.add_command(case13_vm)
cli.add_command(case14_vm)
if __name__ == '__main__':
cli()