Remove deprecated vendordata* params from api/metadata

The deprecated ``vendordata*`` config option has been
removed from api and metadata class.

Change-Id: I87e9c1af1a4b400d3c90c97418050bebde4d4c91
This commit is contained in:
Martin Schuppert 2019-07-02 14:06:54 +02:00
parent 4a425a429f
commit 296b106916
5 changed files with 6 additions and 256 deletions

View File

@ -176,72 +176,6 @@
# (optional) This option is the time (in seconds) to cache metadata.
# Defaults to $::os_service_default
#
# [*vendordata_jsonfile_path*]
# (optional) Represent the path to the data file.
# Cloud providers may store custom data in vendor data file that will then be
# available to the instances via the metadata service, and to the rendering of
# config-drive. The default class for this, JsonFileVendorData, loads this
# information from a JSON file, whose path is configured by this option
# Defaults to undef.
#
# [*vendordata_providers*]
# (optional) vendordata providers are how deployers can provide metadata via
# configdrive and metadata that is specific to their deployment. There are
# currently two supported providers: StaticJSON and DynamicJSON.
# Defaults to undef.
#
# [*vendordata_dynamic_targets*]
# (optional) A list of targets for the dynamic vendordata provider. These
# targets are of the form <name>@<url>.
# Defaults to undef.
#
# [*vendordata_dynamic_connect_timeout*]
# (optional) Maximum wait time for an external REST service to connect.
# Defaults to undef.
#
# [*vendordata_dynamic_read_timeout*]
# (optional) Maximum wait time for an external REST service to return data
# once connected.
# Defaults to undef.
#
# [*vendordata_dynamic_failure_fatal*]
# (optional) Should failures to fetch dynamic vendordata be fatal to
# instance boot?
# Defaults to undef.
#
# [*vendordata_dynamic_auth_auth_type*]
# (optional) Authentication type to load for vendordata dynamic plugins.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_auth_url*]
# (optional) URL to use for authenticating.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_os_region_name*]
# (optional) Region name for the vendordata dynamic plugin credentials.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_password*]
# (optional) Password for the vendordata dynamic plugin credentials.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_project_domain_name*]
# (optional) Project domain name for the vendordata dynamic plugin
# credentials.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_project_name*]
# (optional) Project name for the vendordata dynamic plugin credentials.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_user_domain_name*]
# (optional) User domain name for the vendordata dynamic plugin credentials.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_username*]
# (optional) User name for the vendordata dynamic plugin credentials.
# Defaults to undef.
#
# [*fping_path*]
# (optional) Full path to fping.
# Defaults to undef
@ -285,20 +219,6 @@ class nova::api(
# DEPRECATED PARAMETER
$nova_metadata_wsgi_enabled = false,
$fping_path = undef,
$vendordata_jsonfile_path = undef,
$vendordata_providers = undef,
$vendordata_dynamic_targets = undef,
$vendordata_dynamic_connect_timeout = undef,
$vendordata_dynamic_read_timeout = undef,
$vendordata_dynamic_failure_fatal = undef,
$vendordata_dynamic_auth_auth_type = undef,
$vendordata_dynamic_auth_auth_url = undef,
$vendordata_dynamic_auth_os_region_name = undef,
$vendordata_dynamic_auth_password = undef,
$vendordata_dynamic_auth_project_domain_name = undef,
$vendordata_dynamic_auth_project_name = undef,
$vendordata_dynamic_auth_user_domain_name = undef,
$vendordata_dynamic_auth_username = undef,
) inherits nova::params {
include ::nova::deps
@ -377,26 +297,6 @@ as a standalone service, or httpd for being run by a httpd server")
}
if !$nova_metadata_wsgi_enabled {
if (length(delete_undef_values([$vendordata_jsonfile_path,
$vendordata_providers,
$vendordata_dynamic_targets,
$vendordata_dynamic_connect_timeout,
$vendordata_dynamic_read_timeout,
$vendordata_dynamic_failure_fatal,
$vendordata_dynamic_auth_auth_type,
$vendordata_dynamic_auth_auth_url,
$vendordata_dynamic_auth_os_region_name,
$vendordata_dynamic_auth_password,
$vendordata_dynamic_auth_project_domain_name,
$vendordata_dynamic_auth_project_name,
$vendordata_dynamic_auth_user_domain_name,
$vendordata_dynamic_auth_username])) > 0) {
warning('Vendordata parameters are deprecated in nova::api, nova::vendordata should be used instead.')
}
class { '::nova::vendordata':
vendordata_caller => 'api',
}
nova_config {
'DEFAULT/metadata_workers': value => $metadata_workers;
'DEFAULT/metadata_listen': value => $metadata_listen;

View File

@ -39,72 +39,6 @@
# (optional) A list of apis to enable
# Defaults to undef.
#
# [*vendordata_jsonfile_path*]
# (optional) Represent the path to the data file.
# Cloud providers may store custom data in vendor data file that will then be
# available to the instances via the metadata service, and to the rendering of
# config-drive. The default class for this, JsonFileVendorData, loads this
# information from a JSON file, whose path is configured by this option
# Defaults to undef.
#
# [*vendordata_providers*]
# (optional) vendordata providers are how deployers can provide metadata via
# configdrive and metadata that is specific to their deployment. There are
# currently two supported providers: StaticJSON and DynamicJSON.
# Defaults to undef.
#
# [*vendordata_dynamic_targets*]
# (optional) A list of targets for the dynamic vendordata provider. These
# targets are of the form <name>@<url>.
# Defaults to undef.
#
# [*vendordata_dynamic_connect_timeout*]
# (optional) Maximum wait time for an external REST service to connect.
# Defaults to undef.
#
# [*vendordata_dynamic_read_timeout*]
# (optional) Maximum wait time for an external REST service to return data
# once connected.
# Defaults to undef.
#
# [*vendordata_dynamic_failure_fatal*]
# (optional) Should failures to fetch dynamic vendordata be fatal to
# instance boot?
# Defaults to undef.
#
# [*vendordata_dynamic_auth_auth_type*]
# (optional) Authentication type to load for vendordata dynamic plugins.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_auth_url*]
# (optional) URL to use for authenticating.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_os_region_name*]
# (optional) Region name for the vendordata dynamic plugin credentials.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_password*]
# (optional) Password for the vendordata dynamic plugin credentials.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_project_domain_name*]
# (optional) Project domain name for the vendordata dynamic plugin
# credentials.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_project_name*]
# (optional) Project name for the vendordata dynamic plugin credentials.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_user_domain_name*]
# (optional) User domain name for the vendordata dynamic plugin credentials.
# Defaults to undef.
#
# [*vendordata_dynamic_auth_username*]
# (optional) User name for the vendordata dynamic plugin credentials.
# Defaults to undef.
#
class nova::metadata(
$neutron_metadata_proxy_shared_secret = undef,
$enable_proxy_headers_parsing = $::os_service_default,
@ -113,46 +47,12 @@ class nova::metadata(
$dhcp_domain = $::os_service_default,
# DEPRECATED PARAMETERS
$enabled_apis = undef,
$vendordata_jsonfile_path = undef,
$vendordata_providers = undef,
$vendordata_dynamic_targets = undef,
$vendordata_dynamic_connect_timeout = undef,
$vendordata_dynamic_read_timeout = undef,
$vendordata_dynamic_failure_fatal = undef,
$vendordata_dynamic_auth_auth_type = undef,
$vendordata_dynamic_auth_auth_url = undef,
$vendordata_dynamic_auth_os_region_name = undef,
$vendordata_dynamic_auth_password = undef,
$vendordata_dynamic_auth_project_domain_name = undef,
$vendordata_dynamic_auth_project_name = undef,
$vendordata_dynamic_auth_user_domain_name = undef,
$vendordata_dynamic_auth_username = undef,
) inherits nova::params {
include ::nova::deps
include ::nova::db
include ::nova::keystone::authtoken
if (length(delete_undef_values([$vendordata_jsonfile_path,
$vendordata_providers,
$vendordata_dynamic_targets,
$vendordata_dynamic_connect_timeout,
$vendordata_dynamic_read_timeout,
$vendordata_dynamic_failure_fatal,
$vendordata_dynamic_auth_auth_type,
$vendordata_dynamic_auth_auth_url,
$vendordata_dynamic_auth_os_region_name,
$vendordata_dynamic_auth_password,
$vendordata_dynamic_auth_project_domain_name,
$vendordata_dynamic_auth_project_name,
$vendordata_dynamic_auth_user_domain_name,
$vendordata_dynamic_auth_username])) > 0) {
warning('Vendordata parameters are deprecated in nova::metadata, nova::vendordata should be used instead.')
}
class { '::nova::vendordata':
vendordata_caller => 'metadata',
}
if $enabled_apis != undef {
warning('enabled_apis parameter is deprecated, use nova::compute::enabled_apis instead.')
}

View File

@ -0,0 +1,6 @@
---
deprecations:
- |
The deprecated ``vendordata*`` config option has been
removed from api and metadata class. Use ::nova::vendordata
instead.

View File

@ -98,20 +98,6 @@ describe 'nova::api' do
:enable_instance_password => true,
:password_length => 12,
:allow_resize_to_same_host => true,
:vendordata_jsonfile_path => '/tmp',
:vendordata_providers => ['StaticJSON', 'DynamicJSON'],
:vendordata_dynamic_targets => ['join@http://127.0.0.1:9999/v1/'],
:vendordata_dynamic_connect_timeout => 30,
:vendordata_dynamic_read_timeout => 30,
:vendordata_dynamic_failure_fatal => false,
:vendordata_dynamic_auth_auth_type => 'password',
:vendordata_dynamic_auth_auth_url => 'http://127.0.0.1:5000',
:vendordata_dynamic_auth_os_region_name => 'RegionOne',
:vendordata_dynamic_auth_password => 'secrete',
:vendordata_dynamic_auth_project_domain_name => 'Default',
:vendordata_dynamic_auth_project_name => 'project',
:vendordata_dynamic_auth_user_domain_name => 'Default',
:vendordata_dynamic_auth_username => 'user',
})
end
@ -153,20 +139,6 @@ describe 'nova::api' do
is_expected.to contain_nova_config('api/enable_instance_password').with('value' => true)
is_expected.to contain_nova_config('DEFAULT/password_length').with('value' => '12')
is_expected.to contain_nova_config('DEFAULT/allow_resize_to_same_host').with('value' => true)
is_expected.to contain_nova_config('api/vendordata_jsonfile_path').with('value' => '/tmp')
is_expected.to contain_nova_config('api/vendordata_providers').with('value' => 'StaticJSON,DynamicJSON')
is_expected.to contain_nova_config('api/vendordata_dynamic_targets').with('value' => 'join@http://127.0.0.1:9999/v1/')
is_expected.to contain_nova_config('api/vendordata_dynamic_connect_timeout').with('value' => '30')
is_expected.to contain_nova_config('api/vendordata_dynamic_read_timeout').with('value' => '30')
is_expected.to contain_nova_config('api/vendordata_dynamic_failure_fatal').with('value' => false)
is_expected.to contain_nova_config('vendordata_dynamic_auth/auth_type').with('value' => 'password')
is_expected.to contain_nova_config('vendordata_dynamic_auth/auth_url').with('value' => 'http://127.0.0.1:5000')
is_expected.to contain_nova_config('vendordata_dynamic_auth/os_region_name').with('value' => 'RegionOne')
is_expected.to contain_nova_config('vendordata_dynamic_auth/password').with('value' => 'secrete').with_secret(true)
is_expected.to contain_nova_config('vendordata_dynamic_auth/project_domain_name').with('value' => 'Default')
is_expected.to contain_nova_config('vendordata_dynamic_auth/project_name').with('value' => 'project')
is_expected.to contain_nova_config('vendordata_dynamic_auth/user_domain_name').with('value' => 'Default')
is_expected.to contain_nova_config('vendordata_dynamic_auth/username').with('value' => 'user')
end
end

View File

@ -43,46 +43,18 @@ describe 'nova::metadata' do
:local_metadata_per_cell => true,
:metadata_cache_expiration => 15,
:dhcp_domain => 'foo',
:vendordata_jsonfile_path => '/tmp',
:vendordata_providers => ['StaticJSON', 'DynamicJSON'],
:vendordata_dynamic_targets => ['join@http://127.0.0.1:9999/v1/'],
:vendordata_dynamic_connect_timeout => 30,
:vendordata_dynamic_read_timeout => 30,
:vendordata_dynamic_failure_fatal => false,
:vendordata_dynamic_auth_auth_type => 'password',
:vendordata_dynamic_auth_auth_url => 'http://127.0.0.1:5000',
:vendordata_dynamic_auth_os_region_name => 'RegionOne',
:vendordata_dynamic_auth_password => 'secrete',
:vendordata_dynamic_auth_project_domain_name => 'Default',
:vendordata_dynamic_auth_project_name => 'project',
:vendordata_dynamic_auth_user_domain_name => 'Default',
:vendordata_dynamic_auth_username => 'user',
})
end
it 'configures various stuff' do
is_expected.to contain_nova_config('api/local_metadata_per_cell').with('value' => true)
is_expected.to contain_nova_config('api/metadata_cache_expiration').with('value' => '15')
is_expected.to contain_nova_config('api/vendordata_jsonfile_path').with('value' => '/tmp')
is_expected.to contain_nova_config('api/vendordata_providers').with('value' => 'StaticJSON,DynamicJSON')
is_expected.to contain_nova_config('api/vendordata_dynamic_targets').with('value' => 'join@http://127.0.0.1:9999/v1/')
is_expected.to contain_nova_config('api/vendordata_dynamic_connect_timeout').with('value' => '30')
is_expected.to contain_nova_config('api/vendordata_dynamic_read_timeout').with('value' => '30')
is_expected.to contain_nova_config('api/vendordata_dynamic_failure_fatal').with('value' => false)
is_expected.to contain_nova_config('api/dhcp_domain').with('value' => 'foo')
is_expected.to contain_nova_config('neutron/service_metadata_proxy').with('value' => true)
is_expected.to contain_nova_config('neutron/metadata_proxy_shared_secret').with('value' => 'secrete').with_secret(true)
is_expected.to contain_oslo__middleware('nova_config').with(
:enable_proxy_headers_parsing => true,
)
is_expected.to contain_nova_config('vendordata_dynamic_auth/auth_type').with('value' => 'password')
is_expected.to contain_nova_config('vendordata_dynamic_auth/auth_url').with('value' => 'http://127.0.0.1:5000')
is_expected.to contain_nova_config('vendordata_dynamic_auth/os_region_name').with('value' => 'RegionOne')
is_expected.to contain_nova_config('vendordata_dynamic_auth/password').with('value' => 'secrete').with_secret(true)
is_expected.to contain_nova_config('vendordata_dynamic_auth/project_domain_name').with('value' => 'Default')
is_expected.to contain_nova_config('vendordata_dynamic_auth/project_name').with('value' => 'project')
is_expected.to contain_nova_config('vendordata_dynamic_auth/user_domain_name').with('value' => 'Default')
is_expected.to contain_nova_config('vendordata_dynamic_auth/username').with('value' => 'user')
end
end