summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Johnson <johnsomor@gmail.com>2021-11-18 00:28:18 +0000
committerMichael Johnson <johnsomor@gmail.com>2021-11-18 00:30:05 +0000
commit0e16095a80c28c86dcb0a4fa2be4370b8ee9116b (patch)
tree435d4eb7eb04df49a41340f0d0402efcb8500f06
parentc6d15d3d5e38e4921e4f9f7121306ee6311c34f9 (diff)
downloaddesignate-0e16095a80c28c86dcb0a4fa2be4370b8ee9116b.tar.gz
Enable H306 check and fix import ordering
To better align with other OpenStack projects and to reduce the ongoing problem with duplicate imports, this patch re-enables the H306 check for proper module import order. Change-Id: Iced92590829f6d9177d64ad4868aebe6eafd6a8a
-rw-r--r--contrib/archive/backends/impl_ipa/__init__.py4
-rw-r--r--contrib/archive/backends/impl_ipa/auth.py8
-rw-r--r--contrib/designate-ext-samplehandler/designate_ext_samplehandler/notification_handler/sample.py2
-rwxr-xr-xcontrib/dns_dump_raw.py2
-rwxr-xr-xcontrib/dns_dump_server.py2
-rwxr-xr-xcontrib/fixleadingzeros.py11
-rw-r--r--contrib/zoneextractor.py6
-rw-r--r--designate/agent/handler.py9
-rw-r--r--designate/agent/service.py6
-rw-r--r--designate/api/admin/__init__.py2
-rw-r--r--designate/api/admin/app.py2
-rw-r--r--designate/api/admin/controllers/extensions/counts.py5
-rw-r--r--designate/api/admin/controllers/extensions/export.py4
-rw-r--r--designate/api/admin/controllers/extensions/quotas.py6
-rw-r--r--designate/api/admin/controllers/extensions/reports.py2
-rw-r--r--designate/api/admin/controllers/extensions/tenants.py4
-rw-r--r--designate/api/admin/controllers/extensions/zones.py2
-rw-r--r--designate/api/middleware.py6
-rw-r--r--designate/api/v2/__init__.py2
-rw-r--r--designate/api/v2/app.py2
-rw-r--r--designate/api/v2/controllers/blacklists.py7
-rw-r--r--designate/api/v2/controllers/floatingips.py4
-rw-r--r--designate/api/v2/controllers/limits.py3
-rw-r--r--designate/api/v2/controllers/pools.py6
-rw-r--r--designate/api/v2/controllers/quotas.py2
-rw-r--r--designate/api/v2/controllers/recordsets.py4
-rw-r--r--designate/api/v2/controllers/reverse.py2
-rw-r--r--designate/api/v2/controllers/root.py12
-rw-r--r--designate/api/v2/controllers/service_status.py2
-rw-r--r--designate/api/v2/controllers/tlds.py6
-rw-r--r--designate/api/v2/controllers/tsigkeys.py7
-rw-r--r--designate/api/v2/controllers/zones/__init__.py8
-rw-r--r--designate/api/v2/controllers/zones/nameservers.py4
-rw-r--r--designate/api/v2/controllers/zones/recordsets.py8
-rw-r--r--designate/api/v2/controllers/zones/tasks/__init__.py18
-rw-r--r--designate/api/v2/controllers/zones/tasks/abandon.py4
-rw-r--r--designate/api/v2/controllers/zones/tasks/exports.py6
-rw-r--r--designate/api/v2/controllers/zones/tasks/imports.py6
-rw-r--r--designate/api/v2/controllers/zones/tasks/transfer_accepts.py6
-rw-r--r--designate/api/v2/controllers/zones/tasks/transfer_requests.py8
-rw-r--r--designate/api/v2/controllers/zones/tasks/xfr.py4
-rw-r--r--designate/api/wsgi.py2
-rw-r--r--designate/backend/agent.py12
-rw-r--r--designate/backend/agent_backend/impl_denominator.py4
-rwxr-xr-xdesignate/backend/agent_backend/impl_djbdns.py2
-rw-r--r--designate/backend/agent_backend/impl_gdnsd.py6
-rwxr-xr-xdesignate/backend/agent_backend/impl_knot2.py2
-rw-r--r--designate/backend/agent_backend/impl_msdns.py6
-rw-r--r--designate/backend/base.py2
-rw-r--r--designate/backend/impl_akamai_v2.py4
-rw-r--r--designate/backend/impl_bind9.py4
-rw-r--r--designate/backend/impl_designate.py2
-rwxr-xr-xdesignate/backend/impl_dynect.py2
-rw-r--r--designate/backend/impl_infoblox/__init__.py2
-rw-r--r--designate/backend/impl_ns1.py4
-rw-r--r--designate/backend/impl_nsd4.py2
-rw-r--r--designate/backend/impl_pdns4.py4
-rw-r--r--designate/central/rpcapi.py2
-rw-r--r--designate/central/service.py22
-rw-r--r--designate/cmd/agent.py2
-rw-r--r--designate/cmd/api.py2
-rw-r--r--designate/cmd/central.py2
-rw-r--r--designate/cmd/mdns.py2
-rw-r--r--designate/cmd/producer.py2
-rw-r--r--designate/cmd/sink.py2
-rw-r--r--designate/conf/__init__.py2
-rw-r--r--designate/context.py2
-rw-r--r--designate/dnsutils.py6
-rw-r--r--designate/heartbeat_emitter.py2
-rw-r--r--designate/hookpoints.py4
-rw-r--r--designate/manage/pool.py10
-rw-r--r--designate/manage/tlds.py4
-rw-r--r--designate/mdns/base.py2
-rw-r--r--designate/mdns/handler.py2
-rw-r--r--designate/mdns/notify.py10
-rw-r--r--designate/mdns/rpcapi.py2
-rw-r--r--designate/mdns/service.py8
-rw-r--r--designate/mdns/xfr.py2
-rw-r--r--designate/network_api/fake.py2
-rw-r--r--designate/notification_handler/base.py2
-rw-r--r--designate/notifications.py2
-rw-r--r--designate/objects/adapters/api_v2/base.py4
-rw-r--r--designate/objects/adapters/api_v2/blacklist.py3
-rw-r--r--designate/objects/adapters/api_v2/floating_ip.py3
-rw-r--r--designate/objects/adapters/api_v2/pool.py3
-rw-r--r--designate/objects/adapters/api_v2/pool_attribute.py2
-rw-r--r--designate/objects/adapters/api_v2/pool_ns_record.py3
-rw-r--r--designate/objects/adapters/api_v2/quota.py3
-rw-r--r--designate/objects/adapters/api_v2/record.py3
-rw-r--r--designate/objects/adapters/api_v2/recordset.py5
-rw-r--r--designate/objects/adapters/api_v2/service_status.py3
-rw-r--r--designate/objects/adapters/api_v2/tld.py3
-rw-r--r--designate/objects/adapters/api_v2/tsigkey.py3
-rw-r--r--designate/objects/adapters/api_v2/validation_error.py2
-rw-r--r--designate/objects/adapters/api_v2/zone.py3
-rw-r--r--designate/objects/adapters/api_v2/zone_attribute.py2
-rw-r--r--designate/objects/adapters/api_v2/zone_export.py3
-rw-r--r--designate/objects/adapters/api_v2/zone_import.py3
-rw-r--r--designate/objects/adapters/api_v2/zone_master.py2
-rw-r--r--designate/objects/adapters/api_v2/zone_transfer_accept.py3
-rw-r--r--designate/objects/adapters/api_v2/zone_transfer_request.py5
-rw-r--r--designate/objects/adapters/base.py2
-rw-r--r--designate/objects/adapters/yaml/pool.py3
-rw-r--r--designate/objects/adapters/yaml/pool_also_notify.py3
-rw-r--r--designate/objects/adapters/yaml/pool_attribute.py2
-rw-r--r--designate/objects/adapters/yaml/pool_nameserver.py3
-rw-r--r--designate/objects/adapters/yaml/pool_ns_record.py2
-rw-r--r--designate/objects/adapters/yaml/pool_target.py3
-rw-r--r--designate/objects/adapters/yaml/pool_target_master.py3
-rw-r--r--designate/objects/adapters/yaml/pool_target_option.py2
-rw-r--r--designate/objects/base.py8
-rw-r--r--designate/objects/fields.py2
-rwxr-xr-xdesignate/objects/recordset.py2
-rw-r--r--designate/objects/rrdata_a.py4
-rw-r--r--designate/objects/rrdata_aaaa.py4
-rw-r--r--designate/objects/rrdata_caa.py5
-rw-r--r--designate/objects/rrdata_cert.py4
-rw-r--r--designate/objects/rrdata_cname.py4
-rw-r--r--designate/objects/rrdata_mx.py4
-rw-r--r--designate/objects/rrdata_naptr.py4
-rw-r--r--designate/objects/rrdata_ns.py4
-rw-r--r--designate/objects/rrdata_ptr.py4
-rw-r--r--designate/objects/rrdata_soa.py4
-rw-r--r--designate/objects/rrdata_spf.py6
-rw-r--r--designate/objects/rrdata_srv.py4
-rw-r--r--designate/objects/rrdata_sshfp.py4
-rw-r--r--designate/objects/rrdata_txt.py6
-rw-r--r--designate/objects/zone.py6
-rw-r--r--designate/objects/zone_master.py2
-rw-r--r--designate/plugin.py5
-rw-r--r--designate/policy.py4
-rw-r--r--designate/producer/service.py4
-rw-r--r--designate/producer/tasks.py2
-rw-r--r--designate/quota/impl_storage.py2
-rw-r--r--designate/rpc.py2
-rw-r--r--designate/scheduler/filters/default_pool_filter.py2
-rw-r--r--designate/scheduler/filters/fallback_filter.py2
-rw-r--r--designate/scheduler/filters/in_doubt_default_pool_filter.py2
-rw-r--r--designate/scheduler/filters/pool_id_attribute_filter.py2
-rw-r--r--designate/scheduler/filters/random_filter.py2
-rw-r--r--designate/schema/__init__.py6
-rw-r--r--designate/service.py6
-rw-r--r--designate/sqlalchemy/base.py2
-rw-r--r--designate/sqlalchemy/utils.py10
-rw-r--r--designate/storage/__init__.py2
-rw-r--r--designate/storage/impl_sqlalchemy/migrate_repo/versions/082_unique_ns_record.py4
-rw-r--r--designate/storage/impl_sqlalchemy/migrate_repo/versions/085_add_zone_attributes.py4
-rw-r--r--designate/storage/impl_sqlalchemy/migrate_repo/versions/086_new_pools_tables.py2
-rw-r--r--designate/storage/impl_sqlalchemy/migrate_repo/versions/097_add_services.py4
-rw-r--r--designate/storage/impl_sqlalchemy/tables.py2
-rw-r--r--designate/tests/__init__.py6
-rw-r--r--designate/tests/fixtures.py10
-rw-r--r--designate/tests/test_api/test_middleware.py4
-rw-r--r--designate/tests/test_api/test_service.py2
-rw-r--r--designate/tests/test_api/test_v2/__init__.py2
-rw-r--r--designate/tests/test_api/test_v2/test_import_export.py2
-rw-r--r--designate/tests/test_api/test_v2/test_recordsets.py4
-rw-r--r--designate/tests/test_api/test_v2/test_tsigkeys.py2
-rw-r--r--designate/tests/test_api/test_v2/test_zones.py6
-rw-r--r--designate/tests/test_central/test_decorator.py4
-rw-r--r--designate/tests/test_central/test_service.py16
-rw-r--r--designate/tests/test_hookpoints.py4
-rw-r--r--designate/tests/test_manage/test_update_pool.py7
-rw-r--r--designate/tests/test_mdns/test_handler.py4
-rw-r--r--designate/tests/test_mdns/test_notify.py4
-rw-r--r--designate/tests/test_notification_handler/test_base.py2
-rw-r--r--designate/tests/test_notification_handler/test_neutron.py2
-rw-r--r--designate/tests/test_notification_handler/test_nova.py2
-rw-r--r--designate/tests/test_producer/test_tasks.py4
-rw-r--r--designate/tests/test_quota/test_quota.py6
-rw-r--r--designate/tests/test_schema/__init__.py2
-rw-r--r--designate/tests/test_schema/test_format.py2
-rw-r--r--designate/tests/test_storage/__init__.py6
-rw-r--r--designate/tests/test_storage/test_sqlalchemy.py2
-rw-r--r--designate/tests/unit/agent/backends/test_bind9.py6
-rw-r--r--designate/tests/unit/agent/backends/test_denominator.py7
-rw-r--r--designate/tests/unit/agent/backends/test_djbdns.py4
-rw-r--r--designate/tests/unit/agent/backends/test_fake.py2
-rw-r--r--designate/tests/unit/agent/backends/test_gdnsd.py2
-rw-r--r--designate/tests/unit/agent/backends/test_knot2.py6
-rw-r--r--designate/tests/unit/agent/backends/test_msdns.py4
-rw-r--r--designate/tests/unit/agent/test_handler.py2
-rw-r--r--designate/tests/unit/agent/test_service.py6
-rw-r--r--designate/tests/unit/api/test_admin_api.py4
-rw-r--r--designate/tests/unit/api/test_api_v2.py2
-rw-r--r--designate/tests/unit/backend/test_agent.py2
-rw-r--r--designate/tests/unit/backend/test_akamai_v2.py4
-rw-r--r--designate/tests/unit/backend/test_bind9.py6
-rw-r--r--designate/tests/unit/backend/test_designate.py4
-rw-r--r--designate/tests/unit/backend/test_dynect.py4
-rw-r--r--designate/tests/unit/backend/test_infoblox.py6
-rw-r--r--designate/tests/unit/backend/test_ns1.py3
-rw-r--r--designate/tests/unit/backend/test_nsd4.py4
-rw-r--r--designate/tests/unit/backend/test_pdns4.py4
-rw-r--r--designate/tests/unit/mdns/test_handler.py2
-rw-r--r--designate/tests/unit/mdns/test_service.py8
-rw-r--r--designate/tests/unit/mdns/test_xfr.py2
-rw-r--r--designate/tests/unit/metrics/test_metrics.py2
-rw-r--r--designate/tests/unit/notification_handler/test_fake.py2
-rw-r--r--designate/tests/unit/objects/test_adapters.py2
-rw-r--r--designate/tests/unit/objects/test_base.py4
-rw-r--r--designate/tests/unit/objects/test_caa_object.py2
-rw-r--r--designate/tests/unit/objects/test_cert_object.py2
-rw-r--r--designate/tests/unit/objects/test_mx_object.py4
-rw-r--r--designate/tests/unit/objects/test_naptr_object.py2
-rw-r--r--designate/tests/unit/objects/test_recordset.py2
-rw-r--r--designate/tests/unit/objects/test_rrdata_a.py2
-rw-r--r--designate/tests/unit/objects/test_rrdata_spf.py2
-rw-r--r--designate/tests/unit/objects/test_rrdata_txt.py2
-rw-r--r--designate/tests/unit/objects/test_sshfp_object.py4
-rw-r--r--designate/tests/unit/objects/test_yaml_adapters.py4
-rw-r--r--designate/tests/unit/objects/test_zone.py2
-rw-r--r--designate/tests/unit/producer/test_service.py2
-rw-r--r--designate/tests/unit/producer/test_tasks.py6
-rw-r--r--designate/tests/unit/scheduler/test_filters.py2
-rw-r--r--designate/tests/unit/sink/test_notifications.py2
-rw-r--r--designate/tests/unit/sink/test_service.py2
-rw-r--r--designate/tests/unit/test_central/test_basic.py6
-rw-r--r--designate/tests/unit/test_central/test_notifications.py2
-rw-r--r--designate/tests/unit/test_context.py2
-rw-r--r--designate/tests/unit/test_dnsutils.py9
-rw-r--r--designate/tests/unit/test_heartbeat_emitter.py2
-rw-r--r--designate/tests/unit/test_upgrade_checks.py2
-rw-r--r--designate/tests/unit/test_utils.py4
-rw-r--r--designate/tests/unit/workers/test_processing.py2
-rw-r--r--designate/tests/unit/workers/test_service.py8
-rw-r--r--designate/tests/unit/workers/test_zone_tasks.py4
-rw-r--r--designate/utils.py6
-rw-r--r--designate/worker/processing.py2
-rw-r--r--designate/worker/rpcapi.py2
-rw-r--r--designate/worker/service.py6
-rw-r--r--designate/worker/tasks/zone.py6
-rw-r--r--devstack/networking_test.py10
-rwxr-xr-xdevstack/statsd_mock_server.py2
-rw-r--r--tox.ini3
235 files changed, 455 insertions, 482 deletions
diff --git a/contrib/archive/backends/impl_ipa/__init__.py b/contrib/archive/backends/impl_ipa/__init__.py
index 4809373e..a909ca10 100644
--- a/contrib/archive/backends/impl_ipa/__init__.py
+++ b/contrib/archive/backends/impl_ipa/__init__.py
@@ -16,14 +16,14 @@
import pprint
import time
-import requests
from oslo_config import cfg
from oslo_log import log as logging
from oslo_serialization import jsonutils as json
from oslo_utils import importutils
+import requests
-from designate import exceptions
from designate.backend import base
+from designate import exceptions
from designate.i18n import _LE
diff --git a/contrib/archive/backends/impl_ipa/auth.py b/contrib/archive/backends/impl_ipa/auth.py
index 6f851b8d..45ba6314 100644
--- a/contrib/archive/backends/impl_ipa/auth.py
+++ b/contrib/archive/backends/impl_ipa/auth.py
@@ -13,16 +13,16 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import os
import logging
+import os
-from requests import auth
import kerberos
+from requests import auth
-from designate.utils import generate_uuid
from designate.backend.impl_ipa import IPAAuthError
-from designate.i18n import _LW
from designate.i18n import _LE
+from designate.i18n import _LW
+from designate.utils import generate_uuid
LOG = logging.getLogger(__name__)
diff --git a/contrib/designate-ext-samplehandler/designate_ext_samplehandler/notification_handler/sample.py b/contrib/designate-ext-samplehandler/designate_ext_samplehandler/notification_handler/sample.py
index 56df3b55..814e8e23 100644
--- a/contrib/designate-ext-samplehandler/designate_ext_samplehandler/notification_handler/sample.py
+++ b/contrib/designate-ext-samplehandler/designate_ext_samplehandler/notification_handler/sample.py
@@ -17,8 +17,8 @@ from oslo_config import cfg
from oslo_log import log as logging
from designate.context import DesignateContext
-from designate.objects import Record
from designate.notification_handler.base import NotificationHandler
+from designate.objects import Record
LOG = logging.getLogger(__name__)
diff --git a/contrib/dns_dump_raw.py b/contrib/dns_dump_raw.py
index e89835fc..24b28d00 100755
--- a/contrib/dns_dump_raw.py
+++ b/contrib/dns_dump_raw.py
@@ -14,8 +14,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import sys
import binascii
+import sys
import dns
import dns.message
diff --git a/contrib/dns_dump_server.py b/contrib/dns_dump_server.py
index 712ecda2..eb558b2c 100755
--- a/contrib/dns_dump_server.py
+++ b/contrib/dns_dump_server.py
@@ -14,8 +14,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import socket
import binascii
+import socket
# Bind to UDP 5355
sock_udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
diff --git a/contrib/fixleadingzeros.py b/contrib/fixleadingzeros.py
index 8acfed24..cdf49f1d 100755
--- a/contrib/fixleadingzeros.py
+++ b/contrib/fixleadingzeros.py
@@ -14,19 +14,18 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-import sys
import argparse
import logging
+import sys
+
import dns.exception
from dns.ipv4 import inet_aton
+from keystoneauth1.identity import generic
+from keystoneauth1 import session as keystone_session
import netaddr
-from designateclient.v2 import client
from designateclient import shell
-
-from keystoneauth1.identity import generic
-from keystoneauth1 import session as keystone_session
+from designateclient.v2 import client
auth = generic.Password(
diff --git a/contrib/zoneextractor.py b/contrib/zoneextractor.py
index 57068327..94538198 100644
--- a/contrib/zoneextractor.py
+++ b/contrib/zoneextractor.py
@@ -14,11 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-import sys
-import re
-import os
import argparse
import logging
+import os
+import re
+import sys
import dns.zone
diff --git a/designate/agent/handler.py b/designate/agent/handler.py
index 008f40ca..b32518f0 100644
--- a/designate/agent/handler.py
+++ b/designate/agent/handler.py
@@ -25,18 +25,17 @@
"""
import dns
-import dns.opcode
-import dns.rcode
-import dns.message
import dns.flags
+import dns.message
import dns.opcode
+import dns.rcode
from oslo_config import cfg
from oslo_log import log as logging
-from designate import utils
-from designate import dnsutils
from designate.backend import agent_backend
import designate.backend.private_codes as pcodes
+from designate import dnsutils
+from designate import utils
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
diff --git a/designate/agent/service.py b/designate/agent/service.py
index 59d37d1e..9f3e5020 100644
--- a/designate/agent/service.py
+++ b/designate/agent/service.py
@@ -26,12 +26,12 @@
from oslo_config import cfg
-from designate import utils
-from designate import dnsutils
-from designate import service
from designate.agent import handler
from designate.backend import agent_backend
from designate.conf.agent import DEFAULT_AGENT_PORT
+from designate import dnsutils
+from designate import service
+from designate import utils
CONF = cfg.CONF
diff --git a/designate/api/admin/__init__.py b/designate/api/admin/__init__.py
index 1ac7bd6e..7688db71 100644
--- a/designate/api/admin/__init__.py
+++ b/designate/api/admin/__init__.py
@@ -12,9 +12,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan.deploy
from oslo_config import cfg
from oslo_log import log as logging
+import pecan.deploy
LOG = logging.getLogger(__name__)
diff --git a/designate/api/admin/app.py b/designate/api/admin/app.py
index a687e2d5..d3013f42 100644
--- a/designate/api/admin/app.py
+++ b/designate/api/admin/app.py
@@ -13,9 +13,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_config import cfg
import pecan
import pecan.deploy
-from oslo_config import cfg
from designate.api.v2 import patches
diff --git a/designate/api/admin/controllers/extensions/counts.py b/designate/api/admin/controllers/extensions/counts.py
index ed221a6a..9f609060 100644
--- a/designate/api/admin/controllers/extensions/counts.py
+++ b/designate/api/admin/controllers/extensions/counts.py
@@ -13,12 +13,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-import pecan
from oslo_log import log as logging
+import pecan
-from designate.api.v2.controllers import rest
from designate.api.admin.views.extensions import reports as reports_view
+from designate.api.v2.controllers import rest
LOG = logging.getLogger(__name__)
diff --git a/designate/api/admin/controllers/extensions/export.py b/designate/api/admin/controllers/extensions/export.py
index b468ca74..e42087bc 100644
--- a/designate/api/admin/controllers/extensions/export.py
+++ b/designate/api/admin/controllers/extensions/export.py
@@ -12,12 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
from designate.api.v2.controllers import rest
-from designate import utils
from designate import policy
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/admin/controllers/extensions/quotas.py b/designate/api/admin/controllers/extensions/quotas.py
index 8985f442..440683a8 100644
--- a/designate/api/admin/controllers/extensions/quotas.py
+++ b/designate/api/admin/controllers/extensions/quotas.py
@@ -13,12 +13,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import schema
-from designate.api.v2.controllers import rest
from designate.api.admin.views.extensions import quotas as quotas_view
+from designate.api.v2.controllers import rest
+from designate import schema
LOG = logging.getLogger(__name__)
diff --git a/designate/api/admin/controllers/extensions/reports.py b/designate/api/admin/controllers/extensions/reports.py
index 38a49d36..8a36d73c 100644
--- a/designate/api/admin/controllers/extensions/reports.py
+++ b/designate/api/admin/controllers/extensions/reports.py
@@ -16,9 +16,9 @@
from oslo_log import log as logging
-from designate.api.v2.controllers import rest
from designate.api.admin.controllers.extensions import counts
from designate.api.admin.controllers.extensions import tenants
+from designate.api.v2.controllers import rest
LOG = logging.getLogger(__name__)
diff --git a/designate/api/admin/controllers/extensions/tenants.py b/designate/api/admin/controllers/extensions/tenants.py
index eac3125a..5e88338a 100644
--- a/designate/api/admin/controllers/extensions/tenants.py
+++ b/designate/api/admin/controllers/extensions/tenants.py
@@ -14,11 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate.api.v2.controllers import rest
from designate.api.admin.views.extensions import reports as reports_view
+from designate.api.v2.controllers import rest
LOG = logging.getLogger(__name__)
diff --git a/designate/api/admin/controllers/extensions/zones.py b/designate/api/admin/controllers/extensions/zones.py
index aee4d92d..e0725b7f 100644
--- a/designate/api/admin/controllers/extensions/zones.py
+++ b/designate/api/admin/controllers/extensions/zones.py
@@ -14,8 +14,8 @@
from oslo_log import log as logging
-from designate.api.v2.controllers import rest
from designate.api.admin.controllers.extensions import export
+from designate.api.v2.controllers import rest
LOG = logging.getLogger(__name__)
diff --git a/designate/api/middleware.py b/designate/api/middleware.py
index 334da69c..a4cd5f50 100644
--- a/designate/api/middleware.py
+++ b/designate/api/middleware.py
@@ -14,18 +14,18 @@
# License for the specific language governing permissions and limitations
# under the License.
import flask
-import webob.dec
from oslo_config import cfg
-import oslo_messaging as messaging
from oslo_log import log as logging
+import oslo_messaging as messaging
from oslo_middleware import base
from oslo_middleware import request_id
from oslo_serialization import jsonutils
from oslo_utils import strutils
+import webob.dec
+from designate import context
from designate import exceptions
from designate import notifications
-from designate import context
from designate import objects
from designate.objects.adapters import DesignateAdapter
diff --git a/designate/api/v2/__init__.py b/designate/api/v2/__init__.py
index e7cda5a1..49c7e232 100644
--- a/designate/api/v2/__init__.py
+++ b/designate/api/v2/__init__.py
@@ -13,9 +13,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan.deploy
from oslo_config import cfg
from oslo_log import log as logging
+import pecan.deploy
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/app.py b/designate/api/v2/app.py
index 1596d4fe..7d16c97f 100644
--- a/designate/api/v2/app.py
+++ b/designate/api/v2/app.py
@@ -13,9 +13,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_config import cfg
import pecan
import pecan.deploy
-from oslo_config import cfg
from designate.api.v2 import patches
diff --git a/designate/api/v2/controllers/blacklists.py b/designate/api/v2/controllers/blacklists.py
index 9fa8b5d8..2a104ce4 100644
--- a/designate/api/v2/controllers/blacklists.py
+++ b/designate/api/v2/controllers/blacklists.py
@@ -13,14 +13,13 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import utils
from designate.api.v2.controllers import rest
-from designate.objects import Blacklist
from designate.objects.adapters import DesignateAdapter
+from designate.objects import Blacklist
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/floatingips.py b/designate/api/v2/controllers/floatingips.py
index e2aa0159..5c984e97 100644
--- a/designate/api/v2/controllers/floatingips.py
+++ b/designate/api/v2/controllers/floatingips.py
@@ -15,13 +15,13 @@
# under the License.
import re
-import pecan
from oslo_log import log as logging
+import pecan
+from designate.api.v2.controllers import rest
from designate import exceptions
from designate import objects
from designate.objects.adapters import DesignateAdapter
-from designate.api.v2.controllers import rest
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/limits.py b/designate/api/v2/controllers/limits.py
index 2dbdb62a..936ab819 100644
--- a/designate/api/v2/controllers/limits.py
+++ b/designate/api/v2/controllers/limits.py
@@ -13,9 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-import pecan
from oslo_config import cfg
+import pecan
from designate.api.v2.controllers import rest
diff --git a/designate/api/v2/controllers/pools.py b/designate/api/v2/controllers/pools.py
index f5dd490e..f0b6675d 100644
--- a/designate/api/v2/controllers/pools.py
+++ b/designate/api/v2/controllers/pools.py
@@ -12,13 +12,13 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import utils
from designate.api.v2.controllers import rest
-from designate.objects import Pool
from designate.objects.adapters import DesignateAdapter
+from designate.objects import Pool
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/quotas.py b/designate/api/v2/controllers/quotas.py
index c4a766f4..7d0a74de 100644
--- a/designate/api/v2/controllers/quotas.py
+++ b/designate/api/v2/controllers/quotas.py
@@ -13,9 +13,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_config import cfg
from oslo_log import log as logging
+import pecan
from designate.api.v2.controllers import rest
from designate.common import keystone
diff --git a/designate/api/v2/controllers/recordsets.py b/designate/api/v2/controllers/recordsets.py
index 8001f993..d2bc2f81 100644
--- a/designate/api/v2/controllers/recordsets.py
+++ b/designate/api/v2/controllers/recordsets.py
@@ -13,13 +13,13 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import utils
from designate.api.v2.controllers import common
from designate.api.v2.controllers import rest
from designate.objects.adapters import DesignateAdapter
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/reverse.py b/designate/api/v2/controllers/reverse.py
index f59d3a56..f5347035 100644
--- a/designate/api/v2/controllers/reverse.py
+++ b/designate/api/v2/controllers/reverse.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.api.v2.controllers import rest
from designate.api.v2.controllers import floatingips
+from designate.api.v2.controllers import rest
class ReverseController(rest.RestController):
diff --git a/designate/api/v2/controllers/root.py b/designate/api/v2/controllers/root.py
index 76669db9..33f9d01d 100644
--- a/designate/api/v2/controllers/root.py
+++ b/designate/api/v2/controllers/root.py
@@ -16,17 +16,17 @@
from oslo_config import cfg
from stevedore import named
-from designate.api.v2.controllers import limits
-from designate.api.v2.controllers import reverse
-from designate.api.v2.controllers import tlds
from designate.api.v2.controllers import blacklists
from designate.api.v2.controllers import errors
+from designate.api.v2.controllers import limits
from designate.api.v2.controllers import pools
+from designate.api.v2.controllers import quotas
+from designate.api.v2.controllers import recordsets
+from designate.api.v2.controllers import reverse
from designate.api.v2.controllers import service_status
-from designate.api.v2.controllers import zones
+from designate.api.v2.controllers import tlds
from designate.api.v2.controllers import tsigkeys
-from designate.api.v2.controllers import recordsets
-from designate.api.v2.controllers import quotas
+from designate.api.v2.controllers import zones
class RootController(object):
diff --git a/designate/api/v2/controllers/service_status.py b/designate/api/v2/controllers/service_status.py
index 88aaec0a..18a9e30c 100644
--- a/designate/api/v2/controllers/service_status.py
+++ b/designate/api/v2/controllers/service_status.py
@@ -14,9 +14,9 @@
import pecan
-from designate import utils
from designate.api.v2.controllers import rest
from designate.objects.adapters import DesignateAdapter
+from designate import utils
class ServiceStatusController(rest.RestController):
diff --git a/designate/api/v2/controllers/tlds.py b/designate/api/v2/controllers/tlds.py
index 9749e948..5251586e 100644
--- a/designate/api/v2/controllers/tlds.py
+++ b/designate/api/v2/controllers/tlds.py
@@ -12,13 +12,13 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import utils
from designate.api.v2.controllers import rest
-from designate.objects import Tld
from designate.objects.adapters import DesignateAdapter
+from designate.objects import Tld
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/tsigkeys.py b/designate/api/v2/controllers/tsigkeys.py
index 90451a93..8cb18bcf 100644
--- a/designate/api/v2/controllers/tsigkeys.py
+++ b/designate/api/v2/controllers/tsigkeys.py
@@ -13,14 +13,13 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import utils
from designate.api.v2.controllers import rest
-from designate.objects import TsigKey
from designate.objects.adapters import DesignateAdapter
+from designate.objects import TsigKey
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/zones/__init__.py b/designate/api/v2/controllers/zones/__init__.py
index 1f5a6f5d..2608822f 100644
--- a/designate/api/v2/controllers/zones/__init__.py
+++ b/designate/api/v2/controllers/zones/__init__.py
@@ -13,18 +13,18 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_config import cfg
from oslo_log import log as logging
+import pecan
-from designate import exceptions
-from designate import utils
from designate.api.v2.controllers import rest
+from designate.api.v2.controllers.zones import nameservers
from designate.api.v2.controllers.zones import recordsets
from designate.api.v2.controllers.zones import tasks
-from designate.api.v2.controllers.zones import nameservers
+from designate import exceptions
from designate import objects
from designate.objects.adapters import DesignateAdapter
+from designate import utils
CONF = cfg.CONF
diff --git a/designate/api/v2/controllers/zones/nameservers.py b/designate/api/v2/controllers/zones/nameservers.py
index 8f5c7e26..b72fd2cd 100644
--- a/designate/api/v2/controllers/zones/nameservers.py
+++ b/designate/api/v2/controllers/zones/nameservers.py
@@ -13,12 +13,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import utils
from designate.api.v2.controllers import rest
from designate.objects.adapters import DesignateAdapter
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/zones/recordsets.py b/designate/api/v2/controllers/zones/recordsets.py
index f0f0cfb9..fdcbf61c 100644
--- a/designate/api/v2/controllers/zones/recordsets.py
+++ b/designate/api/v2/controllers/zones/recordsets.py
@@ -13,15 +13,15 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import exceptions
-from designate import utils
from designate.api.v2.controllers import common
from designate.api.v2.controllers import rest
-from designate.objects import RecordSet
+from designate import exceptions
from designate.objects.adapters import DesignateAdapter
+from designate.objects import RecordSet
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/zones/tasks/__init__.py b/designate/api/v2/controllers/zones/tasks/__init__.py
index 0361d85b..28f1d207 100644
--- a/designate/api/v2/controllers/zones/tasks/__init__.py
+++ b/designate/api/v2/controllers/zones/tasks/__init__.py
@@ -15,18 +15,18 @@
# under the License.
from oslo_log import log as logging
-from designate.api.v2.controllers.zones.tasks.transfer_requests \
- import TransferRequestsController as TRC
-from designate.api.v2.controllers.zones.tasks.transfer_accepts \
- import TransferAcceptsController as TRA
from designate.api.v2.controllers.zones.tasks import abandon
-from designate.api.v2.controllers.zones.tasks.xfr import XfrController
-from designate.api.v2.controllers.zones.tasks.imports \
- import ZoneImportController
-from designate.api.v2.controllers.zones.tasks.exports \
- import ZoneExportsController
from designate.api.v2.controllers.zones.tasks.exports \
import ZoneExportCreateController
+from designate.api.v2.controllers.zones.tasks.exports \
+ import ZoneExportsController
+from designate.api.v2.controllers.zones.tasks.imports \
+ import ZoneImportController
+from designate.api.v2.controllers.zones.tasks.transfer_accepts \
+ import TransferAcceptsController as TRA
+from designate.api.v2.controllers.zones.tasks.transfer_requests \
+ import TransferRequestsController as TRC
+from designate.api.v2.controllers.zones.tasks.xfr import XfrController
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/zones/tasks/abandon.py b/designate/api/v2/controllers/zones/tasks/abandon.py
index e45e2e60..fbc79774 100644
--- a/designate/api/v2/controllers/zones/tasks/abandon.py
+++ b/designate/api/v2/controllers/zones/tasks/abandon.py
@@ -12,11 +12,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import utils
from designate.api.v2.controllers import rest
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/zones/tasks/exports.py b/designate/api/v2/controllers/zones/tasks/exports.py
index 60a852b9..9252da08 100644
--- a/designate/api/v2/controllers/zones/tasks/exports.py
+++ b/designate/api/v2/controllers/zones/tasks/exports.py
@@ -13,14 +13,14 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
+from designate.api.v2.controllers import rest
from designate import exceptions
+from designate.objects.adapters import DesignateAdapter
from designate import policy
from designate import utils
-from designate.api.v2.controllers import rest
-from designate.objects.adapters import DesignateAdapter
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/zones/tasks/imports.py b/designate/api/v2/controllers/zones/tasks/imports.py
index 25e4dc8c..3f74cbae 100644
--- a/designate/api/v2/controllers/zones/tasks/imports.py
+++ b/designate/api/v2/controllers/zones/tasks/imports.py
@@ -13,13 +13,13 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import exceptions
-from designate import utils
from designate.api.v2.controllers import rest
+from designate import exceptions
from designate.objects.adapters import DesignateAdapter
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/zones/tasks/transfer_accepts.py b/designate/api/v2/controllers/zones/tasks/transfer_accepts.py
index 6cd67652..b2a3299a 100644
--- a/designate/api/v2/controllers/zones/tasks/transfer_accepts.py
+++ b/designate/api/v2/controllers/zones/tasks/transfer_accepts.py
@@ -13,13 +13,13 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import utils
from designate.api.v2.controllers import rest
-from designate.objects import ZoneTransferAccept
from designate.objects.adapters import DesignateAdapter
+from designate.objects import ZoneTransferAccept
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/zones/tasks/transfer_requests.py b/designate/api/v2/controllers/zones/tasks/transfer_requests.py
index a6b24458..947bce8a 100644
--- a/designate/api/v2/controllers/zones/tasks/transfer_requests.py
+++ b/designate/api/v2/controllers/zones/tasks/transfer_requests.py
@@ -13,14 +13,14 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import utils
-from designate import exceptions
from designate.api.v2.controllers import rest
-from designate.objects import ZoneTransferRequest
+from designate import exceptions
from designate.objects.adapters import DesignateAdapter
+from designate.objects import ZoneTransferRequest
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/v2/controllers/zones/tasks/xfr.py b/designate/api/v2/controllers/zones/tasks/xfr.py
index 9743dfa4..a80aa03d 100644
--- a/designate/api/v2/controllers/zones/tasks/xfr.py
+++ b/designate/api/v2/controllers/zones/tasks/xfr.py
@@ -13,11 +13,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import pecan
from oslo_log import log as logging
+import pecan
-from designate import utils
from designate.api.v2.controllers import rest
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/api/wsgi.py b/designate/api/wsgi.py
index 4d2e41ec..35b8ae19 100644
--- a/designate/api/wsgi.py
+++ b/designate/api/wsgi.py
@@ -17,11 +17,11 @@ from oslo_config import cfg
from oslo_log import log as logging
from paste import deploy
+from designate.common import config
from designate import conf
from designate import heartbeat_emitter
from designate import policy
from designate import rpc
-from designate.common import config
CONF = conf.CONF
diff --git a/designate/backend/agent.py b/designate/backend/agent.py
index 8ddc1818..3e045c6e 100644
--- a/designate/backend/agent.py
+++ b/designate/backend/agent.py
@@ -24,23 +24,23 @@
Configured in the [service:pool_manager] section
"""
-import eventlet
import dns
-import dns.rdataclass
-import dns.rdatatype
import dns.exception
import dns.flags
-import dns.rcode
import dns.message
import dns.opcode
+import dns.rcode
+import dns.rdataclass
+import dns.rdatatype
+import eventlet
from oslo_config import cfg
from oslo_log import log as logging
from designate.backend import base
-from designate import exceptions
+import designate.backend.private_codes as pcodes
from designate.conf.agent import DEFAULT_AGENT_PORT
+from designate import exceptions
from designate.mdns import rpcapi as mdns_api
-import designate.backend.private_codes as pcodes
dns_query = eventlet.import_patched('dns.query')
diff --git a/designate/backend/agent_backend/impl_denominator.py b/designate/backend/agent_backend/impl_denominator.py
index 283c840e..76f110f9 100644
--- a/designate/backend/agent_backend/impl_denominator.py
+++ b/designate/backend/agent_backend/impl_denominator.py
@@ -16,10 +16,10 @@
import itertools
import dns.rdata
-import dns.rdatatype
import dns.rdataclass
-from oslo_config import cfg
+import dns.rdatatype
from oslo_concurrency import lockutils
+from oslo_config import cfg
from oslo_log import log as logging
from designate.backend.agent_backend import base
diff --git a/designate/backend/agent_backend/impl_djbdns.py b/designate/backend/agent_backend/impl_djbdns.py
index 79ab986c..f368fd48 100755
--- a/designate/backend/agent_backend/impl_djbdns.py
+++ b/designate/backend/agent_backend/impl_djbdns.py
@@ -51,9 +51,9 @@ from oslo_concurrency.processutils import ProcessExecutionError
from oslo_config import cfg
from oslo_log import log as logging
+from designate.backend.agent_backend import base
from designate import exceptions
from designate import utils
-from designate.backend.agent_backend import base
from designate.utils import execute
LOG = logging.getLogger(__name__)
diff --git a/designate/backend/agent_backend/impl_gdnsd.py b/designate/backend/agent_backend/impl_gdnsd.py
index 8c98a969..134dd15a 100644
--- a/designate/backend/agent_backend/impl_gdnsd.py
+++ b/designate/backend/agent_backend/impl_gdnsd.py
@@ -40,8 +40,8 @@ Configured in [service:agent:gdnsd]
import errno
import os
-import tempfile
import string
+import tempfile
import dns
import dns.resolver
@@ -49,9 +49,9 @@ from oslo_concurrency.processutils import ProcessExecutionError
from oslo_config import cfg
from oslo_log import log as logging
-from designate import utils
-from designate import exceptions
from designate.backend.agent_backend import base
+from designate import exceptions
+from designate import utils
CFG_GROUP_NAME = 'backend:agent:gdnsd'
LOG = logging.getLogger(__name__)
diff --git a/designate/backend/agent_backend/impl_knot2.py b/designate/backend/agent_backend/impl_knot2.py
index 965874e9..ca9b6b15 100755
--- a/designate/backend/agent_backend/impl_knot2.py
+++ b/designate/backend/agent_backend/impl_knot2.py
@@ -43,8 +43,8 @@ from oslo_concurrency.processutils import ProcessExecutionError
from oslo_config import cfg
from oslo_log import log as logging
-from designate import exceptions
from designate.backend.agent_backend import base
+from designate import exceptions
from designate.utils import execute
CFG_GROUP_NAME = 'backend:agent:knot2'
diff --git a/designate/backend/agent_backend/impl_msdns.py b/designate/backend/agent_backend/impl_msdns.py
index 533b6360..182f2d3c 100644
--- a/designate/backend/agent_backend/impl_msdns.py
+++ b/designate/backend/agent_backend/impl_msdns.py
@@ -15,11 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from oslo_config import cfg
-from oslo_log import log as logging
-from os_win import utilsfactory
from os_win import constants
from os_win import exceptions as os_win_exc
+from os_win import utilsfactory
+from oslo_config import cfg
+from oslo_log import log as logging
from designate.backend.agent_backend import base
from designate import exceptions
diff --git a/designate/backend/base.py b/designate/backend/base.py
index 263501ec..4c798c71 100644
--- a/designate/backend/base.py
+++ b/designate/backend/base.py
@@ -19,8 +19,8 @@ from oslo_config import cfg
from oslo_log import log as logging
from designate.context import DesignateContext
-from designate.plugin import DriverPlugin
from designate.mdns import rpcapi as mdns_api
+from designate.plugin import DriverPlugin
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
diff --git a/designate/backend/impl_akamai_v2.py b/designate/backend/impl_akamai_v2.py
index 9531e990..a4c7852c 100644
--- a/designate/backend/impl_akamai_v2.py
+++ b/designate/backend/impl_akamai_v2.py
@@ -17,12 +17,12 @@
import time
from urllib import parse as urlparse
-import requests
from akamai import edgegrid
from oslo_log import log as logging
+import requests
-from designate import exceptions
from designate.backend import base
+from designate import exceptions
LOG = logging.getLogger(__name__)
diff --git a/designate/backend/impl_bind9.py b/designate/backend/impl_bind9.py
index 8f04bfdc..b112cd97 100644
--- a/designate/backend/impl_bind9.py
+++ b/designate/backend/impl_bind9.py
@@ -25,10 +25,10 @@ import subprocess
from oslo_log import log as logging
from oslo_utils import strutils
-from designate import exceptions
-from designate import utils
from designate.backend import base
from designate.conf.mdns import DEFAULT_MDNS_PORT
+from designate import exceptions
+from designate import utils
LOG = logging.getLogger(__name__)
DEFAULT_MASTER_PORT = DEFAULT_MDNS_PORT
diff --git a/designate/backend/impl_designate.py b/designate/backend/impl_designate.py
index 3739e798..30c08ece 100644
--- a/designate/backend/impl_designate.py
+++ b/designate/backend/impl_designate.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designateclient.v2 import client
from designateclient import exceptions
+from designateclient.v2 import client
from keystoneauth1.identity import v3 as v3_auth
from keystoneauth1 import session as ks_session
from oslo_log import log as logging
diff --git a/designate/backend/impl_dynect.py b/designate/backend/impl_dynect.py
index b31f15f6..186cac1c 100755
--- a/designate/backend/impl_dynect.py
+++ b/designate/backend/impl_dynect.py
@@ -22,9 +22,9 @@ from oslo_serialization import jsonutils
import requests
from requests.adapters import HTTPAdapter
+from designate.backend import base
from designate import exceptions
from designate import utils
-from designate.backend import base
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
diff --git a/designate/backend/impl_infoblox/__init__.py b/designate/backend/impl_infoblox/__init__.py
index 018a7875..be707835 100644
--- a/designate/backend/impl_infoblox/__init__.py
+++ b/designate/backend/impl_infoblox/__init__.py
@@ -16,9 +16,9 @@
from oslo_log import log as logging
from designate.backend import base
-from designate import exceptions
from designate.backend.impl_infoblox import connector
from designate.backend.impl_infoblox import object_manipulator
+from designate import exceptions
LOG = logging.getLogger(__name__)
diff --git a/designate/backend/impl_ns1.py b/designate/backend/impl_ns1.py
index a23ad1ba..3f4229f3 100644
--- a/designate/backend/impl_ns1.py
+++ b/designate/backend/impl_ns1.py
@@ -13,12 +13,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import requests
from oslo_config import cfg
from oslo_log import log as logging
+import requests
-from designate import exceptions
from designate.backend import base
+from designate import exceptions
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
diff --git a/designate/backend/impl_nsd4.py b/designate/backend/impl_nsd4.py
index 52079991..c90e51b5 100644
--- a/designate/backend/impl_nsd4.py
+++ b/designate/backend/impl_nsd4.py
@@ -25,8 +25,8 @@ import ssl
import eventlet
from oslo_log import log as logging
-from designate import exceptions
from designate.backend import base
+from designate import exceptions
LOG = logging.getLogger(__name__)
diff --git a/designate/backend/impl_pdns4.py b/designate/backend/impl_pdns4.py
index cba31779..6e6ca491 100644
--- a/designate/backend/impl_pdns4.py
+++ b/designate/backend/impl_pdns4.py
@@ -14,12 +14,12 @@
import urllib
import netaddr
-import requests
from oslo_config import cfg
from oslo_log import log as logging
+import requests
-from designate import exceptions
from designate.backend import base
+from designate import exceptions
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
diff --git a/designate/central/rpcapi.py b/designate/central/rpcapi.py
index ff8907a7..43184a88 100644
--- a/designate/central/rpcapi.py
+++ b/designate/central/rpcapi.py
@@ -18,8 +18,8 @@ from oslo_config import cfg
from oslo_log import log as logging
import oslo_messaging as messaging
-from designate import rpc
from designate.loggingutils import rpc_logging
+from designate import rpc
LOG = logging.getLogger(__name__)
diff --git a/designate/central/service.py b/designate/central/service.py
index 4d504be5..6b23b371 100644
--- a/designate/central/service.py
+++ b/designate/central/service.py
@@ -14,42 +14,42 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import re
import collections
import copy
import functools
-import threading
import itertools
-import string
-import signal
import random
from random import SystemRandom
+import re
+import signal
+import string
+import threading
import time
-from eventlet import tpool
-from dns import zone as dnszone
from dns import exception as dnsexception
+from dns import zone as dnszone
+from eventlet import tpool
from oslo_config import cfg
-import oslo_messaging as messaging
from oslo_log import log as logging
+import oslo_messaging as messaging
from designate import context as dcontext
from designate import coordination
-from designate import exceptions
from designate import dnsutils
+from designate import exceptions
+from designate.mdns import rpcapi as mdns_rpcapi
from designate import network_api
from designate import notifications
from designate import objects
from designate import policy
from designate import quota
from designate import rpc
-from designate import service
from designate import scheduler
+from designate import service
from designate import storage
-from designate import utils
-from designate.mdns import rpcapi as mdns_rpcapi
from designate.storage import transaction
from designate.storage import transaction_shallow_copy
+from designate import utils
from designate.worker import rpcapi as worker_rpcapi
diff --git a/designate/cmd/agent.py b/designate/cmd/agent.py
index 48b661b7..d78f083e 100644
--- a/designate/cmd/agent.py
+++ b/designate/cmd/agent.py
@@ -18,13 +18,13 @@ import sys
from oslo_log import log as logging
from oslo_reports import guru_meditation_report as gmr
+from designate.agent import service as agent_service
import designate.conf
from designate import heartbeat_emitter
from designate import hookpoints
from designate import service
from designate import utils
from designate import version
-from designate.agent import service as agent_service
CONF = designate.conf.CONF
diff --git a/designate/cmd/api.py b/designate/cmd/api.py
index 001a1b64..bcea0e18 100644
--- a/designate/cmd/api.py
+++ b/designate/cmd/api.py
@@ -19,13 +19,13 @@ from oslo_config import cfg
from oslo_log import log as logging
from oslo_reports import guru_meditation_report as gmr
+from designate.api import service as api_service
import designate.conf
from designate import heartbeat_emitter
from designate import hookpoints
from designate import service
from designate import utils
from designate import version
-from designate.api import service as api_service
CONF = designate.conf.CONF
diff --git a/designate/cmd/central.py b/designate/cmd/central.py
index 32ba370e..f8326893 100644
--- a/designate/cmd/central.py
+++ b/designate/cmd/central.py
@@ -18,13 +18,13 @@ import sys
from oslo_log import log as logging
from oslo_reports import guru_meditation_report as gmr
+from designate.central import service as central_service
import designate.conf
from designate import heartbeat_emitter
from designate import hookpoints
from designate import service
from designate import utils
from designate import version
-from designate.central import service as central_service
CONF = designate.conf.CONF
diff --git a/designate/cmd/mdns.py b/designate/cmd/mdns.py
index 5aed6335..0815b16b 100644
--- a/designate/cmd/mdns.py
+++ b/designate/cmd/mdns.py
@@ -21,10 +21,10 @@ from oslo_reports import guru_meditation_report as gmr
import designate.conf
from designate import heartbeat_emitter
from designate import hookpoints
+from designate.mdns import service as mdns_service
from designate import service
from designate import utils
from designate import version
-from designate.mdns import service as mdns_service
CONF = designate.conf.CONF
diff --git a/designate/cmd/producer.py b/designate/cmd/producer.py
index 5f79b7ae..8f2f3579 100644
--- a/designate/cmd/producer.py
+++ b/designate/cmd/producer.py
@@ -21,10 +21,10 @@ from oslo_reports import guru_meditation_report as gmr
import designate.conf
from designate import heartbeat_emitter
from designate import hookpoints
+from designate.producer import service as producer_service
from designate import service
from designate import utils
from designate import version
-from designate.producer import service as producer_service
LOG = logging.getLogger(__name__)
CONF = designate.conf.CONF
diff --git a/designate/cmd/sink.py b/designate/cmd/sink.py
index 6f1d1e8a..78721b0b 100644
--- a/designate/cmd/sink.py
+++ b/designate/cmd/sink.py
@@ -22,9 +22,9 @@ import designate.conf
from designate import heartbeat_emitter
from designate import hookpoints
from designate import service
+from designate.sink import service as sink_service
from designate import utils
from designate import version
-from designate.sink import service as sink_service
CONF = designate.conf.CONF
diff --git a/designate/conf/__init__.py b/designate/conf/__init__.py
index 3eada868..7da89cd7 100644
--- a/designate/conf/__init__.py
+++ b/designate/conf/__init__.py
@@ -13,9 +13,9 @@
# under the License.
from oslo_config import cfg
-from designate.conf import base # noqa
from designate.conf import agent
from designate.conf import api
+from designate.conf import base # noqa
from designate.conf import bind9
from designate.conf import central
from designate.conf import coordination
diff --git a/designate/context.py b/designate/context.py
index 13ccda13..43992d5a 100644
--- a/designate/context.py
+++ b/designate/context.py
@@ -16,8 +16,8 @@
import copy
import itertools
-from keystoneauth1 import plugin
from keystoneauth1.access import service_catalog as ksa_service_catalog
+from keystoneauth1 import plugin
from oslo_context import context
from oslo_log import log as logging
diff --git a/designate/dnsutils.py b/designate/dnsutils.py
index 5875bc1c..53e46fba 100644
--- a/designate/dnsutils.py
+++ b/designate/dnsutils.py
@@ -15,16 +15,16 @@
# under the License.
import random
import socket
-import time
from threading import Lock
+import time
import dns
import dns.exception
+from dns import rdatatype
import dns.zone
import eventlet
-from dns import rdatatype
-from oslo_serialization import base64
from oslo_log import log as logging
+from oslo_serialization import base64
import designate.conf
from designate import context
diff --git a/designate/heartbeat_emitter.py b/designate/heartbeat_emitter.py
index fbcbf1c8..e36648e4 100644
--- a/designate/heartbeat_emitter.py
+++ b/designate/heartbeat_emitter.py
@@ -17,11 +17,11 @@ from oslo_log import log as logging
from oslo_service import loopingcall
from oslo_utils import timeutils
+from designate.central import rpcapi as central_rpcapi
import designate.conf
from designate import context
from designate import objects
from designate import plugin
-from designate.central import rpcapi as central_rpcapi
CONF = designate.conf.CONF
diff --git a/designate/hookpoints.py b/designate/hookpoints.py
index 5185da59..de01e1be 100644
--- a/designate/hookpoints.py
+++ b/designate/hookpoints.py
@@ -13,12 +13,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import sys
import functools
+import sys
-import pkg_resources
from oslo_config import cfg
from oslo_log import log
+import pkg_resources
from stevedore import hook
diff --git a/designate/manage/pool.py b/designate/manage/pool.py
index 5d845659..eaf7ff2a 100644
--- a/designate/manage/pool.py
+++ b/designate/manage/pool.py
@@ -15,18 +15,18 @@
# under the License.
import sys
-import yaml
from oslo_config import cfg
from oslo_log import log as logging
import oslo_messaging as messaging
+import yaml
-from designate import exceptions
-from designate import rpc
-from designate import objects
-from designate import policy
from designate.central import rpcapi as central_rpcapi
+from designate import exceptions
from designate.manage import base
+from designate import objects
from designate.objects.adapters import DesignateAdapter
+from designate import policy
+from designate import rpc
LOG = logging.getLogger(__name__)
diff --git a/designate/manage/tlds.py b/designate/manage/tlds.py
index fc6a6509..a1dbe93e 100644
--- a/designate/manage/tlds.py
+++ b/designate/manage/tlds.py
@@ -18,11 +18,11 @@ import os
from oslo_config import cfg
from oslo_log import log as logging
+from designate.central import rpcapi as central_rpcapi
from designate import exceptions
+from designate.manage import base
from designate import objects
from designate import rpc
-from designate.central import rpcapi as central_rpcapi
-from designate.manage import base
from designate.schema import format
diff --git a/designate/mdns/base.py b/designate/mdns/base.py
index c49440a4..eaa9ea37 100644
--- a/designate/mdns/base.py
+++ b/designate/mdns/base.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslo_messaging as messaging
from oslo_log import log as logging
+import oslo_messaging as messaging
from designate.central import rpcapi as central_api
diff --git a/designate/mdns/handler.py b/designate/mdns/handler.py
index 001d7b2b..4e70d68c 100644
--- a/designate/mdns/handler.py
+++ b/designate/mdns/handler.py
@@ -23,8 +23,8 @@ import dns.rdatatype
from oslo_config import cfg
from oslo_log import log as logging
-from designate import exceptions
from designate.central import rpcapi as central_api
+from designate import exceptions
from designate.mdns import xfr
LOG = logging.getLogger(__name__)
diff --git a/designate/mdns/notify.py b/designate/mdns/notify.py
index d88a4d22..283ee23a 100644
--- a/designate/mdns/notify.py
+++ b/designate/mdns/notify.py
@@ -13,18 +13,18 @@
# License for the specific language governing permissions and limitations
# under the License.
-import time
import socket
+import time
-import eventlet
import dns
-import dns.rdataclass
-import dns.rdatatype
import dns.exception
import dns.flags
-import dns.rcode
import dns.message
import dns.opcode
+import dns.rcode
+import dns.rdataclass
+import dns.rdatatype
+import eventlet
from oslo_config import cfg
from oslo_log import log as logging
diff --git a/designate/mdns/rpcapi.py b/designate/mdns/rpcapi.py
index d65f7cc4..fc6cc869 100644
--- a/designate/mdns/rpcapi.py
+++ b/designate/mdns/rpcapi.py
@@ -16,8 +16,8 @@ from oslo_config import cfg
from oslo_log import log as logging
import oslo_messaging as messaging
-from designate import rpc
from designate.loggingutils import rpc_logging
+from designate import rpc
CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/designate/mdns/service.py b/designate/mdns/service.py
index 2e6b4122..a369e52d 100644
--- a/designate/mdns/service.py
+++ b/designate/mdns/service.py
@@ -16,14 +16,14 @@
from oslo_config import cfg
from oslo_log import log as logging
-from designate import dnsutils
-from designate import service
-from designate import storage
-from designate import utils
from designate.conf.mdns import DEFAULT_MDNS_PORT
+from designate import dnsutils
from designate.mdns import handler
from designate.mdns import notify
from designate.mdns import xfr
+from designate import service
+from designate import storage
+from designate import utils
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
diff --git a/designate/mdns/xfr.py b/designate/mdns/xfr.py
index 0785e6b3..05c48686 100644
--- a/designate/mdns/xfr.py
+++ b/designate/mdns/xfr.py
@@ -16,8 +16,8 @@
import time
from oslo_config import cfg
-from oslo_utils import timeutils
from oslo_log import log as logging
+from oslo_utils import timeutils
from designate import dnsutils
from designate import exceptions
diff --git a/designate/network_api/fake.py b/designate/network_api/fake.py
index 05eb6dcf..58b752f9 100644
--- a/designate/network_api/fake.py
+++ b/designate/network_api/fake.py
@@ -15,8 +15,8 @@
# under the License.
from oslo_log import log as logging
-from designate.utils import generate_uuid
from designate.network_api import base
+from designate.utils import generate_uuid
LOG = logging.getLogger(__name__)
diff --git a/designate/notification_handler/base.py b/designate/notification_handler/base.py
index a95c0145..50a5ef41 100644
--- a/designate/notification_handler/base.py
+++ b/designate/notification_handler/base.py
@@ -21,9 +21,9 @@ from oslo_log import log as logging
import re
-from designate import exceptions
from designate.central import rpcapi as central_rpcapi
from designate.context import DesignateContext
+from designate import exceptions
from designate.objects import Record
from designate.objects import RecordList
from designate.objects import RecordSet
diff --git a/designate/notifications.py b/designate/notifications.py
index 84f916df..baffd552 100644
--- a/designate/notifications.py
+++ b/designate/notifications.py
@@ -21,8 +21,8 @@ from oslo_config import cfg
from oslo_log import log as logging
import designate.conf
-from designate.plugin import DriverPlugin
from designate import objects
+from designate.plugin import DriverPlugin
from designate import rpc
LOG = logging.getLogger(__name__)
diff --git a/designate/objects/adapters/api_v2/base.py b/designate/objects/adapters/api_v2/base.py
index 2773daf6..7347cb27 100644
--- a/designate/objects/adapters/api_v2/base.py
+++ b/designate/objects/adapters/api_v2/base.py
@@ -11,12 +11,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from urllib import parse
from oslo_config import cfg
+from urllib import parse
+from designate import exceptions
from designate.objects.adapters import base
from designate.objects import base as ovoobj_base
-from designate import exceptions
cfg.CONF.import_opt('api_base_uri', 'designate.api', group='service:api')
diff --git a/designate/objects/adapters/api_v2/blacklist.py b/designate/objects/adapters/api_v2/blacklist.py
index 61fe17d2..dcd1d57c 100644
--- a/designate/objects/adapters/api_v2/blacklist.py
+++ b/designate/objects/adapters/api_v2/blacklist.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class BlacklistAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/floating_ip.py b/designate/objects/adapters/api_v2/floating_ip.py
index 742ac90a..fa45feb4 100644
--- a/designate/objects/adapters/api_v2/floating_ip.py
+++ b/designate/objects/adapters/api_v2/floating_ip.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class FloatingIPAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/pool.py b/designate/objects/adapters/api_v2/pool.py
index 3d1cb0ba..c71c2eef 100644
--- a/designate/objects/adapters/api_v2/pool.py
+++ b/designate/objects/adapters/api_v2/pool.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class PoolAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/pool_attribute.py b/designate/objects/adapters/api_v2/pool_attribute.py
index cce2dd70..f558b57d 100644
--- a/designate/objects/adapters/api_v2/pool_attribute.py
+++ b/designate/objects/adapters/api_v2/pool_attribute.py
@@ -11,8 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class PoolAttributeAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/pool_ns_record.py b/designate/objects/adapters/api_v2/pool_ns_record.py
index 9ed492e4..7ea42b07 100644
--- a/designate/objects/adapters/api_v2/pool_ns_record.py
+++ b/designate/objects/adapters/api_v2/pool_ns_record.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class PoolNsRecordAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/quota.py b/designate/objects/adapters/api_v2/quota.py
index 0861a075..0928c981 100644
--- a/designate/objects/adapters/api_v2/quota.py
+++ b/designate/objects/adapters/api_v2/quota.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class QuotaAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/record.py b/designate/objects/adapters/api_v2/record.py
index 705e46c9..c5886864 100644
--- a/designate/objects/adapters/api_v2/record.py
+++ b/designate/objects/adapters/api_v2/record.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class RecordAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/recordset.py b/designate/objects/adapters/api_v2/recordset.py
index 8b5210db..9040f0a4 100644
--- a/designate/objects/adapters/api_v2/recordset.py
+++ b/designate/objects/adapters/api_v2/recordset.py
@@ -11,10 +11,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
-from designate import objects
from designate import exceptions
+from designate import objects
+from designate.objects.adapters.api_v2 import base
class RecordSetAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/service_status.py b/designate/objects/adapters/api_v2/service_status.py
index 77267122..a45979ed 100644
--- a/designate/objects/adapters/api_v2/service_status.py
+++ b/designate/objects/adapters/api_v2/service_status.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class ServiceStatusAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/tld.py b/designate/objects/adapters/api_v2/tld.py
index 97766b66..09aee419 100644
--- a/designate/objects/adapters/api_v2/tld.py
+++ b/designate/objects/adapters/api_v2/tld.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class TldAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/tsigkey.py b/designate/objects/adapters/api_v2/tsigkey.py
index e73a6fbf..3041432a 100644
--- a/designate/objects/adapters/api_v2/tsigkey.py
+++ b/designate/objects/adapters/api_v2/tsigkey.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class TsigKeyAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/validation_error.py b/designate/objects/adapters/api_v2/validation_error.py
index 54665340..ee69156d 100644
--- a/designate/objects/adapters/api_v2/validation_error.py
+++ b/designate/objects/adapters/api_v2/validation_error.py
@@ -13,8 +13,8 @@
# under the License.
import re
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class NotSpecifiedSential:
diff --git a/designate/objects/adapters/api_v2/zone.py b/designate/objects/adapters/api_v2/zone.py
index 2a6b0f96..96b0c4c7 100644
--- a/designate/objects/adapters/api_v2/zone.py
+++ b/designate/objects/adapters/api_v2/zone.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class ZoneAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/zone_attribute.py b/designate/objects/adapters/api_v2/zone_attribute.py
index 448c3a60..de4ab839 100644
--- a/designate/objects/adapters/api_v2/zone_attribute.py
+++ b/designate/objects/adapters/api_v2/zone_attribute.py
@@ -11,8 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class ZoneAttributeAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/zone_export.py b/designate/objects/adapters/api_v2/zone_export.py
index addf59d5..905e5f77 100644
--- a/designate/objects/adapters/api_v2/zone_export.py
+++ b/designate/objects/adapters/api_v2/zone_export.py
@@ -13,9 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class ZoneExportAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/zone_import.py b/designate/objects/adapters/api_v2/zone_import.py
index 5d582d81..947fefd9 100644
--- a/designate/objects/adapters/api_v2/zone_import.py
+++ b/designate/objects/adapters/api_v2/zone_import.py
@@ -13,9 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class ZoneImportAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/zone_master.py b/designate/objects/adapters/api_v2/zone_master.py
index d2b865b4..838ec81e 100644
--- a/designate/objects/adapters/api_v2/zone_master.py
+++ b/designate/objects/adapters/api_v2/zone_master.py
@@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
from designate import utils
diff --git a/designate/objects/adapters/api_v2/zone_transfer_accept.py b/designate/objects/adapters/api_v2/zone_transfer_accept.py
index 397b711b..fa3c3cd2 100644
--- a/designate/objects/adapters/api_v2/zone_transfer_accept.py
+++ b/designate/objects/adapters/api_v2/zone_transfer_accept.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
from designate import objects
+from designate.objects.adapters.api_v2 import base
class ZoneTransferAcceptAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/api_v2/zone_transfer_request.py b/designate/objects/adapters/api_v2/zone_transfer_request.py
index 56b9790f..73249422 100644
--- a/designate/objects/adapters/api_v2/zone_transfer_request.py
+++ b/designate/objects/adapters/api_v2/zone_transfer_request.py
@@ -11,11 +11,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.api_v2 import base
+from designate import exceptions
from designate import objects
+from designate.objects.adapters.api_v2 import base
from designate import policy
-from designate import exceptions
class ZoneTransferRequestAPIv2Adapter(base.APIv2Adapter):
diff --git a/designate/objects/adapters/base.py b/designate/objects/adapters/base.py
index 1d06b90a..7f827096 100644
--- a/designate/objects/adapters/base.py
+++ b/designate/objects/adapters/base.py
@@ -16,9 +16,9 @@ import datetime
from oslo_log import log
from oslo_versionedobjects import fields
+from designate import exceptions
from designate import objects
from designate import utils
-from designate import exceptions
LOG = log.getLogger(__name__)
diff --git a/designate/objects/adapters/yaml/pool.py b/designate/objects/adapters/yaml/pool.py
index 2e534eee..f4b13439 100644
--- a/designate/objects/adapters/yaml/pool.py
+++ b/designate/objects/adapters/yaml/pool.py
@@ -13,8 +13,9 @@
# under the License.
from oslo_log import log as logging
-from designate.objects.adapters.yaml import base
from designate import objects
+from designate.objects.adapters.yaml import base
+
LOG = logging.getLogger(__name__)
diff --git a/designate/objects/adapters/yaml/pool_also_notify.py b/designate/objects/adapters/yaml/pool_also_notify.py
index 9c50459f..6c417fb7 100644
--- a/designate/objects/adapters/yaml/pool_also_notify.py
+++ b/designate/objects/adapters/yaml/pool_also_notify.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.yaml import base
from designate import objects
+from designate.objects.adapters.yaml import base
class PoolAlsoNotifyYAMLAdapter(base.YAMLAdapter):
diff --git a/designate/objects/adapters/yaml/pool_attribute.py b/designate/objects/adapters/yaml/pool_attribute.py
index c9c502c1..4ec7cfa9 100644
--- a/designate/objects/adapters/yaml/pool_attribute.py
+++ b/designate/objects/adapters/yaml/pool_attribute.py
@@ -11,8 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.adapters.yaml import base
from designate import objects
+from designate.objects.adapters.yaml import base
class PoolAttributeYAMLAdapter(base.YAMLAdapter):
diff --git a/designate/objects/adapters/yaml/pool_nameserver.py b/designate/objects/adapters/yaml/pool_nameserver.py
index d3a882c4..c5048e7d 100644
--- a/designate/objects/adapters/yaml/pool_nameserver.py
+++ b/designate/objects/adapters/yaml/pool_nameserver.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.yaml import base
from designate import objects
+from designate.objects.adapters.yaml import base
class PoolNameserverYAMLAdapter(base.YAMLAdapter):
diff --git a/designate/objects/adapters/yaml/pool_ns_record.py b/designate/objects/adapters/yaml/pool_ns_record.py
index c51b953a..576793b4 100644
--- a/designate/objects/adapters/yaml/pool_ns_record.py
+++ b/designate/objects/adapters/yaml/pool_ns_record.py
@@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.adapters.yaml import base
from designate import objects
+from designate.objects.adapters.yaml import base
class PoolNsRecordYAMLAdapter(base.YAMLAdapter):
diff --git a/designate/objects/adapters/yaml/pool_target.py b/designate/objects/adapters/yaml/pool_target.py
index 3439ce9d..6142c4ec 100644
--- a/designate/objects/adapters/yaml/pool_target.py
+++ b/designate/objects/adapters/yaml/pool_target.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.yaml import base
from designate import objects
+from designate.objects.adapters.yaml import base
class PoolTargetYAMLAdapter(base.YAMLAdapter):
diff --git a/designate/objects/adapters/yaml/pool_target_master.py b/designate/objects/adapters/yaml/pool_target_master.py
index b91ed1e4..eeb9a983 100644
--- a/designate/objects/adapters/yaml/pool_target_master.py
+++ b/designate/objects/adapters/yaml/pool_target_master.py
@@ -11,9 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.adapters.yaml import base
from designate import objects
+from designate.objects.adapters.yaml import base
class PoolTargetMasterYAMLAdapter(base.YAMLAdapter):
diff --git a/designate/objects/adapters/yaml/pool_target_option.py b/designate/objects/adapters/yaml/pool_target_option.py
index da1e59ad..95996cf8 100644
--- a/designate/objects/adapters/yaml/pool_target_option.py
+++ b/designate/objects/adapters/yaml/pool_target_option.py
@@ -11,8 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.adapters.yaml import base
from designate import objects
+from designate.objects.adapters.yaml import base
class PoolTargetOptionYAMLAdapter(base.YAMLAdapter):
diff --git a/designate/objects/base.py b/designate/objects/base.py
index 8240a3f5..4a7c5927 100644
--- a/designate/objects/base.py
+++ b/designate/objects/base.py
@@ -13,16 +13,16 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_log import log as logging
-from oslo_versionedobjects import exception
from oslo_utils import excutils
-from designate.i18n import _
from oslo_versionedobjects import base
+from oslo_versionedobjects.base import VersionedObjectDictCompat as DictObjectMixin # noqa
+from oslo_versionedobjects import exception
from oslo_versionedobjects import fields as ovoo_fields
-from oslo_versionedobjects.base import VersionedObjectDictCompat as DictObjectMixin # noqa
-from designate.objects import fields
from designate import exceptions
+from designate.i18n import _
+from designate.objects import fields
LOG = logging.getLogger(__name__)
diff --git a/designate/objects/fields.py b/designate/objects/fields.py
index 9b533438..a4525265 100644
--- a/designate/objects/fields.py
+++ b/designate/objects/fields.py
@@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from dns import ipv4
import dns.exception
+from dns import ipv4
import re
import uuid
diff --git a/designate/objects/recordset.py b/designate/objects/recordset.py
index c4de31b9..1fe0c687 100755
--- a/designate/objects/recordset.py
+++ b/designate/objects/recordset.py
@@ -20,11 +20,11 @@ from oslo_log import log
from oslo_versionedobjects import exception as ovo_exc
from designate import exceptions
-from designate import utils
from designate.objects import base
from designate.objects import fields
from designate.objects.validation_error import ValidationError
from designate.objects.validation_error import ValidationErrorList
+from designate import utils
LOG = log.getLogger(__name__)
diff --git a/designate/objects/rrdata_a.py b/designate/objects/rrdata_a.py
index 0b167364..bbe298e0 100644
--- a/designate/objects/rrdata_a.py
+++ b/designate/objects/rrdata_a.py
@@ -12,10 +12,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_aaaa.py b/designate/objects/rrdata_aaaa.py
index c33cee4c..b2073907 100644
--- a/designate/objects/rrdata_aaaa.py
+++ b/designate/objects/rrdata_aaaa.py
@@ -12,10 +12,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_caa.py b/designate/objects/rrdata_caa.py
index fe5c6d92..4b141b78 100644
--- a/designate/objects/rrdata_caa.py
+++ b/designate/objects/rrdata_caa.py
@@ -13,11 +13,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_cert.py b/designate/objects/rrdata_cert.py
index 166d4c02..712ae83c 100644
--- a/designate/objects/rrdata_cert.py
+++ b/designate/objects/rrdata_cert.py
@@ -17,10 +17,10 @@
import base64
from designate.exceptions import InvalidObject
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_cname.py b/designate/objects/rrdata_cname.py
index 9c796f43..b876585a 100644
--- a/designate/objects/rrdata_cname.py
+++ b/designate/objects/rrdata_cname.py
@@ -12,10 +12,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_mx.py b/designate/objects/rrdata_mx.py
index d43c3800..caf6dedb 100644
--- a/designate/objects/rrdata_mx.py
+++ b/designate/objects/rrdata_mx.py
@@ -12,10 +12,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_naptr.py b/designate/objects/rrdata_naptr.py
index a126f971..cbc22231 100644
--- a/designate/objects/rrdata_naptr.py
+++ b/designate/objects/rrdata_naptr.py
@@ -14,10 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_ns.py b/designate/objects/rrdata_ns.py
index a3c5cf38..a411d218 100644
--- a/designate/objects/rrdata_ns.py
+++ b/designate/objects/rrdata_ns.py
@@ -12,10 +12,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_ptr.py b/designate/objects/rrdata_ptr.py
index 9b3e419a..a3ae7e31 100644
--- a/designate/objects/rrdata_ptr.py
+++ b/designate/objects/rrdata_ptr.py
@@ -12,10 +12,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_soa.py b/designate/objects/rrdata_soa.py
index b2219b2a..72809b49 100644
--- a/designate/objects/rrdata_soa.py
+++ b/designate/objects/rrdata_soa.py
@@ -12,10 +12,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_spf.py b/designate/objects/rrdata_spf.py
index 7fc1be3c..323daf66 100644
--- a/designate/objects/rrdata_spf.py
+++ b/designate/objects/rrdata_spf.py
@@ -12,11 +12,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
+from designate.exceptions import InvalidObject
from designate.objects import base
from designate.objects import fields
-from designate.exceptions import InvalidObject
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_srv.py b/designate/objects/rrdata_srv.py
index 20eb842d..5a2d638b 100644
--- a/designate/objects/rrdata_srv.py
+++ b/designate/objects/rrdata_srv.py
@@ -12,10 +12,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_sshfp.py b/designate/objects/rrdata_sshfp.py
index 1c66df54..2ab6bc69 100644
--- a/designate/objects/rrdata_sshfp.py
+++ b/designate/objects/rrdata_sshfp.py
@@ -12,10 +12,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
from designate.objects import base
from designate.objects import fields
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/rrdata_txt.py b/designate/objects/rrdata_txt.py
index 9fcec720..b811dadc 100644
--- a/designate/objects/rrdata_txt.py
+++ b/designate/objects/rrdata_txt.py
@@ -12,11 +12,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.objects.record import Record
-from designate.objects.record import RecordList
+from designate.exceptions import InvalidObject
from designate.objects import base
from designate.objects import fields
-from designate.exceptions import InvalidObject
+from designate.objects.record import Record
+from designate.objects.record import RecordList
@base.DesignateRegistry.register
diff --git a/designate/objects/zone.py b/designate/objects/zone.py
index 3b9e54dc..fa09187d 100644
--- a/designate/objects/zone.py
+++ b/designate/objects/zone.py
@@ -12,12 +12,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate import utils
from designate import exceptions
-from designate.objects.validation_error import ValidationError
-from designate.objects.validation_error import ValidationErrorList
from designate.objects import base
from designate.objects import fields
+from designate.objects.validation_error import ValidationError
+from designate.objects.validation_error import ValidationErrorList
+from designate import utils
@base.DesignateRegistry.register
diff --git a/designate/objects/zone_master.py b/designate/objects/zone_master.py
index 804b82f1..ba51f426 100644
--- a/designate/objects/zone_master.py
+++ b/designate/objects/zone_master.py
@@ -15,9 +15,9 @@
# under the License.
from oslo_versionedobjects import base as ovoo_base
-from designate import utils
from designate.objects import base
from designate.objects import fields
+from designate import utils
@base.DesignateRegistry.register
diff --git a/designate/plugin.py b/designate/plugin.py
index c2c52e0b..9a6280ce 100644
--- a/designate/plugin.py
+++ b/designate/plugin.py
@@ -15,11 +15,10 @@
# under the License.
import abc
-from stevedore import driver
-from stevedore import enabled
from oslo_config import cfg
from oslo_log import log as logging
-
+from stevedore import driver
+from stevedore import enabled
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
diff --git a/designate/policy.py b/designate/policy.py
index 863f0ddc..006f48b8 100644
--- a/designate/policy.py
+++ b/designate/policy.py
@@ -15,11 +15,11 @@
# under the License.
from oslo_config import cfg
from oslo_log import log as logging
-from oslo_policy import policy
from oslo_policy import opts
+from oslo_policy import policy
-from designate import exceptions
from designate.common import policies
+from designate import exceptions
CONF = cfg.CONF
diff --git a/designate/producer/service.py b/designate/producer/service.py
index a862dde6..eb0e632d 100644
--- a/designate/producer/service.py
+++ b/designate/producer/service.py
@@ -17,12 +17,12 @@ from oslo_config import cfg
from oslo_log import log as logging
import oslo_messaging as messaging
+from designate.central import rpcapi
from designate import coordination
+from designate.producer import tasks
from designate import quota
from designate import service
from designate import storage
-from designate.central import rpcapi
-from designate.producer import tasks
LOG = logging.getLogger(__name__)
diff --git a/designate/producer/tasks.py b/designate/producer/tasks.py
index 5db0065f..9fc84148 100644
--- a/designate/producer/tasks.py
+++ b/designate/producer/tasks.py
@@ -15,10 +15,10 @@
# under the License.
import datetime
+from designate.central import rpcapi
from designate import context
from designate import plugin
from designate import rpc
-from designate.central import rpcapi
from designate.worker import rpcapi as worker_rpcapi
from oslo_config import cfg
diff --git a/designate/quota/impl_storage.py b/designate/quota/impl_storage.py
index 4631b569..a98cb518 100644
--- a/designate/quota/impl_storage.py
+++ b/designate/quota/impl_storage.py
@@ -17,9 +17,9 @@ from oslo_config import cfg
from oslo_log import log as logging
from designate import exceptions
-from designate import storage
from designate import objects
from designate.quota import base
+from designate import storage
from designate.storage import transaction
diff --git a/designate/rpc.py b/designate/rpc.py
index 97b4ad45..4a832f6d 100644
--- a/designate/rpc.py
+++ b/designate/rpc.py
@@ -19,9 +19,9 @@ import oslo_messaging as messaging
from oslo_messaging.rpc import dispatcher as rpc_dispatcher
from oslo_serialization import jsonutils
-from designate import objects
import designate.context
import designate.exceptions
+from designate import objects
__all__ = [
'init',
diff --git a/designate/scheduler/filters/default_pool_filter.py b/designate/scheduler/filters/default_pool_filter.py
index 783245de..2faff54a 100644
--- a/designate/scheduler/filters/default_pool_filter.py
+++ b/designate/scheduler/filters/default_pool_filter.py
@@ -13,8 +13,8 @@
# under the License.
from oslo_config import cfg
-from designate.scheduler.filters import base
from designate import objects
+from designate.scheduler.filters import base
class DefaultPoolFilter(base.Filter):
diff --git a/designate/scheduler/filters/fallback_filter.py b/designate/scheduler/filters/fallback_filter.py
index bacb0d33..18a6a73b 100644
--- a/designate/scheduler/filters/fallback_filter.py
+++ b/designate/scheduler/filters/fallback_filter.py
@@ -14,8 +14,8 @@
from oslo_config import cfg
-from designate.scheduler.filters import base
from designate import objects
+from designate.scheduler.filters import base
cfg.CONF.register_opts([
cfg.StrOpt('default_pool_id',
diff --git a/designate/scheduler/filters/in_doubt_default_pool_filter.py b/designate/scheduler/filters/in_doubt_default_pool_filter.py
index af0c27e5..b9cc11b5 100644
--- a/designate/scheduler/filters/in_doubt_default_pool_filter.py
+++ b/designate/scheduler/filters/in_doubt_default_pool_filter.py
@@ -14,8 +14,8 @@
from oslo_config import cfg
-from designate.scheduler.filters import base
from designate import objects
+from designate.scheduler.filters import base
cfg.CONF.register_opts([
cfg.StrOpt('default_pool_id',
diff --git a/designate/scheduler/filters/pool_id_attribute_filter.py b/designate/scheduler/filters/pool_id_attribute_filter.py
index fba0570f..f703876b 100644
--- a/designate/scheduler/filters/pool_id_attribute_filter.py
+++ b/designate/scheduler/filters/pool_id_attribute_filter.py
@@ -13,10 +13,10 @@
# under the License.
from oslo_log import log as logging
-from designate.scheduler.filters import base
from designate import exceptions
from designate import objects
from designate import policy
+from designate.scheduler.filters import base
LOG = logging.getLogger(__name__)
diff --git a/designate/scheduler/filters/random_filter.py b/designate/scheduler/filters/random_filter.py
index 494a1fad..159e3dc2 100644
--- a/designate/scheduler/filters/random_filter.py
+++ b/designate/scheduler/filters/random_filter.py
@@ -15,8 +15,8 @@ import random
from oslo_log import log as logging
-from designate.scheduler.filters import base
from designate.objects import PoolList
+from designate.scheduler.filters import base
LOG = logging.getLogger(__name__)
diff --git a/designate/schema/__init__.py b/designate/schema/__init__.py
index ae893634..54bef9a2 100644
--- a/designate/schema/__init__.py
+++ b/designate/schema/__init__.py
@@ -16,10 +16,10 @@
from oslo_log import log as logging
from designate import exceptions
-from designate import utils
-from designate.schema import validators
-from designate.schema import resolvers
from designate.schema import format
+from designate.schema import resolvers
+from designate.schema import validators
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/service.py b/designate/service.py
index 9f5c68b3..0f020c49 100644
--- a/designate/service.py
+++ b/designate/service.py
@@ -30,13 +30,13 @@ from oslo_service import sslutils
from oslo_service import wsgi
from oslo_utils import netutils
+import designate.conf
+from designate.i18n import _
+from designate.metrics import metrics
from designate import policy
from designate import rpc
from designate import utils
from designate import version
-import designate.conf
-from designate.i18n import _
-from designate.metrics import metrics
CONF = designate.conf.CONF
LOG = logging.getLogger(__name__)
diff --git a/designate/sqlalchemy/base.py b/designate/sqlalchemy/base.py
index 7de614e6..905e4b40 100644
--- a/designate/sqlalchemy/base.py
+++ b/designate/sqlalchemy/base.py
@@ -17,8 +17,8 @@ import abc
import operator
import threading
-from oslo_db.sqlalchemy import utils as oslodb_utils
from oslo_db import exception as oslo_db_exception
+from oslo_db.sqlalchemy import utils as oslodb_utils
from oslo_log import log as logging
from oslo_utils import timeutils
from sqlalchemy import select, or_, between, func, distinct
diff --git a/designate/sqlalchemy/utils.py b/designate/sqlalchemy/utils.py
index c5476bf8..68f7b18d 100644
--- a/designate/sqlalchemy/utils.py
+++ b/designate/sqlalchemy/utils.py
@@ -16,16 +16,16 @@
# License for the specific language governing permissions and limitations
# under the License.
-import sqlalchemy
-from sqlalchemy import exc as sqlalchemy_exc
-from sqlalchemy import select
-from oslo_db.sqlalchemy import utils
from oslo_db import exception as oslo_db_exception
from oslo_db.sqlalchemy.migration_cli import manager
+from oslo_db.sqlalchemy import utils
from oslo_log import log
+import sqlalchemy
+from sqlalchemy import exc as sqlalchemy_exc
+from sqlalchemy import select
-from designate.i18n import _
from designate import exceptions
+from designate.i18n import _
LOG = log.getLogger(__name__)
diff --git a/designate/storage/__init__.py b/designate/storage/__init__.py
index b911154a..b3565dce 100644
--- a/designate/storage/__init__.py
+++ b/designate/storage/__init__.py
@@ -19,8 +19,8 @@ import functools
import threading
import time
-from oslo_log import log as logging
from oslo_db import exception as db_exception
+from oslo_log import log as logging
from oslo_utils import excutils
from designate.storage import base
diff --git a/designate/storage/impl_sqlalchemy/migrate_repo/versions/082_unique_ns_record.py b/designate/storage/impl_sqlalchemy/migrate_repo/versions/082_unique_ns_record.py
index f18184af..681fb061 100644
--- a/designate/storage/impl_sqlalchemy/migrate_repo/versions/082_unique_ns_record.py
+++ b/designate/storage/impl_sqlalchemy/migrate_repo/versions/082_unique_ns_record.py
@@ -21,9 +21,9 @@ import sys
from migrate.changeset.constraint import UniqueConstraint
from oslo_log import log as logging
-from sqlalchemy.schema import MetaData, Table
-from sqlalchemy import exc
from sqlalchemy.engine.reflection import Inspector
+from sqlalchemy import exc
+from sqlalchemy.schema import MetaData, Table
LOG = logging.getLogger()
diff --git a/designate/storage/impl_sqlalchemy/migrate_repo/versions/085_add_zone_attributes.py b/designate/storage/impl_sqlalchemy/migrate_repo/versions/085_add_zone_attributes.py
index a30ae694..3ab5a4bb 100644
--- a/designate/storage/impl_sqlalchemy/migrate_repo/versions/085_add_zone_attributes.py
+++ b/designate/storage/impl_sqlalchemy/migrate_repo/versions/085_add_zone_attributes.py
@@ -18,11 +18,11 @@ attributes table"""
from migrate.changeset.constraint import UniqueConstraint
from oslo_log import log as logging
from oslo_utils import timeutils
-from sqlalchemy.schema import MetaData, Table, Column, ForeignKeyConstraint
from sqlalchemy import DateTime, Integer, String, select
+from sqlalchemy.schema import MetaData, Table, Column, ForeignKeyConstraint
-from designate import utils
from designate.sqlalchemy.types import UUID
+from designate import utils
LOG = logging.getLogger()
diff --git a/designate/storage/impl_sqlalchemy/migrate_repo/versions/086_new_pools_tables.py b/designate/storage/impl_sqlalchemy/migrate_repo/versions/086_new_pools_tables.py
index 039eee2e..776afab1 100644
--- a/designate/storage/impl_sqlalchemy/migrate_repo/versions/086_new_pools_tables.py
+++ b/designate/storage/impl_sqlalchemy/migrate_repo/versions/086_new_pools_tables.py
@@ -19,8 +19,8 @@ from sqlalchemy import (Integer, String, Unicode, DateTime,
ForeignKeyConstraint, UniqueConstraint)
from sqlalchemy.schema import Table, Column, MetaData
-from designate import utils
from designate.sqlalchemy.types import UUID
+from designate import utils
meta = MetaData()
diff --git a/designate/storage/impl_sqlalchemy/migrate_repo/versions/097_add_services.py b/designate/storage/impl_sqlalchemy/migrate_repo/versions/097_add_services.py
index 29895738..48ce661e 100644
--- a/designate/storage/impl_sqlalchemy/migrate_repo/versions/097_add_services.py
+++ b/designate/storage/impl_sqlalchemy/migrate_repo/versions/097_add_services.py
@@ -16,11 +16,11 @@
from oslo_log import log as logging
-from sqlalchemy import String, DateTime, Enum, Text
from sqlalchemy.schema import Table, Column, MetaData
+from sqlalchemy import String, DateTime, Enum, Text
-from designate import utils
from designate.sqlalchemy.types import UUID
+from designate import utils
LOG = logging.getLogger()
diff --git a/designate/storage/impl_sqlalchemy/tables.py b/designate/storage/impl_sqlalchemy/tables.py
index 6f4c4a81..4cc17605 100644
--- a/designate/storage/impl_sqlalchemy/tables.py
+++ b/designate/storage/impl_sqlalchemy/tables.py
@@ -21,8 +21,8 @@ from oslo_config import cfg
from oslo_db.sqlalchemy import types
from oslo_utils import timeutils
-from designate import utils
from designate.sqlalchemy.types import UUID
+from designate import utils
CONF = cfg.CONF
diff --git a/designate/tests/__init__.py b/designate/tests/__init__.py
index 64e709df..3479f275 100644
--- a/designate/tests/__init__.py
+++ b/designate/tests/__init__.py
@@ -29,15 +29,15 @@ from oslotest import base
from testtools import testcase
import designate.conf
+from designate.context import DesignateContext
from designate import exceptions
+from designate.manage import database as manage_database
from designate import objects
from designate import policy
from designate import storage
-from designate import utils
-from designate.context import DesignateContext
-from designate.manage import database as manage_database
from designate.tests import fixtures
from designate.tests import resources
+from designate import utils
eventlet.monkey_patch(os=False)
diff --git a/designate/tests/fixtures.py b/designate/tests/fixtures.py
index 76d4e479..8ef03fc9 100644
--- a/designate/tests/fixtures.py
+++ b/designate/tests/fixtures.py
@@ -20,26 +20,26 @@
# under the License.
from unittest import mock
+from contextlib import contextmanager
import logging as std_logging
import os
import random
import shutil
import tempfile
-from contextlib import contextmanager
import fixtures
-import tooz.coordination
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import importutils
+import tooz.coordination
-import designate.service
-import designate.utils
from designate import network_api
+from designate.network_api import fake as fake_network_api
from designate import policy
from designate import rpc
-from designate.network_api import fake as fake_network_api
+import designate.service
from designate.sqlalchemy import utils as sqlalchemy_utils
+import designate.utils
"""Test fixtures
"""
diff --git a/designate/tests/test_api/test_middleware.py b/designate/tests/test_api/test_middleware.py
index 3425c1c6..dc754ae4 100644
--- a/designate/tests/test_api/test_middleware.py
+++ b/designate/tests/test_api/test_middleware.py
@@ -19,11 +19,11 @@ from unittest import mock
from oslo_config import cfg
from oslo_messaging.notify import notifier
-from designate.tests.test_api import ApiTestCase
+from designate.api import middleware
from designate import context
from designate import exceptions
from designate import rpc
-from designate.api import middleware
+from designate.tests.test_api import ApiTestCase
class FakeRequest(object):
diff --git a/designate/tests/test_api/test_service.py b/designate/tests/test_api/test_service.py
index e8e054d4..d28857d8 100644
--- a/designate/tests/test_api/test_service.py
+++ b/designate/tests/test_api/test_service.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.tests.test_api import ApiTestCase
from designate.api import service
+from designate.tests.test_api import ApiTestCase
class ApiServiceTest(ApiTestCase):
diff --git a/designate/tests/test_api/test_v2/__init__.py b/designate/tests/test_api/test_v2/__init__.py
index a66ed6c3..27337031 100644
--- a/designate/tests/test_api/test_v2/__init__.py
+++ b/designate/tests/test_api/test_v2/__init__.py
@@ -18,8 +18,8 @@ import itertools
from oslo_log import log as logging
from webtest import TestApp
-from designate.api import v2 as api_v2
from designate.api import middleware
+from designate.api import v2 as api_v2
from designate.tests.test_api import ApiTestCase
diff --git a/designate/tests/test_api/test_v2/test_import_export.py b/designate/tests/test_api/test_v2/test_import_export.py
index aefc6e1d..7855f88b 100644
--- a/designate/tests/test_api/test_v2/test_import_export.py
+++ b/designate/tests/test_api/test_v2/test_import_export.py
@@ -14,8 +14,8 @@
import unittest
from dns import zone as dnszone
-from webtest import TestApp
from oslo_config import cfg
+from webtest import TestApp
from designate.api import admin as admin_api
from designate.api import middleware
diff --git a/designate/tests/test_api/test_v2/test_recordsets.py b/designate/tests/test_api/test_v2/test_recordsets.py
index 9b96157c..933eaaa1 100644
--- a/designate/tests/test_api/test_v2/test_recordsets.py
+++ b/designate/tests/test_api/test_v2/test_recordsets.py
@@ -15,11 +15,11 @@
# under the License.
from unittest.mock import patch
-import oslo_messaging as messaging
from oslo_log import log as logging
+import oslo_messaging as messaging
-from designate import exceptions
from designate.central import service as central_service
+from designate import exceptions
from designate.tests.test_api.test_v2 import ApiV2TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_api/test_v2/test_tsigkeys.py b/designate/tests/test_api/test_v2/test_tsigkeys.py
index 1cf66c4b..65403ab2 100644
--- a/designate/tests/test_api/test_v2/test_tsigkeys.py
+++ b/designate/tests/test_api/test_v2/test_tsigkeys.py
@@ -17,8 +17,8 @@ from unittest.mock import patch
import oslo_messaging as messaging
-from designate import exceptions
from designate.central import service as central_service
+from designate import exceptions
from designate.tests.test_api.test_v2 import ApiV2TestCase
diff --git a/designate/tests/test_api/test_v2/test_zones.py b/designate/tests/test_api/test_v2/test_zones.py
index e9d1c386..24845ef7 100644
--- a/designate/tests/test_api/test_v2/test_zones.py
+++ b/designate/tests/test_api/test_v2/test_zones.py
@@ -13,16 +13,16 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from unittest.mock import patch
from unittest import mock
+from unittest.mock import patch
from oslo_config import cfg
import oslo_messaging as messaging
-from designate import exceptions
-from designate import objects
from designate.central import service as central_service
+from designate import exceptions
from designate.mdns import rpcapi as mdns_api
+from designate import objects
from designate.tests.test_api.test_v2 import ApiV2TestCase
diff --git a/designate/tests/test_central/test_decorator.py b/designate/tests/test_central/test_decorator.py
index 79f7126a..5c4515e0 100644
--- a/designate/tests/test_central/test_decorator.py
+++ b/designate/tests/test_central/test_decorator.py
@@ -14,12 +14,12 @@ from unittest import mock
from oslo_concurrency import lockutils
from oslo_log import log as logging
-from designate import exceptions
-from designate import utils
from designate.central import service
+from designate import exceptions
from designate.objects import record
from designate.objects import zone
from designate.tests.test_central import CentralTestCase
+from designate import utils
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_central/test_service.py b/designate/tests/test_central/test_service.py
index 26694b9a..7d8df07d 100644
--- a/designate/tests/test_central/test_service.py
+++ b/designate/tests/test_central/test_service.py
@@ -15,27 +15,27 @@
# License for the specific language governing permissions and limitations
# under the License.
-import datetime
+from collections import namedtuple
import copy
+import datetime
import random
-from collections import namedtuple
from unittest import mock
-import testtools
-from testtools.matchers import GreaterThan
from oslo_config import cfg
-from oslo_log import log as logging
from oslo_db import exception as db_exception
-from oslo_versionedobjects import exception as ovo_exc
+from oslo_log import log as logging
from oslo_messaging.notify import notifier
from oslo_messaging.rpc import dispatcher as rpc_dispatcher
+from oslo_versionedobjects import exception as ovo_exc
+import testtools
+from testtools.matchers import GreaterThan
from designate import exceptions
-from designate import objects
from designate.mdns import rpcapi as mdns_api
+from designate import objects
+from designate.storage.impl_sqlalchemy import tables
from designate.tests import fixtures
from designate.tests.test_central import CentralTestCase
-from designate.storage.impl_sqlalchemy import tables
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_hookpoints.py b/designate/tests/test_hookpoints.py
index bb1c6c98..21aaa910 100644
--- a/designate/tests/test_hookpoints.py
+++ b/designate/tests/test_hookpoints.py
@@ -17,11 +17,11 @@ from unittest.mock import Mock
from unittest.mock import patch
from oslo_config import cfg
-from stevedore.hook import HookManager
from stevedore.extension import Extension
+from stevedore.hook import HookManager
-from designate.hookpoints import hook_point
from designate.hookpoints import BaseHook
+from designate.hookpoints import hook_point
from designate.tests import TestCase
diff --git a/designate/tests/test_manage/test_update_pool.py b/designate/tests/test_manage/test_update_pool.py
index 35bc1fa4..f759d178 100644
--- a/designate/tests/test_manage/test_update_pool.py
+++ b/designate/tests/test_manage/test_update_pool.py
@@ -9,13 +9,14 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+from unittest import mock
+
from oslo_log import log as logging
-from unittest import mock
-from designate.tests.test_manage import DesignateManageTestCase
from designate.manage.pool import PoolCommands
-from designate.tests import fixtures
from designate import objects
+from designate.tests import fixtures
+from designate.tests.test_manage import DesignateManageTestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_mdns/test_handler.py b/designate/tests/test_mdns/test_handler.py
index 09525892..15610ee3 100644
--- a/designate/tests/test_mdns/test_handler.py
+++ b/designate/tests/test_mdns/test_handler.py
@@ -22,13 +22,13 @@ import dns.rdataclass
import dns.rdatatype
import dns.resolver
import dns.rrset
-import testtools
from oslo_config import cfg
+import testtools
from designate import context
+from designate.mdns import handler
from designate import objects
from designate.tests.test_mdns import MdnsTestCase
-from designate.mdns import handler
CONF = cfg.CONF
default_pool_id = CONF['service:central'].default_pool_id
diff --git a/designate/tests/test_mdns/test_notify.py b/designate/tests/test_mdns/test_notify.py
index 566c3d20..56953144 100644
--- a/designate/tests/test_mdns/test_notify.py
+++ b/designate/tests/test_mdns/test_notify.py
@@ -17,13 +17,13 @@ from unittest import mock
from unittest.mock import patch
import dns
+import dns.exception
import dns.message
import dns.query
-import dns.exception
-from designate.tests.test_mdns import MdnsTestCase
from designate.mdns import notify
from designate import objects
+from designate.tests.test_mdns import MdnsTestCase
class MdnsNotifyTest(MdnsTestCase):
diff --git a/designate/tests/test_notification_handler/test_base.py b/designate/tests/test_notification_handler/test_base.py
index 93bb11b6..f1a10dab 100644
--- a/designate/tests/test_notification_handler/test_base.py
+++ b/designate/tests/test_notification_handler/test_base.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.tests import TestCase
from designate.notification_handler import base
+from designate.tests import TestCase
class InheritFormBaseAddressHandler(base.BaseAddressHandler):
diff --git a/designate/tests/test_notification_handler/test_neutron.py b/designate/tests/test_notification_handler/test_neutron.py
index 9373a869..8d15063d 100644
--- a/designate/tests/test_notification_handler/test_neutron.py
+++ b/designate/tests/test_notification_handler/test_neutron.py
@@ -15,10 +15,10 @@
# under the License.
from oslo_log import log as logging
-from designate.tests import TestCase
from designate.notification_handler.neutron import NeutronFloatingHandler
from designate.tests.test_notification_handler import \
NotificationHandlerMixin
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_notification_handler/test_nova.py b/designate/tests/test_notification_handler/test_nova.py
index 4d973987..746380b0 100644
--- a/designate/tests/test_notification_handler/test_nova.py
+++ b/designate/tests/test_notification_handler/test_nova.py
@@ -18,10 +18,10 @@ from unittest import mock
from oslo_log import log as logging
-from designate.tests import TestCase
from designate.notification_handler.nova import NovaFixedHandler
from designate.tests.test_notification_handler import \
NotificationHandlerMixin
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_producer/test_tasks.py b/designate/tests/test_producer/test_tasks.py
index 0ad1ca50..c6403670 100644
--- a/designate/tests/test_producer/test_tasks.py
+++ b/designate/tests/test_producer/test_tasks.py
@@ -19,10 +19,10 @@ import datetime
from oslo_log import log as logging
from oslo_utils import timeutils
+from designate.producer import tasks
from designate.storage.impl_sqlalchemy import tables
-from designate.tests import TestCase
from designate.tests import fixtures
-from designate.producer import tasks
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_quota/test_quota.py b/designate/tests/test_quota/test_quota.py
index 039dbf7e..5e18e790 100644
--- a/designate/tests/test_quota/test_quota.py
+++ b/designate/tests/test_quota/test_quota.py
@@ -15,14 +15,14 @@
# under the License.
from unittest import mock
-from testscenarios import load_tests_apply_scenarios as load_tests # noqa
-import testtools
from oslo_config import cfg
from oslo_log import log as logging
+from testscenarios import load_tests_apply_scenarios as load_tests # noqa
+import testtools
+from designate import exceptions
from designate import quota
from designate import tests
-from designate import exceptions
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_schema/__init__.py b/designate/tests/test_schema/__init__.py
index c78503f9..68c51c4b 100644
--- a/designate/tests/test_schema/__init__.py
+++ b/designate/tests/test_schema/__init__.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from designate.tests import TestCase
from designate import schema
+from designate.tests import TestCase
class TestSchema(TestCase):
diff --git a/designate/tests/test_schema/test_format.py b/designate/tests/test_schema/test_format.py
index 7b37c65c..d7fa1ed3 100644
--- a/designate/tests/test_schema/test_format.py
+++ b/designate/tests/test_schema/test_format.py
@@ -15,8 +15,8 @@
# under the License.
from oslo_log import log as logging
-from designate.tests import TestCase
from designate.schema import format
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_storage/__init__.py b/designate/tests/test_storage/__init__.py
index d7ada332..76e5ea0a 100644
--- a/designate/tests/test_storage/__init__.py
+++ b/designate/tests/test_storage/__init__.py
@@ -16,16 +16,16 @@
import math
from unittest import mock
-import testtools
from oslo_config import cfg
from oslo_log import log as logging
from oslo_messaging.rpc import dispatcher as rpc_dispatcher
+import testtools
+from designate.conf.mdns import DEFAULT_MDNS_PORT
from designate import exceptions
from designate import objects
-from designate.conf.mdns import DEFAULT_MDNS_PORT
-from designate.utils import generate_uuid
from designate.storage.base import Storage as StorageBase
+from designate.utils import generate_uuid
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/test_storage/test_sqlalchemy.py b/designate/tests/test_storage/test_sqlalchemy.py
index 4543b34e..1979a0ff 100644
--- a/designate/tests/test_storage/test_sqlalchemy.py
+++ b/designate/tests/test_storage/test_sqlalchemy.py
@@ -18,8 +18,8 @@ from unittest import mock
from oslo_log import log as logging
from designate import storage
-from designate.tests import TestCase
from designate.tests.test_storage import StorageTestCase
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/agent/backends/test_bind9.py b/designate/tests/unit/agent/backends/test_bind9.py
index 18f445ff..f080b565 100644
--- a/designate/tests/unit/agent/backends/test_bind9.py
+++ b/designate/tests/unit/agent/backends/test_bind9.py
@@ -17,11 +17,11 @@ from unittest import mock
import dns.resolver
-import designate.tests
-from designate import exceptions
-from designate import utils
from designate.backend.agent_backend import impl_bind9
+from designate import exceptions
+import designate.tests
from designate.tests.unit.agent import backends
+from designate import utils
class Bind9AgentBackendTestCase(designate.tests.TestCase):
diff --git a/designate/tests/unit/agent/backends/test_denominator.py b/designate/tests/unit/agent/backends/test_denominator.py
index 043ae34c..f74e00f6 100644
--- a/designate/tests/unit/agent/backends/test_denominator.py
+++ b/designate/tests/unit/agent/backends/test_denominator.py
@@ -17,15 +17,14 @@ from unittest import mock
from oslo_config import cfg
-import designate.tests
+from designate.backend.agent_backend import impl_denominator
from designate import exceptions
from designate import tests
-from designate import utils
-from designate.backend.agent_backend import impl_denominator
from designate.tests.unit.agent import backends
+from designate import utils
-class DenominatorAgentBackendTestCase(designate.tests.TestCase):
+class DenominatorAgentBackendTestCase(tests.TestCase):
def setUp(self):
super(DenominatorAgentBackendTestCase, self).setUp()
diff --git a/designate/tests/unit/agent/backends/test_djbdns.py b/designate/tests/unit/agent/backends/test_djbdns.py
index 213de11e..518f71e7 100644
--- a/designate/tests/unit/agent/backends/test_djbdns.py
+++ b/designate/tests/unit/agent/backends/test_djbdns.py
@@ -15,9 +15,9 @@
# under the License.
from unittest import mock
-import designate.tests
-from designate import exceptions
from designate.backend.agent_backend import impl_djbdns
+from designate import exceptions
+import designate.tests
from designate.tests.unit.agent import backends
diff --git a/designate/tests/unit/agent/backends/test_fake.py b/designate/tests/unit/agent/backends/test_fake.py
index 00fd6414..7cbe15a3 100644
--- a/designate/tests/unit/agent/backends/test_fake.py
+++ b/designate/tests/unit/agent/backends/test_fake.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import designate.tests
from designate.backend.agent_backend import impl_fake
+import designate.tests
from designate.tests.unit.agent import backends
diff --git a/designate/tests/unit/agent/backends/test_gdnsd.py b/designate/tests/unit/agent/backends/test_gdnsd.py
index e1716377..d790bfef 100644
--- a/designate/tests/unit/agent/backends/test_gdnsd.py
+++ b/designate/tests/unit/agent/backends/test_gdnsd.py
@@ -15,8 +15,8 @@
# under the License.
from unittest import mock
-import designate.tests
from designate.backend.agent_backend import impl_gdnsd
+import designate.tests
class GdnsdAgentBackendTestCase(designate.tests.TestCase):
diff --git a/designate/tests/unit/agent/backends/test_knot2.py b/designate/tests/unit/agent/backends/test_knot2.py
index ce317a3b..b8bbb7a5 100644
--- a/designate/tests/unit/agent/backends/test_knot2.py
+++ b/designate/tests/unit/agent/backends/test_knot2.py
@@ -13,14 +13,14 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-from unittest.mock import call
from unittest import mock
+from unittest.mock import call
from oslo_concurrency import processutils
-import designate.tests
-from designate import exceptions
from designate.backend.agent_backend import impl_knot2
+from designate import exceptions
+import designate.tests
from designate.tests.unit.agent import backends
diff --git a/designate/tests/unit/agent/backends/test_msdns.py b/designate/tests/unit/agent/backends/test_msdns.py
index b8499daa..36f0fde5 100644
--- a/designate/tests/unit/agent/backends/test_msdns.py
+++ b/designate/tests/unit/agent/backends/test_msdns.py
@@ -20,9 +20,9 @@ from os_win import constants
from os_win import exceptions as os_win_exc
from os_win import utilsfactory
-import designate.tests
-from designate import exceptions
from designate.backend.agent_backend import impl_msdns
+from designate import exceptions
+import designate.tests
from designate.tests.unit.agent import backends
diff --git a/designate/tests/unit/agent/test_handler.py b/designate/tests/unit/agent/test_handler.py
index eb1f2f0b..97d3796a 100644
--- a/designate/tests/unit/agent/test_handler.py
+++ b/designate/tests/unit/agent/test_handler.py
@@ -20,8 +20,8 @@ import dns
import dns.resolver
import designate
-import designate.tests
from designate.agent import handler
+import designate.tests
class AgentRequestHandlerTest(designate.tests.TestCase):
diff --git a/designate/tests/unit/agent/test_service.py b/designate/tests/unit/agent/test_service.py
index ac88e8cc..1e205ddb 100644
--- a/designate/tests/unit/agent/test_service.py
+++ b/designate/tests/unit/agent/test_service.py
@@ -15,13 +15,13 @@
# under the License.
from unittest import mock
-import designate.tests
-from designate import dnsutils
-from designate import utils
from designate.agent import service
from designate.backend import agent_backend
from designate.backend.agent_backend import impl_fake
+from designate import dnsutils
+import designate.tests
from designate.tests import fixtures
+from designate import utils
class AgentServiceTest(designate.tests.TestCase):
diff --git a/designate/tests/unit/api/test_admin_api.py b/designate/tests/unit/api/test_admin_api.py
index 56adee5c..d47bfee2 100644
--- a/designate/tests/unit/api/test_admin_api.py
+++ b/designate/tests/unit/api/test_admin_api.py
@@ -15,9 +15,9 @@
# under the License.
from unittest import mock
-import designate.tests
-from designate import exceptions
from designate.api.admin.views import base
+from designate import exceptions
+import designate.tests
class MockRequest(object):
diff --git a/designate/tests/unit/api/test_api_v2.py b/designate/tests/unit/api/test_api_v2.py
index d60e0ccf..813f8f0b 100644
--- a/designate/tests/unit/api/test_api_v2.py
+++ b/designate/tests/unit/api/test_api_v2.py
@@ -15,9 +15,9 @@
# under the License.
from unittest import mock
-import designate.tests
from designate import exceptions
from designate.objects.adapters.api_v2 import base
+import designate.tests
class MockRequest(object):
diff --git a/designate/tests/unit/backend/test_agent.py b/designate/tests/unit/backend/test_agent.py
index d1e585bf..1316dec2 100644
--- a/designate/tests/unit/backend/test_agent.py
+++ b/designate/tests/unit/backend/test_agent.py
@@ -20,9 +20,9 @@ import dns.rdatatype
import designate.backend.agent as agent
import designate.backend.private_codes as pcodes
from designate import exceptions
+from designate.mdns import rpcapi as mdns_api
from designate import objects
from designate import tests
-from designate.mdns import rpcapi as mdns_api
from designate.tests.unit import RoObject
diff --git a/designate/tests/unit/backend/test_akamai_v2.py b/designate/tests/unit/backend/test_akamai_v2.py
index 1a526576..07f7346e 100644
--- a/designate/tests/unit/backend/test_akamai_v2.py
+++ b/designate/tests/unit/backend/test_akamai_v2.py
@@ -19,10 +19,10 @@ from unittest import mock
import requests
-import designate.tests
+from designate.backend import impl_akamai_v2 as akamai
from designate import exceptions
from designate import objects
-from designate.backend import impl_akamai_v2 as akamai
+import designate.tests
from designate.tests import fixtures
diff --git a/designate/tests/unit/backend/test_bind9.py b/designate/tests/unit/backend/test_bind9.py
index c1189e84..f29394ca 100644
--- a/designate/tests/unit/backend/test_bind9.py
+++ b/designate/tests/unit/backend/test_bind9.py
@@ -13,12 +13,12 @@
# under the License.
from unittest import mock
-import designate.tests
+from designate.backend import impl_bind9
from designate import exceptions
from designate import objects
-from designate import utils
-from designate.backend import impl_bind9
+import designate.tests
from designate.tests import fixtures
+from designate import utils
import subprocess
diff --git a/designate/tests/unit/backend/test_designate.py b/designate/tests/unit/backend/test_designate.py
index 6d3225e7..41795a52 100644
--- a/designate/tests/unit/backend/test_designate.py
+++ b/designate/tests/unit/backend/test_designate.py
@@ -19,9 +19,9 @@ from designateclient import exceptions
from designateclient.v2 import client
from oslo_log import log as logging
-import designate.tests
-from designate import objects
from designate.backend import impl_designate
+from designate import objects
+import designate.tests
from designate.tests import fixtures
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/backend/test_dynect.py b/designate/tests/unit/backend/test_dynect.py
index 35377259..307666aa 100644
--- a/designate/tests/unit/backend/test_dynect.py
+++ b/designate/tests/unit/backend/test_dynect.py
@@ -15,9 +15,9 @@
# under the License.
import requests_mock
-import designate.tests
-from designate import objects
from designate.backend import impl_dynect
+from designate import objects
+import designate.tests
MASTERS = ["10.0.0.1"]
CONTACT = 'jdoe@myco.biz'
diff --git a/designate/tests/unit/backend/test_infoblox.py b/designate/tests/unit/backend/test_infoblox.py
index 76f1c4b9..54de1b1c 100644
--- a/designate/tests/unit/backend/test_infoblox.py
+++ b/designate/tests/unit/backend/test_infoblox.py
@@ -16,12 +16,12 @@ from unittest import mock
import requests_mock
-import designate.tests
-from designate import exceptions
-from designate import objects
from designate.backend import impl_infoblox
from designate.backend.impl_infoblox import ibexceptions
+from designate import exceptions
from designate.mdns import rpcapi as mdns_rpcapi
+from designate import objects
+import designate.tests
class InfobloxBackendTestCase(designate.tests.TestCase):
diff --git a/designate/tests/unit/backend/test_ns1.py b/designate/tests/unit/backend/test_ns1.py
index edb15de8..3047d14b 100644
--- a/designate/tests/unit/backend/test_ns1.py
+++ b/designate/tests/unit/backend/test_ns1.py
@@ -14,9 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import requests_mock
+
+from designate.backend import impl_ns1
from designate import exceptions
from designate import objects
-from designate.backend import impl_ns1
import designate.tests
from designate.tests import fixtures
diff --git a/designate/tests/unit/backend/test_nsd4.py b/designate/tests/unit/backend/test_nsd4.py
index cf841d99..0a6b2c2b 100644
--- a/designate/tests/unit/backend/test_nsd4.py
+++ b/designate/tests/unit/backend/test_nsd4.py
@@ -19,10 +19,10 @@ from unittest import mock
import eventlet
-import designate.tests
+from designate.backend import impl_nsd4
from designate import exceptions
from designate import objects
-from designate.backend import impl_nsd4
+import designate.tests
class NSD4BackendTestCase(designate.tests.TestCase):
diff --git a/designate/tests/unit/backend/test_pdns4.py b/designate/tests/unit/backend/test_pdns4.py
index 9cfc779e..9672b4b7 100644
--- a/designate/tests/unit/backend/test_pdns4.py
+++ b/designate/tests/unit/backend/test_pdns4.py
@@ -13,10 +13,10 @@ from unittest import mock
import requests_mock
-from designate import exceptions
-from designate import objects
from designate.backend import impl_pdns4
+from designate import exceptions
from designate.mdns import rpcapi as mdns_rpcapi
+from designate import objects
import designate.tests
from designate.tests import fixtures
diff --git a/designate/tests/unit/mdns/test_handler.py b/designate/tests/unit/mdns/test_handler.py
index 92a35a93..93ea162c 100644
--- a/designate/tests/unit/mdns/test_handler.py
+++ b/designate/tests/unit/mdns/test_handler.py
@@ -21,8 +21,8 @@ from oslo_config import fixture as cfg_fixture
import oslotest.base
from designate import exceptions
-from designate import objects
from designate.mdns import handler
+from designate import objects
from designate.tests import fixtures
CONF = cfg.CONF
diff --git a/designate/tests/unit/mdns/test_service.py b/designate/tests/unit/mdns/test_service.py
index 3ec53590..4ea8c1d1 100644
--- a/designate/tests/unit/mdns/test_service.py
+++ b/designate/tests/unit/mdns/test_service.py
@@ -15,18 +15,18 @@
# under the License.
from unittest import mock
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
+import oslotest.base
import designate.dnsutils
+from designate.mdns import handler
+from designate.mdns import service
import designate.rpc
import designate.service
from designate import storage
-import designate.utils
-from designate.mdns import handler
-from designate.mdns import service
from designate.tests import fixtures
+import designate.utils
CONF = cfg.CONF
diff --git a/designate/tests/unit/mdns/test_xfr.py b/designate/tests/unit/mdns/test_xfr.py
index 13928cf8..8aef1b77 100644
--- a/designate/tests/unit/mdns/test_xfr.py
+++ b/designate/tests/unit/mdns/test_xfr.py
@@ -20,9 +20,9 @@ from oslo_config import fixture as cfg_fixture
import oslotest.base
-from designate import objects
from designate import dnsutils
from designate.mdns import xfr
+from designate import objects
from designate.tests import fixtures
diff --git a/designate/tests/unit/metrics/test_metrics.py b/designate/tests/unit/metrics/test_metrics.py
index 951f0033..bcb855a7 100644
--- a/designate/tests/unit/metrics/test_metrics.py
+++ b/designate/tests/unit/metrics/test_metrics.py
@@ -22,8 +22,8 @@ from oslo_config import fixture as cfg_fixture
from designate import metrics
from designate.metrics_client import noop
-from designate.tests import TestCase
from designate.tests import fixtures
+from designate.tests import TestCase
class TestNoopMetrics(TestCase):
diff --git a/designate/tests/unit/notification_handler/test_fake.py b/designate/tests/unit/notification_handler/test_fake.py
index b1803da0..a915b2ab 100644
--- a/designate/tests/unit/notification_handler/test_fake.py
+++ b/designate/tests/unit/notification_handler/test_fake.py
@@ -11,8 +11,8 @@
# under the License.mport threading
from unittest import mock
-import oslotest.base
from oslo_config import cfg
+import oslotest.base
from designate.notification_handler import fake
from designate.tests import test_notification_handler
diff --git a/designate/tests/unit/objects/test_adapters.py b/designate/tests/unit/objects/test_adapters.py
index 94ae79cb..8cd5f631 100644
--- a/designate/tests/unit/objects/test_adapters.py
+++ b/designate/tests/unit/objects/test_adapters.py
@@ -16,9 +16,9 @@
import datetime
from unittest.mock import Mock
-import oslotest.base
from oslo_log import log as logging
from oslo_utils import timeutils
+import oslotest.base
from designate import objects
from designate.objects import adapters
diff --git a/designate/tests/unit/objects/test_base.py b/designate/tests/unit/objects/test_base.py
index 6fa27858..b6d8079e 100644
--- a/designate/tests/unit/objects/test_base.py
+++ b/designate/tests/unit/objects/test_base.py
@@ -17,10 +17,10 @@ import copy
from operator import attrgetter
from unittest import mock
-import oslotest.base
-import testtools
from oslo_log import log as logging
from oslo_serialization import jsonutils
+import oslotest.base
+import testtools
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_caa_object.py b/designate/tests/unit/objects/test_caa_object.py
index 877ffb25..7ab7dd86 100644
--- a/designate/tests/unit/objects/test_caa_object.py
+++ b/designate/tests/unit/objects/test_caa_object.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import objects
diff --git a/designate/tests/unit/objects/test_cert_object.py b/designate/tests/unit/objects/test_cert_object.py
index a2f70d8d..c650b6f0 100644
--- a/designate/tests/unit/objects/test_cert_object.py
+++ b/designate/tests/unit/objects/test_cert_object.py
@@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_mx_object.py b/designate/tests/unit/objects/test_mx_object.py
index 9396da56..589e5be8 100644
--- a/designate/tests/unit/objects/test_mx_object.py
+++ b/designate/tests/unit/objects/test_mx_object.py
@@ -13,11 +13,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
-from designate import objects
from designate.exceptions import InvalidObject
+from designate import objects
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/objects/test_naptr_object.py b/designate/tests/unit/objects/test_naptr_object.py
index e1fb3e90..4415bcbd 100644
--- a/designate/tests/unit/objects/test_naptr_object.py
+++ b/designate/tests/unit/objects/test_naptr_object.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import objects
diff --git a/designate/tests/unit/objects/test_recordset.py b/designate/tests/unit/objects/test_recordset.py
index 37d625c4..634221bf 100644
--- a/designate/tests/unit/objects/test_recordset.py
+++ b/designate/tests/unit/objects/test_recordset.py
@@ -16,8 +16,8 @@
import itertools
from unittest import mock
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_rrdata_a.py b/designate/tests/unit/objects/test_rrdata_a.py
index fc7bbfda..3b508c3a 100644
--- a/designate/tests/unit/objects/test_rrdata_a.py
+++ b/designate/tests/unit/objects/test_rrdata_a.py
@@ -13,8 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_rrdata_spf.py b/designate/tests/unit/objects/test_rrdata_spf.py
index b60f00ae..4e1bc102 100644
--- a/designate/tests/unit/objects/test_rrdata_spf.py
+++ b/designate/tests/unit/objects/test_rrdata_spf.py
@@ -9,8 +9,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_rrdata_txt.py b/designate/tests/unit/objects/test_rrdata_txt.py
index 22274816..3802884a 100644
--- a/designate/tests/unit/objects/test_rrdata_txt.py
+++ b/designate/tests/unit/objects/test_rrdata_txt.py
@@ -9,8 +9,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/objects/test_sshfp_object.py b/designate/tests/unit/objects/test_sshfp_object.py
index 5e989a9a..ac1ea380 100644
--- a/designate/tests/unit/objects/test_sshfp_object.py
+++ b/designate/tests/unit/objects/test_sshfp_object.py
@@ -13,11 +13,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
-from designate import objects
from designate.exceptions import InvalidObject
+from designate import objects
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/objects/test_yaml_adapters.py b/designate/tests/unit/objects/test_yaml_adapters.py
index 05e53e7d..532798a0 100644
--- a/designate/tests/unit/objects/test_yaml_adapters.py
+++ b/designate/tests/unit/objects/test_yaml_adapters.py
@@ -15,12 +15,12 @@
# under the License.
import os
+from oslo_log import log as logging
import oslotest.base
import yaml
-from oslo_log import log as logging
-from designate import objects
from designate.conf.mdns import DEFAULT_MDNS_PORT
+from designate import objects
from designate.objects import adapters
from designate.tests import resources
diff --git a/designate/tests/unit/objects/test_zone.py b/designate/tests/unit/objects/test_zone.py
index 11fe3f08..126ed747 100644
--- a/designate/tests/unit/objects/test_zone.py
+++ b/designate/tests/unit/objects/test_zone.py
@@ -15,8 +15,8 @@
# under the License.
import unittest
-import oslotest.base
from oslo_log import log as logging
+import oslotest.base
from designate import exceptions
from designate import objects
diff --git a/designate/tests/unit/producer/test_service.py b/designate/tests/unit/producer/test_service.py
index 6bbd89ed..a4e4d8af 100644
--- a/designate/tests/unit/producer/test_service.py
+++ b/designate/tests/unit/producer/test_service.py
@@ -20,9 +20,9 @@ Unit-test Producer service
from unittest import mock
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
+import oslotest.base
from designate.producer import service
import designate.service
diff --git a/designate/tests/unit/producer/test_tasks.py b/designate/tests/unit/producer/test_tasks.py
index 795ff6f3..a4461ded 100644
--- a/designate/tests/unit/producer/test_tasks.py
+++ b/designate/tests/unit/producer/test_tasks.py
@@ -21,15 +21,15 @@ import datetime
from unittest import mock
import fixtures
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
from oslo_utils import timeutils
+import oslotest.base
-from designate import context
-from designate import rpc
from designate.central import rpcapi as central_api
+from designate import context
from designate.producer import tasks
+from designate import rpc
from designate.tests.unit import RoObject
from designate.utils import generate_uuid
diff --git a/designate/tests/unit/scheduler/test_filters.py b/designate/tests/unit/scheduler/test_filters.py
index 78570e80..44b89242 100644
--- a/designate/tests/unit/scheduler/test_filters.py
+++ b/designate/tests/unit/scheduler/test_filters.py
@@ -18,12 +18,12 @@ import fixtures
from designate import exceptions
from designate import objects
from designate import policy
-from designate import tests
from designate.scheduler.filters import attribute_filter
from designate.scheduler.filters import default_pool_filter
from designate.scheduler.filters import fallback_filter
from designate.scheduler.filters import in_doubt_default_pool_filter
from designate.scheduler.filters import pool_id_attribute_filter
+from designate import tests
class SchedulerFilterTest(tests.TestCase):
diff --git a/designate/tests/unit/sink/test_notifications.py b/designate/tests/unit/sink/test_notifications.py
index b80b8a2f..b47ff207 100644
--- a/designate/tests/unit/sink/test_notifications.py
+++ b/designate/tests/unit/sink/test_notifications.py
@@ -12,8 +12,8 @@
from unittest import mock
-import oslotest.base
from oslo_config import cfg
+import oslotest.base
from designate.notification_handler import fake
from designate.sink import service
diff --git a/designate/tests/unit/sink/test_service.py b/designate/tests/unit/sink/test_service.py
index 3ee95aad..f750af64 100644
--- a/designate/tests/unit/sink/test_service.py
+++ b/designate/tests/unit/sink/test_service.py
@@ -11,9 +11,9 @@
# under the License.mport threading
from unittest import mock
-import designate.tests
import designate.rpc
from designate.sink import service
+import designate.tests
from designate.tests import fixtures
diff --git a/designate/tests/unit/test_central/test_basic.py b/designate/tests/unit/test_central/test_basic.py
index b7711955..45f528e4 100644
--- a/designate/tests/unit/test_central/test_basic.py
+++ b/designate/tests/unit/test_central/test_basic.py
@@ -18,19 +18,19 @@ from unittest import mock
from unittest.mock import patch
import fixtures
-import testtools
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
from oslo_log import log as logging
from oslo_messaging.rpc import dispatcher as rpc_dispatcher
from oslotest import base
+import testtools
import designate.central.service
+from designate.central.service import Service
from designate import exceptions
from designate import objects
-from designate.central.service import Service
-from designate.tests import TestCase
from designate.tests.fixtures import random_seed
+from designate.tests import TestCase
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/test_central/test_notifications.py b/designate/tests/unit/test_central/test_notifications.py
index 7e3221c6..83fa66f9 100644
--- a/designate/tests/unit/test_central/test_notifications.py
+++ b/designate/tests/unit/test_central/test_notifications.py
@@ -18,8 +18,8 @@ from unittest import mock
from oslo_log import log as logging
-from designate import objects
from designate import notifications
+from designate import objects
LOG = logging.getLogger(__name__)
diff --git a/designate/tests/unit/test_context.py b/designate/tests/unit/test_context.py
index 81fa61c4..ad1d9022 100644
--- a/designate/tests/unit/test_context.py
+++ b/designate/tests/unit/test_context.py
@@ -17,10 +17,10 @@ from unittest import mock
import testtools
-import designate.tests
from designate import context
from designate import exceptions
from designate import policy
+import designate.tests
class TestDesignateContext(designate.tests.TestCase):
diff --git a/designate/tests/unit/test_dnsutils.py b/designate/tests/unit/test_dnsutils.py
index 8345b8ef..0dd4c4c8 100644
--- a/designate/tests/unit/test_dnsutils.py
+++ b/designate/tests/unit/test_dnsutils.py
@@ -24,12 +24,11 @@ import dns.rdatatype
import dns.zone
import eventlet
import oslotest.base
-from dns import zone as dnszone
-import designate.tests
from designate import dnsutils
from designate import exceptions
from designate import objects
+import designate.tests
SAMPLES = {
("cname.example.com.", "CNAME"): {
@@ -94,7 +93,7 @@ class TestUtils(designate.tests.TestCase):
def test_from_dnspython_zone(self):
zone_file = self.get_zonefile_fixture()
- dnspython_zone = dnszone.from_text(
+ dnspython_zone = dns.zone.from_text(
zone_file,
relativize=False,
check_origin=False
@@ -107,7 +106,7 @@ class TestUtils(designate.tests.TestCase):
def test_from_dnspython_zone_no_soa(self):
zone_file = self.get_zonefile_fixture(variant='nosoa')
- dnspython_zone = dnszone.from_text(
+ dnspython_zone = dns.zone.from_text(
zone_file,
relativize=False,
check_origin=False
@@ -122,7 +121,7 @@ class TestUtils(designate.tests.TestCase):
def test_parse_zone(self):
zone_file = self.get_zonefile_fixture()
- dnspython_zone = dnszone.from_text(
+ dnspython_zone = dns.zone.from_text(
zone_file,
# Don't relativize, otherwise we end up with '@' record names.
relativize=False,
diff --git a/designate/tests/unit/test_heartbeat_emitter.py b/designate/tests/unit/test_heartbeat_emitter.py
index 547bd048..d04ed665 100644
--- a/designate/tests/unit/test_heartbeat_emitter.py
+++ b/designate/tests/unit/test_heartbeat_emitter.py
@@ -14,10 +14,10 @@
import time
from unittest import mock
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
from oslo_service import loopingcall
+import oslotest.base
from designate import heartbeat_emitter
from designate import objects
diff --git a/designate/tests/unit/test_upgrade_checks.py b/designate/tests/unit/test_upgrade_checks.py
index 31c21ccd..da8f2ffb 100644
--- a/designate/tests/unit/test_upgrade_checks.py
+++ b/designate/tests/unit/test_upgrade_checks.py
@@ -18,8 +18,8 @@ from sqlalchemy.schema import MetaData
from sqlalchemy.schema import Table
from designate.cmd import status
-from designate import tests
from designate.sqlalchemy import session
+from designate import tests
class TestDuplicateServiceStatus(tests.TestCase):
diff --git a/designate/tests/unit/test_utils.py b/designate/tests/unit/test_utils.py
index 62e909d2..aabaa885 100644
--- a/designate/tests/unit/test_utils.py
+++ b/designate/tests/unit/test_utils.py
@@ -13,15 +13,15 @@ import random
from unittest import mock
import jinja2
-import oslotest.base
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
from oslo_utils import timeutils
+import oslotest.base
from designate import exceptions
-from designate import utils
from designate.tests import fixtures
+from designate import utils
CONF = cfg.CONF
diff --git a/designate/tests/unit/workers/test_processing.py b/designate/tests/unit/workers/test_processing.py
index 7ddde8f4..463c82f4 100644
--- a/designate/tests/unit/workers/test_processing.py
+++ b/designate/tests/unit/workers/test_processing.py
@@ -16,8 +16,8 @@
from unittest import mock
from designate import exceptions
-from designate.tests import TestCase
from designate.tests import fixtures
+from designate.tests import TestCase
from designate.worker import processing
diff --git a/designate/tests/unit/workers/test_service.py b/designate/tests/unit/workers/test_service.py
index 73428f83..b341f3c3 100644
--- a/designate/tests/unit/workers/test_service.py
+++ b/designate/tests/unit/workers/test_service.py
@@ -15,16 +15,16 @@
# under the License.mport threading
from unittest import mock
-import oslo_messaging as messaging
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
+import oslo_messaging as messaging
+import oslotest.base
-import designate.service
-import designate.tests
from designate import backend
from designate import exceptions
from designate import objects
+import designate.service
+import designate.tests
from designate.tests import fixtures
from designate.worker import processing
from designate.worker import service
diff --git a/designate/tests/unit/workers/test_zone_tasks.py b/designate/tests/unit/workers/test_zone_tasks.py
index 25b9c41a..1b209862 100644
--- a/designate/tests/unit/workers/test_zone_tasks.py
+++ b/designate/tests/unit/workers/test_zone_tasks.py
@@ -16,16 +16,16 @@
from unittest import mock
import dns.exception
-import oslotest.base
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
+import oslotest.base
from designate import exceptions
from designate import objects
from designate.tests.unit import utils
from designate.worker import processing
-from designate.worker import utils as wutils
from designate.worker.tasks import zone
+from designate.worker import utils as wutils
CONF = cfg.CONF
diff --git a/designate/utils.py b/designate/utils.py
index d1c87365..62955860 100644
--- a/designate/utils.py
+++ b/designate/utils.py
@@ -20,15 +20,15 @@ import os
import socket
import sys
-import pkg_resources
from jinja2 import Template
-from oslo_config import cfg
from oslo_concurrency import processutils
+from oslo_config import cfg
from oslo_log import log as logging
from oslo_serialization import jsonutils
+from oslo_utils.netutils import is_valid_ipv6
from oslo_utils import timeutils
from oslo_utils import uuidutils
-from oslo_utils.netutils import is_valid_ipv6
+import pkg_resources
from designate.common import config
from designate import exceptions
diff --git a/designate/worker/processing.py b/designate/worker/processing.py
index a41564f1..7c7e06c0 100644
--- a/designate/worker/processing.py
+++ b/designate/worker/processing.py
@@ -16,8 +16,8 @@
import time
import futurist
-from oslo_log import log as logging
from oslo_config import cfg
+from oslo_log import log as logging
from designate import exceptions
diff --git a/designate/worker/rpcapi.py b/designate/worker/rpcapi.py
index fa4f0233..9d7dd58d 100644
--- a/designate/worker/rpcapi.py
+++ b/designate/worker/rpcapi.py
@@ -17,8 +17,8 @@ from oslo_config import cfg
from oslo_log import log as logging
import oslo_messaging as messaging
-from designate import rpc
from designate.loggingutils import rpc_logging
+from designate import rpc
LOG = logging.getLogger(__name__)
diff --git a/designate/worker/service.py b/designate/worker/service.py
index af86cd5c..3dbcf419 100644
--- a/designate/worker/service.py
+++ b/designate/worker/service.py
@@ -20,14 +20,14 @@ from oslo_log import log as logging
import oslo_messaging as messaging
from designate import backend
+from designate.central import rpcapi as central_api
+from designate.context import DesignateContext
from designate import exceptions
from designate import rpc
from designate import service
from designate import storage
-from designate.central import rpcapi as central_api
-from designate.context import DesignateContext
-from designate.worker.tasks import zone as zonetasks
from designate.worker import processing
+from designate.worker.tasks import zone as zonetasks
LOG = logging.getLogger(__name__)
diff --git a/designate/worker/tasks/zone.py b/designate/worker/tasks/zone.py
index 3189de27..5dae0690 100644
--- a/designate/worker/tasks/zone.py
+++ b/designate/worker/tasks/zone.py
@@ -13,17 +13,17 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import time
from collections import namedtuple
+import time
import dns
from oslo_config import cfg
from oslo_log import log as logging
-from designate.worker import utils as wutils
-from designate.worker.tasks import base
from designate import exceptions
from designate import utils
+from designate.worker.tasks import base
+from designate.worker import utils as wutils
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
diff --git a/devstack/networking_test.py b/devstack/networking_test.py
index e1849c36..0e279af7 100644
--- a/devstack/networking_test.py
+++ b/devstack/networking_test.py
@@ -36,16 +36,16 @@
from argparse import ArgumentParser
from collections import OrderedDict
from itertools import product
-from subprocess import check_output
-from subprocess import CalledProcessError
-from tempfile import NamedTemporaryFile
-from threading import Thread
import logging
import os
import random
import string
-import time
+from subprocess import CalledProcessError
+from subprocess import check_output
import sys
+from tempfile import NamedTemporaryFile
+from threading import Thread
+import time
from oslo_serialization import jsonutils
diff --git a/devstack/statsd_mock_server.py b/devstack/statsd_mock_server.py
index 62c8cb2f..9db180f9 100755
--- a/devstack/statsd_mock_server.py
+++ b/devstack/statsd_mock_server.py
@@ -19,10 +19,10 @@ Log to stdout or to a file.
"""
from argparse import ArgumentParser
+import SocketServer
import sys
from time import gmtime
from time import strftime
-import SocketServer
def parse_args():
diff --git a/tox.ini b/tox.ini
index 854cddbc..4c145b29 100644
--- a/tox.ini
+++ b/tox.ini
@@ -152,7 +152,6 @@ ignore-path = .venv,.git,.tox,*designate/locale*,*lib/python*,*designate.egg*,ap
# ignored flake8 codes:
# H105 don't use author tags. We use version control instead
# H302 import only modules
-# H306 imports not in alphabetical order
# H238 old style class declaration, use new style (inherit from `object`)
# H402 one line docstring needs punctuation
# H404 multi line docstring should start with a summary
@@ -162,7 +161,7 @@ ignore-path = .venv,.git,.tox,*designate/locale*,*lib/python*,*designate.egg*,ap
# E126 continuation line over-indented for hanging indent
# E128 continuation line under-indented for visual indent
# W504 line break after binary operator
-ignore = H105,H302,H306,H238,H402,H404,H405,H501,H904,E126,E128,W504
+ignore = H105,H302,H238,H402,H404,H405,H501,H904,E126,E128,W504
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject
[hacking]