Use oslo.i18n
oslo.i18n provides the i18n function that were provided by oslo-incubator's gettextutils module Import _ where needed, oslo.i18n deprecated the builtin method. Closes-Bug: #1382187 Change-Id: I12aa1c725aa4bb52a9aa46e9c3d2b303839de48b
This commit is contained in:
parent
732ccbc661
commit
7b659fc4e0
@ -39,9 +39,11 @@ possible_topdir = os.path.normpath(os.path.join
|
|||||||
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
|
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
from manila.openstack.common import gettextutils
|
from manila import i18n
|
||||||
gettextutils.install('manila')
|
i18n.enable_lazy()
|
||||||
|
|
||||||
from manila.common import config # Need to register global_opts # noqa
|
from manila.common import config # Need to register global_opts # noqa
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import service
|
from manila import service
|
||||||
from manila import utils
|
from manila import utils
|
||||||
|
@ -36,8 +36,9 @@ possible_topdir = os.path.normpath(os.path.join
|
|||||||
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
|
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
from manila.openstack.common import gettextutils
|
from manila import i18n
|
||||||
gettextutils.install('manila')
|
i18n.enable_lazy()
|
||||||
|
|
||||||
from manila.common import config # Need to register global_opts # noqa
|
from manila.common import config # Need to register global_opts # noqa
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import service
|
from manila import service
|
||||||
|
@ -67,8 +67,8 @@ POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
|||||||
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'manila', '__init__.py')):
|
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'manila', '__init__.py')):
|
||||||
sys.path.insert(0, POSSIBLE_TOPDIR)
|
sys.path.insert(0, POSSIBLE_TOPDIR)
|
||||||
|
|
||||||
from manila.openstack.common import gettextutils
|
from manila import i18n
|
||||||
gettextutils.install('manila')
|
i18n.enable_lazy()
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
@ -76,6 +76,7 @@ from manila.common import config # Need to register global_opts # noqa
|
|||||||
from manila import context
|
from manila import context
|
||||||
from manila import db
|
from manila import db
|
||||||
from manila.db import migration
|
from manila.db import migration
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common import uuidutils
|
from manila.openstack.common import uuidutils
|
||||||
from manila import utils
|
from manila import utils
|
||||||
|
@ -34,8 +34,8 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
|||||||
if os.path.exists(os.path.join(possible_topdir, 'manila', '__init__.py')):
|
if os.path.exists(os.path.join(possible_topdir, 'manila', '__init__.py')):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
from manila.openstack.common import gettextutils
|
from manila import i18n
|
||||||
gettextutils.install('manila')
|
i18n.enable_lazy()
|
||||||
from manila.common import config # Need to register global_opts # noqa
|
from manila.common import config # Need to register global_opts # noqa
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import service
|
from manila import service
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from manila.api.middleware import auth
|
from manila.api.middleware import auth
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ import webob
|
|||||||
|
|
||||||
from manila.api.openstack import wsgi
|
from manila.api.openstack import wsgi
|
||||||
from manila.api import xmlutil
|
from manila.api import xmlutil
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import utils
|
from manila import utils
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ from manila.api import xmlutil
|
|||||||
from manila import db
|
from manila import db
|
||||||
from manila.db.sqlalchemy import api as sqlalchemy_api
|
from manila.db.sqlalchemy import api as sqlalchemy_api
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common import strutils
|
from manila.openstack.common import strutils
|
||||||
from manila import quota
|
from manila import quota
|
||||||
|
@ -21,6 +21,7 @@ from manila.api import extensions
|
|||||||
from manila.api.openstack import wsgi
|
from manila.api.openstack import wsgi
|
||||||
from manila.api import xmlutil
|
from manila.api import xmlutil
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila import share
|
from manila import share
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ from manila.api import extensions
|
|||||||
from manila.api.openstack import wsgi
|
from manila.api.openstack import wsgi
|
||||||
from manila import db
|
from manila import db
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila import rpc
|
from manila import rpc
|
||||||
from manila.share import volume_types
|
from manila.share import volume_types
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ import manila.api.openstack
|
|||||||
from manila.api.openstack import wsgi
|
from manila.api.openstack import wsgi
|
||||||
from manila.api import xmlutil
|
from manila.api import xmlutil
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import importutils
|
from manila.openstack.common import importutils
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
import manila.policy
|
import manila.policy
|
||||||
|
@ -24,6 +24,7 @@ import webob.exc
|
|||||||
|
|
||||||
from manila.api.openstack import wsgi
|
from manila.api.openstack import wsgi
|
||||||
from manila import context
|
from manila import context
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import jsonutils
|
from manila.openstack.common import jsonutils
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import wsgi as base_wsgi
|
from manila import wsgi as base_wsgi
|
||||||
|
@ -19,6 +19,7 @@ import webob.dec
|
|||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from manila.api.openstack import wsgi
|
from manila.api.openstack import wsgi
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import utils
|
from manila import utils
|
||||||
from manila import wsgi as base_wsgi
|
from manila import wsgi as base_wsgi
|
||||||
|
@ -21,6 +21,7 @@ import webob.dec
|
|||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import wsgi
|
from manila import wsgi
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ import routes
|
|||||||
|
|
||||||
from manila.api.openstack import wsgi
|
from manila.api.openstack import wsgi
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
from manila.i18n import _
|
||||||
from manila import utils
|
from manila import utils
|
||||||
from manila import wsgi as base_wsgi
|
from manila import wsgi as base_wsgi
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
from manila.api import urlmap
|
from manila.api import urlmap
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
from manila.i18n import _
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from manila.api.v1.router import APIRouter as v1_router
|
from manila.api.v1.router import APIRouter as v1_router
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from manila.api import versions
|
from manila.api import versions
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ import time
|
|||||||
import webob
|
import webob
|
||||||
|
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import jsonutils
|
from manila.openstack.common import jsonutils
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import utils
|
from manila import utils
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from manila.api.middleware import sizelimit
|
from manila.api.middleware import sizelimit
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
@ -30,6 +30,7 @@ import webob.exc
|
|||||||
from manila.api.openstack import wsgi
|
from manila.api.openstack import wsgi
|
||||||
from manila.api.views import limits as limits_views
|
from manila.api.views import limits as limits_views
|
||||||
from manila.api import xmlutil
|
from manila.api import xmlutil
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import importutils
|
from manila.openstack.common import importutils
|
||||||
from manila.openstack.common import jsonutils
|
from manila.openstack.common import jsonutils
|
||||||
from manila import quota
|
from manila import quota
|
||||||
|
@ -26,6 +26,7 @@ from manila.api import xmlutil
|
|||||||
from manila.common import constants
|
from manila.common import constants
|
||||||
from manila import db
|
from manila import db
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import policy
|
from manila import policy
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ from webob import exc
|
|||||||
from manila.api import common
|
from manila.api import common
|
||||||
from manila.api.openstack import wsgi
|
from manila.api.openstack import wsgi
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila import share
|
from manila import share
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ from manila.api.views import share_networks as share_networks_views
|
|||||||
from manila.api import xmlutil
|
from manila.api import xmlutil
|
||||||
from manila.db import api as db_api
|
from manila.db import api as db_api
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import policy
|
from manila import policy
|
||||||
from manila import quota
|
from manila import quota
|
||||||
|
@ -23,6 +23,7 @@ from manila.api import xmlutil
|
|||||||
from manila.common import constants
|
from manila.common import constants
|
||||||
from manila.db import api as db_api
|
from manila.db import api as db_api
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import policy
|
from manila import policy
|
||||||
from manila import share
|
from manila import share
|
||||||
|
@ -24,6 +24,7 @@ from manila.api.openstack import wsgi
|
|||||||
from manila.api.views import share_snapshots as snapshot_views
|
from manila.api.views import share_snapshots as snapshot_views
|
||||||
from manila.api import xmlutil
|
from manila.api import xmlutil
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import share
|
from manila import share
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ from manila.api.openstack import wsgi
|
|||||||
from manila.api.views import shares as share_views
|
from manila.api.views import shares as share_views
|
||||||
from manila.api import xmlutil
|
from manila.api import xmlutil
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common import uuidutils
|
from manila.openstack.common import uuidutils
|
||||||
from manila import share
|
from manila import share
|
||||||
|
@ -19,6 +19,7 @@ from webob import exc
|
|||||||
from manila.api.openstack import wsgi
|
from manila.api.openstack import wsgi
|
||||||
from manila.api.views import types as views_types
|
from manila.api.views import types as views_types
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.share import volume_types
|
from manila.share import volume_types
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ import os.path
|
|||||||
from lxml import etree
|
from lxml import etree
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila import utils
|
from manila import utils
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ import socket
|
|||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import copy
|
|||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import context as common_context
|
from manila.openstack.common import context as common_context
|
||||||
from manila.openstack.common import local
|
from manila.openstack.common import local
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
@ -28,6 +28,7 @@ from alembic import op
|
|||||||
from sqlalchemy import Boolean, Column, DateTime, ForeignKey
|
from sqlalchemy import Boolean, Column, DateTime, ForeignKey
|
||||||
from sqlalchemy import Integer, MetaData, String, Table, UniqueConstraint
|
from sqlalchemy import Integer, MetaData, String, Table, UniqueConstraint
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ from sqlalchemy.sql import func
|
|||||||
from manila.common import constants
|
from manila.common import constants
|
||||||
from manila.db.sqlalchemy import models
|
from manila.db.sqlalchemy import models
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common import timeutils
|
from manila.openstack.common import timeutils
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ from oslo.config import cfg
|
|||||||
import six
|
import six
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common import processutils
|
from manila.openstack.common import processutils
|
||||||
|
|
||||||
|
71
manila/i18n.py
Normal file
71
manila/i18n.py
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# Copyright 2014 IBM Corp.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
"""oslo.i18n integration module.
|
||||||
|
|
||||||
|
See http://docs.openstack.org/developer/oslo.i18n/usage.html .
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from oslo import i18n
|
||||||
|
|
||||||
|
from manila.openstack.common import gettextutils
|
||||||
|
|
||||||
|
DOMAIN = 'manila'
|
||||||
|
|
||||||
|
_translators = i18n.TranslatorFactory(domain=DOMAIN)
|
||||||
|
|
||||||
|
# The primary translation function using the well-known name "_"
|
||||||
|
_ = _translators.primary
|
||||||
|
|
||||||
|
# Translators for log levels.
|
||||||
|
#
|
||||||
|
# The abbreviated names are meant to reflect the usual use of a short
|
||||||
|
# name like '_'. The "L" is for "log" and the other letter comes from
|
||||||
|
# the level.
|
||||||
|
_LI = _translators.log_info
|
||||||
|
_LW = _translators.log_warning
|
||||||
|
_LE = _translators.log_error
|
||||||
|
_LC = _translators.log_critical
|
||||||
|
|
||||||
|
|
||||||
|
def enable_lazy():
|
||||||
|
return i18n.enable_lazy()
|
||||||
|
|
||||||
|
|
||||||
|
def translate(value, user_locale):
|
||||||
|
return i18n.translate(value, user_locale)
|
||||||
|
|
||||||
|
|
||||||
|
def get_available_languages():
|
||||||
|
return i18n.get_available_languages(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
|
# Parts in oslo-incubator are still using gettextutils._(), _LI(), etc., from
|
||||||
|
# oslo-incubator. Until these parts are changed to use oslo.i18n, Manila
|
||||||
|
# needs to do something to allow them to work. One option is to continue to
|
||||||
|
# initialize gettextutils, but with the way that manila has initialization
|
||||||
|
# spread out over multiple entry points, we'll monkey-patch
|
||||||
|
# gettextutils._(), _LI(), etc., to use our oslo.i18n versions.
|
||||||
|
|
||||||
|
# FIXME(jaegerandi): Remove the monkey-patching and update
|
||||||
|
# openstack-common.conf and do a sync with oslo-incubator to remove
|
||||||
|
# gettextutils once oslo-incubator isn't using oslo-incubator
|
||||||
|
# gettextutils any more.
|
||||||
|
|
||||||
|
gettextutils._ = _
|
||||||
|
gettextutils._LI = _LI
|
||||||
|
gettextutils._LW = _LW
|
||||||
|
gettextutils._LE = _LE
|
||||||
|
gettextutils._LC = _LC
|
@ -55,6 +55,7 @@ from oslo.config import cfg
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from manila.db import base
|
from manila.db import base
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.scheduler import rpcapi as scheduler_rpcapi
|
from manila.scheduler import rpcapi as scheduler_rpcapi
|
||||||
from manila import version
|
from manila import version
|
||||||
|
@ -20,6 +20,7 @@ from oslo.config import cfg
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.network.linux import ip_lib
|
from manila.network.linux import ip_lib
|
||||||
from manila.network.linux import ovs_lib
|
from manila.network.linux import ovs_lib
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
import netaddr
|
import netaddr
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila import utils
|
from manila import utils
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import utils
|
from manila import utils
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ from oslo.config import cfg
|
|||||||
from manila import context
|
from manila import context
|
||||||
from manila.db import base
|
from manila.db import base
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.network import neutron
|
from manila.network import neutron
|
||||||
from manila.network.neutron import constants as neutron_constants
|
from manila.network.neutron import constants as neutron_constants
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
@ -23,6 +23,7 @@ import six
|
|||||||
|
|
||||||
from manila import db
|
from manila import db
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import importutils
|
from manila.openstack.common import importutils
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common import timeutils
|
from manila.openstack.common import timeutils
|
||||||
|
@ -24,6 +24,7 @@ import random
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.scheduler import driver
|
from manila.scheduler import driver
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -22,6 +22,7 @@ Scheduler base class that all Schedulers should inherit from
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from manila import db
|
from manila import db
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import importutils
|
from manila.openstack.common import importutils
|
||||||
from manila.openstack.common import timeutils
|
from manila.openstack.common import timeutils
|
||||||
from manila.share import rpcapi as share_rpcapi
|
from manila.share import rpcapi as share_rpcapi
|
||||||
|
@ -23,6 +23,7 @@ Weighing Functions.
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.scheduler import driver
|
from manila.scheduler import driver
|
||||||
from manila.scheduler import scheduler_options
|
from manila.scheduler import scheduler_options
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common.scheduler import filters
|
from manila.openstack.common.scheduler import filters
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ import six
|
|||||||
|
|
||||||
from manila import db
|
from manila import db
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common.scheduler import filters
|
from manila.openstack.common.scheduler import filters
|
||||||
from manila.openstack.common.scheduler import weights
|
from manila.openstack.common.scheduler import weights
|
||||||
|
@ -24,6 +24,7 @@ from oslo.config import cfg
|
|||||||
from manila import context
|
from manila import context
|
||||||
from manila import db
|
from manila import db
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila import manager
|
from manila import manager
|
||||||
from manila.openstack.common import excutils
|
from manila.openstack.common import excutils
|
||||||
from manila.openstack.common import importutils
|
from manila.openstack.common import importutils
|
||||||
|
@ -25,6 +25,7 @@ import os
|
|||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import jsonutils
|
from manila.openstack.common import jsonutils
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common import timeutils
|
from manila.openstack.common import timeutils
|
||||||
|
@ -23,6 +23,7 @@ from oslo.config import cfg
|
|||||||
|
|
||||||
from manila import db
|
from manila import db
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.scheduler import chance
|
from manila.scheduler import chance
|
||||||
from manila.scheduler import driver
|
from manila.scheduler import driver
|
||||||
from manila import utils
|
from manila import utils
|
||||||
|
@ -33,6 +33,7 @@ from oslo import messaging
|
|||||||
from manila import context
|
from manila import context
|
||||||
from manila import db
|
from manila import db
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import importutils
|
from manila.openstack.common import importutils
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common import loopingcall
|
from manila.openstack.common import loopingcall
|
||||||
|
@ -24,6 +24,7 @@ import six
|
|||||||
from manila.api import extensions
|
from manila.api import extensions
|
||||||
from manila.db import base
|
from manila.db import base
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import excutils
|
from manila.openstack.common import excutils
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common import timeutils
|
from manila.openstack.common import timeutils
|
||||||
|
@ -20,6 +20,7 @@ Drivers for shares.
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila import utils
|
from manila import utils
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ import six
|
|||||||
|
|
||||||
from manila import db as manila_db
|
from manila import db as manila_db
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import excutils
|
from manila.openstack.common import excutils
|
||||||
from manila.openstack.common import log
|
from manila.openstack.common import log
|
||||||
from manila.share.drivers.emc.plugins import base as driver
|
from manila.share.drivers.emc.plugins import base as driver
|
||||||
|
@ -22,6 +22,7 @@ from six.moves.urllib import error as url_error # pylint: disable=E0611
|
|||||||
from six.moves.urllib import request as url_request # pylint: disable=E0611
|
from six.moves.urllib import request as url_request # pylint: disable=E0611
|
||||||
|
|
||||||
import manila.exception
|
import manila.exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import lockutils
|
from manila.openstack.common import lockutils
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.share.drivers.emc.plugins.vnx import constants
|
from manila.share.drivers.emc.plugins.vnx import constants
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
import types
|
import types
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log
|
from manila.openstack.common import log
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ from manila.common import constants as const
|
|||||||
from manila import compute
|
from manila import compute
|
||||||
from manila import context
|
from manila import context
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import excutils
|
from manila.openstack.common import excutils
|
||||||
from manila.openstack.common import importutils
|
from manila.openstack.common import importutils
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
@ -30,6 +30,7 @@ import re
|
|||||||
import xml.etree.cElementTree as etree
|
import xml.etree.cElementTree as etree
|
||||||
|
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.share import driver
|
from manila.share import driver
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ from oslo.config import cfg
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.share import driver
|
from manila.share import driver
|
||||||
from manila.share.drivers import glusterfs
|
from manila.share.drivers import glusterfs
|
||||||
|
@ -22,6 +22,7 @@ import urllib2
|
|||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log
|
from manila.openstack.common import log
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ import six
|
|||||||
|
|
||||||
from manila import context
|
from manila import context
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import excutils
|
from manila.openstack.common import excutils
|
||||||
from manila.openstack.common import log
|
from manila.openstack.common import log
|
||||||
from manila.share import driver
|
from manila.share import driver
|
||||||
|
@ -28,6 +28,7 @@ from manila.common import constants
|
|||||||
from manila import compute
|
from manila import compute
|
||||||
from manila import context
|
from manila import context
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.network.linux import ip_lib
|
from manila.network.linux import ip_lib
|
||||||
from manila.network.neutron import api as neutron
|
from manila.network.neutron import api as neutron
|
||||||
from manila.openstack.common import importutils
|
from manila.openstack.common import importutils
|
||||||
|
@ -25,6 +25,7 @@ import six
|
|||||||
from manila.common import constants
|
from manila.common import constants
|
||||||
from manila import context
|
from manila import context
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila import manager
|
from manila import manager
|
||||||
from manila import network
|
from manila import network
|
||||||
from manila.openstack.common import excutils
|
from manila.openstack.common import excutils
|
||||||
|
@ -22,6 +22,7 @@ import six
|
|||||||
from manila import context
|
from manila import context
|
||||||
from manila import db
|
from manila import db
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -24,6 +24,7 @@ from oslo.db.sqlalchemy import test_migrations
|
|||||||
from sqlalchemy.sql import text
|
from sqlalchemy.sql import text
|
||||||
|
|
||||||
from manila.db.migrations.alembic import migration
|
from manila.db.migrations.alembic import migration
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger('manila.tests.test_migrations')
|
LOG = logging.getLogger('manila.tests.test_migrations')
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
import httplib
|
import httplib
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import jsonutils
|
from manila.openstack.common import jsonutils
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ import paramiko
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import excutils
|
from manila.openstack.common import excutils
|
||||||
from manila.openstack.common import importutils
|
from manila.openstack.common import importutils
|
||||||
from manila.openstack.common import lockutils
|
from manila.openstack.common import lockutils
|
||||||
|
@ -27,6 +27,7 @@ from oslo.config import cfg
|
|||||||
|
|
||||||
from manila.db import base
|
from manila.db import base
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ import webob.dec
|
|||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from manila import exception
|
from manila import exception
|
||||||
|
from manila.i18n import _
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
|
|
||||||
socket_opts = [
|
socket_opts = [
|
||||||
|
@ -6,7 +6,6 @@ module=context
|
|||||||
module=eventlet_backdoor
|
module=eventlet_backdoor
|
||||||
module=excutils
|
module=excutils
|
||||||
module=fileutils
|
module=fileutils
|
||||||
module=gettextutils
|
|
||||||
module=importutils
|
module=importutils
|
||||||
module=jsonutils
|
module=jsonutils
|
||||||
module=local
|
module=local
|
||||||
|
Loading…
Reference in New Issue
Block a user