Deprecate quota_injected_file_path_bytes (update for Juno)

* Deprecate [DEFAULT]/quota_injected_file_path_bytes in favor of
  [DEFAULT] quota_injected_file_path_length.
* Remove quota_max_injected_file_path_bytes parameter.

Use new parameters for Juno like it's documented here:
http://docs.openstack.org/trunk/config-reference/content/nova-conf-changes-master.html

Change-Id: Ia408de8fa980b37e6d46dece8d90a83f2083df8a
Partial-Bug: #1391099
This commit is contained in:
Sebastien Badia 2014-11-10 10:46:29 +01:00
parent aa578ae78b
commit e6711e3906
2 changed files with 18 additions and 9 deletions

View File

@ -57,6 +57,10 @@
# Defaults to 10240 # Defaults to 10240
# #
# [*quota_injected_file_path_bytes*] # [*quota_injected_file_path_bytes*]
# (optional) Deprecated. Use quota_injected_file_path_length instead
# Defaults to undef
#
# [*quota_injected_file_path_length*]
# (optional) Maximum size in bytes of injected file path # (optional) Maximum size in bytes of injected file path
# Defaults to 255 # Defaults to 255
# #
@ -97,7 +101,7 @@ class nova::quota(
$quota_metadata_items = 128, $quota_metadata_items = 128,
$quota_injected_files = 5, $quota_injected_files = 5,
$quota_injected_file_content_bytes = 10240, $quota_injected_file_content_bytes = 10240,
$quota_injected_file_path_bytes = 255, $quota_injected_file_path_length = 255,
$quota_security_groups = 10, $quota_security_groups = 10,
$quota_security_group_rules = 20, $quota_security_group_rules = 20,
$quota_key_pairs = 100, $quota_key_pairs = 100,
@ -109,6 +113,7 @@ class nova::quota(
$quota_volumes = undef, $quota_volumes = undef,
$quota_gigabytes = undef, $quota_gigabytes = undef,
$quota_max_injected_files = undef, $quota_max_injected_files = undef,
$quota_injected_file_path_bytes = undef,
$quota_max_injected_file_content_bytes = undef, $quota_max_injected_file_content_bytes = undef,
$quota_max_injected_file_path_bytes = undef $quota_max_injected_file_path_bytes = undef
) { ) {
@ -136,10 +141,14 @@ class nova::quota(
} }
if $quota_max_injected_file_path_bytes { if $quota_max_injected_file_path_bytes {
warning('The quota_max_injected_file_path_bytes parameter is deprecated, use quota_injected_file_path_bytes instead.') fail('The quota_max_injected_file_path_bytes parameter is deprecated, use quota_injected_file_path_length instead.')
$quota_injected_file_path_bytes_real = $quota_max_injected_file_path_bytes }
if $quota_injected_file_path_bytes {
warning('The quota_injected_file_path_bytes parameter is deprecated, use quota_injected_file_path_length instead.')
$quota_injected_file_path_length_real = $quota_injected_file_path_bytes
} else { } else {
$quota_injected_file_path_bytes_real = $quota_injected_file_path_bytes $quota_injected_file_path_length_real = $quota_injected_file_path_length
} }
nova_config { nova_config {
@ -151,7 +160,7 @@ class nova::quota(
'DEFAULT/quota_metadata_items': value => $quota_metadata_items; 'DEFAULT/quota_metadata_items': value => $quota_metadata_items;
'DEFAULT/quota_injected_files': value => $quota_injected_files_real; 'DEFAULT/quota_injected_files': value => $quota_injected_files_real;
'DEFAULT/quota_injected_file_content_bytes': value => $quota_injected_file_content_bytes_real; 'DEFAULT/quota_injected_file_content_bytes': value => $quota_injected_file_content_bytes_real;
'DEFAULT/quota_injected_file_path_bytes': value => $quota_injected_file_path_bytes_real; 'DEFAULT/quota_injected_file_path_length': value => $quota_injected_file_path_length_real;
'DEFAULT/quota_security_groups': value => $quota_security_groups; 'DEFAULT/quota_security_groups': value => $quota_security_groups;
'DEFAULT/quota_security_group_rules': value => $quota_security_group_rules; 'DEFAULT/quota_security_group_rules': value => $quota_security_group_rules;
'DEFAULT/quota_key_pairs': value => $quota_key_pairs; 'DEFAULT/quota_key_pairs': value => $quota_key_pairs;

View File

@ -15,7 +15,7 @@ describe 'nova::quota' do
:quota_metadata_items => 128, :quota_metadata_items => 128,
:quota_injected_files => 5, :quota_injected_files => 5,
:quota_injected_file_content_bytes => 10240, :quota_injected_file_content_bytes => 10240,
:quota_injected_file_path_bytes => 255, :quota_injected_file_path_length => 255,
:quota_security_groups => 10, :quota_security_groups => 10,
:quota_security_group_rules => 20, :quota_security_group_rules => 20,
:quota_key_pairs => 100, :quota_key_pairs => 100,
@ -52,7 +52,7 @@ describe 'nova::quota' do
:quota_metadata_items => 256, :quota_metadata_items => 256,
:quota_injected_files => 10, :quota_injected_files => 10,
:quota_injected_file_content_bytes => 20480, :quota_injected_file_content_bytes => 20480,
:quota_injected_file_path_bytes => 254, :quota_injected_file_path_length => 254,
:quota_security_groups => 20, :quota_security_groups => 20,
:quota_security_group_rules => 40, :quota_security_group_rules => 40,
:quota_key_pairs => 200, :quota_key_pairs => 200,
@ -69,14 +69,14 @@ describe 'nova::quota' do
let :params do { let :params do {
:quota_max_injected_files => 10, :quota_max_injected_files => 10,
:quota_max_injected_file_content_bytes => 20480, :quota_max_injected_file_content_bytes => 20480,
:quota_max_injected_file_path_bytes => 254 :quota_injected_file_path_bytes => 254
} }
end end
it { it {
should contain_nova_config('DEFAULT/quota_injected_files').with_value('10') should contain_nova_config('DEFAULT/quota_injected_files').with_value('10')
should contain_nova_config('DEFAULT/quota_injected_file_content_bytes').with_value('20480') should contain_nova_config('DEFAULT/quota_injected_file_content_bytes').with_value('20480')
should contain_nova_config('DEFAULT/quota_injected_file_path_bytes').with_value('254') should contain_nova_config('DEFAULT/quota_injected_file_path_length').with_value('254')
} }
end end