From 2df43d6911162264798d12ceb492347710aec7f6 Mon Sep 17 00:00:00 2001 From: Andrew Austin Date: Thu, 6 Jul 2017 14:18:17 +0000 Subject: [PATCH] Use _is_dns_integration_supported for _delete_floatingip L3_NAT_dbonly_mixin._delete_floatingip still uses utils.is_extension_supported to determine if DNS-specific methods should be run rather than the self._is_dns_integration_supported method used by _create and _update. This causes issues with L3 service plugins like Cisco ACI where the core plugin is ML2 but the L3 plugin does not implement the DNS methods. When such a plugin sets _dns_integration to False, _create and _update do not call the DNS-specific plugin methods, but _delete_floatingip does which leads to an exception being raised. This patch changes _delete_floatingip to use the same method for determining DNS support as _create_floatingip and _update_floatingip. Change-Id: Ieb2db6cb96c5d6aae166aa7f0d2d481b2a3690f9 Closes-Bug: #1702693 (cherry picked from commit a6f83bc0aa7575b74c9267b2e399b9d830942e77) --- neutron/db/l3_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/db/l3_db.py b/neutron/db/l3_db.py index 9d2b48c45ae..2f2cde2ca15 100644 --- a/neutron/db/l3_db.py +++ b/neutron/db/l3_db.py @@ -1384,7 +1384,7 @@ class L3_NAT_dbonly_mixin(l3.RouterPluginBase, def _delete_floatingip(self, context, id): floatingip = self._get_floatingip(context, id) floatingip_dict = self._make_floatingip_dict(floatingip) - if utils.is_extension_supported(self._core_plugin, 'dns-integration'): + if self._is_dns_integration_supported: self._process_dns_floatingip_delete(context, floatingip_dict) # Foreign key cascade will take care of the removal of the # floating IP record once the port is deleted. We can't start