Loading cccli/commands/vm.py +21 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,27 @@ class Command_disablevirtiocache(TqlCommand): def remote_functions(self): return set(("disablevirtiocache",)) class Command_autostart(TqlCommand): '''Set autostart flag on VMs''' def __init__(self, cli, argv0): TqlCommand.__init__(self, cli, argv0) self.tql_filter += "&r=vm" self.add_option("-D", action="store_false", dest="flag", help="Disable" " autostart") self.add_option("-e", default=True, action="store_true", dest="flag", help="Enable autostart") def __call__(self, argv): # arg parse self.parse_args(argv) if len(self.args) != 1: raise cmdBadArgument() # rpc call self.rpccall("autostart", self.args[0], self.options.flag) def remote_functions(self): return set(("autostart",)) class Command_undefine(TqlCommand): '''Undefine a stopped vm''' Loading Loading
cccli/commands/vm.py +21 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,27 @@ class Command_disablevirtiocache(TqlCommand): def remote_functions(self): return set(("disablevirtiocache",)) class Command_autostart(TqlCommand): '''Set autostart flag on VMs''' def __init__(self, cli, argv0): TqlCommand.__init__(self, cli, argv0) self.tql_filter += "&r=vm" self.add_option("-D", action="store_false", dest="flag", help="Disable" " autostart") self.add_option("-e", default=True, action="store_true", dest="flag", help="Enable autostart") def __call__(self, argv): # arg parse self.parse_args(argv) if len(self.args) != 1: raise cmdBadArgument() # rpc call self.rpccall("autostart", self.args[0], self.options.flag) def remote_functions(self): return set(("autostart",)) class Command_undefine(TqlCommand): '''Undefine a stopped vm''' Loading