Remove non-existing options

Those options are long gone are not relevant anymore.

Change-Id: I2b48d23006e38f56f04456b4556374bf0fcdb14a
This commit is contained in:
Julien Danjou 2017-02-02 21:48:07 +01:00
parent e7dc746107
commit f580416d46
3 changed files with 35 additions and 23 deletions

View File

@ -10,18 +10,6 @@
# (optional) Whether the service should be managed by Puppet.
# Defaults to true.
#
# [*host*]
# (optional) The gnocchi api bind address.
# Defaults to 0.0.0.0
#
# [*port*]
# (optional) The gnocchi api port.
# Defaults to 8041
#
# [*workers*]
# (optional) Number of workers for Gnocchi API server.
# Defaults to $::os_workers
#
# [*max_limit*]
# (optional) The maximum number of items returned in a
# single response from a collection resource.
@ -54,23 +42,50 @@
# HTTPProxyToWSGI middleware.
# Defaults to $::os_service_default.
#
# DEPRECATED PARAMETERS
#
# [*host*]
# (optional) The gnocchi api bind address.
# Defaults to $::os_service_default
#
# [*port*]
# (optional) The gnocchi api port.
# Defaults to $::os_service_default
#
# [*workers*]
# (optional) Number of workers for Gnocchi API server.
# Defaults to $::os_service_default
#
class gnocchi::api (
$manage_service = true,
$enabled = true,
$package_ensure = 'present',
$host = '0.0.0.0',
$port = '8041',
$workers = $::os_workers,
$max_limit = 1000,
$service_name = $::gnocchi::params::api_service_name,
$sync_db = false,
$auth_strategy = 'keystone',
$enable_proxy_headers_parsing = $::os_service_default,
# DEPRECATED
$host = $::os_service_default,
$port = $::os_service_default,
$workers = $::os_service_default,
) inherits gnocchi::params {
include ::gnocchi::deps
include ::gnocchi::policy
if !is_service_default($host) {
warning('host is deprecated')
}
if !is_service_default($port) {
warning('port is deprecated')
}
if !is_service_default($workers) {
warning('workers is deprecated')
}
package { 'gnocchi-api':
ensure => $package_ensure,
name => $::gnocchi::params::api_package_name,
@ -116,9 +131,6 @@ standalone service, or httpd for being run by a httpd server")
}
gnocchi_config {
'api/host': value => $host;
'api/port': value => $port;
'api/workers': value => $workers;
'api/max_limit': value => $max_limit;
'api/auth_mode': value => $auth_strategy;
}

View File

@ -0,0 +1,5 @@
---
deprecations:
- The Gnocchi API options host, port and workers are deprecated. These
options have been removed in the Gnocchi project so they have no effect
whatsoever.

View File

@ -14,9 +14,7 @@ describe 'gnocchi::api' do
{ :enabled => true,
:manage_service => true,
:package_ensure => 'latest',
:port => '8041',
:max_limit => '1000',
:host => '0.0.0.0',
}
end
@ -35,10 +33,7 @@ describe 'gnocchi::api' do
end
it 'configures gnocchi-api' do
is_expected.to contain_gnocchi_config('api/host').with_value( params[:host] )
is_expected.to contain_gnocchi_config('api/port').with_value( params[:port] )
is_expected.to contain_gnocchi_config('api/max_limit').with_value( params[:max_limit] )
is_expected.to contain_gnocchi_config('api/workers').with_value('2')
is_expected.to contain_gnocchi_config('api/auth_mode').with_value('keystone')
is_expected.to contain_gnocchi_config('oslo_middleware/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')
end