Allow setting computes_need_external_bridge.

Allow to set computes_need_external_bridge to true/false
depending on the desired configuration, for allowing
cases such as disable dvr and enable l3 ha.

Closes-Bug: #1769686

Change-Id: I1565b08dfccb7bec2ddda8c048b7d951c9eb1824
Signed-off-by: Jorge Niedbalski <jorge.niedbalski@linaro.org>
This commit is contained in:
Jorge Niedbalski 2018-05-07 12:18:25 -03:00
parent 47b94cb6e4
commit bb1da0074f
3 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ extensions = {{ neutron_agent_extensions|map(attribute='name')|join(',') }}
{% endif %}
[ovs]
{% if inventory_hostname in groups["network"] or (inventory_hostname in groups["compute"] and computes_need_external_bridge ) %}
{% if inventory_hostname in groups["network"] or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool ) %}
bridge_mappings = {% for bridge in neutron_bridge_name.split(',') %}physnet{{ loop.index0 + 1 }}:{{ bridge }}{% if not loop.last %},{% endif %}{% endfor %}
{% endif %}

View File

@ -12,7 +12,7 @@ root_helper =
[ovs]
of_listen_address = {{ os_xenapi_variables.domu_himn_ip }}
ovsdb_connection = tcp:{{ xenserver_himn_ip }}:{{ ovsdb_port }}
{% if computes_need_external_bridge %}
{% if computes_need_external_bridge | bool %}
bridge_mappings = {% for interface in neutron_external_interface.split(',') %}physnet{{ loop.index0 + 1 }}:{{ os_xenapi_variables.domu_vifs[interface]["bridge"] }}{% if not loop.last %},{% endif %}{% endfor %}
{% else %}
bridge_mappings =

View File

@ -38,7 +38,7 @@
changed_when: status.stdout.find('changed') != -1
when:
- inventory_hostname in groups["network"]
or (inventory_hostname in groups["compute"] and computes_need_external_bridge)
or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool )
with_together:
- "{{ neutron_bridge_name.split(',') }}"
- "{{ neutron_external_interface.split(',') }}"