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

add command undefine

parent e4fe4f4c
No related branches found
No related tags found
No related merge requests found
......@@ -86,3 +86,20 @@ class Command_resume(TqlCommand):
raise cmdBadArgument()
# rpc call
self.rpccall("resume", self.args[0])
class Command_undefine(TqlCommand):
'''Undefine a stopped vm'''
def __init__(self, cli, argv0):
TqlCommand.__init__(self, cli, argv0)
self.tql_filter += "&r=vm&status=stopped"
self.add_option("-c", "--clean", action="store_true", dest="clean", default=False,
help="Remove storage")
def __call__(self, argv):
# arg parse
self.parse_args(argv)
if len(self.args) != 1:
raise cmdBadArgument()
# rpc call
self.rpccall("undefine", self.args[0], self.options.clean)
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