quota: Stop overriding defaults
... and use the service defaults instead. Current values are based on the old default values in trove but these were changed in trove some time ago[1]. [1] 9e3860d54cc0fea59e80b1705c02c78cca8e1953 Change-Id: If6ba170457ca11cbd0531ff8ea1e87346b43dcc2
This commit is contained in:
parent
0a832b7a06
commit
2db61dcc98
@ -6,15 +6,15 @@
|
||||
#
|
||||
# [*max_instances_per_tenant*]
|
||||
# (optional) Default maximum number of instances per tenant.
|
||||
# Defaults to 5.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*max_ram_per_tenant*]
|
||||
# (optional) Default maximum amount of RAM (in MB) per tenant.
|
||||
# Defaults to -1.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*max_accepted_volume_size*]
|
||||
# (optional) Default maximum volume size (in GB) for an instance.
|
||||
# Defaults to 5.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*max_volumes_per_tenant*]
|
||||
# (optional) Default maximum volume capacity (in GB) spanning across
|
||||
@ -23,19 +23,19 @@
|
||||
#
|
||||
# [*max_backups_per_tenant*]
|
||||
# (optional) Default maximum number of backups created by a tenant.
|
||||
# Defaults to 50.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*quota_driver*]
|
||||
# (optional) Default driver to use for quota checks.
|
||||
# Defaults to 'trove.quota.quota.DbQuotaDriver'.
|
||||
#
|
||||
class trove::quota (
|
||||
$max_instances_per_tenant = 5,
|
||||
$max_ram_per_tenant = -1,
|
||||
$max_accepted_volume_size = 5,
|
||||
$max_volumes_per_tenant = 20,
|
||||
$max_backups_per_tenant = 50,
|
||||
$quota_driver = 'trove.quota.quota.DbQuotaDriver',
|
||||
$max_instances_per_tenant = $facts['os_service_default'],
|
||||
$max_ram_per_tenant = $facts['os_service_default'],
|
||||
$max_accepted_volume_size = $facts['os_service_default'],
|
||||
$max_volumes_per_tenant = $facts['os_service_default'],
|
||||
$max_backups_per_tenant = $facts['os_service_default'],
|
||||
$quota_driver = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include trove::deps
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Default values of the ``trove::quota`` class parameters have been updated
|
||||
and now the service default values are used by default.
|
@ -5,18 +5,12 @@ describe 'trove::quota' do
|
||||
shared_examples_for 'trove::quota' do
|
||||
context 'with default parameters' do
|
||||
it 'contains default values' do
|
||||
is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with(
|
||||
:value => 5)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_ram_per_tenant').with(
|
||||
:value => -1)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_accepted_volume_size').with(
|
||||
:value => 5)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with(
|
||||
:value => 20)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_backups_per_tenant').with(
|
||||
:value => 50)
|
||||
is_expected.to contain_trove_config('DEFAULT/quota_driver').with(
|
||||
:value => 'trove.quota.quota.DbQuotaDriver')
|
||||
is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('DEFAULT/max_ram_per_tenant').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('DEFAULT/max_accepted_volume_size').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('DEFAULT/max_backups_per_tenant').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('DEFAULT/quota_driver').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
@ -27,19 +21,16 @@ describe 'trove::quota' do
|
||||
:max_accepted_volume_size => 10,
|
||||
:max_volumes_per_tenant => 100,
|
||||
:max_backups_per_tenant => 100,
|
||||
:quota_driver => 'trove.quota.quota.DbQuotaDriver',
|
||||
}
|
||||
end
|
||||
it 'contains overrided values' do
|
||||
is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with(
|
||||
:value => 10)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_ram_per_tenant').with(
|
||||
:value => 10)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_accepted_volume_size').with(
|
||||
:value => 10)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with(
|
||||
:value => 100)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_backups_per_tenant').with(
|
||||
:value => 100)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with_value(10)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_ram_per_tenant').with_value(10)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_accepted_volume_size').with_value(10)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with_value(100)
|
||||
is_expected.to contain_trove_config('DEFAULT/max_backups_per_tenant').with_value(100)
|
||||
is_expected.to contain_trove_config('DEFAULT/quota_driver').with_value('trove.quota.quota.DbQuotaDriver')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user