diff --git a/marconi/common/cache/_backends/memcached.py b/marconi/common/cache/_backends/memcached.py index 0fc3215f3..c0c788f11 100644 --- a/marconi/common/cache/_backends/memcached.py +++ b/marconi/common/cache/_backends/memcached.py @@ -19,6 +19,7 @@ from oslo.config import cfg from marconi.common.cache import backends + _memcache_opts = [ cfg.ListOpt('memcached_servers', default=['127.0.0.1:11211'], diff --git a/marconi/common/cache/cache.py b/marconi/common/cache/cache.py index 36aac4131..bc503dadc 100644 --- a/marconi/common/cache/cache.py +++ b/marconi/common/cache/cache.py @@ -22,6 +22,7 @@ Supported configuration options: from oslo.config import cfg from stevedore import driver + _cache_options = [ cfg.StrOpt('cache_backend', default='memory', diff --git a/marconi/common/cli.py b/marconi/common/cli.py index 6ef085d4a..77d1062c0 100644 --- a/marconi/common/cli.py +++ b/marconi/common/cli.py @@ -22,6 +22,7 @@ import termios from marconi.openstack.common import log as logging + LOG = logging.getLogger(__name__) diff --git a/marconi/common/transport/wsgi/helpers.py b/marconi/common/transport/wsgi/helpers.py index b80470936..d19588331 100644 --- a/marconi/common/transport/wsgi/helpers.py +++ b/marconi/common/transport/wsgi/helpers.py @@ -12,13 +12,16 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """wsgi transport helpers.""" + import falcon import six import marconi.openstack.common.log as logging from marconi.queues.transport import validation as validate + LOG = logging.getLogger(__name__) diff --git a/marconi/proxy/storage/base.py b/marconi/proxy/storage/base.py index d100beef7..6bbd5a7c1 100644 --- a/marconi/proxy/storage/base.py +++ b/marconi/proxy/storage/base.py @@ -12,7 +12,9 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """Defines an interface for working with proxy partitions and the catalogue.""" + import abc import six diff --git a/marconi/proxy/storage/exceptions.py b/marconi/proxy/storage/exceptions.py index aee51fb06..71efb10b3 100644 --- a/marconi/proxy/storage/exceptions.py +++ b/marconi/proxy/storage/exceptions.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """These are the exceptions that the proxy storage layer can raise.""" diff --git a/marconi/proxy/storage/memory/controllers.py b/marconi/proxy/storage/memory/controllers.py index a8efcfa05..1b5b616a2 100644 --- a/marconi/proxy/storage/memory/controllers.py +++ b/marconi/proxy/storage/memory/controllers.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + from marconi.proxy.storage.memory import catalogue from marconi.proxy.storage.memory import partitions diff --git a/marconi/proxy/storage/memory/driver.py b/marconi/proxy/storage/memory/driver.py index 554094fdb..9c3b8b1bd 100644 --- a/marconi/proxy/storage/memory/driver.py +++ b/marconi/proxy/storage/memory/driver.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + from marconi.proxy.storage import base from marconi.proxy.storage.memory import controllers diff --git a/marconi/proxy/storage/mongodb/__init__.py b/marconi/proxy/storage/mongodb/__init__.py index aeb38c093..92cc30b5f 100644 --- a/marconi/proxy/storage/mongodb/__init__.py +++ b/marconi/proxy/storage/mongodb/__init__.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """MongoDB Proxy Storage Driver for Marconi""" from marconi.proxy.storage.mongodb import driver diff --git a/marconi/proxy/storage/mongodb/catalogue.py b/marconi/proxy/storage/mongodb/catalogue.py index 64ac1b7ca..1f828e54c 100644 --- a/marconi/proxy/storage/mongodb/catalogue.py +++ b/marconi/proxy/storage/mongodb/catalogue.py @@ -32,6 +32,7 @@ from marconi.proxy.storage import base from marconi.proxy.storage import exceptions from marconi.queues.storage.mongodb import utils + LOG = logging.getLogger(__name__) CATALOGUE_INDEX = [ diff --git a/marconi/proxy/storage/mongodb/controllers.py b/marconi/proxy/storage/mongodb/controllers.py index 76ec57d99..c2013c51a 100644 --- a/marconi/proxy/storage/mongodb/controllers.py +++ b/marconi/proxy/storage/mongodb/controllers.py @@ -18,5 +18,6 @@ from marconi.proxy.storage.mongodb import catalogue from marconi.proxy.storage.mongodb import partitions + CatalogueController = catalogue.CatalogueController PartitionsController = partitions.PartitionsController diff --git a/marconi/proxy/storage/mongodb/driver.py b/marconi/proxy/storage/mongodb/driver.py index 09785e17c..df81a2944 100644 --- a/marconi/proxy/storage/mongodb/driver.py +++ b/marconi/proxy/storage/mongodb/driver.py @@ -23,6 +23,7 @@ from marconi.proxy import storage from marconi.proxy.storage.mongodb import controllers from marconi.proxy.storage.mongodb import options + LOG = logging.getLogger(__name__) diff --git a/marconi/proxy/storage/mongodb/partitions.py b/marconi/proxy/storage/mongodb/partitions.py index 542839122..3387103eb 100644 --- a/marconi/proxy/storage/mongodb/partitions.py +++ b/marconi/proxy/storage/mongodb/partitions.py @@ -28,6 +28,7 @@ from marconi.proxy.storage import base from marconi.proxy.storage import exceptions from marconi.queues.storage.mongodb import utils + PARTITIONS_INDEX = [ ('n', 1) ] diff --git a/marconi/proxy/transport/schema.py b/marconi/proxy/transport/schema.py index f047208f3..1be8e9263 100644 --- a/marconi/proxy/transport/schema.py +++ b/marconi/proxy/transport/schema.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """schema: JSON Schemas for marconi proxy transports.""" partition_patch_hosts = { diff --git a/marconi/proxy/transport/utils.py b/marconi/proxy/transport/utils.py index 0cf787d52..9da786216 100644 --- a/marconi/proxy/transport/utils.py +++ b/marconi/proxy/transport/utils.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """utils: utilities for transport handling.""" import jsonschema diff --git a/marconi/proxy/transport/wsgi/admin/driver.py b/marconi/proxy/transport/wsgi/admin/driver.py index e4d24967e..8b7c2cffc 100644 --- a/marconi/proxy/transport/wsgi/admin/driver.py +++ b/marconi/proxy/transport/wsgi/admin/driver.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """marconi-proxy (admin): interface for managing partitions.""" from marconi.proxy.transport.wsgi import ( diff --git a/marconi/proxy/transport/wsgi/catalogue.py b/marconi/proxy/transport/wsgi/catalogue.py index 6199777bb..e9ee916c8 100644 --- a/marconi/proxy/transport/wsgi/catalogue.py +++ b/marconi/proxy/transport/wsgi/catalogue.py @@ -12,8 +12,10 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """catalogue: maintains a directory of all queues proxied through the system. """ + import json import falcon @@ -22,6 +24,7 @@ from marconi.openstack.common import log from marconi.proxy.storage import exceptions from marconi.proxy.utils import helpers + LOG = log.getLogger(__name__) diff --git a/marconi/proxy/transport/wsgi/driver.py b/marconi/proxy/transport/wsgi/driver.py index 13b99e457..f236526f9 100644 --- a/marconi/proxy/transport/wsgi/driver.py +++ b/marconi/proxy/transport/wsgi/driver.py @@ -12,7 +12,9 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """marconi-proxy (base): Interface for driver implementations.""" + import abc from wsgiref import simple_server diff --git a/marconi/proxy/transport/wsgi/forward.py b/marconi/proxy/transport/wsgi/forward.py index 573083b91..e19ca5e29 100644 --- a/marconi/proxy/transport/wsgi/forward.py +++ b/marconi/proxy/transport/wsgi/forward.py @@ -12,9 +12,11 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """forward: a resource for each marconi route where the desired result is to just pass along a request to marconi. """ + from marconi.proxy.utils import forward diff --git a/marconi/proxy/transport/wsgi/health.py b/marconi/proxy/transport/wsgi/health.py index 17e094895..378661ccb 100644 --- a/marconi/proxy/transport/wsgi/health.py +++ b/marconi/proxy/transport/wsgi/health.py @@ -12,7 +12,9 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """health: returns the health information for this proxy.""" + import falcon diff --git a/marconi/proxy/transport/wsgi/metadata.py b/marconi/proxy/transport/wsgi/metadata.py index 4b131f81a..75c488cf7 100644 --- a/marconi/proxy/transport/wsgi/metadata.py +++ b/marconi/proxy/transport/wsgi/metadata.py @@ -12,9 +12,11 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """metadata: adds queue metadata to the catalogue and forwards to marconi queue metadata requests. """ + import io import json diff --git a/marconi/proxy/transport/wsgi/partitions.py b/marconi/proxy/transport/wsgi/partitions.py index 10deac153..a31ea4768 100644 --- a/marconi/proxy/transport/wsgi/partitions.py +++ b/marconi/proxy/transport/wsgi/partitions.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """partitions: a registry of all marconi partitions this proxy can route to A partition is added by an operator by interacting with the @@ -24,6 +25,7 @@ following fields are required: "hosts": [HTTP_EndPoints(:Port), ...] } """ + import json import falcon @@ -36,6 +38,7 @@ from marconi.proxy.transport import schema, utils from marconi.queues.transport import utils as json_utils from marconi.queues.transport.wsgi import exceptions as wsgi_errors + LOG = log.getLogger(__name__) diff --git a/marconi/proxy/transport/wsgi/queues.py b/marconi/proxy/transport/wsgi/queues.py index 8b65984e1..d9227383c 100644 --- a/marconi/proxy/transport/wsgi/queues.py +++ b/marconi/proxy/transport/wsgi/queues.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """queues: routing and cataloguing queue operations on marconi The queues resource performs routing to a marconi partition for @@ -27,6 +28,7 @@ based on the operation. A DELETE removes entries from the catalogue. A PUT adds an entry to the catalogue. A GET asks marconi for an authoritative response. """ + import collections import json diff --git a/marconi/proxy/transport/wsgi/v1.py b/marconi/proxy/transport/wsgi/v1.py index eeda54669..07b8d8345 100644 --- a/marconi/proxy/transport/wsgi/v1.py +++ b/marconi/proxy/transport/wsgi/v1.py @@ -12,13 +12,16 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """v1: queries the first node in the first partition for a homedoc.""" + import falcon from marconi.openstack.common import log from marconi.proxy.utils import helpers from marconi.proxy.utils import http + LOG = log.getLogger(__name__) diff --git a/marconi/proxy/transport/wsgi/version.py b/marconi/proxy/transport/wsgi/version.py index 0f4c155e2..be382b678 100644 --- a/marconi/proxy/transport/wsgi/version.py +++ b/marconi/proxy/transport/wsgi/version.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """version: version information for the proxy transport API.""" diff --git a/marconi/proxy/utils/forward.py b/marconi/proxy/utils/forward.py index 9b1b7daec..0011f0581 100644 --- a/marconi/proxy/utils/forward.py +++ b/marconi/proxy/utils/forward.py @@ -12,7 +12,9 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """forward: exposes a mixin class appropriate for forwarding requests.""" + import falcon from marconi.openstack.common import log @@ -20,6 +22,7 @@ from marconi.proxy.utils import helpers from marconi.proxy.utils import http from marconi.proxy.utils import lookup + LOG = log.getLogger(__name__) diff --git a/marconi/proxy/utils/helpers.py b/marconi/proxy/utils/helpers.py index 14ace3ef4..9aaef8ee5 100644 --- a/marconi/proxy/utils/helpers.py +++ b/marconi/proxy/utils/helpers.py @@ -12,7 +12,9 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """helpers: utilities for performing common operations for resources.""" + import requests diff --git a/marconi/proxy/utils/http.py b/marconi/proxy/utils/http.py index cd58f1002..b0b950eac 100644 --- a/marconi/proxy/utils/http.py +++ b/marconi/proxy/utils/http.py @@ -12,7 +12,9 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """http: utilities for handling HTTP details.""" + import falcon diff --git a/marconi/proxy/utils/lookup.py b/marconi/proxy/utils/lookup.py index ed24187b9..23c2aab7d 100644 --- a/marconi/proxy/utils/lookup.py +++ b/marconi/proxy/utils/lookup.py @@ -12,14 +12,18 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """lookup: functions to handle caching/lookup of proxy details.""" + import msgpack from marconi.openstack.common import log from marconi.proxy.storage import exceptions + LOG = log.getLogger(__name__) + def _entry_key(project, queue): assert project is not None, 'Project must not be None' assert queue is not None, 'Queue must not be None' diff --git a/marconi/proxy/utils/partition.py b/marconi/proxy/utils/partition.py index 28fc66359..c90ea6916 100644 --- a/marconi/proxy/utils/partition.py +++ b/marconi/proxy/utils/partition.py @@ -12,7 +12,9 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """partition: utilities for implementing partition selections.""" + import random diff --git a/marconi/proxy/utils/round_robin.py b/marconi/proxy/utils/round_robin.py index 2bd97bac8..6ce71671b 100644 --- a/marconi/proxy/utils/round_robin.py +++ b/marconi/proxy/utils/round_robin.py @@ -12,7 +12,9 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """round_robin: Implements round-robin selection for partition hosts.""" + import itertools diff --git a/marconi/queues/storage/mongodb/claims.py b/marconi/queues/storage/mongodb/claims.py index 01015dfd8..bb518678d 100644 --- a/marconi/queues/storage/mongodb/claims.py +++ b/marconi/queues/storage/mongodb/claims.py @@ -32,6 +32,7 @@ from marconi.queues import storage from marconi.queues.storage import exceptions from marconi.queues.storage.mongodb import utils + LOG = logging.getLogger(__name__) STORAGE_LIMITS = cfg.CONF['queues:limits:storage'] diff --git a/marconi/queues/storage/mongodb/controllers.py b/marconi/queues/storage/mongodb/controllers.py index 804cdc452..fbc107084 100644 --- a/marconi/queues/storage/mongodb/controllers.py +++ b/marconi/queues/storage/mongodb/controllers.py @@ -26,6 +26,7 @@ from marconi.queues.storage.mongodb import claims from marconi.queues.storage.mongodb import messages from marconi.queues.storage.mongodb import queues + ClaimController = claims.ClaimController MessageController = messages.MessageController QueueController = queues.QueueController diff --git a/marconi/queues/storage/mongodb/driver.py b/marconi/queues/storage/mongodb/driver.py index f04578c55..e520765ae 100644 --- a/marconi/queues/storage/mongodb/driver.py +++ b/marconi/queues/storage/mongodb/driver.py @@ -24,6 +24,7 @@ from marconi.queues import storage from marconi.queues.storage.mongodb import controllers from marconi.queues.storage.mongodb import options + LOG = logging.getLogger(__name__) diff --git a/marconi/queues/storage/mongodb/messages.py b/marconi/queues/storage/mongodb/messages.py index b5dd3ad70..24e55ad62 100644 --- a/marconi/queues/storage/mongodb/messages.py +++ b/marconi/queues/storage/mongodb/messages.py @@ -35,6 +35,7 @@ from marconi.queues.storage import exceptions from marconi.queues.storage.mongodb import options from marconi.queues.storage.mongodb import utils + LOG = logging.getLogger(__name__) STORAGE_LIMITS = cfg.CONF['queues:limits:storage'] diff --git a/marconi/queues/storage/mongodb/queues.py b/marconi/queues/storage/mongodb/queues.py index 4e515009b..6d65ac2ec 100644 --- a/marconi/queues/storage/mongodb/queues.py +++ b/marconi/queues/storage/mongodb/queues.py @@ -30,6 +30,7 @@ from marconi.queues import storage from marconi.queues.storage import exceptions from marconi.queues.storage.mongodb import utils + LOG = logging.getLogger(__name__) STORAGE_LIMITS = cfg.CONF['queues:limits:storage'] diff --git a/marconi/queues/storage/mongodb/utils.py b/marconi/queues/storage/mongodb/utils.py index 6486d2924..d0e5a2a2a 100644 --- a/marconi/queues/storage/mongodb/utils.py +++ b/marconi/queues/storage/mongodb/utils.py @@ -29,6 +29,7 @@ from marconi.openstack.common import timeutils from marconi.queues.storage import exceptions as storage_exceptions from marconi.queues.storage.mongodb import options + # BSON ObjectId gives TZ-aware datetime, so we generate a # TZ-aware UNIX epoch for convenience. EPOCH = datetime.datetime.utcfromtimestamp(0).replace(tzinfo=tz_util.utc) diff --git a/marconi/queues/storage/sqlite/claims.py b/marconi/queues/storage/sqlite/claims.py index b4b7d166c..e2ca9871c 100644 --- a/marconi/queues/storage/sqlite/claims.py +++ b/marconi/queues/storage/sqlite/claims.py @@ -19,6 +19,7 @@ from marconi.queues.storage import base from marconi.queues.storage import exceptions from marconi.queues.storage.sqlite import utils + STORAGE_LIMITS = cfg.CONF['queues:limits:storage'] diff --git a/marconi/queues/storage/sqlite/controllers.py b/marconi/queues/storage/sqlite/controllers.py index 18e393d9b..c2a7ec8bb 100644 --- a/marconi/queues/storage/sqlite/controllers.py +++ b/marconi/queues/storage/sqlite/controllers.py @@ -20,6 +20,7 @@ from marconi.queues.storage.sqlite import claims from marconi.queues.storage.sqlite import messages from marconi.queues.storage.sqlite import queues + ClaimController = claims.ClaimController MessageController = messages.MessageController QueueController = queues.QueueController diff --git a/marconi/queues/storage/sqlite/driver.py b/marconi/queues/storage/sqlite/driver.py index 7ad19ba2b..844cab27c 100644 --- a/marconi/queues/storage/sqlite/driver.py +++ b/marconi/queues/storage/sqlite/driver.py @@ -24,6 +24,7 @@ from marconi.queues import storage from marconi.queues.storage.sqlite import controllers from marconi.queues.storage.sqlite import utils + _SQLITE_OPTIONS = [ cfg.StrOpt('database', default=':memory:', help='Sqlite database to use.') diff --git a/marconi/queues/storage/sqlite/messages.py b/marconi/queues/storage/sqlite/messages.py index d4c090374..a917218a0 100644 --- a/marconi/queues/storage/sqlite/messages.py +++ b/marconi/queues/storage/sqlite/messages.py @@ -20,6 +20,7 @@ from marconi.queues.storage import base from marconi.queues.storage import exceptions from marconi.queues.storage.sqlite import utils + STORAGE_LIMITS = cfg.CONF['queues:limits:storage'] diff --git a/marconi/queues/storage/sqlite/queues.py b/marconi/queues/storage/sqlite/queues.py index cfc29476e..baf35a31e 100644 --- a/marconi/queues/storage/sqlite/queues.py +++ b/marconi/queues/storage/sqlite/queues.py @@ -20,6 +20,7 @@ from marconi.queues.storage import base from marconi.queues.storage import exceptions from marconi.queues.storage.sqlite import utils + STORAGE_LIMITS = cfg.CONF['queues:limits:storage'] diff --git a/marconi/queues/storage/sqlite/utils.py b/marconi/queues/storage/sqlite/utils.py index d2461fd12..9a9931ca3 100644 --- a/marconi/queues/storage/sqlite/utils.py +++ b/marconi/queues/storage/sqlite/utils.py @@ -16,6 +16,7 @@ from marconi.queues.storage import exceptions + UNIX_EPOCH_AS_JULIAN_SEC = 2440587.5 * 86400.0 diff --git a/marconi/queues/transport/__init__.py b/marconi/queues/transport/__init__.py index 62747f29c..94cec6c82 100644 --- a/marconi/queues/transport/__init__.py +++ b/marconi/queues/transport/__init__.py @@ -1,9 +1,11 @@ + """Marconi Transport Drivers""" from oslo.config import cfg from marconi.queues.transport import base + _TRANSPORT_OPTIONS = [ cfg.StrOpt('auth_strategy', default='') ] diff --git a/marconi/queues/transport/auth.py b/marconi/queues/transport/auth.py index 0cfb33d71..73cde25e1 100644 --- a/marconi/queues/transport/auth.py +++ b/marconi/queues/transport/auth.py @@ -19,6 +19,7 @@ from keystoneclient.middleware import auth_token from marconi.openstack.common import log + STRATEGIES = {} LOG = log.getLogger(__name__) diff --git a/marconi/queues/transport/wsgi/driver.py b/marconi/queues/transport/wsgi/driver.py index 14ec0c91e..6013431ba 100644 --- a/marconi/queues/transport/wsgi/driver.py +++ b/marconi/queues/transport/wsgi/driver.py @@ -13,9 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +from wsgiref import simple_server + import falcon from oslo.config import cfg -from wsgiref import simple_server from marconi.common.transport.wsgi import helpers import marconi.openstack.common.log as logging diff --git a/marconi/queues/transport/wsgi/metadata.py b/marconi/queues/transport/wsgi/metadata.py index 14e541489..80a0583a8 100644 --- a/marconi/queues/transport/wsgi/metadata.py +++ b/marconi/queues/transport/wsgi/metadata.py @@ -24,6 +24,7 @@ from marconi.queues.transport import validation as validate from marconi.queues.transport.wsgi import exceptions as wsgi_exceptions from marconi.queues.transport.wsgi import utils as wsgi_utils + LOG = logging.getLogger(__name__) CFG = cfg.CONF['queues:drivers:transport:wsgi'] diff --git a/marconi/queues/transport/wsgi/queues.py b/marconi/queues/transport/wsgi/queues.py index a33690d30..22dfec8e3 100644 --- a/marconi/queues/transport/wsgi/queues.py +++ b/marconi/queues/transport/wsgi/queues.py @@ -21,6 +21,7 @@ from marconi.queues.transport import utils from marconi.queues.transport import validation as validate from marconi.queues.transport.wsgi import exceptions as wsgi_exceptions + LOG = logging.getLogger(__name__) diff --git a/marconi/queues/transport/wsgi/stats.py b/marconi/queues/transport/wsgi/stats.py index d3cd295f5..f058cdcd5 100644 --- a/marconi/queues/transport/wsgi/stats.py +++ b/marconi/queues/transport/wsgi/stats.py @@ -20,6 +20,7 @@ from marconi.queues.storage import exceptions as storage_exceptions from marconi.queues.transport import utils from marconi.queues.transport.wsgi import exceptions as wsgi_exceptions + LOG = logging.getLogger(__name__) diff --git a/marconi/queues/transport/wsgi/utils.py b/marconi/queues/transport/wsgi/utils.py index c4b122de9..52fe6e3a1 100644 --- a/marconi/queues/transport/wsgi/utils.py +++ b/marconi/queues/transport/wsgi/utils.py @@ -17,7 +17,6 @@ import uuid import marconi.openstack.common.log as logging - from marconi.queues.transport import utils from marconi.queues.transport.wsgi import exceptions diff --git a/marconi/queues/transport/wsgi/v1.py b/marconi/queues/transport/wsgi/v1.py index 666bc8551..3119c1622 100644 --- a/marconi/queues/transport/wsgi/v1.py +++ b/marconi/queues/transport/wsgi/v1.py @@ -16,6 +16,7 @@ import json + # NOTE(kgriffs): http://tools.ietf.org/html/draft-nottingham-json-home-03 JSON_HOME = { 'resources': { diff --git a/marconi/tests/__init__.py b/marconi/tests/__init__.py index fe158996c..16b8bd914 100644 --- a/marconi/tests/__init__.py +++ b/marconi/tests/__init__.py @@ -18,6 +18,7 @@ from marconi.tests import base from marconi.tests import helpers + SKIP_SLOW_TESTS = helpers.SKIP_SLOW_TESTS RUN_SLOW_TESTS = not SKIP_SLOW_TESTS diff --git a/marconi/tests/base.py b/marconi/tests/base.py index 9e20809b6..1ddb4aa9d 100644 --- a/marconi/tests/base.py +++ b/marconi/tests/base.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import fixtures import os -import testtools +import fixtures from oslo.config import cfg +import testtools class TestBase(testtools.TestCase): diff --git a/marconi/tests/faulty_storage.py b/marconi/tests/faulty_storage.py index 3005a6adc..e02448224 100644 --- a/marconi/tests/faulty_storage.py +++ b/marconi/tests/faulty_storage.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - from marconi.queues import storage diff --git a/marconi/tests/functional/config.py b/marconi/tests/functional/config.py index a65094394..e66600da6 100644 --- a/marconi/tests/functional/config.py +++ b/marconi/tests/functional/config.py @@ -17,6 +17,7 @@ import os from oslo.config import cfg + _DEFAULT = [ cfg.BoolOpt("run_tests", default=True), ] diff --git a/marconi/tests/helpers.py b/marconi/tests/helpers.py index e822bee34..d894d93a7 100644 --- a/marconi/tests/helpers.py +++ b/marconi/tests/helpers.py @@ -13,14 +13,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -import testtools - import contextlib import functools import os import uuid import six +import testtools + SKIP_SLOW_TESTS = os.environ.get('MARCONI_TEST_SLOW') is None SKIP_MONGODB_TESTS = os.environ.get('MARCONI_TEST_MONGODB') is None diff --git a/marconi/version.py b/marconi/version.py index 69ae23bf2..a3acf9555 100644 --- a/marconi/version.py +++ b/marconi/version.py @@ -16,6 +16,7 @@ import pbr.packaging import pbr.version + version_info = pbr.version.VersionInfo('marconi') diff --git a/tests/__init__.py b/tests/__init__.py index 99252f86f..93cf1580b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -15,6 +15,7 @@ import os + tests_dir = os.path.abspath(os.path.dirname(__file__)) os.environ.setdefault("MARCONI_TESTS_DIR", tests_dir) diff --git a/tests/functional/wsgi/v1/test_claims.py b/tests/functional/wsgi/v1/test_claims.py index 8945bc817..bb579fefd 100644 --- a/tests/functional/wsgi/v1/test_claims.py +++ b/tests/functional/wsgi/v1/test_claims.py @@ -13,9 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import ddt import uuid +import ddt + from marconi.tests.functional import base from marconi.tests.functional import helpers diff --git a/tests/functional/wsgi/v1/test_messages.py b/tests/functional/wsgi/v1/test_messages.py index b33eae546..3ccc01d0a 100644 --- a/tests/functional/wsgi/v1/test_messages.py +++ b/tests/functional/wsgi/v1/test_messages.py @@ -12,9 +12,11 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. -import ddt + import uuid +import ddt + from marconi.tests.functional import base # noqa from marconi.tests.functional import helpers diff --git a/tests/functional/wsgi/v1/test_queues.py b/tests/functional/wsgi/v1/test_queues.py index 9591366df..0e237dd2b 100644 --- a/tests/functional/wsgi/v1/test_queues.py +++ b/tests/functional/wsgi/v1/test_queues.py @@ -12,10 +12,12 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + import copy +import uuid + import ddt import six -import uuid from marconi.tests.functional import base # noqa from marconi.tests.functional import helpers diff --git a/tests/unit/proxy/storage/base.py b/tests/unit/proxy/storage/base.py index 11130f45f..f9dcd3600 100644 --- a/tests/unit/proxy/storage/base.py +++ b/tests/unit/proxy/storage/base.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + import uuid import six diff --git a/tests/unit/proxy/storage/test_impl_memory.py b/tests/unit/proxy/storage/test_impl_memory.py index 2f5a33731..85bc48434 100644 --- a/tests/unit/proxy/storage/test_impl_memory.py +++ b/tests/unit/proxy/storage/test_impl_memory.py @@ -12,10 +12,10 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + from marconi.proxy.storage import memory from marconi.proxy.storage.memory import controllers from marconi import tests as testing - from tests.unit.proxy.storage import base diff --git a/tests/unit/proxy/storage/test_impl_mongodb.py b/tests/unit/proxy/storage/test_impl_mongodb.py index bcd14a1fb..6cb24e458 100644 --- a/tests/unit/proxy/storage/test_impl_mongodb.py +++ b/tests/unit/proxy/storage/test_impl_mongodb.py @@ -12,11 +12,11 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + from marconi.proxy.storage import mongodb from marconi.proxy.storage.mongodb import controllers from marconi.proxy.storage.mongodb import options from marconi import tests as testing - from tests.unit.proxy.storage import base diff --git a/tests/unit/proxy/test_catalogue.py b/tests/unit/proxy/test_catalogue.py index 82f45b28c..439644273 100644 --- a/tests/unit/proxy/test_catalogue.py +++ b/tests/unit/proxy/test_catalogue.py @@ -13,6 +13,7 @@ # # See the License for the specific language governing permissions and # limitations under the License. + import json import uuid diff --git a/tests/unit/proxy/test_queues.py b/tests/unit/proxy/test_queues.py index c30e9ad8a..68f402a62 100644 --- a/tests/unit/proxy/test_queues.py +++ b/tests/unit/proxy/test_queues.py @@ -13,6 +13,7 @@ # # See the License for the specific language governing permissions and # limitations under the License. + import json import uuid diff --git a/tests/unit/queues/transport/test_auth.py b/tests/unit/queues/transport/test_auth.py index d7bfc8d4b..7b560e39e 100644 --- a/tests/unit/queues/transport/test_auth.py +++ b/tests/unit/queues/transport/test_auth.py @@ -12,6 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. + """Test Auth.""" from oslo.config import cfg diff --git a/tests/unit/queues/transport/wsgi/test_utils.py b/tests/unit/queues/transport/wsgi/test_utils.py index cd0623bdb..b6ca74744 100644 --- a/tests/unit/queues/transport/wsgi/test_utils.py +++ b/tests/unit/queues/transport/wsgi/test_utils.py @@ -15,9 +15,9 @@ # limitations under the License. import io +import json import falcon -import json import testtools from marconi.queues.transport.wsgi import utils