Merge "Use get_notification_url when configuring notifications"

This commit is contained in:
Jenkins 2017-09-02 10:26:26 +00:00 committed by Gerrit Code Review
commit 7e9ec03af4
2 changed files with 5 additions and 4 deletions

View File

@ -542,7 +542,7 @@ function create_nova_conf {
# Set the oslo messaging driver to the typical default. This does not
# enable notifications, but it will allow them to function when enabled.
iniset $NOVA_CONF oslo_messaging_notifications driver "messagingv2"
iniset $NOVA_CONF oslo_messaging_notifications transport_url $(get_transport_url)
iniset $NOVA_CONF oslo_messaging_notifications transport_url $(get_notification_url)
iniset_rpc_backend nova $NOVA_CONF
iniset $NOVA_CONF glance api_servers "$GLANCE_URL"

View File

@ -114,7 +114,7 @@ function rpc_backend_add_vhost {
fi
}
# builds transport url string
# Returns the address of the RPC backend in URL format.
function get_transport_url {
local virtual_host=$1
if is_service_enabled rabbit || { [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; }; then
@ -122,8 +122,9 @@ 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.
# Returns the address of the Notification backend in URL format. This
# should be used to set the transport_url option in the
# oslo_messaging_notifications group.
function get_notification_url {
local virtual_host=$1
if is_service_enabled rabbit || { [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; }; then