3 describe 'nova::quota' do
10 { :quota_instances => 10,
13 :quota_floating_ips => 10,
14 :quota_fixed_ips => -1,
15 :quota_metadata_items => 128,
16 :quota_injected_files => 5,
17 :quota_injected_file_content_bytes => 10240,
18 :quota_injected_file_path_length => 255,
19 :quota_security_groups => 10,
20 :quota_security_group_rules => 20,
21 :quota_key_pairs => 100,
22 :reservation_expire => 86400,
25 :quota_driver => 'nova.quota.DbQuotaDriver' }
28 shared_examples_for 'nova quota' do
30 default_params.merge(params)
33 it 'configures quota in nova.conf' do
34 params_hash.each_pair do |config,value|
35 should contain_nova_config("DEFAULT/#{config}").with_value( value )
40 context 'with default parameters' do
41 it_configures 'nova quota'
44 context 'with provided parameters' do
47 :quota_instances => 20,
50 :quota_floating_ips => 20,
51 :quota_fixed_ips => 512,
52 :quota_metadata_items => 256,
53 :quota_injected_files => 10,
54 :quota_injected_file_content_bytes => 20480,
55 :quota_injected_file_path_length => 254,
56 :quota_security_groups => 20,
57 :quota_security_group_rules => 40,
58 :quota_key_pairs => 200,
59 :reservation_expire => 6400,
65 it_configures 'nova quota'
68 context 'with deprecated parameters' do
70 :quota_max_injected_files => 10,
71 :quota_max_injected_file_content_bytes => 20480,
72 :quota_injected_file_path_bytes => 254
77 should contain_nova_config('DEFAULT/quota_injected_files').with_value('10')
78 should contain_nova_config('DEFAULT/quota_injected_file_content_bytes').with_value('20480')
79 should contain_nova_config('DEFAULT/quota_injected_file_path_length').with_value('254')
83 it { should contain_nova_config('DEFAULT/quota_ram').with_value('51200') }
85 describe 'when overriding params' do
91 it { should contain_nova_config('DEFAULT/quota_ram').with_value('1') }