From 4fcdad5ddf2fceff6b8b88dcb639c513be70f88a Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 8 Feb 2020 19:49:54 +0900 Subject: [PATCH] Deprecate glance api parameters related to glance registry Deprecated parameters in glance api which are related to glance registry, because these parameters were already deprecated when glance registry was deperecated in Queens release. Change-Id: I07c6384a4262aeb1823e68840bffb88e3dcfb590 --- manifests/api.pp | 61 ++++++++++++------- ..._registry_parameters-1dcb0f3579fe9a42.yaml | 6 ++ spec/classes/glance_api_spec.rb | 3 - 3 files changed, 44 insertions(+), 26 deletions(-) create mode 100644 releasenotes/notes/deprecate_api_registry_parameters-1dcb0f3579fe9a42.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 24af911d..726a6f64 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -25,18 +25,6 @@ # (optional) Number of Glance API worker processes to start # Default: $::os_workers. # -# [*registry_host*] -# (optional) The address used to connect to the registry service. -# Default: 0.0.0.0 -# -# [*registry_port*] -# (optional) The port of the Glance registry service. -# Default: $::os_service_default. -# -# [*registry_client_protocol*] -# (optional) The protocol of the Glance registry service. -# Default: $::os_service_default. -# # [*scrub_time*] # (optional) The amount of time in seconds to delay before performing a delete. # Defaults to $::os_service_default. @@ -316,15 +304,24 @@ # (optional) Boolean describing if multiple backends will be configured # Defaults to false # +# [*registry_host*] +# (optional) The address used to connect to the registry service. +# Default: undef +# +# [*registry_port*] +# (optional) The port of the Glance registry service. +# Default: undef +# +# [*registry_client_protocol*] +# (optional) The protocol of the Glance registry service. +# Default: undef +# class glance::api( $package_ensure = 'present', $bind_host = $::os_service_default, $bind_port = '9292', $backlog = $::os_service_default, $workers = $::os_workers, - $registry_host = '0.0.0.0', - $registry_port = $::os_service_default, - $registry_client_protocol = $::os_service_default, $scrub_time = $::os_service_default, $delayed_delete = $::os_service_default, $auth_strategy = 'keystone', @@ -385,6 +382,9 @@ class glance::api( $stores = undef, $default_store = undef, $multi_store = false, + $registry_host = undef, + $registry_port = undef, + $registry_client_protocol = undef, ) inherits glance { include glance::deps @@ -569,17 +569,32 @@ enabled_backends instead.') 'inject_metadata_properties/ignore_user_roles': value => $ignore_user_roles_real; } - # configure api service to connect registry service - glance_api_config { - 'DEFAULT/registry_host': value => $registry_host; - 'DEFAULT/registry_port': value => $registry_port; - 'DEFAULT/registry_client_protocol': value => $registry_client_protocol; + if $registry_host { + warning('The registry_host parameter is deprecated, and will be removed in a future release') + glance_api_config { + 'DEFAULT/registry_host': value => $registry_host; + } + glance_cache_config { + 'DEFAULT/registry_host': value => $registry_host; + } } - glance_cache_config { - 'DEFAULT/registry_host': value => $registry_host; - 'DEFAULT/registry_port': value => $registry_port; + if $registry_port { + warning('The registry_port parameter is deprecated, and will be removed in a future release') + glance_api_config { + 'DEFAULT/registry_port': value => $registry_port; + } + glance_cache_config { + 'DEFAULT/registry_port': value => $registry_port; + } + } + + if $registry_client_protocol { + warning('The registry_client_protocol parameter is deprecated, and will be removed in a future release') + glance_api_config { + 'DEFAULT/registry_client_protocol': value => $registry_client_protocol; + } } # Set the pipeline, it is allowed to be blank diff --git a/releasenotes/notes/deprecate_api_registry_parameters-1dcb0f3579fe9a42.yaml b/releasenotes/notes/deprecate_api_registry_parameters-1dcb0f3579fe9a42.yaml new file mode 100644 index 00000000..d5682826 --- /dev/null +++ b/releasenotes/notes/deprecate_api_registry_parameters-1dcb0f3579fe9a42.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + glance::api::registry_host, glance::api::registry_port and + glance::api::registry_client_protocol are deprecated, because + the corresponding parameters were deprecated in glance. diff --git a/spec/classes/glance_api_spec.rb b/spec/classes/glance_api_spec.rb index fdf6b862..c3e1a908 100644 --- a/spec/classes/glance_api_spec.rb +++ b/spec/classes/glance_api_spec.rb @@ -11,9 +11,6 @@ describe 'glance::api' do { :bind_host => '', :bind_port => '9292', - :registry_host => '0.0.0.0', - :registry_port => '', - :registry_client_protocol => '', :auth_strategy => 'keystone', :enabled => true, :manage_service => true,