Merge "Deprecate parameters for LBaaS quotas"

This commit is contained in:
Zuul 2021-01-05 04:50:00 +00:00 committed by Gerrit Code Review
commit f22eee33b8
3 changed files with 47 additions and 32 deletions

View File

@ -54,16 +54,6 @@
# (optional) Number of firewalls rules allowed per tenant, -1 for unlimited.
# Defaults to '-1'.
#
# [*quota_healthmonitor*]
# (optional) Number of health monitors allowed per tenant.
# A negative value means unlimited.
# Defaults to $::os_service_default.
#
# [*quota_member*]
# (optional) Number of pool members allowed per tenant.
# A negative value means unlimited
# Defaults to $::os_service_default.
#
# [*quota_network_gateway*]
# (optional) Number of network gateways allowed per tenant, -1 for unlimited.
# Defaults to '5'.
@ -72,21 +62,33 @@
# (optional) Number of packet_filters allowed per tenant, -1 for unlimited.
# Defaults to '100'.
#
# [*quota_loadbalancer*]
# (optional) Number of loadbalancers allowed per tenant.
# A negative value means unlimited.
# Defaults to $::os_service_default.
#
# [*quota_pool*]
# (optional) Number of pools allowed per tenant.
# A negative value means unlimited.
# Defaults to $::os_service_default.
#
# [*quota_vip*]
# (optional) Number of vips allowed per tenant.
# A negative value means unlimited.
# Defaults to $::os_service_default.
#
# DEPRECATED PARAMETERS
#
# [*quota_loadbalancer*]
# (optional) Number of loadbalancers allowed per tenant.
# A negative value means unlimited.
# Defaults to undef.
#
# [*quota_pool*]
# (optional) Number of pools allowed per tenant.
# A negative value means unlimited.
# Defaults to undef.
#
# [*quota_member*]
# (optional) Number of pool members allowed per tenant.
# A negative value means unlimited
# Defaults to undef.
#
# [*quota_healthmonitor*]
# (optional) Number of health monitors allowed per tenant.
# A negative value means unlimited.
# Defaults to undef.
#
class neutron::quota (
$default_quota = $::os_service_default,
$quota_network = $::os_service_default,
@ -102,17 +104,28 @@ class neutron::quota (
$quota_firewall = $::os_service_default,
$quota_firewall_policy = $::os_service_default,
$quota_firewall_rule = -1,
$quota_healthmonitor = $::os_service_default,
$quota_member = $::os_service_default,
$quota_network_gateway = 5,
$quota_packet_filter = 100,
$quota_loadbalancer = $::os_service_default,
$quota_pool = $::os_service_default,
$quota_vip = $::os_service_default,
# DEPRECATED PARAMETERS
$quota_loadbalancer = undef,
$quota_pool = undef,
$quota_member = undef,
$quota_healthmonitor = undef,
) {
include neutron::deps
$deprecated_param_names = [
'quota_loadbalancer', 'quota_pool', 'quota_member', 'quota_healthmonitor'
]
$deprecated_param_names.each |$param_name| {
$param = getvar($param_name)
if $param != undef {
warning("The ${param_name} parameter has been deprecated and has no effect")
}
}
neutron_config {
'quotas/default_quota': value => $default_quota;
'quotas/quota_network': value => $quota_network;
@ -126,12 +139,8 @@ class neutron::quota (
'quotas/quota_firewall': value => $quota_firewall;
'quotas/quota_firewall_policy': value => $quota_firewall_policy;
'quotas/quota_firewall_rule': value => $quota_firewall_rule;
'quotas/quota_healthmonitor': value => $quota_healthmonitor;
'quotas/quota_member': value => $quota_member;
'quotas/quota_network_gateway': value => $quota_network_gateway;
'quotas/quota_packet_filter': value => $quota_packet_filter;
'quotas/quota_loadbalancer': value => $quota_loadbalancer;
'quotas/quota_pool': value => $quota_pool;
'quotas/quota_vip': value => $quota_vip;
}
}

View File

@ -0,0 +1,10 @@
---
deprecations:
- |
The parameters for quotas in Neutron LBaaS v2 have been deprecated and have
no effect. These parameters will be removed in a future release.
- ``neutron::quota::quota_loadbalancer``
- ``neutron::quota::quota_pool``
- ``neutron::quota::quota_member``
- ``neutron::quota::quota_health_monitor``

View File

@ -43,12 +43,8 @@ describe 'neutron::quota' do
:quota_firewall => 1,
:quota_firewall_policy => 1,
:quota_firewall_rule => -1,
:quota_healthmonitor => -1,
:quota_member => -1,
:quota_network_gateway => 5,
:quota_packet_filter => 100,
:quota_loadbalancer => 10,
:quota_pool => 10,
:quota_vip => 10
})
end