aboutsummaryrefslogtreecommitdiffstats
path: root/spec/classes/tripleo_profile_base_octavia_spec.rb
diff options
context:
space:
mode:
authorAndrew Smith <ansmith@redhat.com>2017-01-25 20:08:42 -0500
committerAndrew Smith <ansmith@redhat.com>2017-02-17 10:08:38 -0500
commite1a1a5cbedad165b4942d77f48c2c55605c70adb (patch)
tree64ebc34294e719738f9374fd7e2aa7126fc560f3 /spec/classes/tripleo_profile_base_octavia_spec.rb
parent3cea0982f96a523cfb8fa6bc323932636d193ddb (diff)
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
Diffstat (limited to 'spec/classes/tripleo_profile_base_octavia_spec.rb')
-rw-r--r--spec/classes/tripleo_profile_base_octavia_spec.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/classes/tripleo_profile_base_octavia_spec.rb b/spec/classes/tripleo_profile_base_octavia_spec.rb
index 89820ef..0070621 100644
--- a/spec/classes/tripleo_profile_base_octavia_spec.rb
+++ b/spec/classes/tripleo_profile_base_octavia_spec.rb
@@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::octavia' do
let :params do
- { :rabbit_hosts => ['some.server.com'],
+ { :oslomsg_rpc_hosts => ['some.server.com'],
:step => 5
}
end
@@ -44,7 +44,7 @@ describe 'tripleo::profile::base::octavia' do
it 'should provide basic initialization' do
is_expected.to contain_class('octavia').with(
- :default_transport_url => 'rabbit://some.server.com:5672/'
+ :default_transport_url => 'rabbit://guest:password@some.server.com:5672/?ssl=0'
)
is_expected.to contain_class('octavia::config')
end
@@ -52,24 +52,24 @@ describe 'tripleo::profile::base::octavia' do
context 'with multiple hosts' do
before do
- params.merge!({ :rabbit_hosts => ['some.server.com', 'someother.server.com'] })
+ params.merge!({ :oslomsg_rpc_hosts => ['some.server.com', 'someother.server.com'] })
end
it 'should construct a multihost URL' do
is_expected.to contain_class('octavia').with(
- :default_transport_url => 'rabbit://some.server.com:5672,someother.server.com:5672/'
+ :default_transport_url => 'rabbit://guest:password@some.server.com:5672,guest:password@someother.server.com:5672/?ssl=0'
)
end
end
context 'with username provided' do
before do
- params.merge!({ :rabbit_user => 'bunny' })
+ params.merge!({ :oslomsg_rpc_username => 'bunny' })
end
it 'should construct URL with username' do
is_expected.to contain_class('octavia').with(
- :default_transport_url => 'rabbit://bunny@some.server.com:5672/'
+ :default_transport_url => 'rabbit://bunny:password@some.server.com:5672/?ssl=0'
)
end
end
@@ -77,15 +77,15 @@ describe 'tripleo::profile::base::octavia' do
context 'with username and password provided' do
before do
params.merge!(
- { :rabbit_user => 'bunny',
- :rabbit_password => 'carrot'
+ { :oslomsg_rpc_username => 'bunny',
+ :oslomsg_rpc_password => 'carrot'
}
)
end
it 'should construct URL with username and password' do
is_expected.to contain_class('octavia').with(
- :default_transport_url => 'rabbit://bunny:carrot@some.server.com:5672/'
+ :default_transport_url => 'rabbit://bunny:carrot@some.server.com:5672/?ssl=0'
)
end
end
@@ -93,16 +93,16 @@ describe 'tripleo::profile::base::octavia' do
context 'with multiple hosts and user info provided' do
before do
params.merge!(
- { :rabbit_hosts => ['some.server.com', 'someother.server.com'],
- :rabbit_user => 'bunny',
- :rabbit_password => 'carrot'
+ { :oslomsg_rpc_hosts => ['some.server.com', 'someother.server.com'],
+ :oslomsg_rpc_username => 'bunny',
+ :oslomsg_rpc_password => 'carrot'
}
)
end
it 'should distributed user info across hosts URL' do
is_expected.to contain_class('octavia').with(
- :default_transport_url => 'rabbit://bunny:carrot@some.server.com:5672,bunny:carrot@someother.server.com:5672/'
+ :default_transport_url => 'rabbit://bunny:carrot@some.server.com:5672,bunny:carrot@someother.server.com:5672/?ssl=0'
)
end
end