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:
parent
7c19259cda
commit
5d25320367
|
@ -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
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
@ -463,6 +459,10 @@
|
|||
# zmq (for zeromq)
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*image_service*]
|
||||
# (optional) Service used to search for and retrieve images.
|
||||
# Defaults to undef
|
||||
#
|
||||
class nova(
|
||||
$ensure_package = 'present',
|
||||
$database_connection = undef,
|
||||
|
@ -482,7 +482,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',
|
||||
|
@ -568,6 +567,7 @@ class nova(
|
|||
$rabbit_userid = $::os_service_default,
|
||||
$rabbit_virtual_host = $::os_service_default,
|
||||
$rpc_backend = $::os_service_default,
|
||||
$image_service = undef,
|
||||
) inherits nova::params {
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -594,6 +594,11 @@ nova::rpc_backend are deprecated. Please use nova::default_transport_url \
|
|||
instead.")
|
||||
}
|
||||
|
||||
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')
|
||||
|
@ -677,10 +682,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 {
|
||||
|
@ -689,7 +692,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;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
deprecations:
|
||||
- |
|
||||
The image_service parameter is deprecated, as we are already using
|
||||
python-glanceclient instead of old glance client.
|
|
@ -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
|
||||
|
||||
|
@ -80,9 +79,8 @@ describe 'nova' do
|
|||
context 'with overridden parameters' do
|
||||
|
||||
let :params do
|
||||
{ :debug => true,
|
||||
:log_dir => '/var/log/nova2',
|
||||
: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',
|
||||
|
@ -136,9 +134,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
|
||||
|
|
Loading…
Reference in New Issue