From d91b9599b41e7951a30385054a23721d0ed2ebc1 Mon Sep 17 00:00:00 2001 From: Xingchao Yu Date: Wed, 19 Aug 2015 12:50:34 +0800 Subject: [PATCH] Introduce amqp_durable_queues option amqp_durable_queues option is already defined in trove class, but is not be used in other trove class. Close-Bug: #1486319 Change-Id: Ifd4411ce90db26d6f12e714fdc5c54ea507975fd --- manifests/api.pp | 1 + manifests/conductor.pp | 1 + manifests/guestagent.pp | 1 + manifests/taskmanager.pp | 1 + spec/classes/trove_api_spec.rb | 5 ++++- spec/classes/trove_conductor_spec.rb | 5 ++++- spec/classes/trove_guestagent_spec.rb | 5 ++++- spec/classes/trove_taskmanager_spec.rb | 5 ++++- 8 files changed, 20 insertions(+), 4 deletions(-) diff --git a/manifests/api.pp b/manifests/api.pp index 7cccac7d..92ff3857 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -301,6 +301,7 @@ class trove::api( 'oslo_messaging_rabbit/rabbit_virtual_host': value => $::trove::rabbit_virtual_host; 'oslo_messaging_rabbit/rabbit_use_ssl': value => $::trove::rabbit_use_ssl; 'oslo_messaging_rabbit/kombu_reconnect_delay': value => $::trove::kombu_reconnect_delay; + 'oslo_messaging_rabbit/amqp_durable_queues': value => $::trove::amqp_durable_queues; } if $::trove::rabbit_use_ssl { diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 090d1164..fa69762b 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -126,6 +126,7 @@ class trove::conductor( 'oslo_messaging_rabbit/rabbit_virtual_host': value => $::trove::rabbit_virtual_host; 'oslo_messaging_rabbit/rabbit_use_ssl': value => $::trove::rabbit_use_ssl; 'oslo_messaging_rabbit/kombu_reconnect_delay': value => $::trove::kombu_reconnect_delay; + 'oslo_messaging_rabbit/amqp_durable_queues': value => $::trove::amqp_durable_queues; } if $::trove::rabbit_use_ssl { diff --git a/manifests/guestagent.pp b/manifests/guestagent.pp index ac506a2d..53d4b2ff 100644 --- a/manifests/guestagent.pp +++ b/manifests/guestagent.pp @@ -123,6 +123,7 @@ class trove::guestagent( 'oslo_messaging_rabbit/rabbit_virtual_host': value => $::trove::rabbit_virtual_host; 'oslo_messaging_rabbit/rabbit_use_ssl': value => $::trove::rabbit_use_ssl; 'oslo_messaging_rabbit/kombu_reconnect_delay': value => $::trove::kombu_reconnect_delay; + 'oslo_messaging_rabbit/amqp_durable_queues': value => $::trove::amqp_durable_queues; } if $::trove::rabbit_use_ssl { diff --git a/manifests/taskmanager.pp b/manifests/taskmanager.pp index c102d9e3..66cdd956 100644 --- a/manifests/taskmanager.pp +++ b/manifests/taskmanager.pp @@ -184,6 +184,7 @@ class trove::taskmanager( 'oslo_messaging_rabbit/rabbit_virtual_host': value => $::trove::rabbit_virtual_host; 'oslo_messaging_rabbit/rabbit_use_ssl': value => $::trove::rabbit_use_ssl; 'oslo_messaging_rabbit/kombu_reconnect_delay': value => $::trove::kombu_reconnect_delay; + 'oslo_messaging_rabbit/amqp_durable_queues': value => $::trove::amqp_durable_queues; } if $::trove::rabbit_use_ssl { diff --git a/spec/classes/trove_api_spec.rb b/spec/classes/trove_api_spec.rb index 9d8d66bb..1940b44e 100644 --- a/spec/classes/trove_api_spec.rb +++ b/spec/classes/trove_api_spec.rb @@ -119,19 +119,22 @@ describe 'trove::api' do it 'configures trove-api with RabbitMQ' do is_expected.to contain_trove_config('oslo_messaging_rabbit/rabbit_host').with_value('10.0.0.1') is_expected.to contain_trove_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('false') + is_expected.to contain_trove_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('false') end end - context 'when using a single RabbitMQ server with enable rabbbit_ha_queues' do + context 'when using a single RabbitMQ server with enable ha options' do let :pre_condition do "class { 'trove': nova_proxy_admin_pass => 'verysecrete', rabbit_ha_queues => 'true', + amqp_durable_queues => 'true', rabbit_host => '10.0.0.1'}" end it 'configures trove-api with RabbitMQ' do is_expected.to contain_trove_config('oslo_messaging_rabbit/rabbit_host').with_value('10.0.0.1') is_expected.to contain_trove_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('true') + is_expected.to contain_trove_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('true') end end diff --git a/spec/classes/trove_conductor_spec.rb b/spec/classes/trove_conductor_spec.rb index 82ef118e..258fa10a 100644 --- a/spec/classes/trove_conductor_spec.rb +++ b/spec/classes/trove_conductor_spec.rb @@ -42,19 +42,22 @@ describe 'trove::conductor' do it 'configures trove-conductor with RabbitMQ' do is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/rabbit_host').with_value('10.0.0.1') is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('false') + is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('false') end end - context 'when using a single RabbitMQ server with enable rabbbit_ha_queues' do + context 'when using a single RabbitMQ server with enable ha options' do let :pre_condition do "class { 'trove': nova_proxy_admin_pass => 'verysecrete', rabbit_ha_queues => 'true', + amqp_durable_queues => 'true', rabbit_host => '10.0.0.1'}" end it 'configures trove-api with RabbitMQ' do is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/rabbit_host').with_value('10.0.0.1') is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('true') + is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('true') end end diff --git a/spec/classes/trove_guestagent_spec.rb b/spec/classes/trove_guestagent_spec.rb index 80dde495..a950d16f 100644 --- a/spec/classes/trove_guestagent_spec.rb +++ b/spec/classes/trove_guestagent_spec.rb @@ -44,19 +44,22 @@ describe 'trove::guestagent' do it 'configures trove-guestagent with RabbitMQ' do is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_host').with_value('10.0.0.1') is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('false') + is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('false') end end - context 'when using a single RabbitMQ server with enable rabbbit_ha_queues' do + context 'when using a single RabbitMQ server with enable ha options' do let :pre_condition do "class { 'trove': nova_proxy_admin_pass => 'verysecrete', rabbit_ha_queues => 'true', + amqp_durable_queues => 'true', rabbit_host => '10.0.0.1'}" end it 'configures trove-api with RabbitMQ' do is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_host').with_value('10.0.0.1') is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('true') + is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('true') end end diff --git a/spec/classes/trove_taskmanager_spec.rb b/spec/classes/trove_taskmanager_spec.rb index 37f78ef4..3491eecc 100644 --- a/spec/classes/trove_taskmanager_spec.rb +++ b/spec/classes/trove_taskmanager_spec.rb @@ -92,19 +92,22 @@ describe 'trove::taskmanager' do it 'configures trove-taskmanager with RabbitMQ' do is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/rabbit_host').with_value('10.0.0.1') is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('false') + is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('false') end end - context 'when using a single RabbitMQ server with enable rabbbit_ha_queues' do + context 'when using a single RabbitMQ server with enable rabbbit ha options' do let :pre_condition do "class { 'trove': nova_proxy_admin_pass => 'verysecrete', rabbit_ha_queues => 'true', + amqp_durable_queues => 'true', rabbit_host => '10.0.0.1'}" end it 'configures trove-api with RabbitMQ' do is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/rabbit_host').with_value('10.0.0.1') is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('true') + is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('true') end end