From 784aaacf0cbd31c56ded2260f5fa89bc1318c299 Mon Sep 17 00:00:00 2001 From: Boden R Date: Thu, 27 Jul 2017 09:10:17 -0600 Subject: [PATCH] use dns api def from neutron-lib neutron-lib contains the dns API definition and associated exceptions, constants, etc. and neutron is moving to it in If180cf92d8ae31a0857080239e8233095cd6c768. This patch moves all references over to use the API def from neutron-lib. Change-Id: Ib17302db4d0d9aaa3b4f469980386b333b4bb056 --- vmware_nsx/extension_drivers/dns_integration.py | 5 +++-- .../tests/unit/extension_drivers/test_dns_integration.py | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vmware_nsx/extension_drivers/dns_integration.py b/vmware_nsx/extension_drivers/dns_integration.py index 61de248f1a..f86edcdd6e 100644 --- a/vmware_nsx/extension_drivers/dns_integration.py +++ b/vmware_nsx/extension_drivers/dns_integration.py @@ -14,14 +14,15 @@ # License for the specific language governing permissions and limitations # under the License. +from neutron_lib.api.definitions import dns from neutron_lib.api import validators from neutron_lib import context as n_context +from neutron_lib.exceptions import dns as dns_exc from neutron_lib.plugins import directory from oslo_config import cfg from oslo_log import log as logging from neutron.extensions import availability_zone as az_ext -from neutron.extensions import dns from neutron.objects import network as net_obj from neutron.objects import ports as port_obj from neutron.services.externaldns import driver @@ -338,5 +339,5 @@ def _get_dns_driver(): except ImportError: LOG.exception("ImportError exception occurred while loading " "the external DNS service driver") - raise dns.ExternalDNSDriverNotFound( + raise dns_exc.ExternalDNSDriverNotFound( driver=cfg.CONF.external_dns_driver) diff --git a/vmware_nsx/tests/unit/extension_drivers/test_dns_integration.py b/vmware_nsx/tests/unit/extension_drivers/test_dns_integration.py index 0c432e65e8..47898554d4 100644 --- a/vmware_nsx/tests/unit/extension_drivers/test_dns_integration.py +++ b/vmware_nsx/tests/unit/extension_drivers/test_dns_integration.py @@ -13,12 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. +from neutron_lib.api.definitions import dns from neutron_lib import context from neutron_lib.plugins import directory from oslo_config import cfg -from neutron.extensions import dns - from vmware_nsx.extension_drivers import dns_integration from vmware_nsx.tests.unit.nsx_v import test_plugin as test_v_plugin from vmware_nsx.tests.unit.nsx_v3 import test_plugin as test_v3_plugin