Messaging multi-backend support

Add config options to declare by default
rabbitmq as RPC and Notifications backend.

These options will be used to generate
backend-related configs of oslo messaging
and specify dependency.

Change-Id: Ib110af1b9d4feef9085a46518f629e27e8094611
This commit is contained in:
kbespalov 2016-11-30 19:58:13 +03:00 committed by Kirill Bespalov
parent 0d75b55c67
commit 8be506e3e0
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,8 @@
{% macro rabbit(cfg_type) -%}
{% if cfg_type == 'rpc_config' -%}
[DEFAULT]
{%- elif cfg_type == 'notifications_config' -%}
[oslo_messaging_notifications]
{%- endif %}
transport_url=rabbit://{{ rabbitmq.user }}:{{ rabbitmq.password }}@{{ address('rabbitmq') }}
{%- endmacro %}

View File

@ -1,4 +1,10 @@
configs:
messaging:
backend:
rpc: rabbit
notifications: rabbit
dependencies:
rabbit: rabbitmq
rabbitmq:
port:
cont: 5672