Handle missing infra_external 51/1551/1
authorEby, Robert (re2429) <re2429@att.com>
Fri, 6 Sep 2019 17:19:37 +0000 (13:19 -0400)
committerEby, Robert (re2429) <re2429@att.com>
Fri, 6 Sep 2019 17:19:37 +0000 (13:19 -0400)
Signed-off-by: Eby, Robert (re2429) <re2429@att.com>
Change-Id: Ic51b273cacb89345081fd1e255e68d140c629cd6

src/remoteinstaller/installer/install.py

index a5c099a..4e0043a 100644 (file)
@@ -180,7 +180,8 @@ class Installer(object):
         pre_allocated_ips = self._uc['hosts'][self._first_controller].get('pre_allocated_ips', None)
         if pre_allocated_ips:
             pre_allocated_infra_external_ip = pre_allocated_ips.get('infra_external', None)
-            self._first_controller_ip = str(IPAddress(pre_allocated_infra_external_ip))
+            if pre_allocated_infra_external_ip:
+                self._first_controller_ip = str(IPAddress(pre_allocated_infra_external_ip))
 
         if not self._first_controller_ip:
             self._first_controller_ip = str(IPAddress(first_ip)+1)