From 5ca156ee8d10e64d0c864867b1ad23335ae37db4 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 11 Mar 2021 10:46:45 +0900 Subject: [PATCH] Deprecate the install_cinder_client parameter Nowadays the python-cinderclient package is supposed to be installed automatically when nova packages are installed because of package dependencies, thus we don't need to install it explicitly. Change-Id: Ic3b764ede243923be631a97da95ba9f2f2f6111b --- manifests/api.pp | 15 +++++++-------- metadata.json | 4 ---- ...te-install_cinder_client-9b5bc4f9f0ab416e.yaml | 5 +++++ spec/classes/nova_api_spec.rb | 10 ---------- 4 files changed, 12 insertions(+), 22 deletions(-) create mode 100644 releasenotes/notes/deprecate-install_cinder_client-9b5bc4f9f0ab416e.yaml diff --git a/manifests/api.pp b/manifests/api.pp index a351f789c..298f6ca90 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -162,10 +162,6 @@ # (optional) Length of generated instance admin passwords (integer value) # Defaults to $::os_service_default # -# [*install_cinder_client*] -# (optional) Whether the cinder::client class should be used to install the cinder client. -# Defaults to true -# # [*allow_resize_to_same_host*] # (optional) Allow destination machine to match source for resize. # Defaults to false @@ -178,6 +174,10 @@ # metadata handling from api class. # Defaults to false # +# [*install_cinder_client*] +# (optional) Whether the cinder::client class should be used to install the cinder client. +# Defaults to undef +# class nova::api( $enabled = true, $manage_service = true, @@ -212,10 +212,10 @@ class nova::api( $enable_network_quota = $::os_service_default, $enable_instance_password = $::os_service_default, $password_length = $::os_service_default, - $install_cinder_client = true, $allow_resize_to_same_host = false, # DEPRECATED PARAMETER $nova_metadata_wsgi_enabled = false, + $install_cinder_client = undef, ) inherits nova::params { include nova::deps @@ -229,9 +229,8 @@ class nova::api( warning('Running nova metadata api via evenlet is deprecated and will be removed in Stein release.') } - if $install_cinder_client { - include cinder::client - Class['cinder::client'] ~> Nova::Generic_service['api'] + if $install_cinder_client != undef { + warning('The nova::api::install_cinder_client parameter is deprecated and has no effect') } if $instance_name_template { diff --git a/metadata.json b/metadata.json index 8f6478bb6..dcb944d31 100644 --- a/metadata.json +++ b/metadata.json @@ -9,10 +9,6 @@ "name": "joshuabaird/ipaclient", "version_requirement": ">=2.5.1" }, - { - "name": "openstack/cinder", - "version_requirement": ">=18.3.0 <19.0.0" - }, { "name": "puppetlabs/inifile", "version_requirement": ">=2.0.0 <3.0.0" diff --git a/releasenotes/notes/deprecate-install_cinder_client-9b5bc4f9f0ab416e.yaml b/releasenotes/notes/deprecate-install_cinder_client-9b5bc4f9f0ab416e.yaml new file mode 100644 index 000000000..0d2d1a4c8 --- /dev/null +++ b/releasenotes/notes/deprecate-install_cinder_client-9b5bc4f9f0ab416e.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``nova::api::install_cinder_client`` parameter has been deprecated and + has no effect. This parameter will be removed in a future release. diff --git a/spec/classes/nova_api_spec.rb b/spec/classes/nova_api_spec.rb index 06ffe6d2d..99aa64e04 100644 --- a/spec/classes/nova_api_spec.rb +++ b/spec/classes/nova_api_spec.rb @@ -19,7 +19,6 @@ describe 'nova::api' do context 'with default parameters' do it { is_expected.to contain_class('nova::keystone::authtoken') } - it { is_expected.to contain_class('cinder::client').that_notifies('Nova::Generic_service[api]') } it 'installs nova-api package and service' do is_expected.to contain_service('nova-api').with( @@ -301,15 +300,6 @@ describe 'nova::api' do end - context 'when disabling cinder client installation' do - before do - params.merge!({ :install_cinder_client => false }) - end - - it { is_expected.to_not contain_class('cinder::client') } - end - - context 'when service_name is not valid' do before do params.merge!({ :service_name => 'foobar' })