Fix network environment validation
Network environment validation fails when accessing value with the key 'os_net_config' from the nic-config files. Fix the dictionary keys needed to fetch the network config from nic_data. Signed-off-by: Yadnesh Kulkarni <ykulkarn@redhat.com> Change-Id: I2ec628dd9c9cf14c0cd9d8ba30f53ac18efe115f
This commit is contained in:
parent
fd01851257
commit
930abb12b3
|
@ -46,7 +46,9 @@ class TestValidateOvercloudNetenv(fakes.TestValidateOvercloudNetenv):
|
||||||
'OsNetConfigImpl': {
|
'OsNetConfigImpl': {
|
||||||
'properties': {
|
'properties': {
|
||||||
'config': {
|
'config': {
|
||||||
'os_net_config': {
|
'str_replace': {
|
||||||
|
'params': {
|
||||||
|
'$network_config': {
|
||||||
'network_config': bridges,
|
'network_config': bridges,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,6 +56,8 @@ class TestValidateOvercloudNetenv(fakes.TestValidateOvercloudNetenv):
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
tmp = tempfile.NamedTemporaryFile(mode='w', delete=False)
|
tmp = tempfile.NamedTemporaryFile(mode='w', delete=False)
|
||||||
yaml.dump(nic_config, tmp)
|
yaml.dump(nic_config, tmp)
|
||||||
tmp.close()
|
tmp.close()
|
||||||
|
|
|
@ -175,7 +175,7 @@ class ValidateOvercloudNetenv(command.Command):
|
||||||
# no bonds.
|
# no bonds.
|
||||||
for item in nic_data['resources']:
|
for item in nic_data['resources']:
|
||||||
bridges = nic_data['resources'][item]['properties']['config'][
|
bridges = nic_data['resources'][item]['properties']['config'][
|
||||||
'os_net_config']['network_config']
|
'str_replace']['params']['$network_config']['network_config']
|
||||||
for bridge in bridges:
|
for bridge in bridges:
|
||||||
if bridge['type'] == 'ovs_bridge':
|
if bridge['type'] == 'ovs_bridge':
|
||||||
bond_count = 0
|
bond_count = 0
|
||||||
|
|
Loading…
Reference in New Issue