Fix style errors H305 and H307

H305: Imports not grouped correctly
H307: Like imports should be grouped together

Change-Id: Ic63d253e015298c7b952121a4b3634d2b1bdaf92
Implements: blueprint new-hacking-style-rules
This commit is contained in:
Jordan Cazamias 2014-06-18 13:19:26 -05:00
parent 0a2406739a
commit 50295fb39e
132 changed files with 276 additions and 50 deletions

View File

@ -14,10 +14,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.objects import Record
from designate.notification_handler.base import NotificationHandler
LOG = logging.getLogger(__name__)
# Setup a config group

View File

@ -14,10 +14,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 binascii
import dns
import dns.message
import dns.rdatatype
import binascii
# Prepare a Packet
request = dns.message.make_query(

View File

@ -16,18 +16,21 @@
import sys
import logging
import requests
import uuid
import pprint
import json
import copy
import requests
from oslo.config import cfg
from designate.backend import impl_ipa
from designate.openstack.common.gettextutils import _LI
from designate.openstack.common.gettextutils import _LW
from designate.openstack.common.gettextutils import _LE
from designate import utils
logging.basicConfig()
LOG = logging.getLogger(__name__)

View File

@ -17,9 +17,11 @@
import sys
import re
import os
import dns.zone
import argparse
import logging
import dns.zone
from designate.openstack.common.gettextutils import _LI
from designate.openstack.common.gettextutils import _LE

View File

@ -15,6 +15,7 @@
# under the License.
import os
import socket
from oslo.config import cfg
from oslo import messaging

View File

@ -14,12 +14,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate import backend
from designate import rpc
from designate import service
from designate.central import rpcapi as central_rpcapi
LOG = logging.getLogger(__name__)

View File

@ -14,8 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from designate.central import rpcapi
cfg.CONF.register_group(cfg.OptGroup(
name='service:api', title="Configuration for API Service"
))

View File

@ -15,7 +15,6 @@
# under the License.
import flask
import webob.dec
from oslo.config import cfg
from oslo import messaging
@ -32,6 +31,7 @@ from designate.openstack.common.gettextutils import _LI
from designate.openstack.common.gettextutils import _LE
from designate.openstack.common.gettextutils import _LC
LOG = logging.getLogger(__name__)
cfg.CONF.register_opts([

View File

@ -14,10 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from paste import deploy
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _LI
from designate.openstack.deprecated import wsgi
from oslo.config import cfg
from designate import exceptions
from designate import utils
from designate import policy

View File

@ -21,11 +21,13 @@ from werkzeug import wrappers
from werkzeug.routing import BaseConverter
from werkzeug.routing import ValidationError
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.openstack.common import jsonutils
from designate import exceptions
from designate import utils
LOG = logging.getLogger(__name__)
cfg.CONF.register_opts([

View File

@ -14,11 +14,13 @@
# License for the specific language governing permissions and limitations
# under the License.
import flask
from designate.openstack.common import log as logging
from designate import schema
from designate.api import get_central_api
from designate.objects import Domain
LOG = logging.getLogger(__name__)
blueprint = flask.Blueprint('domains', __name__)
domain_schema = schema.Schema('v1', 'domain')

View File

@ -19,6 +19,7 @@ from oslo import messaging
from designate.openstack.common import log as logging
from designate import rpc
LOG = logging.getLogger(__name__)
blueprint = flask.Blueprint('diagnostics', __name__)

View File

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import flask
from designate.openstack.common import log as logging
from designate.central import rpcapi as central_rpcapi
LOG = logging.getLogger(__name__)
central_api = central_rpcapi.CentralAPI()
blueprint = flask.Blueprint('quotas', __name__)

View File

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import flask
from designate.openstack.common import log as logging
from designate.central import rpcapi as central_rpcapi
LOG = logging.getLogger(__name__)
central_api = central_rpcapi.CentralAPI()
blueprint = flask.Blueprint('reports', __name__)

View File

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import flask
from designate.openstack.common import log as logging
from designate.central import rpcapi as central_rpcapi
LOG = logging.getLogger(__name__)
central_api = central_rpcapi.CentralAPI()
blueprint = flask.Blueprint('sync', __name__)

View File

@ -14,8 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import flask
from designate.central import rpcapi as central_rpcapi
central_api = central_rpcapi.CentralAPI()
blueprint = flask.Blueprint('touch', __name__)

View File

@ -14,10 +14,12 @@
# License for the specific language governing permissions and limitations
# under the License.
import flask
from designate.openstack.common import log as logging
from designate import schema
from designate.api import get_central_api
LOG = logging.getLogger(__name__)
blueprint = flask.Blueprint('limits', __name__)
limits_schema = schema.Schema('v1', 'limits')

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import flask
from designate.openstack.common import log as logging
from designate import exceptions
from designate import schema
@ -21,6 +22,7 @@ from designate.api import get_central_api
from designate.objects import Record
from designate.objects import RecordSet
LOG = logging.getLogger(__name__)
blueprint = flask.Blueprint('records', __name__)
record_schema = schema.Schema('v1', 'record')

View File

@ -14,11 +14,13 @@
# License for the specific language governing permissions and limitations
# under the License.
import flask
from designate.openstack.common import log as logging
from designate import schema
from designate.api import get_central_api
from designate.objects import Server
LOG = logging.getLogger(__name__)
blueprint = flask.Blueprint('servers', __name__)
server_schema = schema.Schema('v1', 'server')

View File

@ -14,11 +14,13 @@
# License for the specific language governing permissions and limitations
# under the License.
import flask
from designate.openstack.common import log as logging
from designate import schema
from designate.api import get_central_api
from designate.objects import TsigKey
LOG = logging.getLogger(__name__)
blueprint = flask.Blueprint('tsigkeys', __name__)
tsigkey_schema = schema.Schema('v1', 'tsigkey')

View File

@ -13,11 +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.
from designate.api.v2 import patches # flake8: noqa
import pecan.deploy
from oslo.config import cfg
from designate.api.v2 import patches # flake8: noqa
from designate.openstack.common import log as logging
LOG = logging.getLogger(__name__)

View File

@ -16,8 +16,10 @@
import pecan
import pecan.deploy
from oslo.config import cfg
from designate.openstack.common import log as logging
LOG = logging.getLogger(__name__)
cfg.CONF.register_opts([

View File

@ -15,6 +15,7 @@
# under the License.
import pecan
from designate.openstack.common import log as logging
from designate import schema
from designate import utils
@ -22,6 +23,7 @@ from designate.api.v2.controllers import rest
from designate.api.v2.views import blacklists as blacklists_view
from designate.objects import Blacklist
LOG = logging.getLogger(__name__)

View File

@ -13,8 +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.
import pecan
import re
import pecan
from designate import exceptions
from designate import schema
from designate.api.v2.controllers import rest

View File

@ -15,10 +15,12 @@
# under the License.
import pecan
from designate.openstack.common import log as logging
from designate.api.v2.controllers import rest
from designate.api.v2.views import limits as limits_view
LOG = logging.getLogger(__name__)

View File

@ -15,11 +15,13 @@
# under the License.
import pecan
from designate import utils
from designate.openstack.common import log as logging
from designate.api.v2.controllers import rest
from designate.api.v2.views import nameservers as nameservers_view
LOG = logging.getLogger(__name__)

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import pecan
from designate.openstack.common import log as logging
from designate import schema
from designate import utils
@ -21,6 +22,7 @@ from designate.api.v2.controllers import rest
from designate.api.v2.views import records as records_view
from designate.objects import Record
LOG = logging.getLogger(__name__)

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import pecan
from designate.openstack.common import log as logging
from designate import schema
from designate import utils
@ -22,6 +23,7 @@ from designate.api.v2.views import recordsets as recordsets_view
from designate.api.v2.controllers import records
from designate.objects import RecordSet
LOG = logging.getLogger(__name__)

View File

@ -24,16 +24,19 @@
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import six
import inspect
import six
import pecan
import pecan.rest
import pecan.routing
from designate import exceptions
from designate import api
from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _
LOG = logging.getLogger(__name__)

View File

@ -14,7 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import os
import pecan
from designate import exceptions
from designate import utils
from designate.openstack.common import log as logging

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import pecan
from designate.openstack.common import log as logging
from designate import schema
from designate import utils
@ -20,6 +21,7 @@ from designate.api.v2.controllers import rest
from designate.api.v2.views import tlds as tlds_view
from designate.objects import Tld
LOG = logging.getLogger(__name__)

View File

@ -17,6 +17,7 @@ import pecan
from dns import zone as dnszone
from dns import rdatatype
from dns import exception as dnsexception
from designate import exceptions
from designate import utils
from designate import schema
@ -29,6 +30,7 @@ from designate.objects import Record
from designate.objects import RecordSet
from designate.openstack.common import log as logging
LOG = logging.getLogger(__name__)

View File

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import pecan.core
from designate import exceptions
from designate.openstack.common import jsonutils
JSON_TYPES = ('application/json', 'application/json-patch+json')

View File

@ -14,7 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import urllib
from oslo.config import cfg
from designate import exceptions
from designate.openstack.common import log as logging

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import abc
from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _LW
from designate import exceptions

View File

@ -14,13 +14,16 @@
# License for the specific language governing permissions and limitations
# under the License.
import os
import glob
import shutil
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _LW
from designate import utils
from designate.backend import base
import glob
import shutil
LOG = logging.getLogger(__name__)

View File

@ -27,6 +27,7 @@ from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _LI
from designate.openstack.common.gettextutils import _LW
LOG = logging.getLogger(__name__)
GROUP = 'backend:dynect'

View File

@ -13,16 +13,19 @@
# 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 pprint
import time
import requests
from oslo.config import cfg
from designate import exceptions
from designate.openstack.common import log as logging
from designate.openstack.common import importutils
from designate.backend import base
from designate.openstack.common import jsonutils as json
from designate.openstack.common.gettextutils import _LE
import pprint
import time
LOG = logging.getLogger(__name__)

View File

@ -16,12 +16,15 @@
import os
import logging
import uuid
from requests import auth
import kerberos
from designate.backend.impl_ipa import IPAAuthError
from designate.openstack.common.gettextutils import _LW
from designate.openstack.common.gettextutils import _LE
LOG = logging.getLogger(__name__)

View File

@ -14,12 +14,15 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
from oslo.config import cfg
from designate import backend
from designate import exceptions
from designate.backend import base
from designate.openstack.common import excutils
from oslo.config import cfg
import logging
LOG = logging.getLogger(__name__)

View File

@ -14,14 +14,17 @@
# License for the specific language governing permissions and limitations
# under the License.
import eventlet
import os
import socket
import ssl
import eventlet
from oslo.config import cfg
from designate import exceptions
from designate.backend import base
from designate.openstack.common import log as logging
from oslo.config import cfg
LOG = logging.getLogger(__name__)

View File

@ -16,11 +16,13 @@
# License for the specific language governing permissions and limitations
# under the License.
import base64
from sqlalchemy import func
from sqlalchemy.sql import select
from sqlalchemy.sql.expression import and_
from sqlalchemy.orm import exc as sqlalchemy_exceptions
from oslo.config import cfg
from designate.openstack.common import excutils
from designate.openstack.common import log as logging
from designate import exceptions
@ -30,6 +32,7 @@ from designate.sqlalchemy.session import get_session
from designate.sqlalchemy.session import SQLOPTS
from designate.sqlalchemy.expressions import InsertFromSelect
LOG = logging.getLogger(__name__)
TSIG_SUPPORTED_ALGORITHMS = ['hmac-md5']

View File

@ -14,8 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from sqlalchemy import MetaData, Table, Column
from designate.sqlalchemy.types import UUID
meta = MetaData()

View File

@ -15,8 +15,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from sqlalchemy import MetaData, Table, Column, Boolean
from designate.openstack.common import log as logging
LOG = logging.getLogger(__name__)
meta = MetaData()

View File

@ -14,8 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from sqlalchemy import MetaData, Table, Column
from designate.sqlalchemy.types import UUID
meta = MetaData()

View File

@ -17,6 +17,7 @@
# under the License.
from sqlalchemy import Column, String, Text, Integer, Boolean
from sqlalchemy.ext.declarative import declarative_base
from designate.sqlalchemy.models import Base as CommonBase
from designate.sqlalchemy.types import UUID

View File

@ -32,6 +32,7 @@ from designate import service
from designate import utils
from designate.storage import api as storage_api
LOG = logging.getLogger(__name__)

View File

@ -14,12 +14,15 @@
# License for the specific language governing permissions and limitations
# under the License.
import sys
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate import service
from designate import utils
from designate.agent import service as agent_service
CONF = cfg.CONF
CONF.import_opt('workers', 'designate.agent', group='service:agent')

View File

@ -14,13 +14,16 @@
# License for the specific language governing permissions and limitations
# under the License.
import sys
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.openstack.common import service
from designate import rpc
from designate import utils
from designate.api import service as api_service
CONF = cfg.CONF
CONF.import_opt('workers', 'designate.api', group='service:api')

View File

@ -14,12 +14,15 @@
# License for the specific language governing permissions and limitations
# under the License.
import sys
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate import service
from designate import utils
from designate.central import service as central
CONF = cfg.CONF
CONF.import_opt('workers', 'designate.central', group='service:central')

View File

@ -16,14 +16,12 @@
import sys
from oslo.config import cfg
from stevedore.extension import ExtensionManager
from designate.openstack.common import log as logging
from designate.openstack.common import strutils
from designate import utils
from stevedore.extension import ExtensionManager
def methods_of(obj):
"""Get all callable methods of an object that don't start with underscore

View File

@ -14,12 +14,15 @@
# License for the specific language governing permissions and limitations
# under the License.
import sys
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate import service
from designate import utils
from designate.mdns import service as mdns_service
CONF = cfg.CONF
CONF.import_opt('workers', 'designate.mdns', group='service:mdns')

View File

@ -14,12 +14,15 @@
# License for the specific language governing permissions and limitations
# under the License.
import sys
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate import service
from designate import utils
from designate.sink import service as sink_service
CONF = cfg.CONF
CONF.import_opt('workers', 'designate.sink', group='service:sink')

View File

@ -14,10 +14,12 @@
# License for the specific language governing permissions and limitations
# under the License.
import itertools
from designate.openstack.common import context
from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _LW
LOG = logging.getLogger(__name__)

View File

@ -18,9 +18,10 @@ import os
from migrate.exceptions import (DatabaseAlreadyControlledError,
DatabaseNotControlledError)
from migrate.versioning import api as versioning_api
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _LI
from oslo.config import cfg
from designate.manage import base

View File

@ -14,12 +14,14 @@
# License for the specific language governing permissions and limitations
# under the License.
import os
from migrate.exceptions import (DatabaseAlreadyControlledError,
DatabaseNotControlledError)
from migrate.versioning import api as versioning_api
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _LI
from oslo.config import cfg
from designate.manage import base

View File

@ -26,6 +26,7 @@ from designate.openstack.common.gettextutils import _LE
from designate.manage import base
from designate.schema import format
LOG = logging.getLogger(__name__)

View File

@ -15,6 +15,7 @@
# under the License.
import dns
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.storage import api as storage_api

View File

@ -14,7 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import socket
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate import service
from designate.mdns import handler

View File

@ -14,9 +14,12 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
from oslo.config import cfg
from designate.network_api.base import NetworkAPI
LOG = logging.getLogger(__name__)
cfg.CONF.register_opts([

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import uuid
from designate.openstack.common import log
from designate.network_api.base import NetworkAPI

View File

@ -22,7 +22,6 @@ from neutronclient.common import exceptions as neutron_exceptions
from oslo.config import cfg
from designate import exceptions
from designate.openstack.common import log as logging
from designate.openstack.common import threadgroup
from designate.openstack.common.gettextutils import _LW

View File

@ -14,8 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
from designate.notification_handler.base import NotificationHandler
LOG = logging.getLogger(__name__)

View File

@ -15,7 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import abc
from oslo.config import cfg
from designate import exceptions
from designate.openstack.common import log as logging
from designate.central import rpcapi as central_rpcapi

View File

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.notification_handler.base import BaseAddressHandler
LOG = logging.getLogger(__name__)
cfg.CONF.register_group(cfg.OptGroup(

View File

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.notification_handler.base import BaseAddressHandler
LOG = logging.getLogger(__name__)
cfg.CONF.register_group(cfg.OptGroup(

View File

@ -18,6 +18,7 @@ import abc
import six
from stevedore import driver
from stevedore import enabled
from designate.openstack.common import log as logging

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.openstack.common import policy
from designate.openstack.common.gettextutils import _
@ -21,6 +22,7 @@ from designate.openstack.common.gettextutils import _LI
from designate import utils
from designate import exceptions
LOG = logging.getLogger(__name__)

View File

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.quota.base import Quota
LOG = logging.getLogger(__name__)
cfg.CONF.register_opts([

View File

@ -16,8 +16,8 @@
import abc
import six
from oslo.config import cfg
from designate import exceptions
from designate.plugin import DriverPlugin

View File

@ -14,11 +14,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from designate import exceptions
from designate.openstack.common import log as logging
from designate.quota.base import Quota
from designate.storage import api as sapi
LOG = logging.getLogger(__name__)

View File

@ -34,6 +34,7 @@ import designate.exceptions
from designate.openstack.common import importutils
from designate.openstack.common import jsonutils
CONF = cfg.CONF
TRANSPORT = None
NOTIFIER = None

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import datetime
import jsonschema
from jsonschema import _utils

View File

@ -14,11 +14,14 @@
# License for the specific language governing permissions and limitations
# under the License.
import re
import jsonschema
from jsonschema import compat
import netaddr
from designate.openstack.common import log as logging
LOG = logging.getLogger(__name__)
RE_DOMAINNAME = r'^(?!.{255,})(?:(?!\-)[A-Za-z0-9_\-]{1,63}(?<!\-)\.)+$'

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import jsonschema
from designate.openstack.common import log as logging
from designate import utils

View File

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from jsonschema import validators
from designate.openstack.common import log as logging
from designate.schema import _validators
LOG = logging.getLogger(__name__)
Draft3Validator = validators.extend(

View File

@ -26,6 +26,7 @@ from designate.openstack.common.gettextutils import _
from designate import rpc
from designate import version
CONF = cfg.CONF
LOG = logging.getLogger(__name__)

View File

@ -22,6 +22,7 @@ from designate.openstack.common import service
from designate import notification_handler
from designate import rpc
LOG = logging.getLogger(__name__)

View File

@ -17,6 +17,7 @@ from sqlalchemy import Column, DateTime
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import object_mapper
from sqlalchemy.types import CHAR
from designate.openstack.common import timeutils
from designate import exceptions

View File

@ -23,11 +23,12 @@ import sqlalchemy
from sqlalchemy.exc import DisconnectionError, OperationalError
import sqlalchemy.orm
from sqlalchemy.pool import NullPool, StaticPool
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _LW
LOG = logging.getLogger(__name__)
_MAKERS = {}
@ -203,9 +204,10 @@ def get_maker(engine, autocommit=True, expire_on_commit=False, autoflush=True):
def debug_mysql_do_query():
"""Return a debug version of MySQLdb.cursors._do_query"""
import MySQLdb.cursors
import traceback
import MySQLdb.cursors
old_mysql_do_query = MySQLdb.cursors.BaseCursor._do_query
def _do_query(self, q):

View File

@ -13,10 +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 uuid
from sqlalchemy.types import TypeDecorator, CHAR, VARCHAR
from sqlalchemy.dialects.postgresql import UUID as pgUUID
from sqlalchemy.dialects.postgresql import INET as pgINET
import uuid
class UUID(TypeDecorator):

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import contextlib
from designate import storage
from designate.openstack.common import excutils

View File

@ -14,7 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import abc
import six
from designate.plugin import DriverPlugin

View File

@ -14,10 +14,12 @@
# License for the specific language governing permissions and limitations
# under the License.
import time
from sqlalchemy.orm import exc
from sqlalchemy import exc as sqlalchemy_exc
from sqlalchemy import distinct, func
from oslo.config import cfg
from designate.openstack.common import log as logging
from designate.openstack.common.db.sqlalchemy.utils import paginate_query
from designate.openstack.common.db.sqlalchemy.utils import InvalidSortKey

View File

@ -21,8 +21,10 @@
Various conveniences used for migration scripts
"""
from sqlalchemy.schema import Table as SqlaTable
from designate.openstack.common import log as logging
LOG = logging.getLogger(__name__)

View File

@ -18,6 +18,7 @@
# under the License.
from sqlalchemy import ForeignKey, Enum, Integer, String, DateTime, Text
from sqlalchemy.schema import Column, MetaData
from designate.openstack.common import timeutils
from designate import utils
from designate.storage.impl_sqlalchemy.migrate_repo.utils import Table
@ -26,6 +27,7 @@ from designate.storage.impl_sqlalchemy.migrate_repo.utils import drop_tables
from designate.sqlalchemy.types import Inet
from designate.sqlalchemy.types import UUID
meta = MetaData()
RECORD_TYPES = ['A', 'AAAA', 'CNAME', 'MX', 'SRV', 'TXT', 'NS']

View File

@ -14,8 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from sqlalchemy import MetaData, Table, Column, Boolean, Unicode
from designate.sqlalchemy.types import UUID
meta = MetaData()

View File

@ -14,8 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from sqlalchemy import MetaData, Table, Column, ForeignKey
from designate.sqlalchemy.types import UUID
meta = MetaData()

View File

@ -15,6 +15,7 @@
# under the License.
from sqlalchemy import Enum, Integer, String, DateTime
from sqlalchemy.schema import Table, Column, MetaData
from designate.openstack.common import timeutils
from designate import utils
from designate.sqlalchemy.types import UUID

View File

@ -14,8 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from sqlalchemy import MetaData, Table, Column
from designate.sqlalchemy.types import Inet
meta = MetaData()

View File

@ -13,10 +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.
from sqlalchemy import MetaData, Table, Column, Integer
from designate.openstack.common import timeutils
from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _LW
from sqlalchemy import MetaData, Table, Column, Integer
LOG = logging.getLogger(__name__)
meta = MetaData()

View File

@ -15,6 +15,7 @@
# under the License.
from sqlalchemy import Integer, String, DateTime, UniqueConstraint
from sqlalchemy.schema import Table, Column, MetaData
from designate.openstack.common import timeutils
from designate import utils
from designate.sqlalchemy.types import UUID

View File

@ -14,12 +14,15 @@
# License for the specific language governing permissions and limitations
# under the License.
import hashlib
from sqlalchemy.exc import IntegrityError
from sqlalchemy.schema import Table, Column, MetaData
from sqlalchemy.types import String
from designate.openstack.common import log as logging
from designate.openstack.common.gettextutils import _LW
LOG = logging.getLogger(__name__)
meta = MetaData()

View File

@ -14,10 +14,12 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
from sqlalchemy import MetaData, Table, Column, String
from sqlalchemy.sql import update
from migrate.changeset.constraint import UniqueConstraint
LOG = logging.getLogger(__name__)
meta = MetaData()

View File

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
from sqlalchemy import MetaData, Table
from migrate.changeset.constraint import UniqueConstraint
LOG = logging.getLogger(__name__)
meta = MetaData()

View File

@ -13,9 +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.
from designate.openstack.common import log as logging
from sqlalchemy import MetaData, Table, Column, Unicode
from designate.openstack.common import log as logging
LOG = logging.getLogger(__name__)
meta = MetaData()

View File

@ -13,9 +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.
from designate.openstack.common import log as logging
from sqlalchemy import MetaData, Table, Column, Enum
from designate.openstack.common import log as logging
LOG = logging.getLogger(__name__)
RESOURCE_STATUSES = ['ACTIVE', 'PENDING', 'DELETED']
meta = MetaData()

View File

@ -13,10 +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.
from designate.openstack.common import log as logging
from sqlalchemy import MetaData, Table, Column, String
from sqlalchemy.sql import select
from designate.openstack.common import log as logging
LOG = logging.getLogger(__name__)
meta = MetaData()

View File

@ -14,12 +14,14 @@
# License for the specific language governing permissions and limitations
# under the License.
import hashlib
from sqlalchemy import ForeignKey, Enum, Integer, String, DateTime, Unicode
from sqlalchemy import func
from sqlalchemy.sql import select
from sqlalchemy.schema import Table, Column, MetaData
from migrate import ForeignKeyConstraint
from migrate.changeset.constraint import UniqueConstraint
from designate.openstack.common import timeutils
from designate import utils
from designate.sqlalchemy.types import UUID

View File

@ -14,9 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
from sqlalchemy import MetaData, Table
from migrate.changeset.constraint import UniqueConstraint
LOG = logging.getLogger(__name__)
meta = MetaData()

Some files were not shown because too many files have changed in this diff Show More