ceilometer: Require default_transport_url
The default_transport_url parameter should be configured appropriately so that the ceilometer middleware can send notifications. Change-Id: I4fb26670668073619ad3629ea47194ddc33981f0
This commit is contained in:
parent
bba25b4a95
commit
bca2639e5b
@ -11,10 +11,9 @@
|
|||||||
# (Required) The password for the user
|
# (Required) The password for the user
|
||||||
#
|
#
|
||||||
# [*default_transport_url*]
|
# [*default_transport_url*]
|
||||||
# (optional) A URL representing the messaging driver to use and its full
|
# (Required) A URL representing the messaging driver to use and its full
|
||||||
# configuration. Transport URLs take the form:
|
# configuration. Transport URLs take the form:
|
||||||
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
#
|
||||||
# [*driver*]
|
# [*driver*]
|
||||||
# (Optional) The Drivers(s) to handle sending notifications.
|
# (Optional) The Drivers(s) to handle sending notifications.
|
||||||
@ -162,7 +161,7 @@
|
|||||||
#
|
#
|
||||||
class swift::proxy::ceilometer(
|
class swift::proxy::ceilometer(
|
||||||
String[1] $password,
|
String[1] $password,
|
||||||
$default_transport_url = undef,
|
String[1] $default_transport_url,
|
||||||
$driver = $facts['os_service_default'],
|
$driver = $facts['os_service_default'],
|
||||||
$topic = $facts['os_service_default'],
|
$topic = $facts['os_service_default'],
|
||||||
$control_exchange = $facts['os_service_default'],
|
$control_exchange = $facts['os_service_default'],
|
||||||
|
@ -12,17 +12,12 @@ describe 'swift::proxy::ceilometer' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:password => 'swiftpassword'
|
:password => 'swiftpassword',
|
||||||
|
:default_transport_url => 'rabbit://user_1:user_1_passw@1.1.1.1:5673/rabbit',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "when using default parameters" do
|
describe "when using default parameters" do
|
||||||
before :each do
|
|
||||||
params.merge!({
|
|
||||||
:default_transport_url => 'rabbit://user_1:user_1_passw@1.1.1.1:5673/rabbit',
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:ceilometer/password').with_value('swiftpassword').with_secret(true) }
|
it { is_expected.to contain_swift_proxy_config('filter:ceilometer/password').with_value('swiftpassword').with_secret(true) }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:ceilometer/paste.filter_factory').with_value('ceilometermiddleware.swift:filter_factory') }
|
it { is_expected.to contain_swift_proxy_config('filter:ceilometer/paste.filter_factory').with_value('ceilometermiddleware.swift:filter_factory') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:ceilometer/url').with_value('rabbit://user_1:user_1_passw@1.1.1.1:5673/rabbit').with_secret(true) }
|
it { is_expected.to contain_swift_proxy_config('filter:ceilometer/url').with_value('rabbit://user_1:user_1_passw@1.1.1.1:5673/rabbit').with_secret(true) }
|
||||||
@ -49,19 +44,18 @@ describe 'swift::proxy::ceilometer' do
|
|||||||
describe "when overriding default parameters with rabbit driver" do
|
describe "when overriding default parameters with rabbit driver" do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
:default_transport_url => 'rabbit://user_1:user_1_passw@1.1.1.1:5673/rabbit',
|
:driver => 'messagingv2',
|
||||||
:driver => 'messagingv2',
|
:topic => 'notifications',
|
||||||
:topic => 'notifications',
|
:control_exchange => 'swift',
|
||||||
:control_exchange => 'swift',
|
:nonblocking_notify => true,
|
||||||
:nonblocking_notify => true,
|
:ignore_projects => ['services', 'admin'],
|
||||||
:ignore_projects => ['services', 'admin'],
|
:auth_url => 'http://127.0.0.1:5000',
|
||||||
:auth_url => 'http://127.0.0.1:5000',
|
:auth_type => 'password',
|
||||||
:auth_type => 'password',
|
:project_domain_name => 'Default',
|
||||||
:project_domain_name => 'Default',
|
:user_domain_name => 'Default',
|
||||||
:user_domain_name => 'Default',
|
:project_name => 'services',
|
||||||
:project_name => 'services',
|
:username => 'swift',
|
||||||
:username => 'swift',
|
:region_name => 'region2'
|
||||||
:region_name => 'region2'
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -83,14 +77,6 @@ describe 'swift::proxy::ceilometer' do
|
|||||||
it { is_expected.to contain_swift_proxy_config('filter:ceilometer/region_name').with_value('region2') }
|
it { is_expected.to contain_swift_proxy_config('filter:ceilometer/region_name').with_value('region2') }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with default transport url' do
|
|
||||||
before do
|
|
||||||
params.merge!({ :default_transport_url => 'rabbit://user:pass@host:1234/virt' })
|
|
||||||
end
|
|
||||||
|
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:ceilometer/url').with_value('rabbit://user:pass@host:1234/virt').with_secret(true) }
|
|
||||||
end
|
|
||||||
|
|
||||||
it { is_expected.to contain_oslo__messaging__rabbit('swift_ceilometer_config').with(
|
it { is_expected.to contain_oslo__messaging__rabbit('swift_ceilometer_config').with(
|
||||||
:rabbit_ha_queues => '<SERVICE DEFAULT>',
|
:rabbit_ha_queues => '<SERVICE DEFAULT>',
|
||||||
:heartbeat_timeout_threshold => '<SERVICE DEFAULT>',
|
:heartbeat_timeout_threshold => '<SERVICE DEFAULT>',
|
||||||
@ -135,8 +121,7 @@ describe 'swift::proxy::ceilometer' do
|
|||||||
describe 'when system_scope is set' do
|
describe 'when system_scope is set' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
:default_transport_url => 'rabbit://user_1:user_1_passw@1.1.1.1:5673/rabbit',
|
:system_scope => 'all'
|
||||||
:system_scope => 'all'
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user