From a8f95c9e8afedba50d96964e0ffd48ed3ce602b7 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 5 Sep 2017 16:11:14 +0100 Subject: [PATCH] Move two neutron options from custom neutron.conf to globals.yml Support was added in kolla-ansible for neutron_type_drivers and neutron_tenant_network_types. --- ansible/roles/kolla-ansible/defaults/main.yml | 6 ++++++ ansible/roles/kolla-ansible/templates/globals.yml.j2 | 11 +++++++++++ ansible/roles/kolla-openstack/defaults/main.yml | 6 ------ .../roles/kolla-openstack/templates/ml2_conf.ini.j2 | 8 -------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ansible/roles/kolla-ansible/defaults/main.yml b/ansible/roles/kolla-ansible/defaults/main.yml index 9be0d1ad4..f143eb675 100644 --- a/ansible/roles/kolla-ansible/defaults/main.yml +++ b/ansible/roles/kolla-ansible/defaults/main.yml @@ -143,6 +143,12 @@ kolla_provision_interface: # Interface on which the inspector dnsmasq service listens. kolla_inspector_dnsmasq_interface: +# List of Neutron ML2 type drivers to use. +kolla_neutron_ml2_type_drivers: [] + +# List of Neutron ML2 tenant network types to use. +kolla_neutron_ml2_tenant_network_types: [] + #################### # TLS options #################### diff --git a/ansible/roles/kolla-ansible/templates/globals.yml.j2 b/ansible/roles/kolla-ansible/templates/globals.yml.j2 index f79710387..a23d9d51c 100644 --- a/ansible/roles/kolla-ansible/templates/globals.yml.j2 +++ b/ansible/roles/kolla-ansible/templates/globals.yml.j2 @@ -103,6 +103,17 @@ ironic_dnsmasq_interface: "{{ kolla_inspector_dnsmasq_interface }}" # Valid options are [ openvswitch, linuxbridge ] neutron_plugin_agent: "openvswitch" +# Comma-separated names of neutron ML2 type drivers. +{% if kolla_neutron_ml2_type_drivers %} +neutron_type_drivers: {{ kolla_neutron_ml2_type_drivers | join(',') }} +{% endif %} + +# Comma-separated types of tenant networks (should be listed in 'neutron_type_drivers') +# NOTE: for ironic this list should also contain 'flat' +{% if kolla_neutron_ml2_tenant_network_types %} +neutron_tenant_network_types: {{ kolla_neutron_ml2_tenant_network_types | join(',') }} +{% endif %} + #################### # keepalived options diff --git a/ansible/roles/kolla-openstack/defaults/main.yml b/ansible/roles/kolla-openstack/defaults/main.yml index fddb868d4..5b35e4638 100644 --- a/ansible/roles/kolla-openstack/defaults/main.yml +++ b/ansible/roles/kolla-openstack/defaults/main.yml @@ -215,12 +215,6 @@ kolla_enable_neutron: # List of Neutron ML2 mechanism drivers to use. kolla_neutron_ml2_mechanism_drivers: [] -# List of Neutron ML2 type drivers to use. -kolla_neutron_ml2_type_drivers: [] - -# List of Neutron ML2 tenant network types to use. -kolla_neutron_ml2_tenant_network_types: [] - # List of Neutron ML2 network VLAN ranges to use. Each item should be a dict # containing the following items: # physical_network: The physical network diff --git a/ansible/roles/kolla-openstack/templates/ml2_conf.ini.j2 b/ansible/roles/kolla-openstack/templates/ml2_conf.ini.j2 index e26c15473..c6e762200 100644 --- a/ansible/roles/kolla-openstack/templates/ml2_conf.ini.j2 +++ b/ansible/roles/kolla-openstack/templates/ml2_conf.ini.j2 @@ -5,14 +5,6 @@ mechanism_drivers = {{ kolla_neutron_ml2_mechanism_drivers | join(',') }} {% endif %} -{% if kolla_neutron_ml2_type_drivers %} -type_drivers = {{ kolla_neutron_ml2_type_drivers | join(',') }} -{% endif %} - -{% if kolla_neutron_ml2_tenant_network_types %} -tenant_network_types = {{ kolla_neutron_ml2_tenant_network_types | join(',') }} -{% endif %} - {% if kolla_neutron_ml2_extension_drivers %} extension_drivers = {{ kolla_neutron_ml2_extension_drivers | join(',') }} {% endif %}