Deprecate auth_region option

The auth_region options in the [DEFAULT] configuration section in
glance-api.conf are deprecated, and will be removed in the O release.

Change-Id: Ie50ab3371386691b72e25e1088198c05edb920b6
This commit is contained in:
ZhongShengping 2016-07-05 16:59:37 +08:00
parent 272e1df0ce
commit ef27233788
3 changed files with 16 additions and 12 deletions

View File

@ -66,12 +66,6 @@
# (optional) Type is authorization being used.
# Defaults to 'keystone'
#
# [*auth_region*]
# (optional) The region for the authentication service.
# If "use_user_token" is not in effect and using keystone auth,
# then region name can be specified.
# Defaults to $::os_service_default.
#
# [*auth_uri*]
# (optional) Complete public Identity API endpoint.
# Defaults to 'http://127.0.0.1:5000/'.
@ -266,7 +260,13 @@
# [*verbose*]
# (optional) Deprecated. Rather to log the glance api service at verbose level.
# Default: undef
#
# [*auth_region*]
# (optional) The region for the authentication service.
# If "use_user_token" is not in effect and using keystone auth,
# then region name can be specified.
# Defaults to undef
#
class glance::api(
$keystone_password,
$package_ensure = 'present',
@ -283,7 +283,6 @@ class glance::api(
$scrub_time = $::os_service_default,
$delayed_delete = $::os_service_default,
$auth_type = 'keystone',
$auth_region = $::os_service_default,
$auth_uri = 'http://127.0.0.1:5000/',
$identity_uri = 'http://127.0.0.1:35357/',
$memcached_servers = $::os_service_default,
@ -326,6 +325,7 @@ class glance::api(
# DEPRECATED PARAMETERS
$known_stores = false,
$verbose = undef,
$auth_region = undef,
) inherits glance {
include ::glance::deps
@ -338,6 +338,10 @@ class glance::api(
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
}
if $auth_region {
warning('auth_region is deprecated, has no effect and and will be removed in the O release.')
}
if ( $glance::params::api_package_name != $glance::params::registry_package_name ) {
ensure_packages('glance-api',
{
@ -359,7 +363,6 @@ class glance::api(
'DEFAULT/scrub_time': value => $scrub_time;
'DEFAULT/delayed_delete': value => $delayed_delete;
'DEFAULT/image_cache_dir': value => $image_cache_dir;
'DEFAULT/auth_region': value => $auth_region;
'glance_store/os_region_name': value => $os_region_name;
}

View File

@ -0,0 +1,4 @@
---
deprecations:
- verbose option is now deprecated for removal, the
parameter has no effect.

View File

@ -14,7 +14,6 @@ describe 'glance::api' do
:log_file => '/var/log/glance/api.log',
:log_dir => '/var/log/glance',
:auth_type => 'keystone',
:auth_region => '<SERVICE DEFAULT>',
:enabled => true,
:manage_service => true,
:backlog => '<SERVICE DEFAULT>',
@ -53,7 +52,6 @@ describe 'glance::api' do
:registry_port => '9111',
:registry_client_protocol => 'https',
:auth_type => 'not_keystone',
:auth_region => 'RegionOne2',
:enabled => false,
:backlog => '4095',
:workers => '5',
@ -117,7 +115,6 @@ describe 'glance::api' do
'delayed_delete',
'scrub_time',
'image_cache_dir',
'auth_region'
].each do |config|
is_expected.to contain_glance_api_config("DEFAULT/#{config}").with_value(param_hash[config.intern])
end