Use constants.VALUE_AUTO for ip comparison too
authorGuido Trotter <ultrotter@google.com>
Mon, 20 Oct 2008 13:44:45 +0000 (13:44 +0000)
committerGuido Trotter <ultrotter@google.com>
Mon, 20 Oct 2008 13:44:45 +0000 (13:44 +0000)
Forward-port-of: r1889, Reviewed-by: imsnah

Reviewed-by: imsnah

lib/cmdlib.py

index 5d59145..3d2ccc8 100644 (file)
@@ -3322,7 +3322,7 @@ class LUCreateInstance(LogicalUnit):
     ip = getattr(self.op, "ip", None)
     if ip is None or ip.lower() == "none":
       inst_ip = None
-    elif ip.lower() == "auto":
+    elif ip.lower() == constants.VALUE_AUTO:
       inst_ip = hostname1.ip
     else:
       if not utils.IsValidIP(ip):