Skip to content
Snippets Groups Projects
Commit 31dd6b06 authored by Seblu's avatar Seblu
Browse files

update tql in vm command

parent d0eb1cf1
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ class VmCommand(OptionCommand):
self.printer.out("%sid:%s%s%s"%(color["green"],color["yellow"],obj["id"],color["reset"]))
self.printer.out("%sCount: %s%s"%(color["green"],color["reset"], len(objs)))
# be sure boby want do that
if not options.force:
if not options.noask:
self.printer.out("%sProceed?%s"%(color["lred"], color["reset"]))
if self.printer.ask("Answer (yes/NO): ") != "yes":
raise cmdWarning("Aborted")
......@@ -77,38 +77,38 @@ class VmCommand(OptionCommand):
class Command_start(VmCommand):
'''Start a stopped vm'''
def __call__(self, argv):
self._vm_action(argv, "&role=vm&status=stopped")
self._vm_action(argv, "&r=vm&status=stopped")
class Command_stop(VmCommand):
'''Stop a running vm'''
def __call__(self, argv):
self._vm_action(argv, "&role=vm&status=running")
self._vm_action(argv, "&r=vm&status=running")
class Command_destroy(VmCommand):
'''Force a vm to stop'''
def __call__(self, argv):
self._vm_action(argv, "&role=vm&status!=stopped")
self._vm_action(argv, "&r=vm&status!=stopped")
class Command_restart(VmCommand):
'''Restart a vm'''
def __call__(self, argv):
self._vm_action(argv, "&role=vm&status=running")
self._vm_action(argv, "&r=vm")
class Command_pause(VmCommand):
'''Pause a running vm'''
def __call__(self, argv):
self._vm_action(argv, "&role=vm&status=running")
self._vm_action(argv, "&r=vm&status=running")
class Command_resume(VmCommand):
'''Resume a paused vm'''
def __call__(self, argv):
self._vm_action(argv, "&role=vm&status=stalled")
self._vm_action(argv, "&r=vm&status=paused")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment