From 97abc79f67cb6eae7bd18e1e19b492f3767ec22f Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Sat, 27 Sep 2008 15:57:52 +0000 Subject: [PATCH] Replace a cfg.AddInstance with UpdateInstance This seems to be the last (deprecated) use of AddInstance in order to update an instance. The patch also removes a whitespace-at-eol case. Reviewed-by: ultrotter --- lib/cmdlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 378aab5cd..6a975263f 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -2373,7 +2373,7 @@ class LUReinstallInstance(LogicalUnit): if self.op.os_type is not None: feedback_fn("Changing OS to '%s'..." % self.op.os_type) inst.os = self.op.os_type - self.cfg.AddInstance(inst) + self.cfg.Update(inst) _StartInstanceDisks(self.cfg, inst, None) try: @@ -3257,7 +3257,7 @@ class LUCreateInstance(LogicalUnit): if len(ial.nodes) != ial.required_nodes: raise errors.OpPrereqError("iallocator '%s' returned invalid number" " of nodes (%s), required %s" % - (self.op.iallocator, len(ial.nodes), + (self.op.iallocator, len(ial.nodes), ial.required_nodes)) self.op.pnode = ial.nodes[0] logger.ToStdout("Selected nodes for the instance: %s" % -- GitLab