Deprecate unused image_service parameter

As we have already started using python-glanceclient
instead of old glance client, deprecating unused
image_service parameter in nova.conf

The image_service parameter was removed from nova in
change Iea6db7898328a9060fb88586e042efbc0a4351fc

Change-Id: I9b80bf263695d34232056ca8b950eff7e5267ee7
(cherry picked from commit b9bb76c089)
This commit is contained in:
Rajesh Tailor 2018-08-17 12:30:14 +05:30
parent ce0efbe4c7
commit f6262fa5e3
4 changed files with 24 additions and 20 deletions

View File

@ -50,7 +50,6 @@ class { 'nova':
database_connection => 'mysql://nova:a_big_secret@127.0.0.1/nova?charset=utf8',
rabbit_userid => 'nova',
rabbit_password => 'an_even_bigger_secret',
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => 'localhost:9292',
rabbit_host => '127.0.0.1',
}
@ -79,12 +78,12 @@ nova is a combination of Puppet manifest and ruby code to delivery configuration
The `nova_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/nova/nova.conf` file.
```puppet
nova_config { 'DEFAULT/image_service' :
value => nova.image.glance.GlanceImageService,
nova_config { 'DEFAULT/glance_api_servers' :
value => 'http://localhost:9292',
}
```
This will write `image_service=nova.image.glance.GlanceImageService` in the `[DEFAULT]` section.
This will write 'http://localhost:9292' in the `[DEFAULT]` section.
##### name

View File

@ -73,10 +73,6 @@
# option.
# Defaults to $::os_service_default
#
# [*image_service*]
# (optional) Service used to search for and retrieve images.
# Defaults to 'nova.image.glance.GlanceImageService'
#
# [*glance_api_servers*]
# (optional) List of addresses for api servers.
# Defaults to 'http://localhost:9292'
@ -443,6 +439,10 @@
# (optional) Set log output to debug output.
# Defaults to undef
#
# [*image_service*]
# (optional) Service used to search for and retrieve images.
# Defaults to undef
#
class nova(
$ensure_package = 'present',
$database_connection = undef,
@ -462,7 +462,6 @@ class nova(
$default_transport_url = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$control_exchange = $::os_service_default,
$image_service = 'nova.image.glance.GlanceImageService',
# these glance params should be optional
# this should probably just be configured as a glance client
$glance_api_servers = 'http://localhost:9292',
@ -543,6 +542,7 @@ class nova(
$log_facility = undef,
$log_dir = undef,
$debug = undef,
$image_service = undef,
) inherits nova::params {
include ::nova::deps
@ -569,6 +569,11 @@ nova::notify_on_api_faults instead.')
}
$notify_on_api_faults_real = pick($notify_api_faults, $notify_on_api_faults)
if $image_service {
warning('The unused image_service parameter is deprecated, as we are \
already using python-glanceclient instead of old glance client.')
}
if $use_ssl {
if !$cert_file {
fail('The cert_file parameter is required when use_ssl is set to true')
@ -653,10 +658,8 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
purge => $purge_config,
}
if $image_service == 'nova.image.glance.GlanceImageService' {
if $glance_api_servers {
nova_config { 'glance/api_servers': value => $glance_api_servers }
}
if $glance_api_servers {
nova_config { 'glance/api_servers': value => $glance_api_servers }
}
nova_config {
@ -665,7 +668,6 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
'DEFAULT/key': value => $key;
'DEFAULT/my_ip': value => $my_ip;
'api/auth_strategy': value => $auth_strategy;
'DEFAULT/image_service': value => $image_service;
'DEFAULT/host': value => $host;
'DEFAULT/cpu_allocation_ratio': value => $cpu_allocation_ratio;
'DEFAULT/ram_allocation_ratio': value => $ram_allocation_ratio;

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The image_service parameter is deprecated, as we are already using
python-glanceclient instead of old glance client.

View File

@ -31,8 +31,7 @@ describe 'nova' do
:refreshonly => true
)}
it 'configures image service' do
is_expected.to contain_nova_config('DEFAULT/image_service').with_value('nova.image.glance.GlanceImageService')
it 'configures glance api servers' do
is_expected.to contain_nova_config('glance/api_servers').with_value('http://localhost:9292')
end
@ -78,7 +77,7 @@ describe 'nova' do
let :params do
{
:image_service => 'nova.image.local.LocalImageService',
:glance_api_servers => 'http://localhost:9292',
:default_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:rpc_response_timeout => '30',
:control_exchange => 'nova',
@ -129,9 +128,8 @@ describe 'nova' do
})
end
it 'configures image service' do
is_expected.to contain_nova_config('DEFAULT/image_service').with_value('nova.image.local.LocalImageService')
is_expected.to_not contain_nova_config('glance/api_servers')
it 'configures glance api servers' do
is_expected.to contain_nova_config('glance/api_servers')
end
it 'configures auth_strategy' do