Browse Source

Add sasl_default_realm to oslo_messaging_amqp options

Change-Id: I4225c65f51ce8ab6c479c6fcb7362cb7f3c71370
changes/53/459853/1
Andrew Smith 5 years ago
parent
commit
df41e1e1af
  1. 6
      manifests/messaging/amqp.pp
  2. 15
      spec/defines/oslo_messaging_amqp_spec.rb

6
manifests/messaging/amqp.pp

@ -105,6 +105,10 @@
# (Optional) Name of configuration file (without .conf suffix)
# Defaults to $::os_service_default.
#
# [*sasl_default_realm*]
# (Optional) SASL realm to use if not realm present in username
# Defaults to $:os_service_default.
#
# [*username*]
# (Optional) User name for message broker authentication
# Defaults to $::os_service_default.
@ -146,6 +150,7 @@ define oslo::messaging::amqp(
$sasl_mechanisms = $::os_service_default,
$sasl_config_dir = $::os_service_default,
$sasl_config_name = $::os_service_default,
$sasl_default_realm = $::os_service_default,
$username = $::os_service_default,
$password = $::os_service_default,
$default_send_timeout = $::os_service_default,
@ -175,6 +180,7 @@ define oslo::messaging::amqp(
'oslo_messaging_amqp/sasl_mechanisms' => { value => $sasl_mechanisms },
'oslo_messaging_amqp/sasl_config_dir' => { value => $sasl_config_dir },
'oslo_messaging_amqp/sasl_config_name' => { value => $sasl_config_name },
'oslo_messaging_amqp/sasl_default_realm' => { value => $sasl_default_realm },
'oslo_messaging_amqp/username' => { value => $username },
'oslo_messaging_amqp/password' => { value => $password, secret => true },
'oslo_messaging_amqp/default_send_timeout' => { value => $default_send_timeout },

15
spec/defines/oslo_messaging_amqp_spec.rb

@ -32,6 +32,7 @@ describe 'oslo::messaging::amqp' do
is_expected.to contain_keystone_config('oslo_messaging_amqp/sasl_mechanisms').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/sasl_config_dir').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/sasl_config_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/sasl_default_realm').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/username').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_keystone_config('oslo_messaging_amqp/default_send_timeout').with_value('<SERVICE DEFAULT>')
@ -42,12 +43,13 @@ describe 'oslo::messaging::amqp' do
context 'with overridden parameters' do
let :params do
{ :idle_timeout => 2000,
:container_name => 'openstack',
:username => 'newuser',
:password => 'p@ssw0rd',
:pre_settled => ['rpc-cast','rpc-reply','notify'],
:ssl => true,
{ :idle_timeout => 2000,
:container_name => 'openstack',
:username => 'newuser',
:password => 'p@ssw0rd',
:pre_settled => ['rpc-cast','rpc-reply','notify'],
:ssl => true,
:sasl_default_realm => 'overcloud-1'
}
end
it 'configure oslo_messaging_amqp with overriden values' do
@ -57,6 +59,7 @@ describe 'oslo::messaging::amqp' do
is_expected.to contain_keystone_config('oslo_messaging_amqp/password').with_value('p@ssw0rd').with_secret(true)
is_expected.to contain_keystone_config('oslo_messaging_amqp/pre_settled').with_value(['rpc-cast','rpc-reply','notify'])
is_expected.to contain_keystone_config('oslo_messaging_amqp/ssl').with_value(true)
is_expected.to contain_keystone_config('oslo_messaging_amqp/sasl_default_realm').with_value('overcloud-1')
end
end

Loading…
Cancel
Save