Merge "Deprecate the unused quota_network_gateway parameter"

This commit is contained in:
Zuul 2021-09-24 14:23:35 +00:00 committed by Gerrit Code Review
commit 9b04cfb85d
3 changed files with 25 additions and 8 deletions

View File

@ -42,10 +42,6 @@
# (optional) Default driver to use for quota checks.
# Defaults to $::os_service_default.
#
# [*quota_network_gateway*]
# (optional) Number of network gateways allowed per tenant, -1 for unlimited.
# Defaults to '5'.
#
# [*quota_rbac_policy*]
# (optional) Number of rbac policies allowed per tenant.
# A negative value means unlimited.
@ -62,6 +58,10 @@
# A negative value means unlimited.
# Defaults to undef.
#
# [*quota_network_gateway*]
# (optional) Number of network gateways allowed per tenant, -1 for unlimited.
# Defaults to undef.
#
class neutron::quota (
$default_quota = $::os_service_default,
$quota_network = $::os_service_default,
@ -74,12 +74,12 @@ class neutron::quota (
$quota_security_group = $::os_service_default,
$quota_security_group_rule = $::os_service_default,
$quota_driver = $::os_service_default,
$quota_network_gateway = 5,
# rbac extension
$quota_rbac_policy = $::os_service_default,
# DEPRECATED PARAMETERS
$quota_packet_filter = undef,
$quota_vip = undef,
$quota_network_gateway = undef,
) {
include neutron::deps
@ -92,6 +92,13 @@ class neutron::quota (
warning('The neutron::quota::quota_vip parameter is deprecated and has no effect')
}
if $quota_network_gateway != undef {
warning('The neutron::quota::quota_network_gateway parameter is deprecated and has no effect')
}
neutron_config {
'quotas/quota_network_gateway': ensure => absent;
}
neutron_config {
'quotas/default_quota': value => $default_quota;
'quotas/quota_network': value => $quota_network;
@ -102,7 +109,6 @@ class neutron::quota (
'quotas/quota_security_group': value => $quota_security_group;
'quotas/quota_security_group_rule': value => $quota_security_group_rule;
'quotas/quota_driver': value => $quota_driver;
'quotas/quota_network_gateway': value => $quota_network_gateway;
'quotas/quota_rbac_policy': value => $quota_rbac_policy;
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``neutron::quota::quota_network_gateway`` parameter has been deprecated
and has no effect now.

View File

@ -7,7 +7,14 @@ describe 'neutron::quota' do
let :default_params do
{
:quota_network_gateway => 5,
:quota_network => '<SERVICE DEFAULT>',
:quota_subnet => '<SERVICE DEFAULT>',
:quota_port => '<SERVICE DEFAULT>',
:quota_router => '<SERVICE DEFAULT>',
:quota_floatingip => '<SERVICE DEFAULT>',
:quota_security_group => '<SERVICE DEFAULT>',
:quota_security_group_rule => '<SERVICE DEFAULT>',
:quota_rbac_policy => '<SERVICE DEFAULT>',
}
end
@ -38,7 +45,6 @@ describe 'neutron::quota' do
:quota_floatingip => 100,
:quota_security_group => 20,
:quota_security_group_rule => 200,
:quota_network_gateway => 5,
:quota_rbac_policy => 10
})
end