Merge "Replace deprecated is_string/is_array/is_hash method"
This commit is contained in:
commit
60644b3911
|
@ -85,11 +85,9 @@ class tripleo::fencing(
|
|||
|
||||
# check if the devices: section in fence.yaml contains levels.
|
||||
# if it doesn't, assume level=1 and build a hash with the content.
|
||||
if is_array($content) {
|
||||
$all_levels = {'level1' => $content}
|
||||
}
|
||||
else {
|
||||
$all_levels = $content
|
||||
$all_levels = $content ? {
|
||||
Array => {'level1' => $content},
|
||||
default => $content
|
||||
}
|
||||
|
||||
# collect the number of stonith levels currently defined for this system
|
||||
|
|
|
@ -67,10 +67,10 @@ class tripleo::profile::base::ironic_inspector (
|
|||
$sync_db = false
|
||||
}
|
||||
|
||||
if is_hash($inspection_subnets) {
|
||||
$inspection_subnets_real = $inspection_subnets[$::hostname]
|
||||
} elsif is_array($inspection_subnets) {
|
||||
$inspection_subnets_real = $inspection_subnets
|
||||
$inspection_subnets_real = $inspection_subnets ? {
|
||||
Hash => $inspection_subnets[$::hostname],
|
||||
Array => $inspection_subnets,
|
||||
default => undef
|
||||
}
|
||||
|
||||
if $step >= 4 or ($step >= 3 and $sync_db) {
|
||||
|
|
|
@ -218,7 +218,7 @@ class tripleo::profile::pacemaker::cinder::backup_bundle (
|
|||
}
|
||||
}
|
||||
|
||||
if is_hash($docker_environment) {
|
||||
if $docker_environment =~ Hash {
|
||||
$docker_env = join($docker_environment.map |$index, $value| { "-e ${index}=${value}" }, ' ')
|
||||
} else {
|
||||
$docker_env_arr = delete(any2array($docker_environment), '').flatten()
|
||||
|
|
|
@ -219,7 +219,7 @@ class tripleo::profile::pacemaker::cinder::volume_bundle (
|
|||
}
|
||||
}
|
||||
|
||||
if is_hash($docker_environment) {
|
||||
if $docker_environment =~ Hash {
|
||||
$docker_env = join($docker_environment.map |$index, $value| { "-e ${index}=${value}" }, ' ')
|
||||
} else {
|
||||
$docker_env_arr = delete(any2array($docker_environment), '').flatten()
|
||||
|
|
|
@ -253,11 +253,7 @@ class tripleo::profile::pacemaker::database::mysql_bundle (
|
|||
}
|
||||
}
|
||||
|
||||
if is_array($galera_node_names_lookup) {
|
||||
$galera_nodes = join($galera_fqdns_names_lookup, ',')
|
||||
} else {
|
||||
$galera_nodes = $galera_node_names_lookup
|
||||
}
|
||||
$galera_nodes = join(any2array($galera_fqdns_names_lookup), ',')
|
||||
$galera_nodes_array = split($galera_nodes, ',')
|
||||
$galera_nodes_count = count($galera_nodes_array)
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ class tripleo::profile::pacemaker::manila::share_bundle (
|
|||
$storage_maps = merge($default_storage_maps, $extra_storage_maps)
|
||||
}
|
||||
|
||||
if is_hash($docker_environment) {
|
||||
if $docker_environment =~ Hash {
|
||||
$docker_env = join($docker_environment.map |$index, $value| { "-e ${index}=${value}" }, ' ')
|
||||
} else {
|
||||
$docker_env_arr = delete(any2array($docker_environment), '').flatten()
|
||||
|
|
Loading…
Reference in New Issue