kayobe/ansible/roles/kolla-openstack/templates/ml2_conf.ini.j2
Mark Goddard afe1b994ac Support additional options for neutron generic switch driver config
Allows kolla_neutron_ml2_generic_switch_extra to define a dict of additional
config options to add to per-switch configuration for the neutron ML2 generic
switch driver. These options may be switch host-specific.
2017-10-16 16:54:46 +00:00

46 lines
1.2 KiB
Django/Jinja

# {{ ansible_managed }}
[ml2]
{% if kolla_neutron_ml2_mechanism_drivers %}
mechanism_drivers = {{ kolla_neutron_ml2_mechanism_drivers | join(',') }}
{% endif %}
{% if kolla_neutron_ml2_extension_drivers %}
extension_drivers = {{ kolla_neutron_ml2_extension_drivers | join(',') }}
{% endif %}
[ml2_type_vlan]
{% if kolla_neutron_ml2_network_vlan_ranges %}
network_vlan_ranges = {% for vnr in kolla_neutron_ml2_network_vlan_ranges %}{{ vnr.physical_network }}{% if vnr.range is defined %}:{{ vnr.range }}{% endif %}{% if not loop.last %},{% endif %}{% endfor %}
{% endif %}
{% for switch in kolla_neutron_ml2_generic_switches %}
[genericswitch:{{ switch.name }}]
device_type = {{ switch.device_type }}
ip = {{ switch.ip }}
username = {{ switch.username }}
{% if switch.password is defined %}
password = {{ switch.password }}
{% endif %}
{% if switch.key_file is defined %}
key_file = {{ switch.key_file }}
{% endif %}
{% if switch.secret is defined %}
secret = {{ switch.secret }}
{% endif %}
{% for key, value in switch.items() %}
{% if key.startswith('ngs_') %}
{{ key }} = {{ value }}
{% endif %}
{% endfor %}
{% endfor %}
{% if kolla_extra_neutron_ml2 %}
#######################
# Extra configuration
#######################
{{ kolla_extra_neutron_ml2 }}
{% endif %}