From c9e79c84cb04f4ad796fcd2c068d2e0b762a6500 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 23 Jan 2024 15:18:08 +0900 Subject: [PATCH] Deprecate support for [DEFAULT] location_strategy ... because the option was deprecated in glance. Depneds-on: https://review.opendev.org/c/openstack/glance/+/906317 Change-Id: I44a7ecf52972c88f1ca6b41236f4757e0fcff3f8 --- manifests/api.pp | 16 ++++++++++------ ...ecate-location_strategy-0d9471feb6daab5e.yaml | 4 ++++ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/deprecate-location_strategy-0d9471feb6daab5e.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 90240fab..0ab1810a 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -95,10 +95,6 @@ # (optional) Expose image location to trusted clients. # Defaults to $facts['os_service_default']. # -# [*location_strategy*] -# (optional) Strategy used to determine the image location order. -# Defaults to $facts['os_service_default']. -# # [*purge_config*] # (optional) Whether to set only the specified config options # in the api config. @@ -266,6 +262,10 @@ # service name removed. # Defaults to undef # +# [*location_strategy*] +# (optional) Strategy used to determine the image location order. +# Defaults to undef +# class glance::api( $package_ensure = 'present', $bind_host = $facts['os_service_default'], @@ -280,7 +280,6 @@ class glance::api( Boolean $enabled = true, $service_name = $::glance::params::api_service_name, $show_image_direct_url = $facts['os_service_default'], - $location_strategy = $facts['os_service_default'], Boolean $purge_config = false, $enforce_secure_rbac = $facts['os_service_default'], $use_keystone_limits = $facts['os_service_default'], @@ -325,6 +324,7 @@ class glance::api( $filesystem_store_metadata_file = undef, $filesystem_store_file_perm = undef, Optional[String] $pipeline = undef, + $location_strategy = undef, ) inherits glance { include glance::deps @@ -338,6 +338,10 @@ class glance::api( } } + if $location_strategy != undef { + warning('The location_strategy parameter was deprecated and will be removed.') + } + if $sync_db { include glance::db::sync include glance::db::metadefs @@ -365,7 +369,7 @@ class glance::api( 'DEFAULT/backlog': value => $backlog; 'DEFAULT/workers': value => $workers; 'DEFAULT/show_image_direct_url': value => $show_image_direct_url; - 'DEFAULT/location_strategy': value => $location_strategy; + 'DEFAULT/location_strategy': value => pick($location_strategy, $facts['os_service_default']); 'DEFAULT/delayed_delete': value => $delayed_delete; 'DEFAULT/enforce_secure_rbac': value => $enforce_secure_rbac; 'DEFAULT/use_keystone_limits': value => $use_keystone_limits; diff --git a/releasenotes/notes/deprecate-location_strategy-0d9471feb6daab5e.yaml b/releasenotes/notes/deprecate-location_strategy-0d9471feb6daab5e.yaml new file mode 100644 index 00000000..7450172c --- /dev/null +++ b/releasenotes/notes/deprecate-location_strategy-0d9471feb6daab5e.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - | + The ``glance::api::location_strategy`` parameter has been deprecated.