Remove deprecated function i18n.install('heat')
Since i18n.install() is deprecated, remove it from heat codes and import i18n._() to where it needed. blueprint oslo-i18n Change-Id: Icefada18b5a33112b425cd90d31d3a6a5f06188a
This commit is contained in:
parent
ce2cc9f6f6
commit
11c1b62052
@ -13,6 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine.resources.neutron import neutron
|
from heat.engine.resources.neutron import neutron
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import clients
|
from heat.engine import clients
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import clients
|
from heat.engine import clients
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import clients
|
from heat.engine import clients
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -17,6 +17,3 @@
|
|||||||
from oslo import i18n
|
from oslo import i18n
|
||||||
|
|
||||||
i18n.enable_lazy()
|
i18n.enable_lazy()
|
||||||
# fixme(elynn): Since install() is deprecated, we should remove it in
|
|
||||||
# the future
|
|
||||||
i18n.install('heat')
|
|
||||||
|
@ -14,17 +14,11 @@
|
|||||||
import routes
|
import routes
|
||||||
from webob import Request
|
from webob import Request
|
||||||
|
|
||||||
from oslo import i18n
|
|
||||||
|
|
||||||
from heat.api.cloudwatch import versions
|
from heat.api.cloudwatch import versions
|
||||||
from heat.api.cloudwatch import watch
|
from heat.api.cloudwatch import watch
|
||||||
from heat.api.middleware.version_negotiation import VersionNegotiationFilter
|
from heat.api.middleware.version_negotiation import VersionNegotiationFilter
|
||||||
from heat.common import wsgi
|
from heat.common import wsgi
|
||||||
|
|
||||||
# FIXME(elynn): Since install() is deprecated, we should remove it in the
|
|
||||||
# future.
|
|
||||||
i18n.install('heat')
|
|
||||||
|
|
||||||
|
|
||||||
class API(wsgi.Router):
|
class API(wsgi.Router):
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
from heat.api.openstack.v1 import util
|
from heat.api.openstack.v1 import util
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import serializers
|
from heat.common import serializers
|
||||||
from heat.common import wsgi
|
from heat.common import wsgi
|
||||||
from heat.rpc import client as rpc_client
|
from heat.rpc import client as rpc_client
|
||||||
|
@ -16,6 +16,7 @@ import itertools
|
|||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
from heat.api.openstack.v1 import util
|
from heat.api.openstack.v1 import util
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import identifier
|
from heat.common import identifier
|
||||||
from heat.common import serializers
|
from heat.common import serializers
|
||||||
from heat.common import wsgi
|
from heat.common import wsgi
|
||||||
|
@ -22,6 +22,7 @@ from webob import exc
|
|||||||
from heat.api.openstack.v1 import util
|
from heat.api.openstack.v1 import util
|
||||||
from heat.api.openstack.v1.views import stacks_view
|
from heat.api.openstack.v1.views import stacks_view
|
||||||
from heat.common import environment_format
|
from heat.common import environment_format
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common.i18n import _LW
|
from heat.common.i18n import _LW
|
||||||
from heat.common import identifier
|
from heat.common import identifier
|
||||||
from heat.common import param_utils
|
from heat.common import param_utils
|
||||||
|
@ -21,6 +21,7 @@ import sys
|
|||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.db import api
|
from heat.db import api
|
||||||
from heat.db import utils
|
from heat.db import utils
|
||||||
from heat.openstack.common import log
|
from heat.openstack.common import log
|
||||||
|
@ -19,6 +19,7 @@ from oslo.utils import importutils
|
|||||||
from webob.exc import HTTPBadRequest
|
from webob.exc import HTTPBadRequest
|
||||||
from webob.exc import HTTPUnauthorized
|
from webob.exc import HTTPUnauthorized
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import wsgi
|
from heat.common import wsgi
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ import os
|
|||||||
from eventlet.green import socket
|
from eventlet.green import socket
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import wsgi
|
from heat.common import wsgi
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ import logging
|
|||||||
|
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from heat.openstack.common.gettextutils import _
|
from heat.common.i18n import _
|
||||||
from heat.openstack.common import local
|
from heat.openstack.common import local
|
||||||
from heat.rpc import client as rpc_client
|
from heat.rpc import client as rpc_client
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common.template_format import yaml
|
from heat.common.template_format import yaml
|
||||||
from heat.common.template_format import yaml_loader
|
from heat.common.template_format import yaml_loader
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ import sys
|
|||||||
import six
|
import six
|
||||||
from six.moves.urllib import parse as urlparse
|
from six.moves.urllib import parse as urlparse
|
||||||
|
|
||||||
from heat.openstack.common.gettextutils import _
|
from heat.common.i18n import _
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
from oslo import i18n
|
from oslo import i18n
|
||||||
|
|
||||||
|
from heat.openstack.common import gettextutils
|
||||||
|
|
||||||
|
|
||||||
_translators = i18n.TranslatorFactory(domain='heat')
|
_translators = i18n.TranslatorFactory(domain='heat')
|
||||||
|
|
||||||
@ -33,3 +35,13 @@ _LI = _translators.log_info
|
|||||||
_LW = _translators.log_warning
|
_LW = _translators.log_warning
|
||||||
_LE = _translators.log_error
|
_LE = _translators.log_error
|
||||||
_LC = _translators.log_critical
|
_LC = _translators.log_critical
|
||||||
|
|
||||||
|
# FIXME(elynn): Parts in oslo-incubator are still using gettextutils._(), etc.,
|
||||||
|
# from oslo-incubator. Until these parts are changed to use oslo.i18n, we'll
|
||||||
|
# monkey-patch gettextutils._(), _LI(), etc., to use our oslo.i18n versions.
|
||||||
|
gettextutils._ = _
|
||||||
|
gettextutils._LI = _LI
|
||||||
|
gettextutils._LW = _LW
|
||||||
|
gettextutils._LE = _LE
|
||||||
|
gettextutils._LC = _LC
|
||||||
|
gettextutils.install = i18n.install
|
||||||
|
@ -17,6 +17,8 @@ import re
|
|||||||
from oslo.utils import encodeutils
|
from oslo.utils import encodeutils
|
||||||
from six.moves.urllib import parse as urlparse
|
from six.moves.urllib import parse as urlparse
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
|
|
||||||
|
|
||||||
class HeatIdentifier(collections.Mapping):
|
class HeatIdentifier(collections.Mapping):
|
||||||
|
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
'''
|
'''
|
||||||
Utility for fetching and running plug point implementation classes
|
Utility for fetching and running plug point implementation classes
|
||||||
'''
|
'''
|
||||||
|
from heat.common.i18n import _
|
||||||
|
from heat.common.i18n import _LE
|
||||||
from heat.engine import resources
|
from heat.engine import resources
|
||||||
from heat.openstack.common.gettextutils import _LE
|
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
from oslo.utils import strutils
|
from oslo.utils import strutils
|
||||||
|
|
||||||
from heat.openstack.common.gettextutils import _
|
from heat.common.i18n import _
|
||||||
|
|
||||||
|
|
||||||
def extract_bool(subject):
|
def extract_bool(subject):
|
||||||
|
@ -21,6 +21,8 @@ import uuid
|
|||||||
|
|
||||||
from six.moves import xrange
|
from six.moves import xrange
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
|
|
||||||
|
|
||||||
def _to_byte_string(value, num_bits):
|
def _to_byte_string(value, num_bits):
|
||||||
"""Convert an integer to a big-endian string of bytes with padding.
|
"""Convert an integer to a big-endian string of bytes with padding.
|
||||||
|
@ -19,7 +19,7 @@ from oslo.config import cfg
|
|||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.openstack.common.gettextutils import _
|
from heat.common.i18n import _
|
||||||
|
|
||||||
cfg.CONF.import_opt('max_template_size', 'heat.common.config')
|
cfg.CONF.import_opt('max_template_size', 'heat.common.config')
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ Utilities for handling ISO 8601 duration format.
|
|||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
|
|
||||||
|
|
||||||
iso_duration_re = re.compile('PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?$')
|
iso_duration_re = re.compile('PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?$')
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ from eventlet.green import ssl
|
|||||||
import eventlet.greenio
|
import eventlet.greenio
|
||||||
import eventlet.wsgi
|
import eventlet.wsgi
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
from oslo import i18n
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
from paste import deploy
|
from paste import deploy
|
||||||
import routes
|
import routes
|
||||||
@ -44,8 +45,8 @@ import webob.exc
|
|||||||
|
|
||||||
from heat.api.aws import exception as aws_exception
|
from heat.api.aws import exception as aws_exception
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import serializers
|
from heat.common import serializers
|
||||||
from heat.openstack.common import gettextutils
|
|
||||||
|
|
||||||
|
|
||||||
URL_LENGTH_LIMIT = 50000
|
URL_LENGTH_LIMIT = 50000
|
||||||
@ -521,7 +522,7 @@ class Request(webob.Request):
|
|||||||
"""
|
"""
|
||||||
if not self.accept_language:
|
if not self.accept_language:
|
||||||
return None
|
return None
|
||||||
all_languages = gettextutils.get_available_languages('heat')
|
all_languages = i18n.get_available_languages('heat')
|
||||||
return self.accept_language.best_match(all_languages)
|
return self.accept_language.best_match(all_languages)
|
||||||
|
|
||||||
|
|
||||||
@ -735,9 +736,9 @@ def log_exception(err, exc_info):
|
|||||||
def translate_exception(exc, locale):
|
def translate_exception(exc, locale):
|
||||||
"""Translates all translatable elements of the given exception."""
|
"""Translates all translatable elements of the given exception."""
|
||||||
if isinstance(exc, exception.HeatException):
|
if isinstance(exc, exception.HeatException):
|
||||||
exc.message = gettextutils.translate(exc.message, locale)
|
exc.message = i18n.translate(exc.message, locale)
|
||||||
else:
|
else:
|
||||||
exc.message = gettextutils.translate(six.text_type(exc), locale)
|
exc.message = i18n.translate(six.text_type(exc), locale)
|
||||||
|
|
||||||
if isinstance(exc, webob.exc.HTTPError):
|
if isinstance(exc, webob.exc.HTTPError):
|
||||||
# If the explanation is not a Message, that means that the
|
# If the explanation is not a Message, that means that the
|
||||||
@ -746,13 +747,13 @@ def translate_exception(exc, locale):
|
|||||||
# exception is converted to a response, let's actually swap it with
|
# exception is converted to a response, let's actually swap it with
|
||||||
# message, since message is what gets passed in at construction time
|
# message, since message is what gets passed in at construction time
|
||||||
# in the API
|
# in the API
|
||||||
if not isinstance(exc.explanation, gettextutils.Message):
|
if not isinstance(exc.explanation, i18n._message.Message):
|
||||||
exc.explanation = six.text_type(exc)
|
exc.explanation = six.text_type(exc)
|
||||||
exc.detail = ''
|
exc.detail = ''
|
||||||
else:
|
else:
|
||||||
exc.explanation = \
|
exc.explanation = \
|
||||||
gettextutils.translate(exc.explanation, locale)
|
i18n.translate(exc.explanation, locale)
|
||||||
exc.detail = gettextutils.translate(exc.detail, locale)
|
exc.detail = i18n.translate(exc.detail, locale)
|
||||||
return exc
|
return exc
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,15 +17,10 @@ from __future__ import print_function
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from oslo import i18n
|
|
||||||
|
|
||||||
from heat.db import migration
|
from heat.db import migration
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
# fixme(elynn): Since install() is deprecated, we should remove it in
|
|
||||||
# the future
|
|
||||||
i18n.install('heat')
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import collections
|
import collections
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import constraints as constr
|
from heat.engine import constraints as constr
|
||||||
from heat.engine import support
|
from heat.engine import support
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ import six
|
|||||||
|
|
||||||
from heat.api.aws import utils as aws_utils
|
from heat.api.aws import utils as aws_utils
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import function
|
from heat.engine import function
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
import collections
|
import collections
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine.cfn import functions as cfn_funcs
|
from heat.engine.cfn import functions as cfn_funcs
|
||||||
from heat.engine import function
|
from heat.engine import function
|
||||||
from heat.engine import parameters
|
from heat.engine import parameters
|
||||||
|
@ -28,6 +28,7 @@ import six
|
|||||||
from six.moves.urllib import parse as urlparse
|
from six.moves.urllib import parse as urlparse
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine.clients import client_plugin
|
from heat.engine.clients import client_plugin
|
||||||
from heat.engine import scheduler
|
from heat.engine import scheduler
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ from oslo.utils import strutils
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import resources
|
from heat.engine import resources
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import collections
|
import collections
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine.cfn import functions as cfn_funcs
|
from heat.engine.cfn import functions as cfn_funcs
|
||||||
from heat.engine import function
|
from heat.engine import function
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import constraints as constr
|
from heat.engine import constraints as constr
|
||||||
from heat.engine import parameters
|
from heat.engine import parameters
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ from oslo.utils import strutils
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import constraints as constr
|
from heat.engine import constraints as constr
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ import sys
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import plugin_loader
|
from heat.common import plugin_loader
|
||||||
from heat.openstack.common import log
|
from heat.openstack.common import log
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import collections
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import constraints as constr
|
from heat.engine import constraints as constr
|
||||||
from heat.engine import function
|
from heat.engine import function
|
||||||
from heat.engine import parameters
|
from heat.engine import parameters
|
||||||
|
@ -19,6 +19,7 @@ import six
|
|||||||
|
|
||||||
from heat.common import environment_format
|
from heat.common import environment_format
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import timeutils as iso8601utils
|
from heat.common import timeutils as iso8601utils
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
|
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine.resources.neutron import neutron
|
from heat.engine.resources.neutron import neutron
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine.resources.neutron import neutron
|
from heat.engine.resources.neutron import neutron
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
from heat.engine import scheduler
|
from heat.engine import scheduler
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine.resources.neutron import neutron
|
from heat.engine.resources.neutron import neutron
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine.resources.neutron import neutron
|
from heat.engine.resources.neutron import neutron
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
from heat.engine.resources.neutron import neutron
|
from heat.engine.resources.neutron import neutron
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
from six.moves.urllib import parse as urlparse
|
from six.moves.urllib import parse as urlparse
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common.template_format import yaml
|
from heat.common.template_format import yaml
|
||||||
from heat.common.template_format import yaml_dumper
|
from heat.common.template_format import yaml_dumper
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import constraints as constr
|
from heat.engine import constraints as constr
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
@ -18,6 +18,7 @@ import six
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -17,6 +17,7 @@ import collections
|
|||||||
import functools
|
import functools
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine.resources.software_config import software_config as sc
|
from heat.engine.resources.software_config import software_config as sc
|
||||||
from heat.engine.resources.software_config import software_deployment as sd
|
from heat.engine.resources.software_config import software_deployment as sd
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
from requests import exceptions
|
from requests import exceptions
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.common import urlfetch
|
from heat.common import urlfetch
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
from six.moves.urllib import parse as urlparse
|
from six.moves.urllib import parse as urlparse
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
@ -18,6 +18,7 @@ from requests import exceptions
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.common import urlfetch
|
from heat.common import urlfetch
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
@ -15,6 +15,7 @@ import json
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import identifier
|
from heat.common import identifier
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heat.common.i18n import _
|
||||||
|
|
||||||
SUPPORT_STATUSES = (UNKNOWN, SUPPORTED, PROTOTYPE, DEPRECATED,
|
SUPPORT_STATUSES = (UNKNOWN, SUPPORTED, PROTOTYPE, DEPRECATED,
|
||||||
UNSUPPORTED) = ('UNKNOWN', 'SUPPORTED', 'PROTOTYPE',
|
UNSUPPORTED) = ('UNKNOWN', 'SUPPORTED', 'PROTOTYPE',
|
||||||
'DEPRECATED', 'UNSUPPORTED')
|
'DEPRECATED', 'UNSUPPORTED')
|
||||||
|
@ -19,6 +19,7 @@ import six
|
|||||||
from stevedore import extension
|
from stevedore import extension
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.db import api as db_api
|
from heat.db import api as db_api
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ import six
|
|||||||
import stevedore.named
|
import stevedore.named
|
||||||
|
|
||||||
from heat.openstack.common import gettextutils
|
from heat.openstack.common import gettextutils
|
||||||
|
from heat.common import i18n
|
||||||
from heat.openstack.common import importutils
|
from heat.openstack.common import importutils
|
||||||
|
|
||||||
gettextutils.install('heat')
|
gettextutils.install('heat')
|
||||||
|
@ -18,9 +18,6 @@ def fake_translate_msgid(msgid, domain, desired_locale=None):
|
|||||||
return msgid
|
return msgid
|
||||||
|
|
||||||
i18n.enable_lazy()
|
i18n.enable_lazy()
|
||||||
# fixme(elynn): Since install() is deprecated, we should remove it in
|
|
||||||
# the future
|
|
||||||
i18n.install('heat')
|
|
||||||
|
|
||||||
#To ensure messages don't really get translated while running tests.
|
#To ensure messages don't really get translated while running tests.
|
||||||
#As there are lots of places where matching is expected when comparing
|
#As there are lots of places where matching is expected when comparing
|
||||||
|
@ -19,6 +19,7 @@ import fixtures
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.tests import common
|
from heat.tests import common
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ from oslo.messaging._drivers import common as rpc_common
|
|||||||
|
|
||||||
import heat.api.middleware.fault as fault
|
import heat.api.middleware.fault as fault
|
||||||
from heat.common import exception as heat_exc
|
from heat.common import exception as heat_exc
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import six
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.engine.cfn import functions
|
from heat.engine.cfn import functions
|
||||||
from heat.engine import environment
|
from heat.engine import environment
|
||||||
from heat.engine import function
|
from heat.engine import function
|
||||||
|
@ -21,6 +21,7 @@ from neutronclient.neutron import v2_0 as neutronV20
|
|||||||
from neutronclient.v2_0 import client as neutronclient
|
from neutronclient.v2_0 import client as neutronclient
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.engine.clients.os import nova
|
from heat.engine.clients.os import nova
|
||||||
from heat.engine.resources.neutron import loadbalancer
|
from heat.engine.resources.neutron import loadbalancer
|
||||||
|
@ -20,6 +20,7 @@ import yaml
|
|||||||
import mock
|
import mock
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.common import urlfetch
|
from heat.common import urlfetch
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
|
@ -15,6 +15,7 @@ from glanceclient import exc as glance_exceptions
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
from heat.common.i18n import _
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.engine.clients.os import glance
|
from heat.engine.clients.os import glance
|
||||||
from heat.engine.clients.os import nova
|
from heat.engine.clients.os import nova
|
||||||
|
1
tox.ini
1
tox.ini
@ -47,5 +47,4 @@ commands = python setup.py build_sphinx
|
|||||||
# H803 no full stop at the end of the commit message
|
# H803 no full stop at the end of the commit message
|
||||||
ignore = H302,H404,H803
|
ignore = H302,H404,H803
|
||||||
show-source = true
|
show-source = true
|
||||||
builtins = _
|
|
||||||
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
|
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
|
||||||
|
Loading…
Reference in New Issue
Block a user