Move from using _ builtin to using glance.i18n _
The builtin _ should not longer be used. Instead _ should be explicitly assigned from glance.i18n. This patch does the following: (1) adds these explict assignments to any glance file that was missing them, (2) removes the defintion of _ as a builtin from tox.ini so that a pep8 failure will occur if _ is not defined, (3) removes calls to install(). This removes the last direct use of gettextutils by glance. The indirect uses, via openstack/common, will be removed in the next sync with oslo. Change-Id: Ie54e8a67e747e022cc01022dfad35d89686bdfc4
This commit is contained in:
parent
fa7888d920
commit
3f2a56ae65
@ -18,6 +18,9 @@ import copy
|
|||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
import glance.domain.proxy
|
import glance.domain.proxy
|
||||||
|
from glance import i18n
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
|
|
||||||
def is_image_mutable(context, image):
|
def is_image_mutable(context, image):
|
||||||
|
@ -24,6 +24,7 @@ from glance import i18n
|
|||||||
from glance.openstack.common import log as logging
|
from glance.openstack.common import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
@ -20,9 +20,11 @@ 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.openstack.common import local
|
from glance.openstack.common import local
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
context_opts = [
|
context_opts = [
|
||||||
cfg.BoolOpt('owner_is_tenant', default=True,
|
cfg.BoolOpt('owner_is_tenant', default=True,
|
||||||
|
@ -29,7 +29,7 @@ import glance.openstack.common.log as logging
|
|||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import glance.openstack.common.log as logging
|
|||||||
from glance.openstack.common import policy
|
from glance.openstack.common import policy
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
|
@ -17,11 +17,13 @@ import glance_store as store
|
|||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
|
from glance import i18n
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
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):
|
||||||
|
@ -50,6 +50,7 @@ import glance.openstack.common.log as logging
|
|||||||
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._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
@ -22,10 +22,12 @@ 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
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
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')
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ 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
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
@ -28,6 +28,7 @@ import glance.openstack.common.log as logging
|
|||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ import glance.openstack.common.log as logging
|
|||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -38,6 +38,7 @@ import glance.openstack.common.log as logging
|
|||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
|
@ -34,6 +34,7 @@ import glance.openstack.common.log as logging
|
|||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ import glance.openstack.common.log as logging
|
|||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ import glance.openstack.common.log as logging
|
|||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ import glance.openstack.common.log as logging
|
|||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -20,7 +20,9 @@ from oslo.serialization import jsonutils
|
|||||||
import webob.dec
|
import webob.dec
|
||||||
|
|
||||||
from glance.common import wsgi
|
from glance.common import wsgi
|
||||||
|
from glance import i18n
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
versions_opts = [
|
versions_opts = [
|
||||||
cfg.StrOpt('public_endpoint', default=None,
|
cfg.StrOpt('public_endpoint', default=None,
|
||||||
|
@ -16,4 +16,3 @@
|
|||||||
from glance import i18n
|
from glance import i18n
|
||||||
|
|
||||||
i18n.enable_lazy()
|
i18n.enable_lazy()
|
||||||
i18n.install('glance')
|
|
||||||
|
@ -44,7 +44,9 @@ from oslo.utils import units
|
|||||||
from six.moves import xrange
|
from six.moves import xrange
|
||||||
|
|
||||||
from glance.common import config
|
from glance.common import config
|
||||||
|
from glance import i18n
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ from glance import i18n
|
|||||||
from glance.openstack.common import log
|
from glance.openstack.common import log
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
@ -33,10 +33,12 @@ from oslo.serialization import jsonutils
|
|||||||
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
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
|
|
||||||
class BaseStrategy(object):
|
class BaseStrategy(object):
|
||||||
|
@ -48,9 +48,11 @@ from six.moves import xrange
|
|||||||
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
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
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
|
||||||
|
@ -27,8 +27,11 @@ import os
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from paste import deploy
|
from paste import deploy
|
||||||
|
|
||||||
|
from glance import i18n
|
||||||
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,6 +19,10 @@
|
|||||||
import six
|
import six
|
||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
|
|
||||||
|
from glance import i18n
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
_FATAL_EXCEPTION_FORMAT_ERRORS = False
|
_FATAL_EXCEPTION_FORMAT_ERRORS = False
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,8 +18,11 @@ import copy
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import stevedore
|
import stevedore
|
||||||
|
|
||||||
|
from glance import i18n
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
location_strategy_opts = [
|
location_strategy_opts = [
|
||||||
cfg.StrOpt('location_strategy', default='location_order',
|
cfg.StrOpt('location_strategy', default='location_order',
|
||||||
help=_("This value sets what strategy will be used to "
|
help=_("This value sets what strategy will be used to "
|
||||||
|
@ -19,6 +19,10 @@ 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
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
store_type_opts = [
|
store_type_opts = [
|
||||||
cfg.ListOpt("store_type_preference",
|
cfg.ListOpt("store_type_preference",
|
||||||
default=[],
|
default=[],
|
||||||
|
@ -23,6 +23,7 @@ from oslo.config import cfg
|
|||||||
|
|
||||||
import glance.api.policy
|
import glance.api.policy
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
|
from glance import i18n
|
||||||
from glance.openstack.common import log as logging
|
from glance.openstack.common import log as logging
|
||||||
from glance.openstack.common import policy
|
from glance.openstack.common import policy
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ from glance.openstack.common import policy
|
|||||||
# 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._
|
||||||
|
|
||||||
property_opts = [
|
property_opts = [
|
||||||
cfg.StrOpt('property_protection_file',
|
cfg.StrOpt('property_protection_file',
|
||||||
|
@ -29,9 +29,11 @@ from glance.common import client
|
|||||||
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
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
|
|
||||||
rpc_opts = [
|
rpc_opts = [
|
||||||
|
@ -30,10 +30,11 @@ from glance.openstack.common import lockutils
|
|||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def run(t_id, context, task_repo, image_repo, image_factory):
|
def run(t_id, context, task_repo, image_repo, image_factory):
|
||||||
|
@ -29,8 +29,9 @@ from glance import i18n
|
|||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
|
|
||||||
_LE = i18n._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):
|
||||||
|
@ -23,11 +23,11 @@ from glance import i18n
|
|||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
from glance import scrubber
|
from glance import scrubber
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
store_utils_opts = [
|
store_utils_opts = [
|
||||||
cfg.BoolOpt('use_user_token', default=True,
|
cfg.BoolOpt('use_user_token', default=True,
|
||||||
help=_('Whether to pass through the user token when '
|
help=_('Whether to pass through the user token when '
|
||||||
|
@ -21,8 +21,11 @@ except ImportError:
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
|
from glance import i18n
|
||||||
from glance.openstack.common import log as logging
|
from glance.openstack.common import log as logging
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
swift_opts = [
|
swift_opts = [
|
||||||
cfg.StrOpt('default_swift_reference',
|
cfg.StrOpt('default_swift_reference',
|
||||||
default="ref1",
|
default="ref1",
|
||||||
|
@ -46,11 +46,13 @@ import six
|
|||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
|
from glance import i18n
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
FEATURE_BLACKLIST = ['content-length', 'content-type', 'x-image-meta-size']
|
FEATURE_BLACKLIST = ['content-length', 'content-type', 'x-image-meta-size']
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ from glance import i18n
|
|||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
from glance.openstack.common import processutils
|
from glance.openstack.common import processutils
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
bind_opts = [
|
bind_opts = [
|
||||||
cfg.StrOpt('bind_host', default='0.0.0.0',
|
cfg.StrOpt('bind_host', default='0.0.0.0',
|
||||||
|
@ -26,6 +26,9 @@ 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
|
||||||
|
|
||||||
|
_ = 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')
|
||||||
|
@ -27,6 +27,7 @@ import glance.openstack.common.log as logging
|
|||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ import glance.openstack.common.log as os_logging
|
|||||||
BASE = models.BASE
|
BASE = models.BASE
|
||||||
sa_logger = None
|
sa_logger = None
|
||||||
LOG = os_logging.getLogger(__name__)
|
LOG = os_logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ from glance import i18n
|
|||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
|
@ -25,6 +25,7 @@ from glance import i18n
|
|||||||
import glance.openstack.common.log as os_logging
|
import glance.openstack.common.log as os_logging
|
||||||
|
|
||||||
LOG = os_logging.getLogger(__name__)
|
LOG = os_logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ from glance import i18n
|
|||||||
import glance.openstack.common.log as os_logging
|
import glance.openstack.common.log as os_logging
|
||||||
|
|
||||||
LOG = os_logging.getLogger(__name__)
|
LOG = os_logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ from glance import i18n
|
|||||||
import glance.openstack.common.log as os_logging
|
import glance.openstack.common.log as os_logging
|
||||||
|
|
||||||
LOG = os_logging.getLogger(__name__)
|
LOG = os_logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ from glance import i18n
|
|||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ from glance import i18n
|
|||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
@ -28,6 +28,7 @@ from glance.common import exception
|
|||||||
from glance import i18n
|
from glance import i18n
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -30,6 +30,7 @@ from glance import i18n
|
|||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
@ -19,6 +19,9 @@ 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
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
|
|
||||||
class CacheClient(base_client.BaseClient):
|
class CacheClient(base_client.BaseClient):
|
||||||
|
@ -23,9 +23,11 @@ from oslo.config import cfg
|
|||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
|
from glance import i18n
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ from glance.image_cache.drivers import base
|
|||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
@ -26,7 +26,7 @@ import glance.domain.proxy
|
|||||||
from glance import i18n
|
from glance import i18n
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -24,8 +24,11 @@ import webob
|
|||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
from glance.common import utils
|
from glance.common import utils
|
||||||
import glance.domain.proxy
|
import glance.domain.proxy
|
||||||
|
from glance import i18n
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
notifier_opts = [
|
notifier_opts = [
|
||||||
cfg.StrOpt('default_publisher_id', default="image.localhost",
|
cfg.StrOpt('default_publisher_id', default="image.localhost",
|
||||||
help='Default publisher_id for outgoing notifications.'),
|
help='Default publisher_id for outgoing notifications.'),
|
||||||
|
@ -35,7 +35,6 @@ import glance.common.wsgi
|
|||||||
import glance.image_cache
|
import glance.image_cache
|
||||||
import glance.image_cache.drivers.sqlite
|
import glance.image_cache.drivers.sqlite
|
||||||
import glance.notifier
|
import glance.notifier
|
||||||
from glance.openstack.common import gettextutils
|
|
||||||
import glance.openstack.common.lockutils
|
import glance.openstack.common.lockutils
|
||||||
import glance.openstack.common.log
|
import glance.openstack.common.log
|
||||||
import glance.registry
|
import glance.registry
|
||||||
@ -43,10 +42,6 @@ import glance.registry.client
|
|||||||
import glance.registry.client.v1.api
|
import glance.registry.client.v1.api
|
||||||
import glance.scrubber
|
import glance.scrubber
|
||||||
|
|
||||||
# TODO(zhiyan): Remove translation from in-line
|
|
||||||
# help message of option definition code.
|
|
||||||
gettextutils.install('glance', lazy=False)
|
|
||||||
|
|
||||||
|
|
||||||
_global_opt_lists = [
|
_global_opt_lists = [
|
||||||
glance.openstack.common.log.common_cli_opts,
|
glance.openstack.common.log.common_cli_opts,
|
||||||
|
@ -29,6 +29,7 @@ import glance.openstack.common.log as logging
|
|||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LI = i18n._LI
|
_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')
|
||||||
|
@ -19,6 +19,9 @@ Registry API
|
|||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
|
from glance import i18n
|
||||||
|
|
||||||
|
_ = 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',
|
||||||
|
@ -31,6 +31,7 @@ import glance.openstack.common.log as logging
|
|||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
@ -24,6 +24,7 @@ import glance.openstack.common.log as logging
|
|||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
|
|
||||||
|
@ -22,10 +22,12 @@ 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
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
|
from glance import i18n
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
registry_client_opts = [
|
registry_client_opts = [
|
||||||
cfg.StrOpt('registry_client_protocol', default='http',
|
cfg.StrOpt('registry_client_protocol', default='http',
|
||||||
help=_('The protocol to use for communication with the '
|
help=_('The protocol to use for communication with the '
|
||||||
|
@ -23,10 +23,12 @@ from oslo.config import cfg
|
|||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
|
from glance import i18n
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
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,
|
||||||
|
@ -22,10 +22,12 @@ import os
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from glance.common import exception
|
from glance.common import exception
|
||||||
|
from glance import i18n
|
||||||
import glance.openstack.common.log as logging
|
import glance.openstack.common.log as logging
|
||||||
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,6 +18,9 @@ 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
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
|
|
||||||
|
|
||||||
class Schema(object):
|
class Schema(object):
|
||||||
|
@ -34,6 +34,7 @@ import glance.registry.client.v1.api as registry
|
|||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
_ = i18n._
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
_LW = i18n._LW
|
_LW = i18n._LW
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
|
@ -34,6 +34,7 @@ import glance.openstack.common.log as logging
|
|||||||
import glance.schema
|
import glance.schema
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
_ = i18n._
|
||||||
_LE = i18n._LE
|
_LE = i18n._LE
|
||||||
_LI = i18n._LI
|
_LI = i18n._LI
|
||||||
|
|
||||||
|
@ -48,7 +48,9 @@ from glance.db import migration
|
|||||||
from glance.db.sqlalchemy import migrate_repo
|
from glance.db.sqlalchemy import migrate_repo
|
||||||
from glance.db.sqlalchemy.migrate_repo.schema import from_migration_import
|
from glance.db.sqlalchemy.migrate_repo.schema import from_migration_import
|
||||||
from glance.db.sqlalchemy import models
|
from glance.db.sqlalchemy import models
|
||||||
|
from glance import i18n
|
||||||
|
|
||||||
|
_ = 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')
|
||||||
|
@ -31,12 +31,14 @@ 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.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())
|
||||||
|
|
||||||
|
1
tox.ini
1
tox.ini
@ -50,7 +50,6 @@ commands = python setup.py build_sphinx
|
|||||||
# H405 multi line docstring summary not separated with an empty line
|
# H405 multi line docstring summary not separated with an empty line
|
||||||
# H904 Wrap long lines in parentheses instead of a backslash
|
# H904 Wrap long lines in parentheses instead of a backslash
|
||||||
ignore = E711,E712,H302,H402,H404,H405,H904
|
ignore = E711,E712,H302,H402,H404,H405,H904
|
||||||
builtins = _
|
|
||||||
exclude = .venv,.git,.tox,dist,doc,etc,*glance/locale*,*openstack/common*,*lib/python*,*egg,build
|
exclude = .venv,.git,.tox,dist,doc,etc,*glance/locale*,*openstack/common*,*lib/python*,*egg,build
|
||||||
|
|
||||||
[hacking]
|
[hacking]
|
||||||
|
Loading…
Reference in New Issue
Block a user