Commit 8bfcf8aa authored by Anael Beutot's avatar Anael Beutot Committed by Sébastien Luttringer
Browse files

Added pause option to start command

If specified, the matched VMs will be started in pause state.
parent ac9b7168
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ class Command_start(TqlCommand):
    def __init__(self, cli, argv0):
        TqlCommand.__init__(self, cli, argv0)
        self.tql_filter += "&r=vm&status=stopped"
        self.add_option('-p', '--pause', action='store_true', dest='pause',
                        default=False, help='Start VM in pause state')

    def __call__(self, argv):
        # arg parse
@@ -37,7 +39,7 @@ class Command_start(TqlCommand):
        if len(self.args) != 1:
            raise cmdBadArgument()
        # rpc call
        self.rpccall("start", self.args[0])
        self.rpccall("start", self.args[0], self.options.pause)

    def remote_functions(self):
        return set(("start",))