Import i18n functions directly
Import i18n functions from module directly and do not use global module variables like _ = i18n._. It makes code shorter and cleaner. It also to detect cases when these functions are not used in module. Change-Id: Iaa593ac1f2dd15cbcad049bef6ba68f1cfa610da
This commit is contained in:
parent
a33b20b92b
commit
c27c25f779
@ -18,9 +18,7 @@ import copy
|
|||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
import glance.domain.proxy
|
import glance.domain.proxy
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
def is_image_mutable(context, image):
|
def is_image_mutable(context, image):
|
||||||
|
@ -23,12 +23,9 @@ from oslo_utils import units
|
|||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LW
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LW = i18n._LW
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
_CACHED_THREAD_POOL = {}
|
_CACHED_THREAD_POOL = {}
|
||||||
|
@ -34,14 +34,12 @@ from glance.common import exception
|
|||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
from glance import i18n
|
from glance.i18n import _LE, _LI
|
||||||
from glance import image_cache
|
from glance import image_cache
|
||||||
from glance import notifier
|
from glance import notifier
|
||||||
import glance.registry.client.v1.api as registry
|
import glance.registry.client.v1.api as registry
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_LI = i18n._LI
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
PATTERNS = {
|
PATTERNS = {
|
||||||
('v1', 'GET'): re.compile(r'^/v1/images/([^\/]+)$'),
|
('v1', 'GET'): re.compile(r'^/v1/images/([^\/]+)$'),
|
||||||
|
@ -22,10 +22,9 @@ import routes
|
|||||||
|
|
||||||
from glance.api import cached_images
|
from glance.api import cached_images
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance import i18n
|
from glance.i18n import _LI
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
|
|
||||||
class CacheManageFilter(wsgi.Middleware):
|
class CacheManageFilter(wsgi.Middleware):
|
||||||
|
@ -21,9 +21,8 @@ import webob.exc
|
|||||||
from glance.api import policy
|
from glance.api import policy
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.context
|
import glance.context
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
context_opts = [
|
context_opts = [
|
||||||
cfg.BoolOpt('owner_is_tenant', default=True,
|
cfg.BoolOpt('owner_is_tenant', default=True,
|
||||||
|
@ -22,10 +22,9 @@ import re
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance import i18n
|
from glance.i18n import _LI
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
|
|
||||||
class GzipMiddleware(wsgi.Middleware):
|
class GzipMiddleware(wsgi.Middleware):
|
||||||
|
@ -24,13 +24,10 @@ from oslo_log import log as logging
|
|||||||
|
|
||||||
from glance.api import versions
|
from glance.api import versions
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance import i18n
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
|
|
||||||
class VersionNegotiationFilter(wsgi.Middleware):
|
class VersionNegotiationFilter(wsgi.Middleware):
|
||||||
|
@ -24,7 +24,7 @@ from oslo_policy import policy
|
|||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
import glance.domain.proxy
|
import glance.domain.proxy
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
@ -36,8 +36,6 @@ DEFAULT_RULES = policy.Rules.from_dict({
|
|||||||
'manage_image_cache': 'role:admin',
|
'manage_image_cache': 'role:admin',
|
||||||
})
|
})
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class Enforcer(policy.Enforcer):
|
class Enforcer(policy.Enforcer):
|
||||||
"""Responsible for loading and enforcing rules"""
|
"""Responsible for loading and enforcing rules"""
|
||||||
|
@ -18,12 +18,11 @@ from oslo_log import log as logging
|
|||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
import glance.registry.client.v1.api as registry
|
import glance.registry.client.v1.api as registry
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class BaseController(object):
|
class BaseController(object):
|
||||||
|
@ -47,16 +47,12 @@ from glance.common import property_utils
|
|||||||
from glance.common import store_utils
|
from glance.common import store_utils
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
from glance import notifier
|
from glance import notifier
|
||||||
import glance.registry.client.v1.api as registry
|
import glance.registry.client.v1.api as registry
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
SUPPORTED_PARAMS = glance.api.v1.SUPPORTED_PARAMS
|
SUPPORTED_PARAMS = glance.api.v1.SUPPORTED_PARAMS
|
||||||
SUPPORTED_FILTERS = glance.api.v1.SUPPORTED_FILTERS
|
SUPPORTED_FILTERS = glance.api.v1.SUPPORTED_FILTERS
|
||||||
ACTIVE_IMMUTABLE = glance.api.v1.ACTIVE_IMMUTABLE
|
ACTIVE_IMMUTABLE = glance.api.v1.ACTIVE_IMMUTABLE
|
||||||
|
@ -24,11 +24,10 @@ from glance.api.v1 import controller
|
|||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
import glance.registry.client.v1.api as registry
|
import glance.registry.client.v1.api as registry
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('image_member_quota', 'glance.common.config')
|
CONF.import_opt('image_member_quota', 'glance.common.config')
|
||||||
|
|
||||||
|
@ -23,15 +23,12 @@ from glance.common import exception
|
|||||||
from glance.common import store_utils
|
from glance.common import store_utils
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
import glance.db
|
import glance.db
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI
|
||||||
import glance.registry.client.v1.api as registry
|
import glance.registry.client.v1.api as registry
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
|
|
||||||
def initiate_deletion(req, location_data, id):
|
def initiate_deletion(req, location_data, id):
|
||||||
|
@ -22,13 +22,11 @@ from glance.common import utils
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
import glance.gateway
|
import glance.gateway
|
||||||
from glance import i18n
|
from glance.i18n import _LI
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
|
|
||||||
class ImageActionsController(object):
|
class ImageActionsController(object):
|
||||||
|
@ -24,13 +24,11 @@ from glance.common import utils
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
import glance.gateway
|
import glance.gateway
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
|
|
||||||
class ImageDataController(object):
|
class ImageDataController(object):
|
||||||
|
@ -29,13 +29,12 @@ from glance.common import utils
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
import glance.gateway
|
import glance.gateway
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class ImageMembersController(object):
|
class ImageMembersController(object):
|
||||||
|
@ -23,12 +23,11 @@ from glance.common import utils
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
import glance.gateway
|
import glance.gateway
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class Controller(object):
|
class Controller(object):
|
||||||
|
@ -32,13 +32,11 @@ from glance.common import utils
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
import glance.gateway
|
import glance.gateway
|
||||||
from glance import i18n
|
from glance.i18n import _, _LW
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('disk_formats', 'glance.common.config', group='image_format')
|
CONF.import_opt('disk_formats', 'glance.common.config', group='image_format')
|
||||||
|
@ -35,13 +35,11 @@ from glance.common import wsgi
|
|||||||
from glance.common import wsme_utils
|
from glance.common import wsme_utils
|
||||||
import glance.db
|
import glance.db
|
||||||
import glance.gateway
|
import glance.gateway
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -29,12 +29,11 @@ from glance.common import exception
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance.common import wsme_utils
|
from glance.common import wsme_utils
|
||||||
import glance.db
|
import glance.db
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -29,12 +29,11 @@ from glance.common import exception
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
import glance.gateway
|
import glance.gateway
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class NamespacePropertiesController(object):
|
class NamespacePropertiesController(object):
|
||||||
|
@ -29,12 +29,11 @@ from glance.common import exception
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
import glance.gateway
|
import glance.gateway
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class ResourceTypeController(object):
|
class ResourceTypeController(object):
|
||||||
|
@ -28,14 +28,11 @@ from glance.common import exception
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance.common import wsme_utils
|
from glance.common import wsme_utils
|
||||||
import glance.db
|
import glance.db
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -33,13 +33,11 @@ from glance.common import exception
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
import glance.gateway
|
import glance.gateway
|
||||||
from glance import i18n
|
from glance.i18n import _, _LW
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('task_time_to_live', 'glance.common.config', group='task')
|
CONF.import_opt('task_time_to_live', 'glance.common.config', group='task')
|
||||||
|
@ -35,12 +35,10 @@ from glance.common import jsonpatchvalidator
|
|||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_LE = i18n._LE
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||||
os.pardir,
|
os.pardir,
|
||||||
|
@ -20,9 +20,8 @@ from six.moves import http_client
|
|||||||
import webob.dec
|
import webob.dec
|
||||||
|
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
versions_opts = [
|
versions_opts = [
|
||||||
cfg.StrOpt('public_endpoint',
|
cfg.StrOpt('public_endpoint',
|
||||||
|
@ -15,9 +15,7 @@
|
|||||||
from glance.artifacts.domain import proxy
|
from glance.artifacts.domain import proxy
|
||||||
import glance.common.artifacts.definitions as definitions
|
import glance.common.artifacts.definitions as definitions
|
||||||
import glance.common.exception as exc
|
import glance.common.exception as exc
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class ArtifactProxy(proxy.Artifact):
|
class ArtifactProxy(proxy.Artifact):
|
||||||
|
@ -16,9 +16,7 @@ import uuid
|
|||||||
|
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class Artifact(object):
|
class Artifact(object):
|
||||||
|
@ -22,11 +22,7 @@ from oslo_utils import encodeutils
|
|||||||
from glance.artifacts.domain import proxy
|
from glance.artifacts.domain import proxy
|
||||||
from glance.common.artifacts import definitions
|
from glance.common.artifacts import definitions
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LW
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
@ -14,9 +14,7 @@
|
|||||||
|
|
||||||
from glance.artifacts.domain import proxy
|
from glance.artifacts.domain import proxy
|
||||||
from glance.common import exception as exc
|
from glance.common import exception as exc
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class ArtifactProxy(proxy.Artifact):
|
class ArtifactProxy(proxy.Artifact):
|
||||||
|
@ -15,11 +15,10 @@
|
|||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _LE
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
|
|
||||||
class TaskExecutor(object):
|
class TaskExecutor(object):
|
||||||
|
@ -33,13 +33,10 @@ from taskflow.types import failure
|
|||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common.scripts.image_import import main as image_import
|
from glance.common.scripts.image_import import main as image_import
|
||||||
from glance.common.scripts import utils as script_utils
|
from glance.common.scripts import utils as script_utils
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -21,12 +21,8 @@ from oslo_config import cfg
|
|||||||
from taskflow.patterns import linear_flow as lf
|
from taskflow.patterns import linear_flow as lf
|
||||||
from taskflow import task
|
from taskflow import task
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _, _LW
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LW = i18n._LW
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
convert_task_opts = [
|
convert_task_opts = [
|
||||||
|
@ -21,10 +21,9 @@ from oslo_utils import excutils
|
|||||||
from taskflow.patterns import linear_flow as lf
|
from taskflow.patterns import linear_flow as lf
|
||||||
|
|
||||||
from glance.async import utils
|
from glance.async import utils
|
||||||
from glance import i18n
|
from glance.i18n import _LE
|
||||||
|
|
||||||
|
|
||||||
_LE = i18n._LE
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,10 +28,8 @@ from taskflow.listeners import logging as llistener
|
|||||||
import glance.async
|
import glance.async
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common.scripts import utils as script_utils
|
from glance.common.scripts import utils as script_utils
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
_deprecated_opt = cfg.DeprecatedOpt('eventlet_executor_pool_size',
|
_deprecated_opt = cfg.DeprecatedOpt('eventlet_executor_pool_size',
|
||||||
|
@ -17,11 +17,10 @@ from oslo_log import log as logging
|
|||||||
import six
|
import six
|
||||||
from taskflow import task
|
from taskflow import task
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _LW
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
|
|
||||||
class OptionalTask(task.Task):
|
class OptionalTask(task.Task):
|
||||||
|
@ -44,7 +44,7 @@ def fix_greendns_ipv6():
|
|||||||
"if using ipv6 since eventlet.greendns currently "
|
"if using ipv6 since eventlet.greendns currently "
|
||||||
"breaks with ipv6 addresses. Please ensure that "
|
"breaks with ipv6 addresses. Please ensure that "
|
||||||
"eventlet is not imported prior to this being set.")
|
"eventlet is not imported prior to this being set.")
|
||||||
raise ImportError(msg % (nogreendns))
|
raise ImportError(msg % nogreendns)
|
||||||
|
|
||||||
os.environ[nogreendns] = 'yes'
|
os.environ[nogreendns] = 'yes'
|
||||||
|
|
||||||
|
@ -45,9 +45,7 @@ from oslo_utils import units
|
|||||||
from six.moves import range
|
from six.moves import range
|
||||||
|
|
||||||
from glance.common import config
|
from glance.common import config
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -49,12 +49,11 @@ from glance.common import exception
|
|||||||
from glance.db import migration as db_migration
|
from glance.db import migration as db_migration
|
||||||
from glance.db.sqlalchemy import api as db_api
|
from glance.db.sqlalchemy import api as db_api
|
||||||
from glance.db.sqlalchemy import metadata
|
from glance.db.sqlalchemy import metadata
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
# Decorators for actions
|
# Decorators for actions
|
||||||
|
@ -34,13 +34,9 @@ from webob import exc
|
|||||||
from glance.common import config
|
from glance.common import config
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
|
|
||||||
# NOTE: positional arguments <args> will be parsed before <command> until
|
# NOTE: positional arguments <args> will be parsed before <command> until
|
||||||
|
@ -19,10 +19,7 @@ import semantic_version
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from glance.common import exception as exc
|
from glance.common import exception as exc
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class AttributeDefinition(object):
|
class AttributeDefinition(object):
|
||||||
|
@ -21,10 +21,7 @@ import six
|
|||||||
|
|
||||||
from glance.common.artifacts import declarative
|
from glance.common.artifacts import declarative
|
||||||
import glance.common.exception as exc
|
import glance.common.exception as exc
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class Text(declarative.PropertyDefinition):
|
class Text(declarative.PropertyDefinition):
|
||||||
|
@ -21,15 +21,10 @@ from stevedore import enabled
|
|||||||
|
|
||||||
from glance.common.artifacts import definitions
|
from glance.common.artifacts import definitions
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LW = i18n._LW
|
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
|
|
||||||
plugins_opts = [
|
plugins_opts = [
|
||||||
cfg.BoolOpt('load_enabled', default=True,
|
cfg.BoolOpt('load_enabled', default=True,
|
||||||
|
@ -20,11 +20,9 @@ from glance import artifacts as ga
|
|||||||
from glance.common.artifacts import declarative
|
from glance.common.artifacts import declarative
|
||||||
from glance.common.artifacts import definitions
|
from glance.common.artifacts import definitions
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
COMMON_ARTIFACT_PROPERTIES = ['id',
|
COMMON_ARTIFACT_PROPERTIES = ['id',
|
||||||
'type_name',
|
'type_name',
|
||||||
'type_version',
|
'type_version',
|
||||||
|
@ -36,11 +36,10 @@ from six.moves import range
|
|||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class BaseStrategy(object):
|
class BaseStrategy(object):
|
||||||
@ -126,7 +125,7 @@ class KeystoneStrategy(BaseStrategy):
|
|||||||
|
|
||||||
self.check_auth_params()
|
self.check_auth_params()
|
||||||
auth_url = self.creds['auth_url']
|
auth_url = self.creds['auth_url']
|
||||||
for _ in range(self.MAX_REDIRECTS):
|
for redirect_iter in range(self.MAX_REDIRECTS):
|
||||||
try:
|
try:
|
||||||
_authenticate(auth_url)
|
_authenticate(auth_url)
|
||||||
except exception.AuthorizationRedirect as e:
|
except exception.AuthorizationRedirect as e:
|
||||||
|
@ -50,10 +50,9 @@ import six.moves.urllib.parse as urlparse
|
|||||||
from glance.common import auth
|
from glance.common import auth
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
# common chunk size for get and put
|
# common chunk size for get and put
|
||||||
CHUNKSIZE = 65536
|
CHUNKSIZE = 65536
|
||||||
@ -83,7 +82,7 @@ def handle_redirects(func):
|
|||||||
|
|
||||||
@functools.wraps(func)
|
@functools.wraps(func)
|
||||||
def wrapped(self, method, url, body, headers):
|
def wrapped(self, method, url, body, headers):
|
||||||
for _ in range(MAX_REDIRECTS):
|
for i in range(MAX_REDIRECTS):
|
||||||
try:
|
try:
|
||||||
return func(self, method, url, body, headers)
|
return func(self, method, url, body, headers)
|
||||||
except exception.RedirectException as redirect:
|
except exception.RedirectException as redirect:
|
||||||
|
@ -28,11 +28,9 @@ from oslo_config import cfg
|
|||||||
from oslo_policy import policy
|
from oslo_policy import policy
|
||||||
from paste import deploy
|
from paste import deploy
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
from glance.version import version_info as version
|
from glance.version import version_info as version
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
paste_deploy_opts = [
|
paste_deploy_opts = [
|
||||||
cfg.StrOpt('flavor',
|
cfg.StrOpt('flavor',
|
||||||
help=_('Partial name of a pipeline in your paste configuration '
|
help=_('Partial name of a pipeline in your paste configuration '
|
||||||
|
@ -19,9 +19,7 @@
|
|||||||
import six
|
import six
|
||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
_FATAL_EXCEPTION_FORMAT_ERRORS = False
|
_FATAL_EXCEPTION_FORMAT_ERRORS = False
|
||||||
|
|
||||||
|
@ -24,9 +24,7 @@ import re
|
|||||||
import jsonschema
|
import jsonschema
|
||||||
|
|
||||||
import glance.common.exception as exc
|
import glance.common.exception as exc
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class JsonPatchValidatorMixin(object):
|
class JsonPatchValidatorMixin(object):
|
||||||
|
@ -19,10 +19,7 @@ from oslo_config import cfg
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
import stevedore
|
import stevedore
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
location_strategy_opts = [
|
location_strategy_opts = [
|
||||||
cfg.StrOpt('location_strategy', default='location_order',
|
cfg.StrOpt('location_strategy', default='location_order',
|
||||||
|
@ -19,9 +19,8 @@ from oslo_config import cfg
|
|||||||
import six
|
import six
|
||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
store_type_opts = [
|
store_type_opts = [
|
||||||
cfg.ListOpt("store_type_preference",
|
cfg.ListOpt("store_type_preference",
|
||||||
|
@ -22,14 +22,12 @@ from six.moves import configparser
|
|||||||
|
|
||||||
import glance.api.policy
|
import glance.api.policy
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
|
|
||||||
# NOTE(bourke): The default dict_type is collections.OrderedDict in py27, but
|
# NOTE(bourke): The default dict_type is collections.OrderedDict in py27, but
|
||||||
# we must set manually for compatibility with py26
|
# we must set manually for compatibility with py26
|
||||||
CONFIG = configparser.SafeConfigParser(dict_type=OrderedDict)
|
CONFIG = configparser.SafeConfigParser(dict_type=OrderedDict)
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
property_opts = [
|
property_opts = [
|
||||||
cfg.StrOpt('property_protection_file',
|
cfg.StrOpt('property_protection_file',
|
||||||
|
@ -30,11 +30,9 @@ from webob import exc
|
|||||||
from glance.common import client
|
from glance.common import client
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
|
|
||||||
rpc_opts = [
|
rpc_opts = [
|
||||||
|
@ -16,11 +16,9 @@
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from glance.common.scripts.image_import import main as image_import
|
from glance.common.scripts.image_import import main as image_import
|
||||||
from glance import i18n
|
from glance.i18n import _LE, _LI
|
||||||
|
|
||||||
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LE = i18n._LE
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,14 +27,9 @@ from glance.api.v2 import images as v2_api
|
|||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common.scripts import utils as script_utils
|
from glance.common.scripts import utils as script_utils
|
||||||
from glance.common import store_utils
|
from glance.common import store_utils
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
|
|
||||||
def run(t_id, context, task_repo, image_repo, image_factory):
|
def run(t_id, context, task_repo, image_repo, image_factory):
|
||||||
|
@ -26,12 +26,9 @@ from oslo_log import log as logging
|
|||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
|
|
||||||
def get_task(task_repo, task_id):
|
def get_task(task_repo, task_id):
|
||||||
|
@ -19,13 +19,11 @@ from sqlalchemy.orm.properties import CompositeProperty
|
|||||||
from sqlalchemy import sql
|
from sqlalchemy import sql
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
MAX_COMPONENT_LENGTH = pow(2, 16) - 1
|
MAX_COMPONENT_LENGTH = pow(2, 16) - 1
|
||||||
MAX_NUMERIC_PRERELEASE_LENGTH = 6
|
MAX_NUMERIC_PRERELEASE_LENGTH = 6
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class DBVersion(object):
|
class DBVersion(object):
|
||||||
def __init__(self, components_long, prerelease, build):
|
def __init__(self, components_long, prerelease, build):
|
||||||
|
@ -31,11 +31,9 @@ from oslo_utils import encodeutils
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _LE
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
|
|
||||||
# Note: This is the signature hash method, which is independent from the
|
# Note: This is the signature hash method, which is independent from the
|
||||||
|
@ -21,13 +21,10 @@ from oslo_utils import encodeutils
|
|||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
|
|
||||||
import glance.db as db_api
|
import glance.db as db_api
|
||||||
from glance import i18n
|
from glance.i18n import _LE, _LW
|
||||||
from glance import scrubber
|
from glance import scrubber
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -18,10 +18,7 @@ from oslo_log import log as logging
|
|||||||
from six.moves import configparser
|
from six.moves import configparser
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
swift_opts = [
|
swift_opts = [
|
||||||
cfg.StrOpt('default_swift_reference',
|
cfg.StrOpt('default_swift_reference',
|
||||||
|
@ -43,13 +43,11 @@ import six
|
|||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
# Whitelist of v1 API headers of form x-image-meta-xxx
|
# Whitelist of v1 API headers of form x-image-meta-xxx
|
||||||
IMAGE_META_HEADERS = ['x-image-meta-location', 'x-image-meta-size',
|
IMAGE_META_HEADERS = ['x-image-meta-location', 'x-image-meta-size',
|
||||||
@ -376,7 +374,7 @@ class PrettyTable(object):
|
|||||||
def make_header(self):
|
def make_header(self):
|
||||||
label_parts = []
|
label_parts = []
|
||||||
break_parts = []
|
break_parts = []
|
||||||
for width, label, _ in self.columns:
|
for width, label, just in self.columns:
|
||||||
# NOTE(sirp): headers are always left justified
|
# NOTE(sirp): headers are always left justified
|
||||||
label_part = self._clip_and_justify(label, width, 'l')
|
label_part = self._clip_and_justify(label, width, 'l')
|
||||||
label_parts.append(label_part)
|
label_parts.append(label_part)
|
||||||
@ -391,7 +389,7 @@ class PrettyTable(object):
|
|||||||
def make_row(self, *args):
|
def make_row(self, *args):
|
||||||
row = args
|
row = args
|
||||||
row_parts = []
|
row_parts = []
|
||||||
for data, (width, _, just) in zip(row, self.columns):
|
for data, (width, label, just) in zip(row, self.columns):
|
||||||
row_part = self._clip_and_justify(data, width, just)
|
row_part = self._clip_and_justify(data, width, just)
|
||||||
row_parts.append(row_part)
|
row_parts.append(row_part)
|
||||||
|
|
||||||
|
@ -48,13 +48,9 @@ from webob import multidict
|
|||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance import i18n
|
from glance import i18n
|
||||||
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
|
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
bind_opts = [
|
bind_opts = [
|
||||||
cfg.StrOpt('bind_host', default='0.0.0.0',
|
cfg.StrOpt('bind_host', default='0.0.0.0',
|
||||||
help=_('Address to bind the server. Useful when '
|
help=_('Address to bind the server. Useful when '
|
||||||
|
@ -19,10 +19,7 @@ import glance.contrib.plugins.image_artifact.v1_1.image as v1_1
|
|||||||
import glanceclient
|
import glanceclient
|
||||||
|
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class ImageAsAnArtifact(v1_1.ImageAsAnArtifact):
|
class ImageAsAnArtifact(v1_1.ImageAsAnArtifact):
|
||||||
|
@ -29,9 +29,7 @@ from glance.common import exception
|
|||||||
from glance.common import location_strategy
|
from glance.common import location_strategy
|
||||||
import glance.domain
|
import glance.domain
|
||||||
import glance.domain.proxy
|
import glance.domain.proxy
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('image_size_cap', 'glance.common.config')
|
CONF.import_opt('image_size_cap', 'glance.common.config')
|
||||||
|
@ -25,12 +25,10 @@ import six
|
|||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance import i18n
|
from glance.i18n import _, _LI, _LW
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
DATA = {
|
DATA = {
|
||||||
'images': {},
|
'images': {},
|
||||||
|
@ -50,13 +50,11 @@ from glance.db.sqlalchemy.metadef_api import object as metadef_object_api
|
|||||||
from glance.db.sqlalchemy.metadef_api import property as metadef_property_api
|
from glance.db.sqlalchemy.metadef_api import property as metadef_property_api
|
||||||
from glance.db.sqlalchemy.metadef_api import tag as metadef_tag_api
|
from glance.db.sqlalchemy.metadef_api import tag as metadef_tag_api
|
||||||
from glance.db.sqlalchemy import models
|
from glance.db.sqlalchemy import models
|
||||||
from glance import i18n
|
from glance.i18n import _, _LW
|
||||||
|
|
||||||
BASE = models.BASE
|
BASE = models.BASE
|
||||||
sa_logger = None
|
sa_logger = None
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
|
|
||||||
STATUSES = ['active', 'saving', 'queued', 'killed', 'pending_delete',
|
STATUSES = ['active', 'saving', 'queued', 'killed', 'pending_delete',
|
||||||
|
@ -31,12 +31,10 @@ import glance.artifacts as ga
|
|||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import semver_db
|
from glance.common import semver_db
|
||||||
from glance.db.sqlalchemy import models_artifacts as models
|
from glance.db.sqlalchemy import models_artifacts as models
|
||||||
from glance import i18n
|
from glance.i18n import _LE, _LW
|
||||||
from oslo_log import log as os_logging
|
from oslo_log import log as os_logging
|
||||||
|
|
||||||
LOG = os_logging.getLogger(__name__)
|
LOG = os_logging.getLogger(__name__)
|
||||||
_LW = i18n._LW
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -33,13 +33,9 @@ from sqlalchemy import and_
|
|||||||
from sqlalchemy.schema import MetaData
|
from sqlalchemy.schema import MetaData
|
||||||
from sqlalchemy.sql import select
|
from sqlalchemy.sql import select
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LW = i18n._LW
|
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
metadata_opts = [
|
metadata_opts = [
|
||||||
cfg.StrOpt('metadata_source_path', default='/etc/glance/metadefs/',
|
cfg.StrOpt('metadata_source_path', default='/etc/glance/metadefs/',
|
||||||
|
@ -22,10 +22,9 @@ import sqlalchemy.orm as sa_orm
|
|||||||
from glance.common import exception as exc
|
from glance.common import exception as exc
|
||||||
import glance.db.sqlalchemy.metadef_api as metadef_api
|
import glance.db.sqlalchemy.metadef_api as metadef_api
|
||||||
from glance.db.sqlalchemy import models_metadef as models
|
from glance.db.sqlalchemy import models_metadef as models
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
def _is_namespace_visible(context, namespace, status=None):
|
def _is_namespace_visible(context, namespace, status=None):
|
||||||
|
@ -22,10 +22,9 @@ from glance.common import exception as exc
|
|||||||
from glance.db.sqlalchemy.metadef_api import namespace as namespace_api
|
from glance.db.sqlalchemy.metadef_api import namespace as namespace_api
|
||||||
import glance.db.sqlalchemy.metadef_api.utils as metadef_utils
|
import glance.db.sqlalchemy.metadef_api.utils as metadef_utils
|
||||||
from glance.db.sqlalchemy import models_metadef as models
|
from glance.db.sqlalchemy import models_metadef as models
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
def _get(context, object_id, session):
|
def _get(context, object_id, session):
|
||||||
|
@ -22,10 +22,9 @@ from glance.common import exception as exc
|
|||||||
from glance.db.sqlalchemy.metadef_api import namespace as namespace_api
|
from glance.db.sqlalchemy.metadef_api import namespace as namespace_api
|
||||||
from glance.db.sqlalchemy.metadef_api import utils as metadef_utils
|
from glance.db.sqlalchemy.metadef_api import utils as metadef_utils
|
||||||
from glance.db.sqlalchemy import models_metadef as models
|
from glance.db.sqlalchemy import models_metadef as models
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
def _get(context, property_id, session):
|
def _get(context, property_id, session):
|
||||||
|
@ -23,10 +23,9 @@ from glance.common import exception as exc
|
|||||||
from glance.db.sqlalchemy.metadef_api import namespace as namespace_api
|
from glance.db.sqlalchemy.metadef_api import namespace as namespace_api
|
||||||
import glance.db.sqlalchemy.metadef_api.utils as metadef_utils
|
import glance.db.sqlalchemy.metadef_api.utils as metadef_utils
|
||||||
from glance.db.sqlalchemy import models_metadef as models
|
from glance.db.sqlalchemy import models_metadef as models
|
||||||
from glance import i18n
|
from glance.i18n import _LW
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
|
|
||||||
def _get(context, id, session):
|
def _get(context, id, session):
|
||||||
|
@ -20,11 +20,10 @@ Various conveniences used for migration scripts
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
import sqlalchemy.types
|
import sqlalchemy.types
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _LI
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
|
|
||||||
String = lambda length: sqlalchemy.types.String(
|
String = lambda length: sqlalchemy.types.String(
|
||||||
|
@ -19,11 +19,9 @@ import six.moves.urllib.parse as urlparse
|
|||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade(migrate_engine):
|
def upgrade(migrate_engine):
|
||||||
|
@ -36,13 +36,9 @@ import sqlalchemy
|
|||||||
|
|
||||||
from glance.common import crypt
|
from glance.common import crypt
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
CONF.import_opt('metadata_encryption_key', 'glance.common.config')
|
CONF.import_opt('metadata_encryption_key', 'glance.common.config')
|
||||||
|
@ -33,12 +33,10 @@ from sqlalchemy import Text
|
|||||||
|
|
||||||
import glance.artifacts as ga
|
import glance.artifacts as ga
|
||||||
from glance.common import semver_db
|
from glance.common import semver_db
|
||||||
from glance import i18n
|
|
||||||
from oslo_log import log as os_logging
|
from oslo_log import log as os_logging
|
||||||
|
|
||||||
BASE = declarative.declarative_base()
|
BASE = declarative.declarative_base()
|
||||||
LOG = os_logging.getLogger(__name__)
|
LOG = os_logging.getLogger(__name__)
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
|
|
||||||
class ArtifactBase(models.ModelBase, models.TimestampMixin):
|
class ArtifactBase(models.ModelBase, models.TimestampMixin):
|
||||||
|
@ -26,12 +26,8 @@ from oslo_utils import timeutils
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('task_executor', 'glance.common.config', group='task')
|
CONF.import_opt('task_executor', 'glance.common.config', group='task')
|
||||||
|
@ -28,13 +28,9 @@ from oslo_utils import units
|
|||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
image_cache_opts = [
|
image_cache_opts = [
|
||||||
cfg.StrOpt('image_cache_driver', default='sqlite',
|
cfg.StrOpt('image_cache_driver', default='sqlite',
|
||||||
|
@ -19,9 +19,7 @@ from oslo_serialization import jsonutils as json
|
|||||||
|
|
||||||
from glance.common import client as base_client
|
from glance.common import client as base_client
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class CacheClient(base_client.BaseClient):
|
class CacheClient(base_client.BaseClient):
|
||||||
|
@ -24,10 +24,9 @@ from oslo_log import log as logging
|
|||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -31,14 +31,10 @@ from oslo_log import log as logging
|
|||||||
from oslo_utils import excutils
|
from oslo_utils import excutils
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
from glance.image_cache.drivers import base
|
from glance.image_cache.drivers import base
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
sqlite_opts = [
|
sqlite_opts = [
|
||||||
cfg.StrOpt('image_cache_sqlite_db', default='cache.db',
|
cfg.StrOpt('image_cache_sqlite_db', default='cache.db',
|
||||||
|
@ -66,14 +66,10 @@ import six
|
|||||||
import xattr
|
import xattr
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _, _LI, _LW
|
||||||
from glance.image_cache.drivers import base
|
from glance.image_cache.drivers import base
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -23,13 +23,11 @@ from oslo_log import log as logging
|
|||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import context
|
from glance import context
|
||||||
from glance import i18n
|
from glance.i18n import _LI, _LW
|
||||||
from glance.image_cache import base
|
from glance.image_cache import base
|
||||||
import glance.registry.client.v1.api as registry
|
import glance.registry.client.v1.api as registry
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
|
|
||||||
class Prefetcher(base.CacheApp):
|
class Prefetcher(base.CacheApp):
|
||||||
|
@ -26,13 +26,9 @@ from glance.common import exception
|
|||||||
from glance.common import signature_utils
|
from glance.common import signature_utils
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
import glance.domain.proxy
|
import glance.domain.proxy
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI
|
||||||
|
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -28,10 +28,8 @@ import webob
|
|||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.domain import proxy as domain_proxy
|
from glance.domain import proxy as domain_proxy
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
notifier_opts = [
|
notifier_opts = [
|
||||||
cfg.StrOpt('default_publisher_id', default="image.localhost",
|
cfg.StrOpt('default_publisher_id', default="image.localhost",
|
||||||
|
@ -25,12 +25,10 @@ import glance.common.exception as exception
|
|||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
import glance.domain
|
import glance.domain
|
||||||
import glance.domain.proxy
|
import glance.domain.proxy
|
||||||
from glance import i18n
|
from glance.i18n import _, _LI
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LI = i18n._LI
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('image_member_quota', 'glance.common.config')
|
CONF.import_opt('image_member_quota', 'glance.common.config')
|
||||||
CONF.import_opt('image_property_quota', 'glance.common.config')
|
CONF.import_opt('image_property_quota', 'glance.common.config')
|
||||||
|
@ -19,9 +19,8 @@ Registry API
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
registry_addr_opts = [
|
registry_addr_opts = [
|
||||||
cfg.StrOpt('registry_host', default='0.0.0.0',
|
cfg.StrOpt('registry_host', default='0.0.0.0',
|
||||||
|
@ -29,14 +29,10 @@ from glance.common import exception
|
|||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -21,13 +21,10 @@ from glance.common import exception
|
|||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
from glance import i18n
|
from glance.i18n import _, _LI, _LW
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
|
|
||||||
|
|
||||||
class Controller(object):
|
class Controller(object):
|
||||||
|
@ -22,9 +22,8 @@ from oslo_config import cfg
|
|||||||
from glance.common import rpc
|
from glance.common import rpc
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -15,9 +15,8 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
registry_client_opts = [
|
registry_client_opts = [
|
||||||
cfg.StrOpt('registry_client_protocol', default='http',
|
cfg.StrOpt('registry_client_protocol', default='http',
|
||||||
|
@ -24,11 +24,10 @@ from oslo_log import log as logging
|
|||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
from glance.registry.client.v1 import client
|
from glance.registry.client.v1 import client
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
registry_client_ctx_opts = [
|
registry_client_ctx_opts = [
|
||||||
cfg.BoolOpt('send_identity_headers', default=False,
|
cfg.BoolOpt('send_identity_headers', default=False,
|
||||||
|
@ -24,11 +24,10 @@ from oslo_utils import excutils
|
|||||||
|
|
||||||
from glance.common.client import BaseClient
|
from glance.common.client import BaseClient
|
||||||
from glance.common import crypt
|
from glance.common import crypt
|
||||||
from glance import i18n
|
from glance.i18n import _LE
|
||||||
from glance.registry.api.v1 import images
|
from glance.registry.api.v1 import images
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
|
|
||||||
class RegistryClient(BaseClient):
|
class RegistryClient(BaseClient):
|
||||||
|
@ -23,11 +23,10 @@ from oslo_config import cfg
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
from glance.registry.client.v2 import client
|
from glance.registry.client.v2 import client
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
_registry_client = 'glance.registry.client'
|
_registry_client = 'glance.registry.client'
|
||||||
|
@ -18,9 +18,7 @@ from oslo_utils import encodeutils
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
|
|
||||||
class Schema(object):
|
class Schema(object):
|
||||||
|
@ -27,16 +27,11 @@ from glance.common import crypt
|
|||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import context
|
from glance import context
|
||||||
import glance.db as db_api
|
import glance.db as db_api
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE, _LI, _LW
|
||||||
import glance.registry.client.v1.api as registry
|
import glance.registry.client.v1.api as registry
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LI = i18n._LI
|
|
||||||
_LW = i18n._LW
|
|
||||||
_LE = i18n._LE
|
|
||||||
|
|
||||||
scrubber_opts = [
|
scrubber_opts = [
|
||||||
cfg.IntOpt('scrub_time', default=0,
|
cfg.IntOpt('scrub_time', default=0,
|
||||||
help=_('The amount of time in seconds to delay before '
|
help=_('The amount of time in seconds to delay before '
|
||||||
|
@ -29,14 +29,11 @@ from glance.common import exception
|
|||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
import glance.db
|
import glance.db
|
||||||
import glance.gateway
|
import glance.gateway
|
||||||
from glance import i18n
|
from glance.i18n import _, _LE
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
_ = i18n._
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
|
|
||||||
class ResourceTypeController(object):
|
class ResourceTypeController(object):
|
||||||
|
@ -53,9 +53,7 @@ from glance.db.sqlalchemy import models
|
|||||||
from glance.db.sqlalchemy import models_artifacts
|
from glance.db.sqlalchemy import models_artifacts
|
||||||
from glance.db.sqlalchemy import models_metadef
|
from glance.db.sqlalchemy import models_metadef
|
||||||
|
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('metadata_encryption_key', 'glance.common.config')
|
CONF.import_opt('metadata_encryption_key', 'glance.common.config')
|
||||||
|
@ -32,15 +32,13 @@ from glance.common import config
|
|||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance import context
|
from glance import context
|
||||||
from glance.db.sqlalchemy import api as db_api
|
from glance.db.sqlalchemy import api as db_api
|
||||||
from glance import i18n
|
from glance.i18n import _
|
||||||
from glance.registry.api import v2 as rserver
|
from glance.registry.api import v2 as rserver
|
||||||
import glance.registry.client.v2.api as rapi
|
import glance.registry.client.v2.api as rapi
|
||||||
from glance.registry.client.v2.api import client as rclient
|
from glance.registry.client.v2.api import client as rclient
|
||||||
from glance.tests.unit import base
|
from glance.tests.unit import base
|
||||||
from glance.tests import utils as test_utils
|
from glance.tests import utils as test_utils
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
|
|
||||||
_gen_uuid = lambda: str(uuid.uuid4())
|
_gen_uuid = lambda: str(uuid.uuid4())
|
||||||
|
|
||||||
UUID1 = str(uuid.uuid4())
|
UUID1 = str(uuid.uuid4())
|
||||||
|
@ -21,13 +21,9 @@ from oslo_log import log as logging
|
|||||||
|
|
||||||
import glance.context
|
import glance.context
|
||||||
import glance.db.sqlalchemy.api as db_api
|
import glance.db.sqlalchemy.api as db_api
|
||||||
from glance import i18n
|
from glance.i18n import _LC, _LE, _LI
|
||||||
import glance.registry.context
|
import glance.registry.context
|
||||||
|
|
||||||
_ = i18n._
|
|
||||||
_LC = i18n._LC
|
|
||||||
_LE = i18n._LE
|
|
||||||
_LI = i18n._LI
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
LOG.addHandler(logging.StreamHandler())
|
LOG.addHandler(logging.StreamHandler())
|
||||||
|
Loading…
Reference in New Issue
Block a user