Merge "Update the section of quota parameters"

This commit is contained in:
Zuul 2021-09-20 07:11:48 +00:00 committed by Gerrit Code Review
commit 8bd0354b7e
2 changed files with 48 additions and 33 deletions

View File

@ -65,16 +65,31 @@ class manila::quota (
include manila::deps
manila_config {
'DEFAULT/quota_shares': value => $quota_shares;
'DEFAULT/quota_snapshots': value => $quota_snapshots;
'DEFAULT/quota_gigabytes': value => $quota_gigabytes;
'DEFAULT/quota_driver': value => $quota_driver;
'DEFAULT/quota_snapshot_gigabytes': value => $quota_snapshot_gigabytes;
'DEFAULT/quota_share_networks': value => $quota_share_networks;
'DEFAULT/quota_share_replicas': value => $quota_share_replicas;
'DEFAULT/quota_replica_gigabytes': value => $quota_replica_gigabytes;
'DEFAULT/reservation_expire': value => $reservation_expire;
'DEFAULT/until_refresh': value => $until_refresh;
'DEFAULT/max_age': value => $max_age;
'quota/quota_shares': value => $quota_shares;
'quota/quota_snapshots': value => $quota_snapshots;
'quota/quota_gigabytes': value => $quota_gigabytes;
'quota/quota_driver': value => $quota_driver;
'quota/quota_snapshot_gigabytes': value => $quota_snapshot_gigabytes;
'quota/quota_share_networks': value => $quota_share_networks;
'quota/quota_share_replicas': value => $quota_share_replicas;
'quota/quota_replica_gigabytes': value => $quota_replica_gigabytes;
'quota/reservation_expire': value => $reservation_expire;
'quota/until_refresh': value => $until_refresh;
'quota/max_age': value => $max_age;
}
# TODO(tkajinam): Remove this after Xena release.
manila_config {
'DEFAULT/quota_shares': ensure => absent;
'DEFAULT/quota_snapshots': ensure => absent;
'DEFAULT/quota_gigabytes': ensure => absent;
'DEFAULT/quota_driver': ensure => absent;
'DEFAULT/quota_snapshot_gigabytes': ensure => absent;
'DEFAULT/quota_share_networks': ensure => absent;
'DEFAULT/quota_share_replicas': ensure => absent;
'DEFAULT/quota_replica_gigabytes': ensure => absent;
'DEFAULT/reservation_expire': ensure => absent;
'DEFAULT/until_refresh': ensure => absent;
'DEFAULT/max_age': ensure => absent;
}
}

View File

@ -5,27 +5,27 @@ describe 'manila::quota' do
shared_examples_for 'manila::quota' do
context 'with default parameters' do
it 'contains default values' do
is_expected.to contain_manila_config('DEFAULT/quota_shares').with(
is_expected.to contain_manila_config('quota/quota_shares').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_manila_config('DEFAULT/quota_snapshots').with(
is_expected.to contain_manila_config('quota/quota_snapshots').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_manila_config('DEFAULT/quota_gigabytes').with(
is_expected.to contain_manila_config('quota/quota_gigabytes').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_manila_config('DEFAULT/quota_driver').with(
is_expected.to contain_manila_config('quota/quota_driver').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_manila_config('DEFAULT/quota_snapshot_gigabytes').with(
is_expected.to contain_manila_config('quota/quota_snapshot_gigabytes').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_manila_config('DEFAULT/quota_share_networks').with(
is_expected.to contain_manila_config('quota/quota_share_networks').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_manila_config('DEFAULT/quota_share_replicas').with(
is_expected.to contain_manila_config('quota/quota_share_replicas').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_manila_config('DEFAULT/quota_replica_gigabytes').with(
is_expected.to contain_manila_config('quota/quota_replica_gigabytes').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_manila_config('DEFAULT/reservation_expire').with(
is_expected.to contain_manila_config('quota/reservation_expire').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_manila_config('DEFAULT/until_refresh').with(
is_expected.to contain_manila_config('quota/until_refresh').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_manila_config('DEFAULT/max_age').with(
is_expected.to contain_manila_config('quota/max_age').with(
:value => '<SERVICE DEFAULT>')
end
end
@ -45,27 +45,27 @@ describe 'manila::quota' do
:max_age => 10,}
end
it 'contains overrided values' do
is_expected.to contain_manila_config('DEFAULT/quota_shares').with(
is_expected.to contain_manila_config('quota/quota_shares').with(
:value => 1000)
is_expected.to contain_manila_config('DEFAULT/quota_snapshots').with(
is_expected.to contain_manila_config('quota/quota_snapshots').with(
:value => 1000)
is_expected.to contain_manila_config('DEFAULT/quota_gigabytes').with(
is_expected.to contain_manila_config('quota/quota_gigabytes').with(
:value => 100000)
is_expected.to contain_manila_config('DEFAULT/quota_driver').with(
is_expected.to contain_manila_config('quota/quota_driver').with(
:value => 'manila.quota.DbQuotaDriver')
is_expected.to contain_manila_config('DEFAULT/quota_snapshot_gigabytes').with(
is_expected.to contain_manila_config('quota/quota_snapshot_gigabytes').with(
:value => 10000)
is_expected.to contain_manila_config('DEFAULT/quota_share_networks').with(
is_expected.to contain_manila_config('quota/quota_share_networks').with(
:value => 100)
is_expected.to contain_manila_config('DEFAULT/quota_share_replicas').with(
is_expected.to contain_manila_config('quota/quota_share_replicas').with(
:value => 10)
is_expected.to contain_manila_config('DEFAULT/quota_replica_gigabytes').with(
is_expected.to contain_manila_config('quota/quota_replica_gigabytes').with(
:value => 100)
is_expected.to contain_manila_config('DEFAULT/reservation_expire').with(
is_expected.to contain_manila_config('quota/reservation_expire').with(
:value => 864000)
is_expected.to contain_manila_config('DEFAULT/until_refresh').with(
is_expected.to contain_manila_config('quota/until_refresh').with(
:value => 10)
is_expected.to contain_manila_config('DEFAULT/max_age').with(
is_expected.to contain_manila_config('quota/max_age').with(
:value => 10)
end
end