Drop quota parameters without default_ prefix
... because these parameters were deprecated during Wallaby. Change-Id: I097df997bbe66f274c76a29d42f49ffdba2c9575
This commit is contained in:
parent
53f69cd9b6
commit
12d06f3636
@ -24,66 +24,21 @@
|
||||
# (optional) Default per project health monitor quota.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*load_balancer_quota*]
|
||||
# (optional) Default per project load balancer quota
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*listener_quota*]
|
||||
# (optional) Default per project listener quota.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*member_quota*]
|
||||
# (optional) Default per project member quota.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*pool_quota*]
|
||||
# (optional) Default per project pool quota.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*health_monitor_quota*]
|
||||
# (optional) Default per project health monitor quota.
|
||||
# Defaults to undef
|
||||
#
|
||||
class octavia::quota (
|
||||
$default_load_balancer_quota = $::os_service_default,
|
||||
$default_listener_quota = $::os_service_default,
|
||||
$default_member_quota = $::os_service_default,
|
||||
$default_pool_quota = $::os_service_default,
|
||||
$default_health_monitor_quota = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$load_balancer_quota = undef,
|
||||
$listener_quota = undef,
|
||||
$member_quota = undef,
|
||||
$pool_quota = undef,
|
||||
$health_monitor_quota = undef,
|
||||
) {
|
||||
|
||||
include octavia::deps
|
||||
|
||||
[
|
||||
'load_balancer_quota',
|
||||
'listener_quota',
|
||||
'member_quota',
|
||||
'pool_quota',
|
||||
'health_monitor_quota'
|
||||
].each |String $quota_opt| {
|
||||
if getvar("${quota_opt}") != undef {
|
||||
warning("The ${quota_opt} parameter is deprecated. Use the default_${quota_opt} parameter.")
|
||||
}
|
||||
octavia_config {
|
||||
"quotas/default_${quota_opt}": value => pick(getvar("${quota_opt}"), getvar("default_${quota_opt}"))
|
||||
}
|
||||
octavia_config {
|
||||
'quotas/default_load_balancer_quota': value => $default_load_balancer_quota;
|
||||
'quotas/default_listener_quota': value => $default_listener_quota;
|
||||
'quotas/default_member_quota': value => $default_member_quota;
|
||||
'quotas/default_pool_quota': value => $default_pool_quota;
|
||||
'quotas/default_health_monitor_quota': value => $default_health_monitor_quota;
|
||||
}
|
||||
|
||||
# NOTE(tkajinam): Revert back to this implementation when we remove
|
||||
# the deprecated parameters.
|
||||
# octavia_config {
|
||||
# 'quotas/default_load_balancer_quota': value => $load_balancer_quota;
|
||||
# 'quotas/default_listener_quota': value => $listener_quota;
|
||||
# 'quotas/default_member_quota': value => $member_quota;
|
||||
# 'quotas/default_pool_quota': value => $pool_quota;
|
||||
# 'quotas/default_health_monitor_quota': value => $health_monitor_quota;
|
||||
# }
|
||||
}
|
||||
|
11
releasenotes/notes/quota-cleanup-255ebc9eb81c9a0d.yaml
Normal file
11
releasenotes/notes/quota-cleanup-255ebc9eb81c9a0d.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The following deprecated parameters of the ``octavia::quota`` class have
|
||||
been removed.
|
||||
|
||||
- ``load_balancer_quota``
|
||||
- ``listener_quota``
|
||||
- ``member_quota``
|
||||
- ``pool_quota``
|
||||
- ``health_monitor_quota``
|
@ -48,26 +48,6 @@ describe 'octavia::quota' do
|
||||
is_expected.to contain_octavia_config('quotas/default_health_monitor_quota').with_value(p[:default_health_monitor_quota])
|
||||
end
|
||||
end
|
||||
|
||||
context 'configure quota with deprecated parameters' do
|
||||
before :each do
|
||||
params.merge!({
|
||||
:load_balancer_quota => 10,
|
||||
:listener_quota => 20,
|
||||
:member_quota => 30,
|
||||
:pool_quota => 40,
|
||||
:health_monitor_quota => 50
|
||||
})
|
||||
end
|
||||
|
||||
it 'contains overrided values' do
|
||||
is_expected.to contain_octavia_config('quotas/default_load_balancer_quota').with_value(p[:load_balancer_quota])
|
||||
is_expected.to contain_octavia_config('quotas/default_listener_quota').with_value(p[:listener_quota])
|
||||
is_expected.to contain_octavia_config('quotas/default_member_quota').with_value(p[:member_quota])
|
||||
is_expected.to contain_octavia_config('quotas/default_pool_quota').with_value(p[:pool_quota])
|
||||
is_expected.to contain_octavia_config('quotas/default_health_monitor_quota').with_value(p[:health_monitor_quota])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
Loading…
Reference in New Issue
Block a user