From 0889602611398a76c6d72f1196e51ff77402cad8 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Fri, 19 Jun 2009 14:27:44 +0200 Subject: [PATCH] LUCreateInstance: the node list as return value Currently LUCreateInstance has no result; this patch changes it so that both the normal result and the dry-run result is the node list of the selected instance. Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- lib/cmdlib.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index de16fcc7c..03660c153 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -4863,6 +4863,8 @@ class LUCreateInstance(LogicalUnit): self.be_full[constants.BE_MEMORY], self.op.hypervisor) + self.dry_run_result = list(nodenames) + def Exec(self, feedback_fn): """Create and add the instance to the cluster. @@ -4992,6 +4994,8 @@ class LUCreateInstance(LogicalUnit): result = self.rpc.call_instance_start(pnode_name, iobj, None, None) result.Raise("Could not start instance") + return list(iobj.all_nodes) + class LUConnectConsole(NoHooksLU): """Connect to an instance's console. -- GitLab