Skip to content
Snippets Groups Projects
Commit 9c0256b5 authored by Sébastien Luttringer's avatar Sébastien Luttringer
Browse files

Add cycle command

parent 8d3637e3
No related branches found
No related tags found
No related merge requests found
......@@ -138,6 +138,23 @@ class Command_reset(TqlCommand):
def remote_functions(self):
return set(("reset",))
class Command_cycle(TqlCommand):
'''Destroy and start a running vm'''
def __init__(self, cli, argv0):
TqlCommand.__init__(self, cli, argv0)
self.tql_filter += "&r=vm&status=running"
def __call__(self, argv):
# arg parse
self.parse_args(argv)
if len(self.args) != 1:
raise cmdBadArgument()
# rpc call
self.rpccall("cycle", self.args[0])
def remote_functions(self):
return set(("cycle",))
class Command_disablevirtiocache(TqlCommand):
'''Set virtio cache to none on VMs disk devices'''
......
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