Merge "Remove deperecated vendordata_caller parameter"
This commit is contained in:
commit
ba2405400d
@ -70,14 +70,6 @@
|
||||
# (optional) User name for the vendordata dynamic plugin credentials.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# [*vendordata_caller*]
|
||||
# (optional) calling class to be able to consider if we come from
|
||||
# ::nova::metadata or ::nova::api. This is only needed until the backward
|
||||
# compatability in parameters are removed in these classes.
|
||||
# Defaults to undef.
|
||||
#
|
||||
class nova::vendordata(
|
||||
$vendordata_jsonfile_path = $::os_service_default,
|
||||
$vendordata_providers = $::os_service_default,
|
||||
@ -93,93 +85,37 @@ class nova::vendordata(
|
||||
$vendordata_dynamic_auth_project_name = $::os_service_default,
|
||||
$vendordata_dynamic_auth_user_domain_name = 'Default',
|
||||
$vendordata_dynamic_auth_username = $::os_service_default,
|
||||
# DEPRECATED
|
||||
$vendordata_caller = undef,
|
||||
) inherits nova::params {
|
||||
include nova::deps
|
||||
|
||||
# TODO(mschuppert): In order to keep backward compatibility we rely on the
|
||||
# pick function. When vendordata parameters got removed from ::nova::api and
|
||||
# ::nova::metadata, we remove the checkes here.
|
||||
if $vendordata_caller {
|
||||
if ($vendordata_caller == 'metadata') {
|
||||
# lint:ignore:140chars
|
||||
$vendordata_jsonfile_path_real = pick($::nova::metadata::vendordata_jsonfile_path, $vendordata_jsonfile_path)
|
||||
$vendordata_providers_pick = pick($::nova::metadata::vendordata_providers, $vendordata_providers)
|
||||
$vendordata_dynamic_targets_pick = pick($::nova::metadata::vendordata_dynamic_targets, $vendordata_dynamic_targets)
|
||||
$vendordata_dynamic_connect_timeout_real = pick($::nova::metadata::vendordata_dynamic_connect_timeout, $vendordata_dynamic_connect_timeout)
|
||||
$vendordata_dynamic_read_timeout_real = pick($::nova::metadata::vendordata_dynamic_read_timeout, $vendordata_dynamic_read_timeout)
|
||||
$vendordata_dynamic_failure_fatal_real = pick($::nova::metadata::vendordata_dynamic_failure_fatal, $vendordata_dynamic_failure_fatal)
|
||||
$vendordata_dynamic_auth_auth_type_real = pick($::nova::metadata::vendordata_dynamic_auth_auth_type, $vendordata_dynamic_auth_auth_type)
|
||||
$vendordata_dynamic_auth_auth_url_real = pick($::nova::metadata::vendordata_dynamic_auth_auth_url, $vendordata_dynamic_auth_auth_url)
|
||||
$vendordata_dynamic_auth_os_region_name_real = pick($::nova::metadata::vendordata_dynamic_auth_os_region_name, $vendordata_dynamic_auth_os_region_name)
|
||||
$vendordata_dynamic_auth_password_real = pick($::nova::metadata::vendordata_dynamic_auth_password, $vendordata_dynamic_auth_password)
|
||||
$vendordata_dynamic_auth_project_domain_name_real = pick($::nova::metadata::vendordata_dynamic_auth_project_domain_name, $vendordata_dynamic_auth_project_domain_name)
|
||||
$vendordata_dynamic_auth_project_name_real = pick($::nova::metadata::vendordata_dynamic_auth_project_name, $vendordata_dynamic_auth_project_name)
|
||||
$vendordata_dynamic_auth_user_domain_name_real = pick($::nova::metadata::vendordata_dynamic_auth_user_domain_name, $vendordata_dynamic_auth_user_domain_name)
|
||||
$vendordata_dynamic_auth_username_real = pick($::nova::metadata::vendordata_dynamic_auth_username, $vendordata_dynamic_auth_username)
|
||||
} elsif ($vendordata_caller == 'api') {
|
||||
$vendordata_jsonfile_path_real = pick($::nova::api::vendordata_jsonfile_path, $vendordata_jsonfile_path)
|
||||
$vendordata_providers_pick = pick($::nova::api::vendordata_providers, $vendordata_providers)
|
||||
$vendordata_dynamic_targets_pick = pick($::nova::api::vendordata_dynamic_targets, $vendordata_dynamic_targets)
|
||||
$vendordata_dynamic_connect_timeout_real = pick($::nova::api::vendordata_dynamic_connect_timeout, $vendordata_dynamic_connect_timeout)
|
||||
$vendordata_dynamic_read_timeout_real = pick($::nova::api::vendordata_dynamic_read_timeout, $vendordata_dynamic_read_timeout)
|
||||
$vendordata_dynamic_failure_fatal_real = pick($::nova::api::vendordata_dynamic_failure_fatal, $vendordata_dynamic_failure_fatal)
|
||||
$vendordata_dynamic_auth_auth_type_real = pick($::nova::api::vendordata_dynamic_auth_auth_type, $vendordata_dynamic_auth_auth_type)
|
||||
$vendordata_dynamic_auth_auth_url_real = pick($::nova::api::vendordata_dynamic_auth_auth_url, $vendordata_dynamic_auth_auth_url)
|
||||
$vendordata_dynamic_auth_os_region_name_real = pick($::nova::api::vendordata_dynamic_auth_os_region_name, $vendordata_dynamic_auth_os_region_name)
|
||||
$vendordata_dynamic_auth_password_real = pick($::nova::api::vendordata_dynamic_auth_password, $vendordata_dynamic_auth_password)
|
||||
$vendordata_dynamic_auth_project_domain_name_real = pick($::nova::api::vendordata_dynamic_auth_project_domain_name, $vendordata_dynamic_auth_project_domain_name)
|
||||
$vendordata_dynamic_auth_project_name_real = pick($::nova::api::vendordata_dynamic_auth_project_name, $vendordata_dynamic_auth_project_name)
|
||||
$vendordata_dynamic_auth_user_domain_name_real = pick($::nova::api::vendordata_dynamic_auth_user_domain_name, $vendordata_dynamic_auth_user_domain_name)
|
||||
$vendordata_dynamic_auth_username_real = pick($::nova::api::vendordata_dynamic_auth_username, $vendordata_dynamic_auth_username)
|
||||
# lint:endignore
|
||||
}
|
||||
} else {
|
||||
$vendordata_jsonfile_path_real = $vendordata_jsonfile_path
|
||||
$vendordata_providers_pick = $vendordata_providers
|
||||
$vendordata_dynamic_targets_pick = $vendordata_dynamic_targets
|
||||
$vendordata_dynamic_connect_timeout_real = $vendordata_dynamic_connect_timeout
|
||||
$vendordata_dynamic_read_timeout_real = $vendordata_dynamic_read_timeout
|
||||
$vendordata_dynamic_failure_fatal_real = $vendordata_dynamic_failure_fatal
|
||||
$vendordata_dynamic_auth_auth_type_real = $vendordata_dynamic_auth_auth_type
|
||||
$vendordata_dynamic_auth_auth_url_real = $vendordata_dynamic_auth_auth_url
|
||||
$vendordata_dynamic_auth_os_region_name_real = $vendordata_dynamic_auth_os_region_name
|
||||
$vendordata_dynamic_auth_password_real = $vendordata_dynamic_auth_password
|
||||
$vendordata_dynamic_auth_project_domain_name_real = $vendordata_dynamic_auth_project_domain_name
|
||||
$vendordata_dynamic_auth_project_name_real = $vendordata_dynamic_auth_project_name
|
||||
$vendordata_dynamic_auth_user_domain_name_real = $vendordata_dynamic_auth_user_domain_name
|
||||
$vendordata_dynamic_auth_username_real = $vendordata_dynamic_auth_username
|
||||
}
|
||||
|
||||
if !is_service_default($vendordata_providers_pick) and !empty($vendordata_providers_pick){
|
||||
validate_legacy(Array, 'validate_array', $vendordata_providers_pick)
|
||||
$vendordata_providers_real = join($vendordata_providers_pick, ',')
|
||||
if !is_service_default($vendordata_providers) and !empty($vendordata_providers){
|
||||
validate_legacy(Array, 'validate_array', $vendordata_providers)
|
||||
$vendordata_providers_real = join($vendordata_providers, ',')
|
||||
} else {
|
||||
$vendordata_providers_real = $::os_service_default
|
||||
}
|
||||
|
||||
if !is_service_default($vendordata_dynamic_targets_pick) and !empty($vendordata_dynamic_targets_pick){
|
||||
validate_legacy(Array, 'validate_array', $vendordata_dynamic_targets_pick)
|
||||
$vendordata_dynamic_targets_real = join($vendordata_dynamic_targets_pick, ',')
|
||||
if !is_service_default($vendordata_dynamic_targets) and !empty($vendordata_dynamic_targets){
|
||||
validate_legacy(Array, 'validate_array', $vendordata_dynamic_targets)
|
||||
$vendordata_dynamic_targets_real = join($vendordata_dynamic_targets, ',')
|
||||
} else {
|
||||
$vendordata_dynamic_targets_real = $::os_service_default
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'api/vendordata_jsonfile_path': value => $vendordata_jsonfile_path_real;
|
||||
'api/vendordata_jsonfile_path': value => $vendordata_jsonfile_path;
|
||||
'api/vendordata_providers': value => $vendordata_providers_real;
|
||||
'api/vendordata_dynamic_targets': value => $vendordata_dynamic_targets_real;
|
||||
'api/vendordata_dynamic_connect_timeout': value => $vendordata_dynamic_connect_timeout_real;
|
||||
'api/vendordata_dynamic_read_timeout': value => $vendordata_dynamic_read_timeout_real;
|
||||
'api/vendordata_dynamic_failure_fatal': value => $vendordata_dynamic_failure_fatal_real;
|
||||
'vendordata_dynamic_auth/auth_type': value => $vendordata_dynamic_auth_auth_type_real;
|
||||
'vendordata_dynamic_auth/auth_url': value => $vendordata_dynamic_auth_auth_url_real;
|
||||
'vendordata_dynamic_auth/os_region_name': value => $vendordata_dynamic_auth_os_region_name_real;
|
||||
'vendordata_dynamic_auth/password': value => $vendordata_dynamic_auth_password_real, secret => true;
|
||||
'vendordata_dynamic_auth/project_domain_name': value => $vendordata_dynamic_auth_project_domain_name_real;
|
||||
'vendordata_dynamic_auth/project_name': value => $vendordata_dynamic_auth_project_name_real;
|
||||
'vendordata_dynamic_auth/user_domain_name': value => $vendordata_dynamic_auth_user_domain_name_real;
|
||||
'vendordata_dynamic_auth/username': value => $vendordata_dynamic_auth_username_real;
|
||||
'api/vendordata_dynamic_connect_timeout': value => $vendordata_dynamic_connect_timeout;
|
||||
'api/vendordata_dynamic_read_timeout': value => $vendordata_dynamic_read_timeout;
|
||||
'api/vendordata_dynamic_failure_fatal': value => $vendordata_dynamic_failure_fatal;
|
||||
'vendordata_dynamic_auth/auth_type': value => $vendordata_dynamic_auth_auth_type;
|
||||
'vendordata_dynamic_auth/auth_url': value => $vendordata_dynamic_auth_auth_url;
|
||||
'vendordata_dynamic_auth/os_region_name': value => $vendordata_dynamic_auth_os_region_name;
|
||||
'vendordata_dynamic_auth/password': value => $vendordata_dynamic_auth_password, secret => true;
|
||||
'vendordata_dynamic_auth/project_domain_name': value => $vendordata_dynamic_auth_project_domain_name;
|
||||
'vendordata_dynamic_auth/project_name': value => $vendordata_dynamic_auth_project_name;
|
||||
'vendordata_dynamic_auth/user_domain_name': value => $vendordata_dynamic_auth_user_domain_name;
|
||||
'vendordata_dynamic_auth/username': value => $vendordata_dynamic_auth_username;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The deprecated ``nova::vendordata::vendordata_caller`` parameter has been
|
||||
removed.
|
Loading…
Reference in New Issue
Block a user