Support new max_ram_per_tenant quota option
Change-Id: If77f2123174f7d55530c181350c5517dcf084b9b
This commit is contained in:
parent
2bbf23cbf6
commit
67d06ede87
@ -8,6 +8,10 @@
|
|||||||
# (optional) Default maximum number of instances per tenant.
|
# (optional) Default maximum number of instances per tenant.
|
||||||
# Defaults to 5.
|
# Defaults to 5.
|
||||||
#
|
#
|
||||||
|
# [*max_ram_per_tenant*]
|
||||||
|
# (optional) Default maximum amount of RAM (in MB) per tenant.
|
||||||
|
# Defaults to -1.
|
||||||
|
#
|
||||||
# [*max_accepted_volume_size*]
|
# [*max_accepted_volume_size*]
|
||||||
# (optional) Default maximum volume size (in GB) for an instance.
|
# (optional) Default maximum volume size (in GB) for an instance.
|
||||||
# Defaults to 5.
|
# Defaults to 5.
|
||||||
@ -27,6 +31,7 @@
|
|||||||
#
|
#
|
||||||
class trove::quota (
|
class trove::quota (
|
||||||
$max_instances_per_tenant = 5,
|
$max_instances_per_tenant = 5,
|
||||||
|
$max_ram_per_tenant = -1,
|
||||||
$max_accepted_volume_size = 5,
|
$max_accepted_volume_size = 5,
|
||||||
$max_volumes_per_tenant = 20,
|
$max_volumes_per_tenant = 20,
|
||||||
$max_backups_per_tenant = 50,
|
$max_backups_per_tenant = 50,
|
||||||
@ -37,6 +42,7 @@ class trove::quota (
|
|||||||
|
|
||||||
trove_config {
|
trove_config {
|
||||||
'DEFAULT/max_instances_per_tenant': value => $max_instances_per_tenant;
|
'DEFAULT/max_instances_per_tenant': value => $max_instances_per_tenant;
|
||||||
|
'DEFAULT/max_ram_per_tenant': value => $max_ram_per_tenant;
|
||||||
'DEFAULT/max_accepted_volume_size': value => $max_accepted_volume_size;
|
'DEFAULT/max_accepted_volume_size': value => $max_accepted_volume_size;
|
||||||
'DEFAULT/max_volumes_per_tenant': value => $max_volumes_per_tenant;
|
'DEFAULT/max_volumes_per_tenant': value => $max_volumes_per_tenant;
|
||||||
'DEFAULT/max_backups_per_tenant': value => $max_backups_per_tenant;
|
'DEFAULT/max_backups_per_tenant': value => $max_backups_per_tenant;
|
||||||
|
5
releasenotes/notes/ram-quota-db3f2cad1b2bfa90.yaml
Normal file
5
releasenotes/notes/ram-quota-db3f2cad1b2bfa90.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Support new `max_ram_per_tenant` quota option. Specified in MB, the default
|
||||||
|
is -1 (unlimited)
|
@ -7,6 +7,8 @@ describe 'trove::quota' do
|
|||||||
it 'contains default values' do
|
it 'contains default values' do
|
||||||
is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with(
|
is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with(
|
||||||
:value => 5)
|
: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(
|
is_expected.to contain_trove_config('DEFAULT/max_accepted_volume_size').with(
|
||||||
:value => 5)
|
:value => 5)
|
||||||
is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with(
|
is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with(
|
||||||
@ -21,6 +23,7 @@ describe 'trove::quota' do
|
|||||||
context 'with overridden parameters' do
|
context 'with overridden parameters' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :max_instances_per_tenant => 10,
|
{ :max_instances_per_tenant => 10,
|
||||||
|
:max_ram_per_tenant => 10,
|
||||||
:max_accepted_volume_size => 10,
|
:max_accepted_volume_size => 10,
|
||||||
:max_volumes_per_tenant => 100,
|
:max_volumes_per_tenant => 100,
|
||||||
:max_backups_per_tenant => 100,
|
:max_backups_per_tenant => 100,
|
||||||
@ -29,6 +32,8 @@ describe 'trove::quota' do
|
|||||||
it 'contains overrided values' do
|
it 'contains overrided values' do
|
||||||
is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with(
|
is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with(
|
||||||
:value => 10)
|
: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(
|
is_expected.to contain_trove_config('DEFAULT/max_accepted_volume_size').with(
|
||||||
:value => 10)
|
:value => 10)
|
||||||
is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with(
|
is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with(
|
||||||
|
Loading…
Reference in New Issue
Block a user