Loading cloudcontrol/cli/commands/vm.py +36 −0 Original line number Diff line number Diff line Loading @@ -331,6 +331,42 @@ class Command_unrescue(TqlCommand): def remote_functions(self): return set(("unrescue",)) class Command_install(TqlCommand): '''Switch VMs to install mode''' def __init__(self, cli, argv0): TqlCommand.__init__(self, cli, argv0) self.tql_filter += "&r=vm&status=stopped&mode=normal" def __call__(self, argv): # arg parse self.parse_args(argv) if len(self.args) != 1: raise cmdBadArgument() # rpc call self.rpccall("install", self.args[0]) def remote_functions(self): return set(("install",)) class Command_uninstall(TqlCommand): '''Switch VMs back from install mode''' def __init__(self, cli, argv0): TqlCommand.__init__(self, cli, argv0) self.tql_filter += "&r=vm&status=stopped&mode=install" def __call__(self, argv): # arg parse self.parse_args(argv) if len(self.args) != 1: raise cmdBadArgument() # rpc call self.rpccall("uninstall", self.args[0]) def remote_functions(self): return set(("uninstall",)) class Command_title(TqlCommand): '''Set a VM title''' Loading Loading
cloudcontrol/cli/commands/vm.py +36 −0 Original line number Diff line number Diff line Loading @@ -331,6 +331,42 @@ class Command_unrescue(TqlCommand): def remote_functions(self): return set(("unrescue",)) class Command_install(TqlCommand): '''Switch VMs to install mode''' def __init__(self, cli, argv0): TqlCommand.__init__(self, cli, argv0) self.tql_filter += "&r=vm&status=stopped&mode=normal" def __call__(self, argv): # arg parse self.parse_args(argv) if len(self.args) != 1: raise cmdBadArgument() # rpc call self.rpccall("install", self.args[0]) def remote_functions(self): return set(("install",)) class Command_uninstall(TqlCommand): '''Switch VMs back from install mode''' def __init__(self, cli, argv0): TqlCommand.__init__(self, cli, argv0) self.tql_filter += "&r=vm&status=stopped&mode=install" def __call__(self, argv): # arg parse self.parse_args(argv) if len(self.args) != 1: raise cmdBadArgument() # rpc call self.rpccall("uninstall", self.args[0]) def remote_functions(self): return set(("uninstall",)) class Command_title(TqlCommand): '''Set a VM title''' Loading