From c97e42f67d1bff59237fe76f4dbb4d29aa0bc874 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 8 Feb 2020 19:57:23 +0900 Subject: [PATCH] Deprecate glance::api::show_multiple_locations ... because the corresponding parameter in glance, api/show_multiple_locations was deperecated since Newton release.[1] [1] dbfc121072dff4981532b068bb210f9c73c7b98c Change-Id: Ia4a88b5f1b64436ea5937551b8fc99644c051e5c --- manifests/api.pp | 20 ++++++++++++------- ...w_multiple_locations-376b35e39779cf79.yaml | 5 +++++ spec/classes/glance_api_spec.rb | 1 - 3 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/deprecate_api_show_multiple_locations-376b35e39779cf79.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 726a6f64..6243ca5b 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -108,11 +108,6 @@ # (optional) Expose image location to trusted clients. # Defaults to $::os_service_default. # -# [*show_multiple_locations*] -# (optional) Whether to include the backend image locations in image -# properties. -# Defaults to $::os_service_default. -# # [*filesystem_store_metadata_file*] # (optional) The path to a file which contains the metadata to be returned # with any location associated with the filesystem store @@ -316,6 +311,11 @@ # (optional) The protocol of the Glance registry service. # Default: undef # +# [*show_multiple_locations*] +# (optional) Whether to include the backend image locations in image +# properties. +# Defaults to undef +# class glance::api( $package_ensure = 'present', $bind_host = $::os_service_default, @@ -329,7 +329,6 @@ class glance::api( $manage_service = true, $enabled = true, $show_image_direct_url = $::os_service_default, - $show_multiple_locations = $::os_service_default, $filesystem_store_metadata_file = $::os_service_default, $filesystem_store_file_perm = $::os_service_default, $location_strategy = $::os_service_default, @@ -385,6 +384,7 @@ class glance::api( $registry_host = undef, $registry_port = undef, $registry_client_protocol = undef, + $show_multiple_locations = undef, ) inherits glance { include glance::deps @@ -419,7 +419,6 @@ class glance::api( 'DEFAULT/backlog': value => $backlog; 'DEFAULT/workers': value => $workers; 'DEFAULT/show_image_direct_url': value => $show_image_direct_url; - 'DEFAULT/show_multiple_locations': value => $show_multiple_locations; 'DEFAULT/location_strategy': value => $location_strategy; 'DEFAULT/scrub_time': value => $scrub_time; 'DEFAULT/delayed_delete': value => $delayed_delete; @@ -436,6 +435,13 @@ class glance::api( 'glance_store/os_region_name': value => $os_region_name; } + if $show_multiple_locations { + warning('The show_multiple_locations parameter is deprecated, and will be removed in a future release') + glance_api_config { + 'DEFAULT/show_multiple_locations': value => $show_multiple_locations; + } + } + # task/taskflow_executor config. glance_api_config { 'task/task_time_to_live': value => $task_time_to_live; diff --git a/releasenotes/notes/deprecate_api_show_multiple_locations-376b35e39779cf79.yaml b/releasenotes/notes/deprecate_api_show_multiple_locations-376b35e39779cf79.yaml new file mode 100644 index 00000000..bd64f7df --- /dev/null +++ b/releasenotes/notes/deprecate_api_show_multiple_locations-376b35e39779cf79.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + glance::api::show_multiple_locations was deprecated because the + corresponging parameter ins glance was deprecated. diff --git a/spec/classes/glance_api_spec.rb b/spec/classes/glance_api_spec.rb index c3e1a908..5529fafa 100644 --- a/spec/classes/glance_api_spec.rb +++ b/spec/classes/glance_api_spec.rb @@ -17,7 +17,6 @@ describe 'glance::api' do :backlog => '', :workers => '7', :show_image_direct_url => '', - :show_multiple_locations => '', :filesystem_store_metadata_file => '', :filesystem_store_file_perm => '', :location_strategy => '',