Merge "Define a new function for notifications URL"
This commit is contained in:
commit
bc8db65da2
@ -122,6 +122,15 @@ function get_transport_url {
|
||||
fi
|
||||
}
|
||||
|
||||
# Repeat the definition, in case get_transport_url is overriden for RPC purpose.
|
||||
# get_notification_url can then be used to talk to rabbit for notifications.
|
||||
function get_notification_url {
|
||||
local virtual_host=$1
|
||||
if is_service_enabled rabbit || { [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; }; then
|
||||
echo "rabbit://$RABBIT_USERID:$RABBIT_PASSWORD@$RABBIT_HOST:5672/$virtual_host"
|
||||
fi
|
||||
}
|
||||
|
||||
# iniset configuration
|
||||
function iniset_rpc_backend {
|
||||
local package=$1
|
||||
|
@ -412,7 +412,7 @@ function configure_swift {
|
||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer "set log_level" "WARN"
|
||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer paste.filter_factory "ceilometermiddleware.swift:filter_factory"
|
||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer control_exchange "swift"
|
||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer url $(get_transport_url)
|
||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer url $(get_notification_url)
|
||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer driver "messaging"
|
||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer topic "notifications"
|
||||
SWIFT_EXTRAS_MIDDLEWARE_LAST="${SWIFT_EXTRAS_MIDDLEWARE_LAST} ceilometer"
|
||||
|
Loading…
Reference in New Issue
Block a user