From 10e31ea1e253b052b43cd582d57c564c31d570a3 Mon Sep 17 00:00:00 2001 From: Satish Patel Date: Mon, 25 Jan 2021 05:15:24 +0000 Subject: [PATCH] Adding support of subnet_dns_publish_fixed_ip extension in ml2 plugin The subnet-dns-publish-fixed-ip extension adds a new attribute to the definition of the subnet resource. When set to true it will allow publishing DNS records for fixed IPs from that subnet independent of the restrictions described in the [1]. [1] https://docs.openstack.org/neutron/latest/admin/config-dns-int-ext-serv.html Change-Id: I095564cec0f5804e4d0ea9b5201ed40b9d9be603 --- defaults/main.yml | 2 +- ...new-neutron-plugin_base-extension-dbe31debf2187ed1.yaml | 7 +++++++ templates/neutron.conf.j2 | 2 +- templates/plugins/ml2/ml2_conf.ini.j2 | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/adding-new-neutron-plugin_base-extension-dbe31debf2187ed1.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 9f7c65e3..b22e2418 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -333,7 +333,7 @@ neutron_notifications_designate: notifications_designate # - vpnaas # - metering # - qos -# - dns +# - dns/subnet_dns_publish_fixed_ip either one or the other, not both # - port_forwarding neutron_plugin_base: - router diff --git a/releasenotes/notes/adding-new-neutron-plugin_base-extension-dbe31debf2187ed1.yaml b/releasenotes/notes/adding-new-neutron-plugin_base-extension-dbe31debf2187ed1.yaml new file mode 100644 index 00000000..a81f6d19 --- /dev/null +++ b/releasenotes/notes/adding-new-neutron-plugin_base-extension-dbe31debf2187ed1.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + Adds the ``subnet_dns_publish_fixed_ip`` option extension in ml2 plugin. + The subnet-dns-publish-fixed-ip extension adds a new attribute to the + definition of the subnet resource. When set to true it will allow + publishing DNS records for fixed IPs. diff --git a/templates/neutron.conf.j2 b/templates/neutron.conf.j2 index 1661ee56..ddb603e6 100644 --- a/templates/neutron.conf.j2 +++ b/templates/neutron.conf.j2 @@ -2,7 +2,7 @@ {% set neutron_plugin_loaded_base = [] %} {% for plugin in neutron_plugin_base %} - {% if plugin not in ['dns', 'dns_domain_ports'] %} + {% if plugin not in ['dns', 'dns_domain_ports', 'subnet_dns_publish_fixed_ip'] %} {% set _ = neutron_plugin_loaded_base.append(plugin) %} {% endif %} {% endfor %} diff --git a/templates/plugins/ml2/ml2_conf.ini.j2 b/templates/plugins/ml2/ml2_conf.ini.j2 index ed5b4594..dada1670 100644 --- a/templates/plugins/ml2/ml2_conf.ini.j2 +++ b/templates/plugins/ml2/ml2_conf.ini.j2 @@ -5,7 +5,7 @@ type_drivers = {{ neutron_plugins[neutron_plugin_type].drivers_type }} tenant_network_types = {{ neutron_provider_networks.network_types if neutron_provider_networks.network_types != '' else 'local' }} mechanism_drivers = {{ neutron_ml2_mechanism_drivers }} -extension_drivers = port_security{% if 'qos' in neutron_plugin_base %},qos{% endif %}{% if 'dns' in neutron_plugin_base %},dns{% endif %}{% if 'dns_domain_ports' in neutron_plugin_base %},dns_domain_ports{% endif %} +extension_drivers = port_security{% if 'qos' in neutron_plugin_base %},qos{% endif %}{% if 'dns' in neutron_plugin_base %},dns{% endif %}{% if 'dns_domain_ports' in neutron_plugin_base %},dns_domain_ports{% endif %}{% if 'subnet_dns_publish_fixed_ip' in neutron_plugin_base %},subnet_dns_publish_fixed_ip{% endif %} {% if neutron_provider_networks.network_mappings is defined and (neutron_plugin_type == 'ml2.opendaylight' and ('odl-router_v2' in neutron_plugin_base or 'odl-router' in neutron_plugin_base)) %} bridge_mappings = {{ neutron_provider_networks.network_mappings }}