Merge "Explicitly set default notifier strategy" into stable/havana
This commit is contained in:
commit
f76359f1b9
|
@ -159,7 +159,8 @@ class glance::api(
|
|||
$show_image_direct_url = false,
|
||||
$cert_file = false,
|
||||
$key_file = false,
|
||||
$ca_file = false
|
||||
$ca_file = false,
|
||||
$notifier_strategy = 'noop',
|
||||
) inherits glance {
|
||||
|
||||
require keystone::python
|
||||
|
@ -185,6 +186,10 @@ class glance::api(
|
|||
require => Class['glance'],
|
||||
}
|
||||
|
||||
@glance_api_config {
|
||||
'DEFAULT/notifier_strategy': value => $notifier_strategy;
|
||||
}
|
||||
|
||||
if($sql_connection =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {
|
||||
require 'mysql::python'
|
||||
} elsif($sql_connection =~ /postgresql:\/\/\S+:\S+@\S+\/\S+/) {
|
||||
|
|
|
@ -8,8 +8,11 @@ class glance::notify::qpid(
|
|||
$qpid_port = '5672',
|
||||
) inherits glance::api {
|
||||
|
||||
Glance_api_config <| title == 'DEFAULT/notifier_strategy' |> {
|
||||
value => 'qpid'
|
||||
}
|
||||
|
||||
glance_api_config {
|
||||
'DEFAULT/notifier_strategy': value => 'qpid';
|
||||
'DEFAULT/qpid_hostname': value => $qpid_hostname;
|
||||
'DEFAULT/qpid_port': value => $qpid_port;
|
||||
'DEFAULT/qpid_username': value => $qpid_username;
|
||||
|
|
|
@ -13,8 +13,11 @@ class glance::notify::rabbitmq(
|
|||
$rabbit_durable_queues = false
|
||||
) {
|
||||
|
||||
Glance_api_config <| title == 'DEFAULT/notifier_strategy' |> {
|
||||
value => 'rabbit'
|
||||
}
|
||||
|
||||
glance_api_config {
|
||||
'DEFAULT/notifier_strategy': value => 'rabbit';
|
||||
'DEFAULT/rabbit_host': value => $rabbit_host;
|
||||
'DEFAULT/rabbit_port': value => $rabbit_port;
|
||||
'DEFAULT/rabbit_virtual_host': value => $rabbit_virtual_host;
|
||||
|
|
|
@ -32,7 +32,8 @@ describe 'glance::api' do
|
|||
:keystone_password => 'ChangeMe',
|
||||
:sql_idle_timeout => '3600',
|
||||
:sql_connection => 'sqlite:///var/lib/glance/glance.sqlite',
|
||||
:show_image_direct_url => false
|
||||
:show_image_direct_url => false,
|
||||
:notifier_strategy => 'noop'
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -88,7 +89,8 @@ describe 'glance::api' do
|
|||
'bind_port',
|
||||
'registry_host',
|
||||
'registry_port',
|
||||
'show_image_direct_url'
|
||||
'show_image_direct_url',
|
||||
'notifier_strategy'
|
||||
].each do |config|
|
||||
should contain_glance_api_config("DEFAULT/#{config}").with_value(param_hash[config.intern])
|
||||
end
|
||||
|
|
|
@ -14,6 +14,7 @@ describe 'glance::notify::qpid' do
|
|||
end
|
||||
|
||||
it { should contain_glance_api_config('DEFAULT/notifier_strategy').with_value('qpid') }
|
||||
it { should contain_glance_api_config('DEFAULT/notifier_strategy').without_value('noop') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_username').with_value('guest') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_password').with_value('pass') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_hostname').with_value('localhost') }
|
||||
|
|
|
@ -15,6 +15,7 @@ describe 'glance::notify::rabbitmq' do
|
|||
end
|
||||
|
||||
it { should contain_glance_api_config('DEFAULT/notifier_strategy').with_value('rabbit') }
|
||||
it { should contain_glance_api_config('DEFAULT/notifier_strategy').without_value('noop') }
|
||||
it { should contain_glance_api_config('DEFAULT/rabbit_password').with_value('pass') }
|
||||
it { should contain_glance_api_config('DEFAULT/rabbit_userid').with_value('guest') }
|
||||
it { should contain_glance_api_config('DEFAULT/rabbit_host').with_value('localhost') }
|
||||
|
|
Loading…
Reference in New Issue