diff --git a/manifests/api.pp b/manifests/api.pp index 15154774..26d5ab52 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -14,12 +14,6 @@ # http://auth_url:5000/v3 # Defaults to $::os_service_default. # -# [*os_region_name*] -# (optional) Some operations require cinder to make API requests -# to Nova. This sets the keystone region to be used for these -# requests. For example, boot-from-volume. -# Defaults to $::os_service_default -# # [*service_workers*] # (optional) Number of cinder-api workers # Defaults to $::os_workers @@ -125,8 +119,15 @@ # Example of valid value: barbican # Defaults to $::os_service_default # +# DEPRECATED PARAMETERS +# +# [*os_region_name*] +# (optional) Some operations require cinder to make API requests +# to Nova. This sets the keystone region to be used for these +# requests. For example, boot-from-volume. +# Defaults to undef +# class cinder::api ( - $os_region_name = $::os_service_default, $keymgr_encryption_api_url = $::os_service_default, $keymgr_encryption_auth_url = $::os_service_default, $service_workers = $::os_workers, @@ -153,12 +154,19 @@ class cinder::api ( $auth_strategy = 'keystone', $osapi_volume_listen_port = $::os_service_default, $keymgr_backend = $::os_service_default, + # DEPRECATED PARAMETERS + $os_region_name = undef ) inherits cinder::params { include cinder::deps include cinder::params include cinder::policy + if $os_region_name != undef { + warning('cinder::api::os_region_name is deprecated and has no effect. \ +Use cinder::nova::region_name instead') + } + validate_legacy(Boolean, 'validate_bool', $manage_service) validate_legacy(Boolean, 'validate_bool', $enabled) @@ -222,7 +230,6 @@ running as a standalone service, or httpd for being run by a httpd server") cinder_config { 'DEFAULT/osapi_volume_listen': value => $bind_host; 'DEFAULT/osapi_volume_workers': value => $service_workers; - 'DEFAULT/os_region_name': value => $os_region_name; 'DEFAULT/default_volume_type': value => $default_volume_type; 'DEFAULT/public_endpoint': value => $public_endpoint; 'DEFAULT/osapi_volume_base_URL': value => $osapi_volume_base_url; diff --git a/releasenotes/notes/deprecate-cinder-api-os_region_name-812ccb925f867a52.yaml b/releasenotes/notes/deprecate-cinder-api-os_region_name-812ccb925f867a52.yaml new file mode 100644 index 00000000..e287cedc --- /dev/null +++ b/releasenotes/notes/deprecate-cinder-api-os_region_name-812ccb925f867a52.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The cinder::api::os_region_name parameter was deprecated and has no effect. + Use cinder::nova::region_name instead. diff --git a/spec/classes/cinder_api_spec.rb b/spec/classes/cinder_api_spec.rb index f4286a03..5d30cef9 100644 --- a/spec/classes/cinder_api_spec.rb +++ b/spec/classes/cinder_api_spec.rb @@ -30,7 +30,6 @@ describe 'cinder::api' do is_expected.to contain_cinder_config('DEFAULT/public_endpoint').with_value('') is_expected.to contain_cinder_config('DEFAULT/osapi_volume_base_URL').with_value('') is_expected.to contain_cinder_config('DEFAULT/osapi_max_limit').with_value('') - is_expected.to contain_cinder_config('DEFAULT/os_region_name').with_value('') is_expected.to contain_cinder_config('DEFAULT/auth_strategy').with_value('keystone') is_expected.to contain_cinder_config('key_manager/backend').with_value('') is_expected.to contain_cinder_config('barbican/barbican_endpoint').with_value('') @@ -44,17 +43,6 @@ describe 'cinder::api' do end end - context 'with a custom region for nova' do - let :params do - req_params.merge({'os_region_name' => 'MyRegion'}) - end - it 'should configure the region for nova' do - is_expected.to contain_cinder_config('DEFAULT/os_region_name').with( - :value => 'MyRegion' - ) - end - end - context 'with a customized port' do let :params do req_params.merge({'osapi_volume_listen_port' => 9999})