Correct notification driver

The notification driver setup was resulting in the driver and connection string
on the same line. This is caused by the case statement and how jinja formats
the template when a case statement is present. This change modifies how the
driver string is created using a ternary, which will eliminate the case
statement and render the value of the diver correctly.

Change-Id: I78293b35a30ea12da25fc11d7a5c33cdf2982e2d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2019-02-07 22:33:26 +00:00
parent 45fc484bd4
commit b40f4b5e1a

View File

@ -23,7 +23,7 @@ transport_url = {{ keystone_oslomsg_rpc_transport }}://{% for host in keystone_o
ssl = {{ keystone_oslomsg_rpc_use_ssl }} ssl = {{ keystone_oslomsg_rpc_use_ssl }}
[oslo_messaging_notifications] [oslo_messaging_notifications]
driver = {% if keystone_ceilometer_enabled %}messagingv2{% else %}noop{% endif %} driver = {{ (keystone_ceilometer_enabled | bool) | ternary('messagingv2', 'noop') }}
transport_url = {{ keystone_oslomsg_notify_transport }}://{% for host in keystone_oslomsg_notify_servers.split(',') %}{{ keystone_oslomsg_notify_userid }}:{{ keystone_oslomsg_notify_password }}@{{ host }}:{{ keystone_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ keystone_oslomsg_notify_vhost }}{% if keystone_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} transport_url = {{ keystone_oslomsg_notify_transport }}://{% for host in keystone_oslomsg_notify_servers.split(',') %}{{ keystone_oslomsg_notify_userid }}:{{ keystone_oslomsg_notify_password }}@{{ host }}:{{ keystone_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ keystone_oslomsg_notify_vhost }}{% if keystone_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
{% if keystone_cache_servers | length > 0 %} {% if keystone_cache_servers | length > 0 %}