Browse Source

Remove rpc_backend due to duplicate declaration when dual backends

This patch:
* Removes the [DEFAULT] rpc_backend as it lead to a duplicate
  declaration when dual oslo.messaging backends were used
* Removes the conversion of pre_settled as it was incorrect
  for the multiple line MultStrOpt value

Change-Id: I7ccd995ef01c2d54427684718adba054260fdd52
changes/05/435105/2
Andrew Smith 5 years ago
parent
commit
12d80eb63e
  1. 3
      manifests/messaging/amqp.pp
  2. 5
      spec/defines/oslo_messaging_amqp_spec.rb

3
manifests/messaging/amqp.pp

@ -157,7 +157,7 @@ define oslo::messaging::amqp(
'oslo_messaging_amqp/anycast_address' => { value => $anycast_address },
'oslo_messaging_amqp/default_notification_exchange' => { value => $default_notification_exchange },
'oslo_messaging_amqp/default_rpc_exchange' => { value => $default_rpc_exchange },
'oslo_messaging_amqp/pre_settled' => { value => join(any2array($pre_settled),',') },
'oslo_messaging_amqp/pre_settled' => { value => any2array($pre_settled) },
'oslo_messaging_amqp/container_name' => { value => $container_name },
'oslo_messaging_amqp/idle_timeout' => { value => $idle_timeout },
'oslo_messaging_amqp/trace' => { value => $trace },
@ -173,7 +173,6 @@ define oslo::messaging::amqp(
'oslo_messaging_amqp/password' => { value => $password },
'oslo_messaging_amqp/default_send_timeout' => { value => $default_send_timeout },
'oslo_messaging_amqp/default_notify_timeout' => { value => $default_notify_timeout },
'DEFAULT/rpc_backend' => { value => 'amqp' },
}
create_resources($name, $amqp_options)
}

5
spec/defines/oslo_messaging_amqp_spec.rb

@ -19,7 +19,7 @@ describe 'oslo::messaging::amqp' do
is_expected.to contain_keystone_config('oslo_messaging_amqp/anycast_address').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/default_notification_exchange').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/default_rpc_exchange').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/pre_settled').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/pre_settled').with_value(['<SERVICE DEFAULT>'])
is_expected.to contain_keystone_config('oslo_messaging_amqp/container_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/idle_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/trace').with_value('<SERVICE DEFAULT>')
@ -35,7 +35,6 @@ describe 'oslo::messaging::amqp' do
is_expected.to contain_keystone_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/default_send_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/default_notify_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/rpc_backend').with_value('amqp')
end
end
@ -46,6 +45,7 @@ describe 'oslo::messaging::amqp' do
:container_name => 'openstack',
:username => 'newuser',
:password => 'p@ssw0rd',
:pre_settled => ['rpc-cast','rpc-reply','notify'],
}
end
it 'configure oslo_messaging_amqp with overriden values' do
@ -53,6 +53,7 @@ describe 'oslo::messaging::amqp' do
is_expected.to contain_keystone_config('oslo_messaging_amqp/container_name').with_value('openstack')
is_expected.to contain_keystone_config('oslo_messaging_amqp/username').with_value('newuser')
is_expected.to contain_keystone_config('oslo_messaging_amqp/password').with_value('p@ssw0rd')
is_expected.to contain_keystone_config('oslo_messaging_amqp/pre_settled').with_value(['rpc-cast','rpc-reply','notify'])
end
end

Loading…
Cancel
Save