diff --git a/cloudcontrol/cli/commands/vm.py b/cloudcontrol/cli/commands/vm.py index bbee789952fab8d695589121f1ae7def36622785..630483772f9838a8942b7b732325da5fe21974e2 100644 --- a/cloudcontrol/cli/commands/vm.py +++ b/cloudcontrol/cli/commands/vm.py @@ -300,3 +300,23 @@ class Command_unrescue(TqlCommand): def remote_functions(self): return set(("unrescue",)) + +class Command_title(TqlCommand): + '''Set a vm title''' + + def __init__(self, cli, argv0): + TqlCommand.__init__(self, cli, argv0) + self.set_usage("%prog [options] ") + self.tql_filter += "&r=vm" + self.remove_option("--direct") + + def __call__(self, argv): + # arg parse + self.parse_args(argv) + if len(self.args) != 2: + raise cmdBadArgument() + # rpc call + self.rpccall("title", self.args[0], self.args[1], _direct=True) + + def remote_functions(self): + return set(("title",))