Follow hacking rules about import
This patch follows the rules about import in HACKING.rst https://github.com/openstack/marconi/blob/master/HACKING.rst#imports * reorder imports * Add missing blank lines before code Change-Id: I4abcfb3a2640499c5df34cbf75b5eaecb3d19823
This commit is contained in:
parent
2881edcf1c
commit
683206d237
1
marconi/common/cache/_backends/memcached.py
vendored
1
marconi/common/cache/_backends/memcached.py
vendored
@ -19,6 +19,7 @@ from oslo.config import cfg
|
|||||||
|
|
||||||
from marconi.common.cache import backends
|
from marconi.common.cache import backends
|
||||||
|
|
||||||
|
|
||||||
_memcache_opts = [
|
_memcache_opts = [
|
||||||
cfg.ListOpt('memcached_servers',
|
cfg.ListOpt('memcached_servers',
|
||||||
default=['127.0.0.1:11211'],
|
default=['127.0.0.1:11211'],
|
||||||
|
1
marconi/common/cache/cache.py
vendored
1
marconi/common/cache/cache.py
vendored
@ -22,6 +22,7 @@ Supported configuration options:
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from stevedore import driver
|
from stevedore import driver
|
||||||
|
|
||||||
|
|
||||||
_cache_options = [
|
_cache_options = [
|
||||||
cfg.StrOpt('cache_backend',
|
cfg.StrOpt('cache_backend',
|
||||||
default='memory',
|
default='memory',
|
||||||
|
@ -22,6 +22,7 @@ import termios
|
|||||||
|
|
||||||
from marconi.openstack.common import log as logging
|
from marconi.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,13 +12,16 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""wsgi transport helpers."""
|
"""wsgi transport helpers."""
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
import six
|
import six
|
||||||
|
|
||||||
import marconi.openstack.common.log as logging
|
import marconi.openstack.common.log as logging
|
||||||
from marconi.queues.transport import validation as validate
|
from marconi.queues.transport import validation as validate
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""Defines an interface for working with proxy partitions and the catalogue."""
|
"""Defines an interface for working with proxy partitions and the catalogue."""
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""These are the exceptions that the proxy storage layer can raise."""
|
"""These are the exceptions that the proxy storage layer can raise."""
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from marconi.proxy.storage.memory import catalogue
|
from marconi.proxy.storage.memory import catalogue
|
||||||
from marconi.proxy.storage.memory import partitions
|
from marconi.proxy.storage.memory import partitions
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from marconi.proxy.storage import base
|
from marconi.proxy.storage import base
|
||||||
from marconi.proxy.storage.memory import controllers
|
from marconi.proxy.storage.memory import controllers
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""MongoDB Proxy Storage Driver for Marconi"""
|
"""MongoDB Proxy Storage Driver for Marconi"""
|
||||||
|
|
||||||
from marconi.proxy.storage.mongodb import driver
|
from marconi.proxy.storage.mongodb import driver
|
||||||
|
@ -32,6 +32,7 @@ from marconi.proxy.storage import base
|
|||||||
from marconi.proxy.storage import exceptions
|
from marconi.proxy.storage import exceptions
|
||||||
from marconi.queues.storage.mongodb import utils
|
from marconi.queues.storage.mongodb import utils
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
CATALOGUE_INDEX = [
|
CATALOGUE_INDEX = [
|
||||||
|
@ -18,5 +18,6 @@
|
|||||||
from marconi.proxy.storage.mongodb import catalogue
|
from marconi.proxy.storage.mongodb import catalogue
|
||||||
from marconi.proxy.storage.mongodb import partitions
|
from marconi.proxy.storage.mongodb import partitions
|
||||||
|
|
||||||
|
|
||||||
CatalogueController = catalogue.CatalogueController
|
CatalogueController = catalogue.CatalogueController
|
||||||
PartitionsController = partitions.PartitionsController
|
PartitionsController = partitions.PartitionsController
|
||||||
|
@ -23,6 +23,7 @@ from marconi.proxy import storage
|
|||||||
from marconi.proxy.storage.mongodb import controllers
|
from marconi.proxy.storage.mongodb import controllers
|
||||||
from marconi.proxy.storage.mongodb import options
|
from marconi.proxy.storage.mongodb import options
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ from marconi.proxy.storage import base
|
|||||||
from marconi.proxy.storage import exceptions
|
from marconi.proxy.storage import exceptions
|
||||||
from marconi.queues.storage.mongodb import utils
|
from marconi.queues.storage.mongodb import utils
|
||||||
|
|
||||||
|
|
||||||
PARTITIONS_INDEX = [
|
PARTITIONS_INDEX = [
|
||||||
('n', 1)
|
('n', 1)
|
||||||
]
|
]
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""schema: JSON Schemas for marconi proxy transports."""
|
"""schema: JSON Schemas for marconi proxy transports."""
|
||||||
|
|
||||||
partition_patch_hosts = {
|
partition_patch_hosts = {
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""utils: utilities for transport handling."""
|
"""utils: utilities for transport handling."""
|
||||||
|
|
||||||
import jsonschema
|
import jsonschema
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""marconi-proxy (admin): interface for managing partitions."""
|
"""marconi-proxy (admin): interface for managing partitions."""
|
||||||
|
|
||||||
from marconi.proxy.transport.wsgi import (
|
from marconi.proxy.transport.wsgi import (
|
||||||
|
@ -12,8 +12,10 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""catalogue: maintains a directory of all queues proxied through the system.
|
"""catalogue: maintains a directory of all queues proxied through the system.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
@ -22,6 +24,7 @@ from marconi.openstack.common import log
|
|||||||
from marconi.proxy.storage import exceptions
|
from marconi.proxy.storage import exceptions
|
||||||
from marconi.proxy.utils import helpers
|
from marconi.proxy.utils import helpers
|
||||||
|
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""marconi-proxy (base): Interface for driver implementations."""
|
"""marconi-proxy (base): Interface for driver implementations."""
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
from wsgiref import simple_server
|
from wsgiref import simple_server
|
||||||
|
|
||||||
|
@ -12,9 +12,11 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""forward: a resource for each marconi route where the desired result
|
"""forward: a resource for each marconi route where the desired result
|
||||||
is to just pass along a request to marconi.
|
is to just pass along a request to marconi.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from marconi.proxy.utils import forward
|
from marconi.proxy.utils import forward
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""health: returns the health information for this proxy."""
|
"""health: returns the health information for this proxy."""
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,9 +12,11 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""metadata: adds queue metadata to the catalogue and forwards to
|
"""metadata: adds queue metadata to the catalogue and forwards to
|
||||||
marconi queue metadata requests.
|
marconi queue metadata requests.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""partitions: a registry of all marconi partitions this proxy can route to
|
"""partitions: a registry of all marconi partitions this proxy can route to
|
||||||
|
|
||||||
A partition is added by an operator by interacting with the
|
A partition is added by an operator by interacting with the
|
||||||
@ -24,6 +25,7 @@ following fields are required:
|
|||||||
"hosts": [HTTP_EndPoints(:Port), ...]
|
"hosts": [HTTP_EndPoints(:Port), ...]
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
import falcon
|
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 import utils as json_utils
|
||||||
from marconi.queues.transport.wsgi import exceptions as wsgi_errors
|
from marconi.queues.transport.wsgi import exceptions as wsgi_errors
|
||||||
|
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""queues: routing and cataloguing queue operations on marconi
|
"""queues: routing and cataloguing queue operations on marconi
|
||||||
|
|
||||||
The queues resource performs routing to a marconi partition for
|
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
|
PUT adds an entry to the catalogue. A GET asks marconi for an
|
||||||
authoritative response.
|
authoritative response.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -12,13 +12,16 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""v1: queries the first node in the first partition for a homedoc."""
|
"""v1: queries the first node in the first partition for a homedoc."""
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
|
|
||||||
from marconi.openstack.common import log
|
from marconi.openstack.common import log
|
||||||
from marconi.proxy.utils import helpers
|
from marconi.proxy.utils import helpers
|
||||||
from marconi.proxy.utils import http
|
from marconi.proxy.utils import http
|
||||||
|
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""version: version information for the proxy transport API."""
|
"""version: version information for the proxy transport API."""
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""forward: exposes a mixin class appropriate for forwarding requests."""
|
"""forward: exposes a mixin class appropriate for forwarding requests."""
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
|
|
||||||
from marconi.openstack.common import log
|
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 http
|
||||||
from marconi.proxy.utils import lookup
|
from marconi.proxy.utils import lookup
|
||||||
|
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""helpers: utilities for performing common operations for resources."""
|
"""helpers: utilities for performing common operations for resources."""
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""http: utilities for handling HTTP details."""
|
"""http: utilities for handling HTTP details."""
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,14 +12,18 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""lookup: functions to handle caching/lookup of proxy details."""
|
"""lookup: functions to handle caching/lookup of proxy details."""
|
||||||
|
|
||||||
import msgpack
|
import msgpack
|
||||||
|
|
||||||
from marconi.openstack.common import log
|
from marconi.openstack.common import log
|
||||||
from marconi.proxy.storage import exceptions
|
from marconi.proxy.storage import exceptions
|
||||||
|
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def _entry_key(project, queue):
|
def _entry_key(project, queue):
|
||||||
assert project is not None, 'Project must not be None'
|
assert project is not None, 'Project must not be None'
|
||||||
assert queue is not None, 'Queue must not be None'
|
assert queue is not None, 'Queue must not be None'
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""partition: utilities for implementing partition selections."""
|
"""partition: utilities for implementing partition selections."""
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""round_robin: Implements round-robin selection for partition hosts."""
|
"""round_robin: Implements round-robin selection for partition hosts."""
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ from marconi.queues import storage
|
|||||||
from marconi.queues.storage import exceptions
|
from marconi.queues.storage import exceptions
|
||||||
from marconi.queues.storage.mongodb import utils
|
from marconi.queues.storage.mongodb import utils
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ from marconi.queues.storage.mongodb import claims
|
|||||||
from marconi.queues.storage.mongodb import messages
|
from marconi.queues.storage.mongodb import messages
|
||||||
from marconi.queues.storage.mongodb import queues
|
from marconi.queues.storage.mongodb import queues
|
||||||
|
|
||||||
|
|
||||||
ClaimController = claims.ClaimController
|
ClaimController = claims.ClaimController
|
||||||
MessageController = messages.MessageController
|
MessageController = messages.MessageController
|
||||||
QueueController = queues.QueueController
|
QueueController = queues.QueueController
|
||||||
|
@ -24,6 +24,7 @@ from marconi.queues import storage
|
|||||||
from marconi.queues.storage.mongodb import controllers
|
from marconi.queues.storage.mongodb import controllers
|
||||||
from marconi.queues.storage.mongodb import options
|
from marconi.queues.storage.mongodb import options
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ from marconi.queues.storage import exceptions
|
|||||||
from marconi.queues.storage.mongodb import options
|
from marconi.queues.storage.mongodb import options
|
||||||
from marconi.queues.storage.mongodb import utils
|
from marconi.queues.storage.mongodb import utils
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ from marconi.queues import storage
|
|||||||
from marconi.queues.storage import exceptions
|
from marconi.queues.storage import exceptions
|
||||||
from marconi.queues.storage.mongodb import utils
|
from marconi.queues.storage.mongodb import utils
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ from marconi.openstack.common import timeutils
|
|||||||
from marconi.queues.storage import exceptions as storage_exceptions
|
from marconi.queues.storage import exceptions as storage_exceptions
|
||||||
from marconi.queues.storage.mongodb import options
|
from marconi.queues.storage.mongodb import options
|
||||||
|
|
||||||
|
|
||||||
# BSON ObjectId gives TZ-aware datetime, so we generate a
|
# BSON ObjectId gives TZ-aware datetime, so we generate a
|
||||||
# TZ-aware UNIX epoch for convenience.
|
# TZ-aware UNIX epoch for convenience.
|
||||||
EPOCH = datetime.datetime.utcfromtimestamp(0).replace(tzinfo=tz_util.utc)
|
EPOCH = datetime.datetime.utcfromtimestamp(0).replace(tzinfo=tz_util.utc)
|
||||||
|
@ -19,6 +19,7 @@ from marconi.queues.storage import base
|
|||||||
from marconi.queues.storage import exceptions
|
from marconi.queues.storage import exceptions
|
||||||
from marconi.queues.storage.sqlite import utils
|
from marconi.queues.storage.sqlite import utils
|
||||||
|
|
||||||
|
|
||||||
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ from marconi.queues.storage.sqlite import claims
|
|||||||
from marconi.queues.storage.sqlite import messages
|
from marconi.queues.storage.sqlite import messages
|
||||||
from marconi.queues.storage.sqlite import queues
|
from marconi.queues.storage.sqlite import queues
|
||||||
|
|
||||||
|
|
||||||
ClaimController = claims.ClaimController
|
ClaimController = claims.ClaimController
|
||||||
MessageController = messages.MessageController
|
MessageController = messages.MessageController
|
||||||
QueueController = queues.QueueController
|
QueueController = queues.QueueController
|
||||||
|
@ -24,6 +24,7 @@ from marconi.queues import storage
|
|||||||
from marconi.queues.storage.sqlite import controllers
|
from marconi.queues.storage.sqlite import controllers
|
||||||
from marconi.queues.storage.sqlite import utils
|
from marconi.queues.storage.sqlite import utils
|
||||||
|
|
||||||
|
|
||||||
_SQLITE_OPTIONS = [
|
_SQLITE_OPTIONS = [
|
||||||
cfg.StrOpt('database', default=':memory:',
|
cfg.StrOpt('database', default=':memory:',
|
||||||
help='Sqlite database to use.')
|
help='Sqlite database to use.')
|
||||||
|
@ -20,6 +20,7 @@ from marconi.queues.storage import base
|
|||||||
from marconi.queues.storage import exceptions
|
from marconi.queues.storage import exceptions
|
||||||
from marconi.queues.storage.sqlite import utils
|
from marconi.queues.storage.sqlite import utils
|
||||||
|
|
||||||
|
|
||||||
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ from marconi.queues.storage import base
|
|||||||
from marconi.queues.storage import exceptions
|
from marconi.queues.storage import exceptions
|
||||||
from marconi.queues.storage.sqlite import utils
|
from marconi.queues.storage.sqlite import utils
|
||||||
|
|
||||||
|
|
||||||
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
STORAGE_LIMITS = cfg.CONF['queues:limits:storage']
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
from marconi.queues.storage import exceptions
|
from marconi.queues.storage import exceptions
|
||||||
|
|
||||||
|
|
||||||
UNIX_EPOCH_AS_JULIAN_SEC = 2440587.5 * 86400.0
|
UNIX_EPOCH_AS_JULIAN_SEC = 2440587.5 * 86400.0
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
"""Marconi Transport Drivers"""
|
"""Marconi Transport Drivers"""
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from marconi.queues.transport import base
|
from marconi.queues.transport import base
|
||||||
|
|
||||||
|
|
||||||
_TRANSPORT_OPTIONS = [
|
_TRANSPORT_OPTIONS = [
|
||||||
cfg.StrOpt('auth_strategy', default='')
|
cfg.StrOpt('auth_strategy', default='')
|
||||||
]
|
]
|
||||||
|
@ -19,6 +19,7 @@ from keystoneclient.middleware import auth_token
|
|||||||
|
|
||||||
from marconi.openstack.common import log
|
from marconi.openstack.common import log
|
||||||
|
|
||||||
|
|
||||||
STRATEGIES = {}
|
STRATEGIES = {}
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
@ -13,9 +13,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from wsgiref import simple_server
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from wsgiref import simple_server
|
|
||||||
|
|
||||||
from marconi.common.transport.wsgi import helpers
|
from marconi.common.transport.wsgi import helpers
|
||||||
import marconi.openstack.common.log as logging
|
import marconi.openstack.common.log as logging
|
||||||
|
@ -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 exceptions as wsgi_exceptions
|
||||||
from marconi.queues.transport.wsgi import utils as wsgi_utils
|
from marconi.queues.transport.wsgi import utils as wsgi_utils
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
CFG = cfg.CONF['queues:drivers:transport:wsgi']
|
CFG = cfg.CONF['queues:drivers:transport:wsgi']
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ from marconi.queues.transport import utils
|
|||||||
from marconi.queues.transport import validation as validate
|
from marconi.queues.transport import validation as validate
|
||||||
from marconi.queues.transport.wsgi import exceptions as wsgi_exceptions
|
from marconi.queues.transport.wsgi import exceptions as wsgi_exceptions
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ from marconi.queues.storage import exceptions as storage_exceptions
|
|||||||
from marconi.queues.transport import utils
|
from marconi.queues.transport import utils
|
||||||
from marconi.queues.transport.wsgi import exceptions as wsgi_exceptions
|
from marconi.queues.transport.wsgi import exceptions as wsgi_exceptions
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import marconi.openstack.common.log as logging
|
import marconi.openstack.common.log as logging
|
||||||
|
|
||||||
from marconi.queues.transport import utils
|
from marconi.queues.transport import utils
|
||||||
from marconi.queues.transport.wsgi import exceptions
|
from marconi.queues.transport.wsgi import exceptions
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|
||||||
# NOTE(kgriffs): http://tools.ietf.org/html/draft-nottingham-json-home-03
|
# NOTE(kgriffs): http://tools.ietf.org/html/draft-nottingham-json-home-03
|
||||||
JSON_HOME = {
|
JSON_HOME = {
|
||||||
'resources': {
|
'resources': {
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
from marconi.tests import base
|
from marconi.tests import base
|
||||||
from marconi.tests import helpers
|
from marconi.tests import helpers
|
||||||
|
|
||||||
|
|
||||||
SKIP_SLOW_TESTS = helpers.SKIP_SLOW_TESTS
|
SKIP_SLOW_TESTS = helpers.SKIP_SLOW_TESTS
|
||||||
RUN_SLOW_TESTS = not SKIP_SLOW_TESTS
|
RUN_SLOW_TESTS = not SKIP_SLOW_TESTS
|
||||||
|
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import fixtures
|
|
||||||
import os
|
import os
|
||||||
import testtools
|
|
||||||
|
|
||||||
|
import fixtures
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
import testtools
|
||||||
|
|
||||||
|
|
||||||
class TestBase(testtools.TestCase):
|
class TestBase(testtools.TestCase):
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
from marconi.queues import storage
|
from marconi.queues import storage
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ import os
|
|||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
|
|
||||||
_DEFAULT = [
|
_DEFAULT = [
|
||||||
cfg.BoolOpt("run_tests", default=True),
|
cfg.BoolOpt("run_tests", default=True),
|
||||||
]
|
]
|
||||||
|
@ -13,14 +13,14 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import testtools
|
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import functools
|
import functools
|
||||||
import os
|
import os
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
import testtools
|
||||||
|
|
||||||
|
|
||||||
SKIP_SLOW_TESTS = os.environ.get('MARCONI_TEST_SLOW') is None
|
SKIP_SLOW_TESTS = os.environ.get('MARCONI_TEST_SLOW') is None
|
||||||
SKIP_MONGODB_TESTS = os.environ.get('MARCONI_TEST_MONGODB') is None
|
SKIP_MONGODB_TESTS = os.environ.get('MARCONI_TEST_MONGODB') is None
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
import pbr.packaging
|
import pbr.packaging
|
||||||
import pbr.version
|
import pbr.version
|
||||||
|
|
||||||
|
|
||||||
version_info = pbr.version.VersionInfo('marconi')
|
version_info = pbr.version.VersionInfo('marconi')
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
tests_dir = os.path.abspath(os.path.dirname(__file__))
|
tests_dir = os.path.abspath(os.path.dirname(__file__))
|
||||||
os.environ.setdefault("MARCONI_TESTS_DIR", tests_dir)
|
os.environ.setdefault("MARCONI_TESTS_DIR", tests_dir)
|
||||||
|
|
||||||
|
@ -13,9 +13,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import ddt
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
import ddt
|
||||||
|
|
||||||
from marconi.tests.functional import base
|
from marconi.tests.functional import base
|
||||||
from marconi.tests.functional import helpers
|
from marconi.tests.functional import helpers
|
||||||
|
|
||||||
|
@ -12,9 +12,11 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
import ddt
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
import ddt
|
||||||
|
|
||||||
from marconi.tests.functional import base # noqa
|
from marconi.tests.functional import base # noqa
|
||||||
from marconi.tests.functional import helpers
|
from marconi.tests.functional import helpers
|
||||||
|
|
||||||
|
@ -12,10 +12,12 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
import uuid
|
||||||
|
|
||||||
import ddt
|
import ddt
|
||||||
import six
|
import six
|
||||||
import uuid
|
|
||||||
|
|
||||||
from marconi.tests.functional import base # noqa
|
from marconi.tests.functional import base # noqa
|
||||||
from marconi.tests.functional import helpers
|
from marconi.tests.functional import helpers
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from marconi.proxy.storage import memory
|
from marconi.proxy.storage import memory
|
||||||
from marconi.proxy.storage.memory import controllers
|
from marconi.proxy.storage.memory import controllers
|
||||||
from marconi import tests as testing
|
from marconi import tests as testing
|
||||||
|
|
||||||
from tests.unit.proxy.storage import base
|
from tests.unit.proxy.storage import base
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,11 +12,11 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from marconi.proxy.storage import mongodb
|
from marconi.proxy.storage import mongodb
|
||||||
from marconi.proxy.storage.mongodb import controllers
|
from marconi.proxy.storage.mongodb import controllers
|
||||||
from marconi.proxy.storage.mongodb import options
|
from marconi.proxy.storage.mongodb import options
|
||||||
from marconi import tests as testing
|
from marconi import tests as testing
|
||||||
|
|
||||||
from tests.unit.proxy.storage import base
|
from tests.unit.proxy.storage import base
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#
|
#
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""Test Auth."""
|
"""Test Auth."""
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import io
|
import io
|
||||||
|
import json
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
import json
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from marconi.queues.transport.wsgi import utils
|
from marconi.queues.transport.wsgi import utils
|
||||||
|
Loading…
x
Reference in New Issue
Block a user