RPC_backend / transport_url workover
- removed deprecated rabbitmq attributes - added rabbit_transport_url Change-Id: I0ca0fcc1e261eeadb76c9355a0f14499085d9bda
This commit is contained in:
parent
b9b6b26616
commit
2f858e3678
|
@ -14,7 +14,7 @@ default['openstack']['identity']['conf'].tap do |conf|
|
|||
# [DEFAULT] option in keystone.conf to define mq notification topics
|
||||
conf['DEFAULT']['notification_topics'] = 'notifications'
|
||||
end
|
||||
conf['DEFAULT']['rpc_backend'] = node['openstack']['mq']['service_type']
|
||||
|
||||
# [assignment] option in keystone.conf to set driver
|
||||
conf['assignment']['driver'] = 'keystone.assignment.backends.sql.Assignment'
|
||||
|
||||
|
|
|
@ -154,13 +154,8 @@ else
|
|||
end
|
||||
|
||||
# set keystone config parameter for rabbitmq if rabbit is the rpc_backend
|
||||
if node['openstack']['identity']['conf']['DEFAULT']['rpc_backend'] == 'rabbit'
|
||||
user = node['openstack']['mq']['identity']['rabbit']['userid']
|
||||
node.default['openstack']['identity']['conf_secrets']
|
||||
.[]('oslo_messaging_rabbit')['rabbit_userid'] = user
|
||||
node.default['openstack']['identity']['conf_secrets']
|
||||
.[]('oslo_messaging_rabbit')['rabbit_password'] =
|
||||
get_password 'user', user
|
||||
if node['openstack']['mq']['service_type'] == 'rabbit'
|
||||
node.default['openstack']['identity']['conf_secrets']['DEFAULT']['transport_url'] = rabbit_transport_url 'identity'
|
||||
end
|
||||
|
||||
# set keystone config parameters for admin_token, endpoints and memcache
|
||||
|
|
|
@ -130,8 +130,10 @@ describe 'openstack-identity::server-apache' do
|
|||
expect(chef_run).not_to render_config_file(path).with_section_content('DEFAULT', /^list_limit = /)
|
||||
end
|
||||
|
||||
it 'has rpc_backend set for rabbit' do
|
||||
expect(chef_run).to render_config_file(path).with_section_content('DEFAULT', /^rpc_backend = rabbit$/)
|
||||
it 'has default transport_url/AMQP options set' do
|
||||
[%r{^transport_url = rabbit://guest:mypass@127.0.0.1:5672$}].each do |line|
|
||||
expect(chef_run).to render_file(path).with_content(line)
|
||||
end
|
||||
end
|
||||
|
||||
describe '[DEFAULT] section' do
|
||||
|
@ -251,17 +253,6 @@ describe 'openstack-identity::server-apache' do
|
|||
expect(chef_run).to render_config_file(path).with_section_content('policy', r)
|
||||
end
|
||||
end
|
||||
|
||||
describe '[oslo_messaging_rabbit] section' do
|
||||
it 'has defaults for oslo_messaging_rabbit section' do
|
||||
[
|
||||
/^rabbit_userid = guest$/,
|
||||
/^rabbit_password = guest$/
|
||||
].each do |line|
|
||||
expect(chef_run).to render_config_file(path).with_section_content('oslo_messaging_rabbit', line)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'default_catalog.templates' do
|
||||
|
|
|
@ -64,5 +64,8 @@ shared_context 'identity_stubs' do
|
|||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
.with('user', 'admin')
|
||||
.and_return('admin')
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:rabbit_transport_url)
|
||||
.with('identity')
|
||||
.and_return('rabbit://guest:mypass@127.0.0.1:5672')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue