Merge "Deprecate parameters for RateLimitingMiddleware"
This commit is contained in:
@@ -70,16 +70,6 @@
|
|||||||
# installing the package - required on upgrade.
|
# installing the package - required on upgrade.
|
||||||
# Defaults to false.
|
# Defaults to false.
|
||||||
#
|
#
|
||||||
# [*ratelimits*]
|
|
||||||
# (optional) A string that is a semicolon-separated list of 5-tuples.
|
|
||||||
# See http://docs.openstack.org/trunk/config-reference/content/configuring-compute-API.html
|
|
||||||
# Example: '(POST, "*", .*, 10, MINUTE);(POST, "*/servers", ^/servers, 50, DAY);(PUT, "*", .*, 10, MINUTE)'
|
|
||||||
# Defaults to undef
|
|
||||||
#
|
|
||||||
# [*ratelimits_factory*]
|
|
||||||
# (optional) The rate limiting factory to use
|
|
||||||
# Defaults to 'nova.api.openstack.compute.limits:RateLimitingMiddleware.factory'
|
|
||||||
#
|
|
||||||
# [*enable_proxy_headers_parsing*]
|
# [*enable_proxy_headers_parsing*]
|
||||||
# (optional) This determines if the HTTPProxyToWSGI
|
# (optional) This determines if the HTTPProxyToWSGI
|
||||||
# middleware should parse the proxy headers or not.(boolean value)
|
# middleware should parse the proxy headers or not.(boolean value)
|
||||||
@@ -178,6 +168,16 @@
|
|||||||
# (optional) Whether the cinder::client class should be used to install the cinder client.
|
# (optional) Whether the cinder::client class should be used to install the cinder client.
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
|
# [*ratelimits*]
|
||||||
|
# (optional) A string that is a semicolon-separated list of 5-tuples.
|
||||||
|
# See http://docs.openstack.org/trunk/config-reference/content/configuring-compute-API.html
|
||||||
|
# Example: '(POST, "*", .*, 10, MINUTE);(POST, "*/servers", ^/servers, 50, DAY);(PUT, "*", .*, 10, MINUTE)'
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
|
# [*ratelimits_factory*]
|
||||||
|
# (optional) The rate limiting factory to use
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
class nova::api(
|
class nova::api(
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
@@ -194,9 +194,6 @@ class nova::api(
|
|||||||
$sync_db = true,
|
$sync_db = true,
|
||||||
$sync_db_api = true,
|
$sync_db_api = true,
|
||||||
$db_online_data_migrations = false,
|
$db_online_data_migrations = false,
|
||||||
$ratelimits = undef,
|
|
||||||
$ratelimits_factory =
|
|
||||||
'nova.api.openstack.compute.limits:RateLimitingMiddleware.factory',
|
|
||||||
$validate = false,
|
$validate = false,
|
||||||
$validation_options = {},
|
$validation_options = {},
|
||||||
$instance_name_template = $::os_service_default,
|
$instance_name_template = $::os_service_default,
|
||||||
@@ -216,6 +213,8 @@ class nova::api(
|
|||||||
# DEPRECATED PARAMETER
|
# DEPRECATED PARAMETER
|
||||||
$nova_metadata_wsgi_enabled = false,
|
$nova_metadata_wsgi_enabled = false,
|
||||||
$install_cinder_client = undef,
|
$install_cinder_client = undef,
|
||||||
|
$ratelimits = undef,
|
||||||
|
$ratelimits_factory = undef,
|
||||||
) inherits nova::params {
|
) inherits nova::params {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
@@ -233,6 +232,10 @@ class nova::api(
|
|||||||
warning('The nova::api::install_cinder_client parameter is deprecated and has no effect')
|
warning('The nova::api::install_cinder_client parameter is deprecated and has no effect')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $ratelimits != undef {
|
||||||
|
warning('The nova::api::ratelimits parameter has been deprecated and has no effect')
|
||||||
|
}
|
||||||
|
|
||||||
if $instance_name_template {
|
if $instance_name_template {
|
||||||
$instance_name_template_real = $instance_name_template
|
$instance_name_template_real = $instance_name_template
|
||||||
} else {
|
} else {
|
||||||
@@ -331,13 +334,6 @@ as a standalone service, or httpd for being run by a httpd server")
|
|||||||
'DEFAULT/allow_resize_to_same_host': value => $allow_resize_to_same_host;
|
'DEFAULT/allow_resize_to_same_host': value => $allow_resize_to_same_host;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ratelimits != undef) {
|
|
||||||
nova_api_paste_ini {
|
|
||||||
'filter:ratelimit/paste.filter_factory': value => $ratelimits_factory;
|
|
||||||
'filter:ratelimit/limits': value => $ratelimits;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Added arg and if statement prevents this from being run
|
# Added arg and if statement prevents this from being run
|
||||||
# where db is not active i.e. the compute
|
# where db is not active i.e. the compute
|
||||||
if $sync_db {
|
if $sync_db {
|
||||||
|
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The following parameters of the ``nova::api`` class have been deprecated
|
||||||
|
and have no effect, because RateLimitingMiddleware was already removed from
|
||||||
|
nova.
|
||||||
|
|
||||||
|
- ``ratelimits``
|
||||||
|
- ``ratelimits_factory``
|
@@ -80,7 +80,6 @@ describe 'nova::api' do
|
|||||||
:metadata_listen_port => 8875,
|
:metadata_listen_port => 8875,
|
||||||
:osapi_compute_listen_port => 8874,
|
:osapi_compute_listen_port => 8874,
|
||||||
:use_forwarded_for => false,
|
:use_forwarded_for => false,
|
||||||
:ratelimits => '(GET, "*", .*, 100, MINUTE);(POST, "*", .*, 200, MINUTE)',
|
|
||||||
:osapi_compute_workers => 1,
|
:osapi_compute_workers => 1,
|
||||||
:metadata_workers => 2,
|
:metadata_workers => 2,
|
||||||
:enable_proxy_headers_parsing => true,
|
:enable_proxy_headers_parsing => true,
|
||||||
|
Reference in New Issue
Block a user