Allow to configure transport_url

Change-Id: I9ec0a98f896eb881d1f38e7803d89e52c7a3ef82
diff --git a/manila/files/pike/manila.conf b/manila/files/pike/manila.conf
index 5e9138e..ba24ae5 100644
--- a/manila/files/pike/manila.conf
+++ b/manila/files/pike/manila.conf
@@ -74,6 +74,17 @@
 driver_handles_share_servers = {{ cfg.dhss }}
 {%- endif %}
 
+{%- set rabbit_port = cfg.message_queue.get('port', 5671 if cfg.message_queue.get('ssl',{}).get('enabled', False)  else 5672) %}
+{%- if cfg.message_queue.members is defined %}
+transport_url = rabbit://{% for member in cfg.message_queue.members -%}
+                             {{ cfg.message_queue.user }}:{{ cfg.message_queue.password }}@{{ member.host }}:{{ member.get('port', rabbit_port) }}
+                             {%- if not loop.last -%},{%- endif -%}
+                         {%- endfor -%}
+                             /{{ cfg.message_queue.virtual_host }}
+{%- else %}
+transport_url = rabbit://{{ cfg.message_queue.user }}:{{ cfg.message_queue.password }}@{{ cfg.message_queue.host }}:{{ rabbit_port }}/{{ cfg.message_queue.virtual_host }}
+{%- endif %}
+
 [database]
 {% set _database = cfg.database %}
 {%- if _database.ssl is defined and cacert_file not in _database.get('ssl', {}).keys() %}{% do _database['ssl'].update({'cacert_file': cfg.cacert_file}) %}{% endif %}