Fix parseyaml and nodes hash lookup
Parseyaml now returns undef instead of false if it cannot parse any values. Now it also accepts a default value, which has been set to {}. Nodes hash is now located inside network_metadata. Change-Id: I2951bf32b9f5c7e660f8bf989bbd0f8643f89d37 Partial-Bug: #1582228 Partial-Bug: #1582230
This commit is contained in:
parent
bfcaa72eea
commit
a785ff52d8
|
@ -14,22 +14,15 @@ if $detach_keystone_plugin {
|
|||
fail('Keystone service endpoint public VIP is not defined')
|
||||
}
|
||||
|
||||
#TODO (holser): Redesign parseyaml and is_bool once [MODULES-2462] applied
|
||||
$settings_hash = parseyaml($detach_keystone_plugin['yaml_additional_config'])
|
||||
$settings_hash = parseyaml($detach_keystone_plugin['yaml_additional_config'], {})
|
||||
|
||||
if is_bool($settings_hash) {
|
||||
$settings_hash_real = {}
|
||||
} else {
|
||||
$settings_hash_real = $settings_hash
|
||||
}
|
||||
|
||||
$keystone_vip = pick($settings_hash_real['remote_keystone'],
|
||||
$keystone_vip = pick($settings_hash['remote_keystone'],
|
||||
$network_metadata['vips']['service_endpoint']['ipaddr'])
|
||||
|
||||
$public_keystone_vip = pick($settings_hash_real['remote_keystone'],
|
||||
$public_keystone_vip = pick($settings_hash['remote_keystone'],
|
||||
$network_metadata['vips']['public_service_endpoint']['ipaddr'])
|
||||
|
||||
$nodes_hash = hiera('nodes')
|
||||
$nodes_hash = $network_metadata['nodes']
|
||||
$keystone_roles = ['primary-standalone-keystone',
|
||||
'standalone-keystone']
|
||||
$keystone_nodes = get_nodes_hash_by_roles($network_metadata,
|
||||
|
|
Loading…
Reference in New Issue