104 lines
2.9 KiB
Django/Jinja
104 lines
2.9 KiB
Django/Jinja
# ml2_conf.ini
|
|
[ml2]
|
|
# Changing type_drivers after bootstrap can lead to database inconsistencies
|
|
{% if neutron.plugin_agent == "calico" %}
|
|
type_drivers = local, flat
|
|
tenant_network_types = local
|
|
{% else %}
|
|
type_drivers = flat,vlan,vxlan
|
|
tenant_network_types = {{ neutron.ml2.tenant_network_types|join(',') }}
|
|
{% endif %}
|
|
|
|
{% if neutron.plugin_agent == "openvswitch" %}
|
|
{% if neutron.sriov.enabled %}
|
|
mechanism_drivers = openvswitch,sriovnicswitch
|
|
{% else %}
|
|
mechanism_drivers = openvswitch,l2population
|
|
{% endif %}
|
|
{% elif neutron.plugin_agent == "linuxbridge" %}
|
|
mechanism_drivers = linuxbridge,l2population
|
|
{% elif neutron.plugin_agent == "calico" %}
|
|
mechanism_drivers = calico
|
|
{% elif neutron.plugin_agent == "opendaylight" %}
|
|
mechanism_drivers = opendaylight, logger
|
|
{% endif %}
|
|
|
|
extension_drivers = port_security{% if neutron.enable_qos %},qos{% endif %}
|
|
|
|
[ml2_type_vlan]
|
|
network_vlan_ranges =
|
|
{%- for net in neutron.physnets if net.vlan_range -%}
|
|
{%- if not loop.first %},{% endif -%}
|
|
{{ net.name }}:{{ net.vlan_range }}
|
|
{%- endfor %}
|
|
|
|
[ml2_type_flat]
|
|
flat_networks =
|
|
{%- for net in neutron.physnets if net.flat -%}
|
|
{%- if not loop.first %},{% endif -%}
|
|
{{ net.name }}
|
|
{%- endfor %}
|
|
|
|
[ml2_type_vxlan]
|
|
vni_ranges = {{ neutron.ml2.vni_ranges|join(',') }}
|
|
vxlan_group = 239.1.1.1
|
|
|
|
[securitygroup]
|
|
{% if neutron.plugin_agent == "openvswitch" %}
|
|
{% if True in neutron.physnets|map(attribute="dpdk") %}
|
|
firewall_driver = openvswitch
|
|
{% else %}
|
|
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
|
|
{% endif %}
|
|
{% elif neutron.plugin_agent == "linuxbridge" %}
|
|
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
|
|
{% endif %}
|
|
|
|
{% if neutron.plugin_agent == "openvswitch" %}
|
|
[agent]
|
|
tunnel_types = vxlan
|
|
l2_population = true
|
|
arp_responder = true
|
|
|
|
{% if neutron.dvr %}
|
|
enable_distributed_routing = true
|
|
{% endif %}
|
|
|
|
[ovs]
|
|
{% if True in neutron.physnets|map(attribute="dpdk") %}
|
|
datapath_type = netdev
|
|
{% endif %}
|
|
ovsdb_interface = {{ neutron.ovsdb.interface }}
|
|
ovsdb_connection = {{ neutron.ovsdb.connection }}
|
|
bridge_mappings =
|
|
{%- for net in neutron.physnets -%}
|
|
{%- if not loop.first %},{% endif -%}
|
|
{{ net.name }}:{{ net.bridge_name }}
|
|
{%- endfor %}
|
|
{% elif neutron.plugin_agent == "linuxbridge" %}
|
|
[linux_bridge]
|
|
physical_interface_mappings =
|
|
{%- for net in neutron.physnets -%}
|
|
{%- if not loop.first %},{% endif -%}
|
|
{{ net.name }}:{{ net.interface }}
|
|
{%- endfor %}
|
|
|
|
[vxlan]
|
|
l2_population = true
|
|
{% endif %}
|
|
local_ip = {{ network_topology["private"]["address"] }}
|
|
|
|
{% if neutron.plugin_agent == "calico" %}
|
|
[calico]
|
|
etcd_host = {{ neutron.calico.etcd_host }}
|
|
etcd_port = {{ neutron.calico.etcd_port }}
|
|
{% endif %}
|
|
|
|
{% if neutron.plugin_agent == "opendaylight" %}
|
|
[ml2_odl]
|
|
port_binding_controller = network-topology
|
|
password = {{ opendaylight.password }}
|
|
username = {{ opendaylight.username }}
|
|
url = {{ address('opendaylight', port=opendaylight.api_port, with_scheme=True) }}/controller/nb/v2/neutron
|
|
{% endif %}
|