From e1a1a5cbedad165b4942d77f48c2c55605c70adb Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Wed, 25 Jan 2017 20:08:42 -0500 Subject: Use rpc and notify transport_url for oslo_messaging backends This commit adds the transport_url for specifying the oslo.messaging rpc and notify transport schemes. The rpc or notification backend can be one of rabbit, amqp, zmq, etc. Oslo.messaging is deprecating the host, port and auth configuration options. All drivers will get the options via the transport_url. This patch: * Adds transport_url to base services * Updates the corresponding specs * Adds to default hierdata Depends-On: I1cf93d2caebfa1f7373c16754a2ad9bd15eb1a40 Change-Id: Iea5607dbb3ee6b1dd50acc1395de52dc920aa915 --- spec/classes/tripleo_profile_base_aodh_spec.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'spec/classes/tripleo_profile_base_aodh_spec.rb') diff --git a/spec/classes/tripleo_profile_base_aodh_spec.rb b/spec/classes/tripleo_profile_base_aodh_spec.rb index 3befa23..7ef49ec 100644 --- a/spec/classes/tripleo_profile_base_aodh_spec.rb +++ b/spec/classes/tripleo_profile_base_aodh_spec.rb @@ -34,12 +34,14 @@ describe 'tripleo::profile::base::aodh' do let(:params) { { :step => 3, :bootstrap_node => 'node.example.com', - :rabbit_hosts => ['localhost1.localdomain', 'localhost2.localdomain'] + :oslomsg_rpc_hosts => [ '127.0.0.1' ], + :oslomsg_rpc_username => 'aodh', + :oslomsg_rpc_password => 'foo', } } it 'should trigger complete configuration' do is_expected.to contain_class('aodh').with( - :rabbit_hosts => params[:rabbit_hosts].map { |h| h + ":5672" } + :default_transport_url => 'rabbit://aodh:foo@127.0.0.1:5672/?ssl=0' ) is_expected.to contain_class('aodh::auth') is_expected.to contain_class('aodh::config') @@ -67,12 +69,14 @@ describe 'tripleo::profile::base::aodh' do let(:params) { { :step => 4, :bootstrap_node => 'somethingelse.example.com', - :rabbit_hosts => ['localhost1.localdomain', 'localhost2.localdomain'] + :oslomsg_rpc_hosts => [ '127.0.0.1' ], + :oslomsg_rpc_username => 'aodh', + :oslomsg_rpc_password => 'foo', } } it 'should trigger aodh configuration without mysql grant' do is_expected.to contain_class('aodh').with( - :rabbit_hosts => params[:rabbit_hosts].map { |h| h + ":5672" } + :default_transport_url => 'rabbit://aodh:foo@127.0.0.1:5672/?ssl=0' ) is_expected.to contain_class('aodh::auth') is_expected.to contain_class('aodh::config') -- cgit 1.2.3-korg