Deprecate auth_region option for Glare

Patch Ie50ab3371386691b72e25e1088198c05edb920b6 is missed deprecation
for Glare service, so this patch fix it.

Also fix typo in release note.

Change-Id: If6292e518d1ccd7b83072c99cff1e76078753218
This commit is contained in:
Denis Egorenko 2016-07-11 14:31:29 +03:00
parent e2c322095a
commit e5fedfaa30
3 changed files with 15 additions and 12 deletions

View File

@ -29,12 +29,6 @@
# (optional) Type is authorization being used. # (optional) Type is authorization being used.
# Defaults to 'keystone' # 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*] # [*auth_uri*]
# (optional) Complete public Identity API endpoint. # (optional) Complete public Identity API endpoint.
# Defaults to 'http://127.0.0.1:5000/'. # Defaults to 'http://127.0.0.1:5000/'.
@ -114,6 +108,14 @@
# Set to -1 to disable caching completely. # Set to -1 to disable caching completely.
# Defaults to $::os_service_default. # Defaults to $::os_service_default.
# #
# == DEPRECATED PARAMETERS
#
# [*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.
#
class glance::glare( class glance::glare(
$package_ensure = 'present', $package_ensure = 'present',
$bind_host = '0.0.0.0', $bind_host = '0.0.0.0',
@ -121,7 +123,6 @@ class glance::glare(
$backlog = '4096', $backlog = '4096',
$workers = $::processorcount, $workers = $::processorcount,
$auth_type = 'keystone', $auth_type = 'keystone',
$auth_region = $::os_service_default,
$auth_uri = 'http://127.0.0.1:5000/', $auth_uri = 'http://127.0.0.1:5000/',
$identity_uri = 'http://127.0.0.1:35357/', $identity_uri = 'http://127.0.0.1:35357/',
$memcached_servers = $::os_service_default, $memcached_servers = $::os_service_default,
@ -140,6 +141,8 @@ class glance::glare(
$os_region_name = 'RegionOne', $os_region_name = 'RegionOne',
$signing_dir = $::os_service_default, $signing_dir = $::os_service_default,
$token_cache_time = $::os_service_default, $token_cache_time = $::os_service_default,
# DEPRECATED PARAMETERS
$auth_region = $::os_service_default,
) inherits glance { ) inherits glance {
include ::glance::deps include ::glance::deps
@ -147,6 +150,10 @@ class glance::glare(
include ::glance::glare::db include ::glance::glare::db
include ::glance::glare::logging include ::glance::glare::logging
if $auth_region {
warning('auth_region is deprecated, has no effect and and will be removed in the O release.')
}
if ( $glance::params::glare_package_name != $glance::params::registry_package_name ) { if ( $glance::params::glare_package_name != $glance::params::registry_package_name ) {
ensure_packages('glance-glare', { ensure_packages('glance-glare', {
ensure => $package_ensure, ensure => $package_ensure,
@ -159,7 +166,6 @@ class glance::glare(
'DEFAULT/bind_port': value => $bind_port; 'DEFAULT/bind_port': value => $bind_port;
'DEFAULT/backlog': value => $backlog; 'DEFAULT/backlog': value => $backlog;
'DEFAULT/workers': value => $workers; 'DEFAULT/workers': value => $workers;
'DEFAULT/auth_region': value => $auth_region;
'glance_store/os_region_name': value => $os_region_name; 'glance_store/os_region_name': value => $os_region_name;
} }

View File

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

View File

@ -7,7 +7,6 @@ describe 'glance::glare' do
:bind_host => '0.0.0.0', :bind_host => '0.0.0.0',
:bind_port => '9494', :bind_port => '9494',
:auth_type => 'keystone', :auth_type => 'keystone',
:auth_region => '<SERVICE DEFAULT>',
:enabled => true, :enabled => true,
:manage_service => true, :manage_service => true,
:backlog => '4096', :backlog => '4096',
@ -33,7 +32,6 @@ describe 'glance::glare' do
:bind_host => '127.0.0.1', :bind_host => '127.0.0.1',
:bind_port => '9222', :bind_port => '9222',
:auth_type => 'not_keystone', :auth_type => 'not_keystone',
:auth_region => 'RegionOne2',
:enabled => false, :enabled => false,
:backlog => '4095', :backlog => '4095',
:workers => '5', :workers => '5',
@ -78,7 +76,6 @@ describe 'glance::glare' do
[ [
'bind_host', 'bind_host',
'bind_port', 'bind_port',
'auth_region'
].each do |config| ].each do |config|
is_expected.to contain_glance_glare_config("DEFAULT/#{config}").with_value(param_hash[config.intern]) is_expected.to contain_glance_glare_config("DEFAULT/#{config}").with_value(param_hash[config.intern])
end end