Use Update in SetInstanceParams
authorGuido Trotter <ultrotter@google.com>
Tue, 22 Jul 2008 14:25:21 +0000 (14:25 +0000)
committerGuido Trotter <ultrotter@google.com>
Tue, 22 Jul 2008 14:25:21 +0000 (14:25 +0000)
When we set the instance params we're not adding a new instance, but
just updating an existing one, so why using AddInstance?

Reviewed-by: iustinp

lib/cmdlib.py

index ca7ff68..35093f4 100644 (file)
@@ -4284,7 +4284,7 @@ class LUSetInstanceParams(LogicalUnit):
       instance.vnc_bind_address = self.vnc_bind_address
       result.append(("vnc_bind_address", self.vnc_bind_address))
 
-    self.cfg.AddInstance(instance)
+    self.cfg.Update(instance)
 
     return result