From e5fedfaa30a09869ed13b1882c0b6031adf7e57a Mon Sep 17 00:00:00 2001 From: Denis Egorenko Date: Mon, 11 Jul 2016 14:31:29 +0300 Subject: [PATCH] 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 --- manifests/glare.pp | 22 ++++++++++++------- ...e_auth_region_option-d13f8194295a1463.yaml | 2 +- spec/classes/glance_glare_spec.rb | 3 --- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/manifests/glare.pp b/manifests/glare.pp index a47e71a7..3ec43349 100644 --- a/manifests/glare.pp +++ b/manifests/glare.pp @@ -29,12 +29,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/'. @@ -114,6 +108,14 @@ # Set to -1 to disable caching completely. # 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( $package_ensure = 'present', $bind_host = '0.0.0.0', @@ -121,7 +123,6 @@ class glance::glare( $backlog = '4096', $workers = $::processorcount, $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, @@ -140,6 +141,8 @@ class glance::glare( $os_region_name = 'RegionOne', $signing_dir = $::os_service_default, $token_cache_time = $::os_service_default, + # DEPRECATED PARAMETERS + $auth_region = $::os_service_default, ) inherits glance { include ::glance::deps @@ -147,6 +150,10 @@ class glance::glare( include ::glance::glare::db 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 ) { ensure_packages('glance-glare', { ensure => $package_ensure, @@ -159,7 +166,6 @@ class glance::glare( 'DEFAULT/bind_port': value => $bind_port; 'DEFAULT/backlog': value => $backlog; 'DEFAULT/workers': value => $workers; - 'DEFAULT/auth_region': value => $auth_region; 'glance_store/os_region_name': value => $os_region_name; } diff --git a/releasenotes/notes/deprecate_auth_region_option-d13f8194295a1463.yaml b/releasenotes/notes/deprecate_auth_region_option-d13f8194295a1463.yaml index ecfc2567..fd3c1127 100644 --- a/releasenotes/notes/deprecate_auth_region_option-d13f8194295a1463.yaml +++ b/releasenotes/notes/deprecate_auth_region_option-d13f8194295a1463.yaml @@ -1,4 +1,4 @@ --- deprecations: - - verbose option is now deprecated for removal, the + - auth_region option is now deprecated for removal, the parameter has no effect. diff --git a/spec/classes/glance_glare_spec.rb b/spec/classes/glance_glare_spec.rb index 97d6c783..1269dbc2 100644 --- a/spec/classes/glance_glare_spec.rb +++ b/spec/classes/glance_glare_spec.rb @@ -7,7 +7,6 @@ describe 'glance::glare' do :bind_host => '0.0.0.0', :bind_port => '9494', :auth_type => 'keystone', - :auth_region => '', :enabled => true, :manage_service => true, :backlog => '4096', @@ -33,7 +32,6 @@ describe 'glance::glare' do :bind_host => '127.0.0.1', :bind_port => '9222', :auth_type => 'not_keystone', - :auth_region => 'RegionOne2', :enabled => false, :backlog => '4095', :workers => '5', @@ -78,7 +76,6 @@ describe 'glance::glare' do [ 'bind_host', 'bind_port', - 'auth_region' ].each do |config| is_expected.to contain_glance_glare_config("DEFAULT/#{config}").with_value(param_hash[config.intern]) end