Ensures DNS_DRIVER is loaded before it is checked

Previously it was possible for DNS_DRIVER to be checked here before anything
had attempted to load it, causing the check to erroneuously fail. This patch
makes sure that the check will not fail simply because nothing had loaded it
prior by attempting to load it immediately before the check.

Change-Id: I34537beaf675db2634493dfef27b69051a8d0781
Closes-Bug: 1554151
This commit is contained in:
James Anziano
2016-03-07 19:08:39 +00:00
parent 48649d83aa
commit 4f04102e57

View File

@@ -182,7 +182,8 @@ class DNSExtensionDriverML2(DNSExtensionDriver):
return True
def external_dns_not_needed(self, context, network):
if not DNS_DRIVER:
dns_driver = _get_dns_driver()
if not dns_driver:
return True
if network['router:external']:
return True