Deprecate quota_driver

This commit Ic0fd0433aa9e60d98f62f90ae8cdf544a3c860ee deprecated
quota_driver in Nova, so we do the same in puppet-nova.

Change-Id: I1d81e646fd93aaffe66f00ea7ba8fd6570d86331
This commit is contained in:
Emilien Macchi 2016-07-11 09:37:54 -04:00
parent a75d97af80
commit e93fb5184c
5 changed files with 12 additions and 9 deletions

View File

@ -188,7 +188,6 @@ class nova::cells (
nova_config { 'cells/cell_type': value => 'api' }
}
'child': {
nova_config { 'DEFAULT/quota_driver': value => 'nova.quota.NoopQuotaDriver' }
nova_config { 'cells/cell_type': value => 'compute' }
}
default: { fail("Unsupported cell_type parameter value: '${cell_type}'. Should be 'parent' or 'child'.") }

View File

@ -97,8 +97,8 @@
# Defaults to 0
#
# [*quota_driver*]
# (optional) Driver to use for quota checks
# Defaults to 'nova.quota.DbQuotaDriver'
# (optional) Deprecated. Driver to use for quota checks
# Defaults to undef
#
class nova::quota(
$quota_instances = 10,
@ -118,14 +118,14 @@ class nova::quota(
$reservation_expire = 86400,
$until_refresh = 0,
$max_age = 0,
$quota_driver = 'nova.quota.DbQuotaDriver',
# DEPRECATED PARAMETERS
$quota_volumes = undef,
$quota_gigabytes = undef,
$quota_max_injected_files = undef,
$quota_injected_file_path_bytes = undef,
$quota_max_injected_file_content_bytes = undef,
$quota_max_injected_file_path_bytes = undef
$quota_max_injected_file_path_bytes = undef,
$quota_driver = undef,
) {
include ::nova::deps
@ -137,6 +137,10 @@ class nova::quota(
warning('The quota_gigabytes parameter is deprecated and has no effect.')
}
if $quota_driver {
warning('The quota_driver parameter is deprecated and has no effect.')
}
if $quota_max_injected_files {
warning('The quota_max_injected_files parameter is deprecated, use quota_injected_files instead.')
$quota_injected_files_real = $quota_max_injected_files
@ -180,7 +184,6 @@ class nova::quota(
'DEFAULT/reservation_expire': value => $reservation_expire;
'DEFAULT/until_refresh': value => $until_refresh;
'DEFAULT/max_age': value => $max_age;
'DEFAULT/quota_driver': value => $quota_driver
}
}

View File

@ -0,0 +1,3 @@
---
deprecations:
- quota_driver parameter was deprecated in Nova, so we also deprecate it in puppet-nova.

View File

@ -133,7 +133,6 @@ describe 'nova::cells' do
default_params.merge(params)
end
it { is_expected.to contain_nova_config('cells/name').with_value(expected_params[:cell_name]) }
it { is_expected.to contain_nova_config('DEFAULT/quota_driver').with_value('nova.quota.NoopQuotaDriver')}
it { is_expected.to contain_nova_config('cells/cell_type').with_value('compute')}
it_configures 'nova-cells'
end

View File

@ -23,8 +23,7 @@ describe 'nova::quota' do
:quota_server_group_members => 10,
:reservation_expire => 86400,
:until_refresh => 0,
:max_age => 0,
:quota_driver => 'nova.quota.DbQuotaDriver' }
:max_age => 0 }
end
shared_examples_for 'nova quota' do