Fix preflight validation
When using net-config-override, objects can exist without a 'name' key. The validation fails with KeyError: 'name'. This change only considers objects with 'name' key present. Change-Id: I77a30b13e4459ed3dae64a23b128433639eec5b4
This commit is contained in:
parent
5db8184186
commit
1362b900f9
|
@ -311,7 +311,8 @@ def _validate_no_ip_change():
|
|||
with open(os_net_config_file) as f:
|
||||
network_config = json.loads(f.read())
|
||||
ctlplane = [i for i in network_config.get('network_config', [])
|
||||
if i['name'] == 'br-ctlplane'][0]
|
||||
if i.get('name') == 'br-ctlplane'][0]
|
||||
|
||||
except ValueError:
|
||||
# File was empty
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue