From c7d3eddf1c229c56061fa6cd3186950f4faa486f Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Mon, 26 Sep 2016 14:32:36 +0800 Subject: [PATCH] Deprecate backup_topic option The backup_topic parameter is deprecated, has no effect and will be removed in future release. Change-Id: I6904b1d05a0b185c493d415436ac77c84fbc9271 --- manifests/backup.pp | 19 ++++++++++++------- ..._backup_topic_option-1832f8a9d21285ae.yaml | 3 +++ spec/classes/cinder_backup_spec.rb | 2 -- 3 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/deprecate_backup_topic_option-1832f8a9d21285ae.yaml diff --git a/manifests/backup.pp b/manifests/backup.pp index 92ee235f..516667cd 100644 --- a/manifests/backup.pp +++ b/manifests/backup.pp @@ -16,10 +16,6 @@ # (Optional) Ensure state for package. # Defaults to 'present'. # -# [*backup_topic*] -# (optional) The topic volume backup nodes listen on. -# Defaults to $::os_service_default -# # [*backup_manager*] # (optional) Full class name for the Manager for volume backup. # Defaults to $::os_service_default @@ -32,6 +28,12 @@ # (optional) Template string to be used to generate backup names. # Defaults to $::os_service_default # +# DEPRECATED PARAMETERS +# +# [*backup_topic*] +# (optional) The topic volume backup nodes listen on. +# Defaults to undef +# # === Author(s) # # Emilien Macchi @@ -52,15 +54,15 @@ # License for the specific language governing permissions and limitations # under the License. # -# class cinder::backup ( $enabled = true, $manage_service = true, $package_ensure = 'present', - $backup_topic = $::os_service_default, $backup_manager = $::os_service_default, $backup_api_class = $::os_service_default, $backup_name_template = $::os_service_default, + #DEPRECATED PARAMETERS + $backup_topic = undef, ) { include ::cinder::deps @@ -93,8 +95,11 @@ class cinder::backup ( tag => 'cinder-service', } + if $backup_topic { + warning('The backup_topic parameter is deprecated, has no effect and will be removed in future release.') + } + cinder_config { - 'DEFAULT/backup_topic': value => $backup_topic; 'DEFAULT/backup_manager': value => $backup_manager; 'DEFAULT/backup_api_class': value => $backup_api_class; 'DEFAULT/backup_name_template': value => $backup_name_template; diff --git a/releasenotes/notes/deprecate_backup_topic_option-1832f8a9d21285ae.yaml b/releasenotes/notes/deprecate_backup_topic_option-1832f8a9d21285ae.yaml new file mode 100644 index 00000000..b0da99b2 --- /dev/null +++ b/releasenotes/notes/deprecate_backup_topic_option-1832f8a9d21285ae.yaml @@ -0,0 +1,3 @@ +--- +deprecations: + - The backup_topic parameter is deprecated. diff --git a/spec/classes/cinder_backup_spec.rb b/spec/classes/cinder_backup_spec.rb index 481a3562..c8aae4ec 100644 --- a/spec/classes/cinder_backup_spec.rb +++ b/spec/classes/cinder_backup_spec.rb @@ -25,7 +25,6 @@ describe 'cinder::backup' do let :default_params do { :enable => true, :manage_service => true, - :backup_topic => '', :backup_manager => '', :backup_api_class => '', :backup_name_template => '' } @@ -60,7 +59,6 @@ describe 'cinder::backup' do end it 'configures cinder.conf' do - is_expected.to contain_cinder_config('DEFAULT/backup_topic').with_value(p[:backup_topic]) is_expected.to contain_cinder_config('DEFAULT/backup_manager').with_value(p[:backup_manager]) is_expected.to contain_cinder_config('DEFAULT/backup_api_class').with_value(p[:backup_api_class]) is_expected.to contain_cinder_config('DEFAULT/backup_name_template').with_value(p[:backup_name_template])