Add kombu_ssl_version attributes for rabbitmq SSL

Change-Id: I40657a15f3cccb115396bf23083320d0f4d82d51
Closes-bug: #1433405
This commit is contained in:
wenchma 2015-03-18 14:02:02 +08:00
parent c0ac0de826
commit e17ae52931
2 changed files with 12 additions and 1 deletions

View File

@ -55,6 +55,8 @@ default['openstack']['mq']['auto_delete'] = false
default['openstack']['mq']['qpid']['protocol'] = 'tcp'
# global switch for handling rabbit ssl
default['openstack']['mq']['rabbitmq']['use_ssl'] = false
# SSL version to use (valid only if SSL enabled)
default['openstack']['mq']['rabbitmq']['kombu_ssl_version'] = nil
# global switch for handling rabbit ha
default['openstack']['mq']['rabbitmq']['ha'] = false
# defined in oslo/messaging/_drivers/impl_qpid.py
@ -83,7 +85,8 @@ rabbit_defaults = {
port: node['openstack']['endpoints']['mq']['port'],
host: node['openstack']['endpoints']['mq']['host'],
ha: node['openstack']['mq']['rabbitmq']['ha'],
use_ssl: node['openstack']['mq']['rabbitmq']['use_ssl']
use_ssl: node['openstack']['mq']['rabbitmq']['use_ssl'],
kombu_ssl_version: node['openstack']['mq']['rabbitmq']['kombu_ssl_version']
}
###################################################################

View File

@ -76,5 +76,13 @@ describe 'openstack-common::default' do
expect(chef_run.node['openstack']['endpoints'][endpoint]['scheme']).to eq('https')
end
end
it 'enables rabbit ssl version for all services' do
node.set['openstack']['mq']['rabbitmq']['kombu_ssl_version'] = 'TLSv1.2'
%w{bare-metal block-storage compute database image telemetry network orchestration}.each do |svc|
expect(chef_run.node['openstack']['mq'][svc]['rabbit']['kombu_ssl_version']).to eq('TLSv1.2')
end
end
end
end