Browse Source

Merge "Cleanup deperecated per_user parameters from trove::quota"

master
Zuul 1 week ago
committed by Gerrit Code Review
parent
commit
32c6e742ae
2 changed files with 12 additions and 46 deletions
  1. +3
    -46
      manifests/quota.pp
  2. +9
    -0
      releasenotes/notes/cleanup_deprecated_params_from_trove-quota-19ce39fbd7611db7.yaml

+ 3
- 46
manifests/quota.pp View File

@@ -25,64 +25,21 @@
# (optional) Default driver to use for quota checks.
# Defaults to 'trove.quota.quota.DbQuotaDriver'.
#
# === DEPRECATED PARAMETERS
#
# [*max_instances_per_user*]
# (optional) DEPRECATED. Default maximum number of instances per tenant.
# Defaults to undef
#
# [*max_volumes_per_user*]
# (optional) DEPRECATED. Default maximum volume capacity (in GB) spanning across
# all Trove volumes per tenant.
# Defaults to undef
#
# [*max_backups_per_user*]
# (optional) DEPRECATED. Default maximum number of backups created by a tenant.
# Defaults to undef
#
class trove::quota (
$max_instances_per_tenant = 5,
$max_accepted_volume_size = 5,
$max_volumes_per_tenant = 20,
$max_backups_per_tenant = 50,
$quota_driver = 'trove.quota.quota.DbQuotaDriver',
# Deprecated
$max_instances_per_user = undef,
$max_volumes_per_user = undef,
$max_backups_per_user = undef,
) {

include trove::deps

if $max_instances_per_user {
warning("max_instances_per_user deprecated, has no effect and will be removed after Newton cycle. \
Please use max_instances_per_tenant instead.")
$max_instances_per_tenant_real = $max_instances_per_user
} else {
$max_instances_per_tenant_real = $max_instances_per_tenant
}

if $max_volumes_per_user {
warning("max_volumes_per_user deprecated, has no effect and will be removed after Newton cycle. \
Please use max_volumes_per_tenant instead.")
$max_volumes_per_tenant_real = $max_volumes_per_user
} else {
$max_volumes_per_tenant_real = $max_volumes_per_tenant
}

if $max_backups_per_user {
warning("max_backups_per_user deprecated, has no effect and will be removed after Newton cycle. \
Please use max_backups_per_tenant instead.")
$max_backups_per_tenant_real = $max_backups_per_user
} else {
$max_backups_per_tenant_real = $max_backups_per_tenant
}

trove_config {
'DEFAULT/max_instances_per_tenant': value => $max_instances_per_tenant_real;
'DEFAULT/max_instances_per_tenant': value => $max_instances_per_tenant;
'DEFAULT/max_accepted_volume_size': value => $max_accepted_volume_size;
'DEFAULT/max_volumes_per_tenant': value => $max_volumes_per_tenant_real;
'DEFAULT/max_backups_per_tenant': value => $max_backups_per_tenant_real;
'DEFAULT/max_volumes_per_tenant': value => $max_volumes_per_tenant;
'DEFAULT/max_backups_per_tenant': value => $max_backups_per_tenant;
'DEFAULT/quota_driver': value => $quota_driver;
}
}

+ 9
- 0
releasenotes/notes/cleanup_deprecated_params_from_trove-quota-19ce39fbd7611db7.yaml View File

@@ -0,0 +1,9 @@
---
upgrade:
- |
The following deprecated parameters have been removed. The new per_tenant
parameters should be used instead.

- ``trove::quota::max_instances_per_user``
- ``trove::quota::max_volumes_per_user``
- ``trove::quota::max_backups_per_user``

Loading…
Cancel
Save