break vm_action into vm.start() and vm.stop() and image.list() -> image._list()
This commit is contained in:
parent
61d1633599
commit
5e543fa2aa
4 changed files with 17 additions and 6 deletions
|
|
@ -35,14 +35,23 @@ def create(name, realm, seed, specs, image_uuid):
|
|||
print(load_dump_pretty(r.content))
|
||||
|
||||
|
||||
@vm.command("action")
|
||||
@vm.command("start")
|
||||
@click.option("--name", envvar="OTP_NAME", required=True)
|
||||
@click.option("--realm", envvar="OTP_REALM", required=True)
|
||||
@click.option("--seed", envvar="OTP_SEED", required=True)
|
||||
@click.option("--uuid", required=True)
|
||||
@click.option("--command", required=True)
|
||||
def vm_action(name, realm, seed, uuid, command):
|
||||
r = vm_command(command, OTPCredentials(name, realm, seed), uuid)
|
||||
def start(name, realm, seed, uuid):
|
||||
r = vm_command("start", OTPCredentials(name, realm, seed), uuid)
|
||||
print(load_dump_pretty(r.content))
|
||||
|
||||
|
||||
@vm.command("stop")
|
||||
@click.option("--name", envvar="OTP_NAME", required=True)
|
||||
@click.option("--realm", envvar="OTP_REALM", required=True)
|
||||
@click.option("--seed", envvar="OTP_SEED", required=True)
|
||||
@click.option("--uuid", required=True)
|
||||
def stop(name, realm, seed, uuid):
|
||||
r = vm_command("stop", OTPCredentials(name, realm, seed), uuid)
|
||||
print(load_dump_pretty(r.content))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue