container_host can be replaced by physical_host on is_metal

Upgrades broken.
This fix.

Change-Id: I6b881a9657f8860d2cb21e0eb99db6958806e30b
Closes-Bug: #1745382
This commit is contained in:
Jean-Philippe Evrard 2018-01-25 14:24:42 +00:00
parent 7c62a879fc
commit 8a3dfc01fa
1 changed files with 4 additions and 1 deletions

View File

@ -644,7 +644,10 @@ def _add_additional_networks(key, inventory, ip_q, q_name, netmask, interface,
cphg = container.get('physical_host_group')
# user_config data from the container physical host group
phg = user_config[cphg][container_host]
if user_config[cphg].get(container_host) is not None:
phg = user_config[cphg][container_host]
else:
phg = user_config[cphg][physical_host]
network['address'] = phg['ip']
if is_ssh_address is True: