diff --git a/manifests/api.pp b/manifests/api.pp index 0682bb37..2d4cc6ef 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -8,12 +8,6 @@ # (optional) Type of authentication to be used. # Defaults to 'keystone' # -# [*os_region_name*] -# (optional) Some operations require manila to make API requests -# to Nova. This sets the keystone region to be used for these -# requests. For example, boot-from-share. -# Defaults to undef. -# # [*package_ensure*] # (optional) The state of the package # Defaults to present @@ -66,9 +60,14 @@ # (optional) DEPRECATED. The manila api port # Defaults to undef # +# [*os_region_name*] +# (optional) Some operations require manila to make API requests +# to Nova. This sets the keystone region to be used for these +# requests. For example, boot-from-share. +# Defaults to undef. +# class manila::api ( $auth_strategy = 'keystone', - $os_region_name = undef, $package_ensure = 'present', $bind_host = '0.0.0.0', $default_share_type = $::os_service_default, @@ -82,6 +81,7 @@ class manila::api ( $service_workers = $::os_workers, # Deprecated $service_port = undef, + $os_region_name = undef, ) { include ::manila::deps @@ -92,6 +92,10 @@ class manila::api ( warning('service port is deprecated and will be removed in a future release') } + if $os_region_name { + warning('The os_region_name option is deprecated and will be removed in a future release') + } + if $::manila::params::api_package { package { 'manila-api': ensure => $package_ensure, @@ -133,12 +137,6 @@ class manila::api ( enable_proxy_headers_parsing => $enable_proxy_headers_parsing, } - if $os_region_name { - manila_config { - 'DEFAULT/os_region_name': value => $os_region_name; - } - } - if $auth_strategy == 'keystone' { manila_config { 'DEFAULT/auth_strategy': value => $auth_strategy; diff --git a/releasenotes/notes/deprecate-os-region-name-a8713ef980135d13.yaml b/releasenotes/notes/deprecate-os-region-name-a8713ef980135d13.yaml new file mode 100644 index 00000000..9cb4a10b --- /dev/null +++ b/releasenotes/notes/deprecate-os-region-name-a8713ef980135d13.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The configuration option "os_region_name" from the [DEFAULT] is + deprecated and will be removed in a future release. diff --git a/spec/classes/manila_api_spec.rb b/spec/classes/manila_api_spec.rb index ff0ce3e8..5d5f8cd9 100644 --- a/spec/classes/manila_api_spec.rb +++ b/spec/classes/manila_api_spec.rb @@ -30,7 +30,6 @@ describe 'manila::api' do is_expected.to contain_manila_config('DEFAULT/auth_strategy').with(:value => 'keystone') is_expected.to contain_manila_config('DEFAULT/osapi_share_listen').with(:value => '0.0.0.0') is_expected.to contain_manila_config('DEFAULT/enabled_share_protocols').with(:value => '') - is_expected.to_not contain_manila_config('DEFAULT/os_region_name') is_expected.to contain_manila_config('oslo_middleware/enable_proxy_headers_parsing').with_value('') is_expected.to contain_manila_config('DEFAULT/default_share_type').with(:value => '') is_expected.to contain_manila_config('DEFAULT/osapi_share_workers').with(:value => '2') @@ -41,17 +40,6 @@ describe 'manila::api' do end end - describe '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_manila_config('DEFAULT/os_region_name').with( - :value => 'MyRegion' - ) - end - end - describe 'with a default share type' do let :params do req_params.merge({'default_share_type' => 'default'})