From f28222de7c7fb3e8c7bc79783a8c2e47ce9adc56 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 20 Jan 2022 19:03:23 +0900 Subject: [PATCH] Deprecate glance APIs version config options ... following the same deprecation in tempest itself[1]. [1] 6b0b8b718e8e4ed00fe5f108bb7495b968bb6d8d Change-Id: Iac4da3091452589fd4478a6a7125fcfcf8a00939 --- manifests/init.pp | 24 ++++++++++++------- .../deprecate-glance_vN-4853030a03444a13.yaml | 5 ++++ spec/classes/tempest_init_spec.rb | 4 ++-- 3 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 releasenotes/notes/deprecate-glance_vN-4853030a03444a13.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 1a61de6d..d2db1e83 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -32,10 +32,6 @@ # Defaults to undef # [*image_name_alt*] # Defaults to undef -# [*glance_v1*] -# Defaults to false -# [*glance_v2*] -# Defaults to true # [*configure_networks*] # Defaults to true # [*l2gw_switch*] @@ -221,6 +217,10 @@ # Defaults to undef # [*change_password_available*] # Defaults to undef +# [*glance_v1*] +# Defaults to false +# [*glance_v2*] +# Defaults to true # class tempest( $package_ensure = 'present', @@ -243,8 +243,6 @@ class tempest( $configure_images = true, $image_name = undef, $image_name_alt = undef, - $glance_v1 = false, - $glance_v2 = true, # Neutron network config # @@ -361,6 +359,8 @@ class tempest( $panko_available = undef, $keystone_v2 = undef, $change_password_available = undef, + $glance_v1 = undef, + $glance_v2 = undef, ) { if !is_service_default($tempest_roles) and !empty($tempest_roles){ @@ -397,6 +397,14 @@ class tempest( warning('The change_password_available parameter has been deprecated and has no effect') } + if $glance_v1 != undef { + warning('The glance_v1 parameter has been deprecated and will be removed in a future release.') + } + + if $glance_v2 != undef { + warning('The glance_v2 parameter has been deprecated and will be removed in a future release.') + } + include tempest::params include openstacklib::openstackclient @@ -529,8 +537,8 @@ class tempest( 'identity/disable_ssl_certificate_validation': value => $disable_ssl_validation; 'identity-feature-enabled/api_v2': value => pick($keystone_v2, $::os_service_default); 'identity-feature-enabled/api_v3': value => $keystone_v3; - 'image-feature-enabled/api_v1': value => $glance_v1; - 'image-feature-enabled/api_v2': value => $glance_v2; + 'image-feature-enabled/api_v1': value => pick($glance_v1, $::os_service_default); + 'image-feature-enabled/api_v2': value => pick($glance_v2, $::os_service_default); 'l2gw/l2gw_switch': value => $l2gw_switch; 'network-feature-enabled/api_extensions': value => $neutron_api_extensions; 'network/public_network_id': value => $public_network_id; diff --git a/releasenotes/notes/deprecate-glance_vN-4853030a03444a13.yaml b/releasenotes/notes/deprecate-glance_vN-4853030a03444a13.yaml new file mode 100644 index 00000000..7d82ea22 --- /dev/null +++ b/releasenotes/notes/deprecate-glance_vN-4853030a03444a13.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``api_v1`` parameter and the ``api_v2`` parameter of the ``tempest`` + class has been deprecated and will be removed in a future release. diff --git a/spec/classes/tempest_init_spec.rb b/spec/classes/tempest_init_spec.rb index 41910857..e9e277d6 100644 --- a/spec/classes/tempest_init_spec.rb +++ b/spec/classes/tempest_init_spec.rb @@ -235,8 +235,8 @@ describe 'tempest' do is_expected.to contain_tempest_config('identity/disable_ssl_certificate_validation').with(:value => nil) is_expected.to contain_tempest_config('identity-feature-enabled/api_v2').with(:value => '') is_expected.to contain_tempest_config('identity-feature-enabled/api_v3').with(:value => true) - is_expected.to contain_tempest_config('image-feature-enabled/api_v1').with(:value => false) - is_expected.to contain_tempest_config('image-feature-enabled/api_v2').with(:value => true) + is_expected.to contain_tempest_config('image-feature-enabled/api_v1').with(:value => '') + is_expected.to contain_tempest_config('image-feature-enabled/api_v2').with(:value => '') is_expected.to contain_tempest_config('l2gw/l2gw_switch').with(:value => nil) is_expected.to contain_tempest_config('network-feature-enabled/api_extensions').with(:value => nil) is_expected.to contain_tempest_config('network/public_network_id').with(:value => nil)