diff --git a/doc/source/devref/il8n.rst b/doc/source/devref/il8n.rst index 3b5ea65e9623..007395055158 100644 --- a/doc/source/devref/il8n.rst +++ b/doc/source/devref/il8n.rst @@ -19,16 +19,6 @@ If you do not follow the project conventions, your code may cause the LocalizationTestCase.test_multiple_positional_format_placeholders test to fail in nova/tests/test_localization.py. -The ``_()`` function is brought into the global scope by doing:: +The ``_()`` function is found by doing:: - from nova.openstack.common import gettextutils - gettextutils.install('nova') - -These lines are needed in any toplevel script before any nova modules are -imported. If this code is missing, it may result in an error that looks like:: - - NameError: name '_' is not defined - -The gettextutils.install() function also queries the NOVA_LOCALEDIR environment -variable to allow overriding the default localedir with a specific custom -location for Nova's message catalog. + from nova.openstack.common.gettextutils import _ diff --git a/nova/api/auth.py b/nova/api/auth.py index 6b85a9de6719..4d10a59618bc 100644 --- a/nova/api/auth.py +++ b/nova/api/auth.py @@ -23,6 +23,7 @@ import webob.dec import webob.exc from nova import context +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova import wsgi diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py index 61dfa77e4abb..25a707325486 100644 --- a/nova/api/ec2/__init__.py +++ b/nova/api/ec2/__init__.py @@ -34,6 +34,7 @@ from nova.api.ec2 import faults from nova.api import validator from nova import context from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/api/ec2/apirequest.py b/nova/api/ec2/apirequest.py index a2c20efc0737..7cbc14095c44 100644 --- a/nova/api/ec2/apirequest.py +++ b/nova/api/ec2/apirequest.py @@ -27,6 +27,7 @@ from xml.dom import minidom from nova.api.ec2 import ec2utils from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 083bed0d6c59..d8bede933302 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -44,6 +44,7 @@ from nova.image import s3 from nova import network from nova.network.security_group import neutron_driver from nova.objects import instance as instance_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils from nova import quota diff --git a/nova/api/ec2/ec2utils.py b/nova/api/ec2/ec2utils.py index 4cc93dd5a3a8..18e3af408b35 100644 --- a/nova/api/ec2/ec2utils.py +++ b/nova/api/ec2/ec2utils.py @@ -25,6 +25,7 @@ from nova import db from nova import exception from nova.network import model as network_model from nova.objects import instance as instance_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import memorycache from nova.openstack.common import timeutils diff --git a/nova/api/metadata/handler.py b/nova/api/metadata/handler.py index ec5c0216e62a..27f4d4e1b210 100644 --- a/nova/api/metadata/handler.py +++ b/nova/api/metadata/handler.py @@ -28,6 +28,7 @@ import webob.exc from nova.api.metadata import base from nova import conductor from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import memorycache from nova import wsgi diff --git a/nova/api/metadata/password.py b/nova/api/metadata/password.py index 793dcc0a7018..c5d020671358 100644 --- a/nova/api/metadata/password.py +++ b/nova/api/metadata/password.py @@ -17,6 +17,7 @@ from webob import exc from nova import conductor from nova import context +from nova.openstack.common.gettextutils import _ from nova import utils diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py index 2fc351dd0566..a12867aaf87f 100644 --- a/nova/api/openstack/__init__.py +++ b/nova/api/openstack/__init__.py @@ -30,6 +30,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import exception from nova import notifications +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import utils from nova import wsgi as base_wsgi diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py index 59a58103da7e..def0fbee02b5 100644 --- a/nova/api/openstack/common.py +++ b/nova/api/openstack/common.py @@ -30,6 +30,7 @@ from nova.compute import task_states from nova.compute import utils as compute_utils from nova.compute import vm_states from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import quota diff --git a/nova/api/openstack/compute/contrib/admin_actions.py b/nova/api/openstack/compute/contrib/admin_actions.py index 082059080e9e..3554eede82cc 100644 --- a/nova/api/openstack/compute/contrib/admin_actions.py +++ b/nova/api/openstack/compute/contrib/admin_actions.py @@ -24,6 +24,7 @@ from nova.api.openstack import wsgi from nova import compute from nova.compute import vm_states from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/api/openstack/compute/contrib/aggregates.py b/nova/api/openstack/compute/contrib/aggregates.py index 31afd0195f5c..dd878fe8abd3 100644 --- a/nova/api/openstack/compute/contrib/aggregates.py +++ b/nova/api/openstack/compute/contrib/aggregates.py @@ -20,6 +20,7 @@ from webob import exc from nova.api.openstack import extensions from nova.compute import api as compute_api from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/api/openstack/compute/contrib/attach_interfaces.py b/nova/api/openstack/compute/contrib/attach_interfaces.py index a823eed2bfb6..2d56cd00b3b7 100644 --- a/nova/api/openstack/compute/contrib/attach_interfaces.py +++ b/nova/api/openstack/compute/contrib/attach_interfaces.py @@ -22,6 +22,7 @@ from nova.api.openstack import extensions from nova import compute from nova import exception from nova import network +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/api/openstack/compute/contrib/baremetal_nodes.py b/nova/api/openstack/compute/contrib/baremetal_nodes.py index 2f2ddc35b8d9..6f932e740689 100644 --- a/nova/api/openstack/compute/contrib/baremetal_nodes.py +++ b/nova/api/openstack/compute/contrib/baremetal_nodes.py @@ -21,6 +21,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import exception +from nova.openstack.common.gettextutils import _ from nova.virt.baremetal import db authorize = extensions.extension_authorizer('compute', 'baremetal_nodes') diff --git a/nova/api/openstack/compute/contrib/cells.py b/nova/api/openstack/compute/contrib/cells.py index 0d0c55749baf..d79994c270b7 100644 --- a/nova/api/openstack/compute/contrib/cells.py +++ b/nova/api/openstack/compute/contrib/cells.py @@ -28,6 +28,7 @@ from nova.cells import rpc_driver from nova.cells import rpcapi as cells_rpcapi from nova.compute import api as compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/api/openstack/compute/contrib/certificates.py b/nova/api/openstack/compute/contrib/certificates.py index 979008a877f1..ff42cf71b59a 100644 --- a/nova/api/openstack/compute/contrib/certificates.py +++ b/nova/api/openstack/compute/contrib/certificates.py @@ -21,6 +21,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil import nova.cert.rpcapi from nova import network +from nova.openstack.common.gettextutils import _ authorize = extensions.extension_authorizer('compute', 'certificates') diff --git a/nova/api/openstack/compute/contrib/cloudpipe.py b/nova/api/openstack/compute/contrib/cloudpipe.py index d1c906d64805..79571fa2d047 100644 --- a/nova/api/openstack/compute/contrib/cloudpipe.py +++ b/nova/api/openstack/compute/contrib/cloudpipe.py @@ -27,6 +27,7 @@ from nova import db from nova import exception from nova import network from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import timeutils from nova import utils diff --git a/nova/api/openstack/compute/contrib/cloudpipe_update.py b/nova/api/openstack/compute/contrib/cloudpipe_update.py index 1e6cafe04802..20418ae54e02 100644 --- a/nova/api/openstack/compute/contrib/cloudpipe_update.py +++ b/nova/api/openstack/compute/contrib/cloudpipe_update.py @@ -20,6 +20,7 @@ import webob.exc from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import db +from nova.openstack.common.gettextutils import _ authorize = extensions.extension_authorizer('compute', 'cloudpipe_update') diff --git a/nova/api/openstack/compute/contrib/console_output.py b/nova/api/openstack/compute/contrib/console_output.py index a3e4e869ac7b..6c1739ad3e20 100644 --- a/nova/api/openstack/compute/contrib/console_output.py +++ b/nova/api/openstack/compute/contrib/console_output.py @@ -23,6 +23,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ authorize = extensions.extension_authorizer('compute', 'console_output') diff --git a/nova/api/openstack/compute/contrib/consoles.py b/nova/api/openstack/compute/contrib/consoles.py index 8247620f2eb2..a9cd344f575a 100644 --- a/nova/api/openstack/compute/contrib/consoles.py +++ b/nova/api/openstack/compute/contrib/consoles.py @@ -20,6 +20,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ authorize = extensions.extension_authorizer('compute', 'consoles') diff --git a/nova/api/openstack/compute/contrib/coverage_ext.py b/nova/api/openstack/compute/contrib/coverage_ext.py index fd1ad53e9258..d77dff6c8e29 100644 --- a/nova/api/openstack/compute/contrib/coverage_ext.py +++ b/nova/api/openstack/compute/contrib/coverage_ext.py @@ -30,6 +30,7 @@ from webob import exc from nova.api.openstack import extensions from nova import baserpc from nova import db +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common.rpc import common as rpc_common diff --git a/nova/api/openstack/compute/contrib/disk_config.py b/nova/api/openstack/compute/contrib/disk_config.py index 692ed6455df7..c3a1740b5cc2 100644 --- a/nova/api/openstack/compute/contrib/disk_config.py +++ b/nova/api/openstack/compute/contrib/disk_config.py @@ -21,6 +21,7 @@ from webob import exc from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil +from nova.openstack.common.gettextutils import _ from nova.openstack.common import strutils ALIAS = 'OS-DCF' diff --git a/nova/api/openstack/compute/contrib/evacuate.py b/nova/api/openstack/compute/contrib/evacuate.py index 7eee99ed1561..53a82b4f1857 100644 --- a/nova/api/openstack/compute/contrib/evacuate.py +++ b/nova/api/openstack/compute/contrib/evacuate.py @@ -20,6 +20,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import strutils from nova import utils diff --git a/nova/api/openstack/compute/contrib/fixed_ips.py b/nova/api/openstack/compute/contrib/fixed_ips.py index 532282a2b44f..9a8c40e05789 100644 --- a/nova/api/openstack/compute/contrib/fixed_ips.py +++ b/nova/api/openstack/compute/contrib/fixed_ips.py @@ -19,6 +19,7 @@ import webob.exc from nova.api.openstack import extensions from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ authorize = extensions.extension_authorizer('compute', 'fixed_ips') diff --git a/nova/api/openstack/compute/contrib/flavor_access.py b/nova/api/openstack/compute/contrib/flavor_access.py index 82df5a3e10dc..95444e94e2e6 100644 --- a/nova/api/openstack/compute/contrib/flavor_access.py +++ b/nova/api/openstack/compute/contrib/flavor_access.py @@ -24,6 +24,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova.compute import flavors from nova import exception +from nova.openstack.common.gettextutils import _ authorize = extensions.soft_extension_authorizer('compute', 'flavor_access') diff --git a/nova/api/openstack/compute/contrib/flavorextraspecs.py b/nova/api/openstack/compute/contrib/flavorextraspecs.py index c206787842a2..2188a240a776 100644 --- a/nova/api/openstack/compute/contrib/flavorextraspecs.py +++ b/nova/api/openstack/compute/contrib/flavorextraspecs.py @@ -24,6 +24,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ authorize = extensions.extension_authorizer('compute', 'flavorextraspecs') diff --git a/nova/api/openstack/compute/contrib/floating_ip_dns.py b/nova/api/openstack/compute/contrib/floating_ip_dns.py index 7a59c30931ca..1d74b3e8fff6 100644 --- a/nova/api/openstack/compute/contrib/floating_ip_dns.py +++ b/nova/api/openstack/compute/contrib/floating_ip_dns.py @@ -23,6 +23,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import exception from nova import network +from nova.openstack.common.gettextutils import _ from nova import utils diff --git a/nova/api/openstack/compute/contrib/floating_ips.py b/nova/api/openstack/compute/contrib/floating_ips.py index 807201e7e90d..92c42a532086 100644 --- a/nova/api/openstack/compute/contrib/floating_ips.py +++ b/nova/api/openstack/compute/contrib/floating_ips.py @@ -26,6 +26,7 @@ from nova import compute from nova.compute import utils as compute_utils from nova import exception from nova import network +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import uuidutils diff --git a/nova/api/openstack/compute/contrib/floating_ips_bulk.py b/nova/api/openstack/compute/contrib/floating_ips_bulk.py index 1baf474c23eb..1e395c1658c3 100644 --- a/nova/api/openstack/compute/contrib/floating_ips_bulk.py +++ b/nova/api/openstack/compute/contrib/floating_ips_bulk.py @@ -21,6 +21,7 @@ import webob.exc from nova.api.openstack import extensions from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging CONF = cfg.CONF diff --git a/nova/api/openstack/compute/contrib/fping.py b/nova/api/openstack/compute/contrib/fping.py index 0e6bb5ae5edf..9d6d29778fcc 100644 --- a/nova/api/openstack/compute/contrib/fping.py +++ b/nova/api/openstack/compute/contrib/fping.py @@ -26,6 +26,7 @@ from nova.api.openstack import common from nova.api.openstack import extensions from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova import utils authorize = extensions.extension_authorizer('compute', 'fping') diff --git a/nova/api/openstack/compute/contrib/hosts.py b/nova/api/openstack/compute/contrib/hosts.py index ea9528340cd8..3c590b23601c 100644 --- a/nova/api/openstack/compute/contrib/hosts.py +++ b/nova/api/openstack/compute/contrib/hosts.py @@ -22,6 +22,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/api/openstack/compute/contrib/hypervisors.py b/nova/api/openstack/compute/contrib/hypervisors.py index 26ef2c81b71e..b2d15315ac68 100644 --- a/nova/api/openstack/compute/contrib/hypervisors.py +++ b/nova/api/openstack/compute/contrib/hypervisors.py @@ -22,6 +22,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ authorize = extensions.extension_authorizer('compute', 'hypervisors') diff --git a/nova/api/openstack/compute/contrib/instance_usage_audit_log.py b/nova/api/openstack/compute/contrib/instance_usage_audit_log.py index 3c3aa23c0b8d..ce72bca41c3c 100644 --- a/nova/api/openstack/compute/contrib/instance_usage_audit_log.py +++ b/nova/api/openstack/compute/contrib/instance_usage_audit_log.py @@ -23,6 +23,7 @@ import webob.exc from nova.api.openstack import extensions from nova import compute +from nova.openstack.common.gettextutils import _ from nova import utils CONF = cfg.CONF diff --git a/nova/api/openstack/compute/contrib/keypairs.py b/nova/api/openstack/compute/contrib/keypairs.py index af7eb3c8d075..2a7c44b06c56 100644 --- a/nova/api/openstack/compute/contrib/keypairs.py +++ b/nova/api/openstack/compute/contrib/keypairs.py @@ -26,6 +26,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova.compute import api as compute_api from nova import exception +from nova.openstack.common.gettextutils import _ authorize = extensions.extension_authorizer('compute', 'keypairs') diff --git a/nova/api/openstack/compute/contrib/multinic.py b/nova/api/openstack/compute/contrib/multinic.py index 30789a3f197f..8a47975bd9b8 100644 --- a/nova/api/openstack/compute/contrib/multinic.py +++ b/nova/api/openstack/compute/contrib/multinic.py @@ -22,6 +22,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/api/openstack/compute/contrib/networks_associate.py b/nova/api/openstack/compute/contrib/networks_associate.py index 3cdda1d761a8..eb4c8c8baf98 100644 --- a/nova/api/openstack/compute/contrib/networks_associate.py +++ b/nova/api/openstack/compute/contrib/networks_associate.py @@ -4,6 +4,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import exception from nova import network +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/api/openstack/compute/contrib/os_networks.py b/nova/api/openstack/compute/contrib/os_networks.py index e8a5263aa66a..d76ca812b32d 100644 --- a/nova/api/openstack/compute/contrib/os_networks.py +++ b/nova/api/openstack/compute/contrib/os_networks.py @@ -24,6 +24,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import exception from nova import network +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/api/openstack/compute/contrib/os_tenant_networks.py b/nova/api/openstack/compute/contrib/os_tenant_networks.py index 18c605678c6b..a824ab49f280 100644 --- a/nova/api/openstack/compute/contrib/os_tenant_networks.py +++ b/nova/api/openstack/compute/contrib/os_tenant_networks.py @@ -25,6 +25,7 @@ from nova.api.openstack import extensions from nova import context as nova_context from nova import exception import nova.network +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import quota diff --git a/nova/api/openstack/compute/contrib/quotas.py b/nova/api/openstack/compute/contrib/quotas.py index fe4f759da453..9b025e9cccce 100644 --- a/nova/api/openstack/compute/contrib/quotas.py +++ b/nova/api/openstack/compute/contrib/quotas.py @@ -24,6 +24,7 @@ from nova.api.openstack import xmlutil import nova.context from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import strutils from nova import quota diff --git a/nova/api/openstack/compute/contrib/rescue.py b/nova/api/openstack/compute/contrib/rescue.py index c89d11117712..338df2d2e60b 100644 --- a/nova/api/openstack/compute/contrib/rescue.py +++ b/nova/api/openstack/compute/contrib/rescue.py @@ -23,6 +23,7 @@ from nova.api.openstack import extensions as exts from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova import utils diff --git a/nova/api/openstack/compute/contrib/scheduler_hints.py b/nova/api/openstack/compute/contrib/scheduler_hints.py index 0a5136205623..4ad98bae88ab 100644 --- a/nova/api/openstack/compute/contrib/scheduler_hints.py +++ b/nova/api/openstack/compute/contrib/scheduler_hints.py @@ -18,6 +18,7 @@ import webob.exc from nova.api.openstack import extensions from nova.api.openstack import wsgi +from nova.openstack.common.gettextutils import _ class SchedulerHintsController(wsgi.Controller): diff --git a/nova/api/openstack/compute/contrib/security_group_default_rules.py b/nova/api/openstack/compute/contrib/security_group_default_rules.py index 751a4d4594ed..a97a8922c154 100644 --- a/nova/api/openstack/compute/contrib/security_group_default_rules.py +++ b/nova/api/openstack/compute/contrib/security_group_default_rules.py @@ -25,6 +25,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import exception from nova.network.security_group import openstack_driver +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/api/openstack/compute/contrib/security_groups.py b/nova/api/openstack/compute/contrib/security_groups.py index 906404476d2d..d1865d39d511 100644 --- a/nova/api/openstack/compute/contrib/security_groups.py +++ b/nova/api/openstack/compute/contrib/security_groups.py @@ -31,6 +31,7 @@ from nova.compute import api as compute_api from nova import exception from nova.network.security_group import neutron_driver from nova.network.security_group import openstack_driver +from nova.openstack.common.gettextutils import _ from nova.virt import netutils diff --git a/nova/api/openstack/compute/contrib/server_diagnostics.py b/nova/api/openstack/compute/contrib/server_diagnostics.py index 7711eb65309b..9c2549c6f435 100644 --- a/nova/api/openstack/compute/contrib/server_diagnostics.py +++ b/nova/api/openstack/compute/contrib/server_diagnostics.py @@ -20,6 +20,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ authorize = extensions.extension_authorizer('compute', 'server_diagnostics') diff --git a/nova/api/openstack/compute/contrib/server_start_stop.py b/nova/api/openstack/compute/contrib/server_start_stop.py index 1734b2cfa0d8..1ec2b51b14e8 100644 --- a/nova/api/openstack/compute/contrib/server_start_stop.py +++ b/nova/api/openstack/compute/contrib/server_start_stop.py @@ -21,6 +21,7 @@ from nova.api.openstack import wsgi from nova import compute from nova import exception from nova.objects import instance as instance_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/api/openstack/compute/contrib/services.py b/nova/api/openstack/compute/contrib/services.py index 05e7fe45ac5f..b75aed4419e8 100644 --- a/nova/api/openstack/compute/contrib/services.py +++ b/nova/api/openstack/compute/contrib/services.py @@ -22,6 +22,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova import servicegroup from nova import utils diff --git a/nova/api/openstack/compute/contrib/shelve.py b/nova/api/openstack/compute/contrib/shelve.py index 778e2febad02..b4e96a99f692 100644 --- a/nova/api/openstack/compute/contrib/shelve.py +++ b/nova/api/openstack/compute/contrib/shelve.py @@ -22,6 +22,7 @@ from nova.api.openstack import extensions as exts from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ auth_shelve = exts.extension_authorizer('compute', 'shelve') diff --git a/nova/api/openstack/compute/contrib/simple_tenant_usage.py b/nova/api/openstack/compute/contrib/simple_tenant_usage.py index ceac605c5963..198360cabf7d 100644 --- a/nova/api/openstack/compute/contrib/simple_tenant_usage.py +++ b/nova/api/openstack/compute/contrib/simple_tenant_usage.py @@ -26,6 +26,7 @@ from nova.api.openstack import xmlutil from nova.compute import api from nova.compute import flavors from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import timeutils authorize_show = extensions.extension_authorizer('compute', diff --git a/nova/api/openstack/compute/contrib/volumes.py b/nova/api/openstack/compute/contrib/volumes.py index 0ce695a1733a..3f7faa54b156 100644 --- a/nova/api/openstack/compute/contrib/volumes.py +++ b/nova/api/openstack/compute/contrib/volumes.py @@ -24,6 +24,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import strutils from nova.openstack.common import uuidutils diff --git a/nova/api/openstack/compute/extensions.py b/nova/api/openstack/compute/extensions.py index ac8c04aa0785..f25a6a16aac6 100644 --- a/nova/api/openstack/compute/extensions.py +++ b/nova/api/openstack/compute/extensions.py @@ -18,6 +18,7 @@ from oslo.config import cfg from nova.api.openstack import extensions as base_extensions +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging ext_opts = [ diff --git a/nova/api/openstack/compute/flavors.py b/nova/api/openstack/compute/flavors.py index 029e5a5bd6c3..554c7fc32f49 100644 --- a/nova/api/openstack/compute/flavors.py +++ b/nova/api/openstack/compute/flavors.py @@ -23,6 +23,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova.compute import flavors from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import strutils from nova import utils diff --git a/nova/api/openstack/compute/image_metadata.py b/nova/api/openstack/compute/image_metadata.py index d8ca11232a21..4c24e8626bbf 100644 --- a/nova/api/openstack/compute/image_metadata.py +++ b/nova/api/openstack/compute/image_metadata.py @@ -21,6 +21,7 @@ from nova.api.openstack import common from nova.api.openstack import wsgi from nova import exception from nova.image import glance +from nova.openstack.common.gettextutils import _ class Controller(object): diff --git a/nova/api/openstack/compute/images.py b/nova/api/openstack/compute/images.py index e0c4f74654de..1fbf88422703 100644 --- a/nova/api/openstack/compute/images.py +++ b/nova/api/openstack/compute/images.py @@ -21,6 +21,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import exception import nova.image.glance +from nova.openstack.common.gettextutils import _ import nova.utils diff --git a/nova/api/openstack/compute/ips.py b/nova/api/openstack/compute/ips.py index df4b9dabff57..5ccf7dc08c0f 100644 --- a/nova/api/openstack/compute/ips.py +++ b/nova/api/openstack/compute/ips.py @@ -22,6 +22,7 @@ from nova.api.openstack import common from nova.api.openstack.compute.views import addresses as view_addresses from nova.api.openstack import wsgi from nova.api.openstack import xmlutil +from nova.openstack.common.gettextutils import _ def make_network(elem): diff --git a/nova/api/openstack/compute/limits.py b/nova/api/openstack/compute/limits.py index 1aac5b44211f..af127dd3928b 100644 --- a/nova/api/openstack/compute/limits.py +++ b/nova/api/openstack/compute/limits.py @@ -44,6 +44,7 @@ import webob.exc from nova.api.openstack.compute.views import limits as limits_views from nova.api.openstack import wsgi from nova.api.openstack import xmlutil +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova import quota diff --git a/nova/api/openstack/compute/plugins/__init__.py b/nova/api/openstack/compute/plugins/__init__.py index f93f56513538..7a50de01ffdf 100644 --- a/nova/api/openstack/compute/plugins/__init__.py +++ b/nova/api/openstack/compute/plugins/__init__.py @@ -16,6 +16,7 @@ from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/api/openstack/compute/plugins/v3/admin_actions.py b/nova/api/openstack/compute/plugins/v3/admin_actions.py index 2eb6f6aa4391..b9aac57dd959 100644 --- a/nova/api/openstack/compute/plugins/v3/admin_actions.py +++ b/nova/api/openstack/compute/plugins/v3/admin_actions.py @@ -24,6 +24,7 @@ from nova.api.openstack import wsgi from nova import compute from nova.compute import vm_states from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/api/openstack/compute/plugins/v3/aggregates.py b/nova/api/openstack/compute/plugins/v3/aggregates.py index f9369ed18fe3..5755ff258668 100644 --- a/nova/api/openstack/compute/plugins/v3/aggregates.py +++ b/nova/api/openstack/compute/plugins/v3/aggregates.py @@ -21,6 +21,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.compute import api as compute_api from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/api/openstack/compute/plugins/v3/attach_interfaces.py b/nova/api/openstack/compute/plugins/v3/attach_interfaces.py index 600fd67708c9..a7b721909c49 100644 --- a/nova/api/openstack/compute/plugins/v3/attach_interfaces.py +++ b/nova/api/openstack/compute/plugins/v3/attach_interfaces.py @@ -22,6 +22,7 @@ from nova.api.openstack import extensions from nova import compute from nova import exception from nova import network +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/api/openstack/compute/plugins/v3/baremetal_nodes.py b/nova/api/openstack/compute/plugins/v3/baremetal_nodes.py index 8642b166972f..44d17e4c26e8 100644 --- a/nova/api/openstack/compute/plugins/v3/baremetal_nodes.py +++ b/nova/api/openstack/compute/plugins/v3/baremetal_nodes.py @@ -21,6 +21,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import exception +from nova.openstack.common.gettextutils import _ from nova.virt.baremetal import db ALIAS = 'os-baremetal-nodes' diff --git a/nova/api/openstack/compute/plugins/v3/cells.py b/nova/api/openstack/compute/plugins/v3/cells.py index b1308a15073b..d46abae95903 100644 --- a/nova/api/openstack/compute/plugins/v3/cells.py +++ b/nova/api/openstack/compute/plugins/v3/cells.py @@ -28,6 +28,7 @@ from nova.cells import rpc_driver from nova.cells import rpcapi as cells_rpcapi from nova.compute import api as compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/api/openstack/compute/plugins/v3/certificates.py b/nova/api/openstack/compute/plugins/v3/certificates.py index e8f5a07f8730..8c5405d41857 100644 --- a/nova/api/openstack/compute/plugins/v3/certificates.py +++ b/nova/api/openstack/compute/plugins/v3/certificates.py @@ -21,6 +21,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil import nova.cert.rpcapi from nova import network +from nova.openstack.common.gettextutils import _ ALIAS = "os-certificates" authorize = extensions.extension_authorizer('compute', 'v3:' + ALIAS) diff --git a/nova/api/openstack/compute/plugins/v3/console_output.py b/nova/api/openstack/compute/plugins/v3/console_output.py index 1166aced66b7..548f2f4b532c 100644 --- a/nova/api/openstack/compute/plugins/v3/console_output.py +++ b/nova/api/openstack/compute/plugins/v3/console_output.py @@ -23,6 +23,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ ALIAS = "os-console-output" authorize = extensions.extension_authorizer('compute', "v3:" + ALIAS) diff --git a/nova/api/openstack/compute/plugins/v3/coverage.py b/nova/api/openstack/compute/plugins/v3/coverage.py index f60e48509007..0993ed4b4106 100644 --- a/nova/api/openstack/compute/plugins/v3/coverage.py +++ b/nova/api/openstack/compute/plugins/v3/coverage.py @@ -32,6 +32,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import baserpc from nova import db +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common.rpc import common as rpc_common diff --git a/nova/api/openstack/compute/plugins/v3/disk_config.py b/nova/api/openstack/compute/plugins/v3/disk_config.py index 692ed6455df7..c3a1740b5cc2 100644 --- a/nova/api/openstack/compute/plugins/v3/disk_config.py +++ b/nova/api/openstack/compute/plugins/v3/disk_config.py @@ -21,6 +21,7 @@ from webob import exc from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil +from nova.openstack.common.gettextutils import _ from nova.openstack.common import strutils ALIAS = 'OS-DCF' diff --git a/nova/api/openstack/compute/plugins/v3/evacuate.py b/nova/api/openstack/compute/plugins/v3/evacuate.py index b5c57cbc9662..a45628444c51 100644 --- a/nova/api/openstack/compute/plugins/v3/evacuate.py +++ b/nova/api/openstack/compute/plugins/v3/evacuate.py @@ -20,6 +20,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import strutils from nova import utils diff --git a/nova/api/openstack/compute/plugins/v3/extended_volumes.py b/nova/api/openstack/compute/plugins/v3/extended_volumes.py index 1026a40d2209..5e183f1e85a6 100644 --- a/nova/api/openstack/compute/plugins/v3/extended_volumes.py +++ b/nova/api/openstack/compute/plugins/v3/extended_volumes.py @@ -23,6 +23,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import uuidutils from nova import volume diff --git a/nova/api/openstack/compute/plugins/v3/extension_info.py b/nova/api/openstack/compute/plugins/v3/extension_info.py index e862054c31a2..b12bd3e9f87d 100644 --- a/nova/api/openstack/compute/plugins/v3/extension_info.py +++ b/nova/api/openstack/compute/plugins/v3/extension_info.py @@ -19,6 +19,7 @@ import webob.exc from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/api/openstack/compute/plugins/v3/fixed_ips.py b/nova/api/openstack/compute/plugins/v3/fixed_ips.py index 5fa4ae3c21b2..698d558cb6a1 100644 --- a/nova/api/openstack/compute/plugins/v3/fixed_ips.py +++ b/nova/api/openstack/compute/plugins/v3/fixed_ips.py @@ -19,6 +19,7 @@ import webob.exc from nova.api.openstack import extensions from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/api/openstack/compute/plugins/v3/flavor_access.py b/nova/api/openstack/compute/plugins/v3/flavor_access.py index 459a4041b332..da41e066e8c5 100644 --- a/nova/api/openstack/compute/plugins/v3/flavor_access.py +++ b/nova/api/openstack/compute/plugins/v3/flavor_access.py @@ -24,6 +24,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova.compute import flavors from nova import exception +from nova.openstack.common.gettextutils import _ ALIAS = 'os-flavor-access' authorize = extensions.soft_extension_authorizer('compute', 'v3:' + ALIAS) diff --git a/nova/api/openstack/compute/plugins/v3/flavors.py b/nova/api/openstack/compute/plugins/v3/flavors.py index a44b980bfb4e..3cbe31788918 100644 --- a/nova/api/openstack/compute/plugins/v3/flavors.py +++ b/nova/api/openstack/compute/plugins/v3/flavors.py @@ -24,6 +24,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova.compute import flavors from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import strutils diff --git a/nova/api/openstack/compute/plugins/v3/fping.py b/nova/api/openstack/compute/plugins/v3/fping.py index a8e9b7a99f07..5a752016c52c 100644 --- a/nova/api/openstack/compute/plugins/v3/fping.py +++ b/nova/api/openstack/compute/plugins/v3/fping.py @@ -26,6 +26,7 @@ from nova.api.openstack import common from nova.api.openstack import extensions from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova import utils ALIAS = "os-fping" diff --git a/nova/api/openstack/compute/plugins/v3/hosts.py b/nova/api/openstack/compute/plugins/v3/hosts.py index cf78e63d2eb5..a274ec704399 100644 --- a/nova/api/openstack/compute/plugins/v3/hosts.py +++ b/nova/api/openstack/compute/plugins/v3/hosts.py @@ -22,6 +22,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/api/openstack/compute/plugins/v3/hypervisors.py b/nova/api/openstack/compute/plugins/v3/hypervisors.py index e51695fdcfaf..5f091626bc45 100644 --- a/nova/api/openstack/compute/plugins/v3/hypervisors.py +++ b/nova/api/openstack/compute/plugins/v3/hypervisors.py @@ -22,6 +22,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ ALIAS = "os-hypervisors" diff --git a/nova/api/openstack/compute/plugins/v3/image_metadata.py b/nova/api/openstack/compute/plugins/v3/image_metadata.py index 31be2e0e2d7f..aebd7ca2be0d 100644 --- a/nova/api/openstack/compute/plugins/v3/image_metadata.py +++ b/nova/api/openstack/compute/plugins/v3/image_metadata.py @@ -22,6 +22,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import exception from nova.image import glance +from nova.openstack.common.gettextutils import _ ALIAS = "os-image-metadata" authorize = extensions.extension_authorizer('compute', 'v3:' + ALIAS) diff --git a/nova/api/openstack/compute/plugins/v3/images.py b/nova/api/openstack/compute/plugins/v3/images.py index bea0a7adbc25..82ec7dcd08a0 100644 --- a/nova/api/openstack/compute/plugins/v3/images.py +++ b/nova/api/openstack/compute/plugins/v3/images.py @@ -22,6 +22,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import exception import nova.image.glance +from nova.openstack.common.gettextutils import _ import nova.utils diff --git a/nova/api/openstack/compute/plugins/v3/instance_actions.py b/nova/api/openstack/compute/plugins/v3/instance_actions.py index 94497c5e4884..629234071a41 100644 --- a/nova/api/openstack/compute/plugins/v3/instance_actions.py +++ b/nova/api/openstack/compute/plugins/v3/instance_actions.py @@ -20,6 +20,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ ALIAS = "os-instance-actions" authorize_actions = extensions.extension_authorizer('compute', diff --git a/nova/api/openstack/compute/plugins/v3/instance_usage_audit_log.py b/nova/api/openstack/compute/plugins/v3/instance_usage_audit_log.py index 93327b3c5cf9..3f438ccbf112 100644 --- a/nova/api/openstack/compute/plugins/v3/instance_usage_audit_log.py +++ b/nova/api/openstack/compute/plugins/v3/instance_usage_audit_log.py @@ -23,6 +23,7 @@ import webob.exc from nova.api.openstack import extensions from nova import compute +from nova.openstack.common.gettextutils import _ from nova import utils CONF = cfg.CONF diff --git a/nova/api/openstack/compute/plugins/v3/ips.py b/nova/api/openstack/compute/plugins/v3/ips.py index 2d9a4891dd1f..5ddd58224c19 100644 --- a/nova/api/openstack/compute/plugins/v3/ips.py +++ b/nova/api/openstack/compute/plugins/v3/ips.py @@ -23,6 +23,7 @@ from nova.api.openstack.compute.views import addresses as view_addresses from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil +from nova.openstack.common.gettextutils import _ def make_network(elem): diff --git a/nova/api/openstack/compute/plugins/v3/keypairs.py b/nova/api/openstack/compute/plugins/v3/keypairs.py index 28723ef58d53..d7736996822a 100644 --- a/nova/api/openstack/compute/plugins/v3/keypairs.py +++ b/nova/api/openstack/compute/plugins/v3/keypairs.py @@ -26,6 +26,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova.compute import api as compute_api from nova import exception +from nova.openstack.common.gettextutils import _ ALIAS = 'os-keypairs' diff --git a/nova/api/openstack/compute/plugins/v3/limits.py b/nova/api/openstack/compute/plugins/v3/limits.py index 09fbb2dec4df..f639fc0b9406 100644 --- a/nova/api/openstack/compute/plugins/v3/limits.py +++ b/nova/api/openstack/compute/plugins/v3/limits.py @@ -31,6 +31,7 @@ from nova.api.openstack.compute.views import limits as limits_views from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova import quota diff --git a/nova/api/openstack/compute/plugins/v3/multinic.py b/nova/api/openstack/compute/plugins/v3/multinic.py index 65cd74395620..59e6b7279179 100644 --- a/nova/api/openstack/compute/plugins/v3/multinic.py +++ b/nova/api/openstack/compute/plugins/v3/multinic.py @@ -22,6 +22,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/api/openstack/compute/plugins/v3/quota_sets.py b/nova/api/openstack/compute/plugins/v3/quota_sets.py index 57b09110efa7..53b3eea72554 100644 --- a/nova/api/openstack/compute/plugins/v3/quota_sets.py +++ b/nova/api/openstack/compute/plugins/v3/quota_sets.py @@ -24,6 +24,7 @@ from nova.api.openstack import xmlutil import nova.context from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import strutils from nova import quota diff --git a/nova/api/openstack/compute/plugins/v3/rescue.py b/nova/api/openstack/compute/plugins/v3/rescue.py index ded18bb1a328..4575442fdd73 100644 --- a/nova/api/openstack/compute/plugins/v3/rescue.py +++ b/nova/api/openstack/compute/plugins/v3/rescue.py @@ -23,6 +23,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova import utils diff --git a/nova/api/openstack/compute/plugins/v3/scheduler_hints.py b/nova/api/openstack/compute/plugins/v3/scheduler_hints.py index f24794032579..9e64ae965572 100644 --- a/nova/api/openstack/compute/plugins/v3/scheduler_hints.py +++ b/nova/api/openstack/compute/plugins/v3/scheduler_hints.py @@ -18,6 +18,7 @@ import webob.exc from nova.api.openstack import extensions from nova.api.openstack import wsgi +from nova.openstack.common.gettextutils import _ ALIAS = "os-scheduler-hints" diff --git a/nova/api/openstack/compute/plugins/v3/security_groups.py b/nova/api/openstack/compute/plugins/v3/security_groups.py index 276a34d36cf7..083e582fd6c4 100644 --- a/nova/api/openstack/compute/plugins/v3/security_groups.py +++ b/nova/api/openstack/compute/plugins/v3/security_groups.py @@ -30,6 +30,7 @@ from nova.compute import api as compute_api from nova import exception from nova.network.security_group import neutron_driver from nova.network.security_group import openstack_driver +from nova.openstack.common.gettextutils import _ ALIAS = 'os-security-groups' diff --git a/nova/api/openstack/compute/plugins/v3/server_diagnostics.py b/nova/api/openstack/compute/plugins/v3/server_diagnostics.py index 6a19732dc518..d04d64999d81 100644 --- a/nova/api/openstack/compute/plugins/v3/server_diagnostics.py +++ b/nova/api/openstack/compute/plugins/v3/server_diagnostics.py @@ -20,6 +20,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ ALIAS = "os-server-diagnostics" diff --git a/nova/api/openstack/compute/plugins/v3/server_metadata.py b/nova/api/openstack/compute/plugins/v3/server_metadata.py index f9951f23a994..a30a593d5a9f 100644 --- a/nova/api/openstack/compute/plugins/v3/server_metadata.py +++ b/nova/api/openstack/compute/plugins/v3/server_metadata.py @@ -22,6 +22,7 @@ from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ class ServerMetadataController(object): diff --git a/nova/api/openstack/compute/plugins/v3/servers.py b/nova/api/openstack/compute/plugins/v3/servers.py index d4ef13525153..4bc6dd9dc74b 100644 --- a/nova/api/openstack/compute/plugins/v3/servers.py +++ b/nova/api/openstack/compute/plugins/v3/servers.py @@ -33,6 +33,7 @@ from nova import compute from nova.compute import flavors from nova import exception from nova.objects import instance as instance_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common.rpc import common as rpc_common diff --git a/nova/api/openstack/compute/plugins/v3/services.py b/nova/api/openstack/compute/plugins/v3/services.py index 70cdcf80b34d..805f313824ae 100644 --- a/nova/api/openstack/compute/plugins/v3/services.py +++ b/nova/api/openstack/compute/plugins/v3/services.py @@ -22,6 +22,7 @@ from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ from nova import servicegroup from nova import utils diff --git a/nova/api/openstack/compute/plugins/v3/shelve.py b/nova/api/openstack/compute/plugins/v3/shelve.py index 56b0683847b1..11e30232df56 100644 --- a/nova/api/openstack/compute/plugins/v3/shelve.py +++ b/nova/api/openstack/compute/plugins/v3/shelve.py @@ -22,6 +22,7 @@ from nova.api.openstack import extensions as exts from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ ALIAS = 'os-shelve' diff --git a/nova/api/openstack/compute/plugins/v3/simple_tenant_usage.py b/nova/api/openstack/compute/plugins/v3/simple_tenant_usage.py index 491e3f58af23..f9651cde5fc7 100644 --- a/nova/api/openstack/compute/plugins/v3/simple_tenant_usage.py +++ b/nova/api/openstack/compute/plugins/v3/simple_tenant_usage.py @@ -26,6 +26,7 @@ from nova.api.openstack import xmlutil from nova.compute import api from nova.compute import flavors from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import timeutils ALIAS = 'os-simple-tenant-usage' diff --git a/nova/api/openstack/compute/server_metadata.py b/nova/api/openstack/compute/server_metadata.py index 3f7915a84566..972526af0ce9 100644 --- a/nova/api/openstack/compute/server_metadata.py +++ b/nova/api/openstack/compute/server_metadata.py @@ -21,6 +21,7 @@ from nova.api.openstack import common from nova.api.openstack import wsgi from nova import compute from nova import exception +from nova.openstack.common.gettextutils import _ class Controller(object): diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index d04b041226be..7d0e7c1f1c5e 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -30,6 +30,7 @@ from nova.api.openstack import xmlutil from nova import compute from nova.compute import flavors from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common.rpc import common as rpc_common diff --git a/nova/api/openstack/compute/views/servers.py b/nova/api/openstack/compute/views/servers.py index c9661043f027..2c08a7ab2c56 100644 --- a/nova/api/openstack/compute/views/servers.py +++ b/nova/api/openstack/compute/views/servers.py @@ -24,6 +24,7 @@ from nova.api.openstack.compute.views import flavors as views_flavors from nova.api.openstack.compute.views import images as views_images from nova.compute import flavors from nova.objects import instance as instance_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils from nova import utils diff --git a/nova/api/openstack/extensions.py b/nova/api/openstack/extensions.py index 69cc875469b7..f2477f3f7a64 100644 --- a/nova/api/openstack/extensions.py +++ b/nova/api/openstack/extensions.py @@ -27,6 +27,7 @@ import nova.api.openstack from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging import nova.policy diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py index 5df10da35cc1..5da0cba76bcf 100644 --- a/nova/api/openstack/wsgi.py +++ b/nova/api/openstack/wsgi.py @@ -25,6 +25,7 @@ import webob from nova.api.openstack import xmlutil from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova import wsgi diff --git a/nova/api/openstack/xmlutil.py b/nova/api/openstack/xmlutil.py index 37766b3e3e3d..b8d1779af060 100644 --- a/nova/api/openstack/xmlutil.py +++ b/nova/api/openstack/xmlutil.py @@ -24,6 +24,7 @@ from xml import sax from xml.sax import expatreader from nova import exception +from nova.openstack.common.gettextutils import _ from nova import utils diff --git a/nova/api/sizelimit.py b/nova/api/sizelimit.py index d7647ccc3e93..23e6475cced1 100644 --- a/nova/api/sizelimit.py +++ b/nova/api/sizelimit.py @@ -22,6 +22,7 @@ from oslo.config import cfg import webob.dec import webob.exc +from nova.openstack.common.gettextutils import _ from nova import wsgi diff --git a/nova/api/validator.py b/nova/api/validator.py index 2e73563914c0..14339d9129fb 100644 --- a/nova/api/validator.py +++ b/nova/api/validator.py @@ -19,6 +19,7 @@ import base64 import re +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/block_device.py b/nova/block_device.py index 4fe61ce51393..0462e748c681 100644 --- a/nova/block_device.py +++ b/nova/block_device.py @@ -20,6 +20,7 @@ import re from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt import driver diff --git a/nova/cells/filters/target_cell.py b/nova/cells/filters/target_cell.py index ab5adb1e8276..772765c6e4ac 100644 --- a/nova/cells/filters/target_cell.py +++ b/nova/cells/filters/target_cell.py @@ -22,6 +22,7 @@ done as there's no way to know whether the full path is a valid. """ from nova.cells import filters +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/cells/messaging.py b/nova/cells/messaging.py index d7ef1cee780f..8bd68e1ea3e1 100644 --- a/nova/cells/messaging.py +++ b/nova/cells/messaging.py @@ -39,6 +39,7 @@ from nova import exception from nova.objects import base as objects_base from nova.objects import instance as instance_obj from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/cells/opts.py b/nova/cells/opts.py index f380cbce5687..2b95a90e83d7 100644 --- a/nova/cells/opts.py +++ b/nova/cells/opts.py @@ -21,6 +21,7 @@ Global cells config options from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/cells/rpc_driver.py b/nova/cells/rpc_driver.py index 2717a9954a35..4116ceda8b87 100644 --- a/nova/cells/rpc_driver.py +++ b/nova/cells/rpc_driver.py @@ -22,6 +22,7 @@ import urlparse from oslo.config import cfg from nova.cells import driver +from nova.openstack.common.gettextutils import _ from nova.openstack.common import rpc from nova.openstack.common.rpc import dispatcher as rpc_dispatcher from nova.openstack.common.rpc import proxy as rpc_proxy diff --git a/nova/cells/rpcapi.py b/nova/cells/rpcapi.py index 76ddf8879681..d9bdf47cf048 100644 --- a/nova/cells/rpcapi.py +++ b/nova/cells/rpcapi.py @@ -26,6 +26,7 @@ from oslo.config import cfg from nova import exception from nova.objects import base as objects_base +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common.rpc import proxy as rpc_proxy diff --git a/nova/cells/scheduler.py b/nova/cells/scheduler.py index e1e6ce28f552..6f3f3bf7de57 100644 --- a/nova/cells/scheduler.py +++ b/nova/cells/scheduler.py @@ -31,6 +31,7 @@ from nova.compute import vm_states from nova import conductor from nova.db import base from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import rpcapi as scheduler_rpcapi from nova.scheduler import utils as scheduler_utils diff --git a/nova/cells/state.py b/nova/cells/state.py index 1d4867b82a8a..fa10001028aa 100644 --- a/nova/cells/state.py +++ b/nova/cells/state.py @@ -27,6 +27,7 @@ from nova import context from nova.db import base from nova import exception from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/cells/weights/mute_child.py b/nova/cells/weights/mute_child.py index ff9d3ab79ea7..7bffb739b476 100644 --- a/nova/cells/weights/mute_child.py +++ b/nova/cells/weights/mute_child.py @@ -21,6 +21,7 @@ downgrade its likelihood of being chosen for scheduling requests. from oslo.config import cfg from nova.cells import weights +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/cloudpipe/pipelib.py b/nova/cloudpipe/pipelib.py index 73d6b92e6a80..e44cd9c46085 100644 --- a/nova/cloudpipe/pipelib.py +++ b/nova/cloudpipe/pipelib.py @@ -34,6 +34,7 @@ from nova import crypto from nova import db from nova import exception from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import paths from nova import utils diff --git a/nova/cmd/__init__.py b/nova/cmd/__init__.py index 844c3b62a433..87edf9b4b957 100644 --- a/nova/cmd/__init__.py +++ b/nova/cmd/__init__.py @@ -32,6 +32,3 @@ os.environ['EVENTLET_NO_GREENDNS'] = 'yes' import eventlet eventlet.monkey_patch(os=False) - -from nova.openstack.common import gettextutils -gettextutils.install('nova') diff --git a/nova/cmd/all.py b/nova/cmd/all.py index 517033d05128..b4f7daf2a322 100644 --- a/nova/cmd/all.py +++ b/nova/cmd/all.py @@ -32,6 +32,7 @@ from oslo.config import cfg from nova import config from nova.objectstore import s3server +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import service from nova import utils diff --git a/nova/cmd/baremetal_deploy_helper.py b/nova/cmd/baremetal_deploy_helper.py index e8ea955ec100..fe18718ebdde 100644 --- a/nova/cmd/baremetal_deploy_helper.py +++ b/nova/cmd/baremetal_deploy_helper.py @@ -33,6 +33,7 @@ from wsgiref import simple_server from nova import config from nova import context as nova_context from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova import utils diff --git a/nova/cmd/baremetal_manage.py b/nova/cmd/baremetal_manage.py index e28289f8d1f0..843c7e835049 100644 --- a/nova/cmd/baremetal_manage.py +++ b/nova/cmd/baremetal_manage.py @@ -60,6 +60,7 @@ from oslo.config import cfg from nova import config from nova.openstack.common import cliutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import version from nova.virt.baremetal.db import migration as bmdb_migration diff --git a/nova/cmd/dhcpbridge.py b/nova/cmd/dhcpbridge.py index a7b8361a821c..55db5b77979b 100644 --- a/nova/cmd/dhcpbridge.py +++ b/nova/cmd/dhcpbridge.py @@ -29,6 +29,7 @@ from nova import config from nova import context from nova import db from nova.network import rpcapi as network_rpcapi +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/cmd/manage.py b/nova/cmd/manage.py index 944f5caaf7fe..bc4c2f23e59c 100644 --- a/nova/cmd/manage.py +++ b/nova/cmd/manage.py @@ -70,6 +70,7 @@ from nova.db import migration from nova import exception from nova.openstack.common import cliutils from nova.openstack.common.db import exception as db_exc +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import rpc diff --git a/nova/compute/__init__.py b/nova/compute/__init__.py index 7c21c1d3d92e..414084c700c1 100644 --- a/nova/compute/__init__.py +++ b/nova/compute/__init__.py @@ -19,6 +19,7 @@ # Importing full names to not pollute the namespace and cause possible # collisions with use of 'from nova.compute import ' elsewhere. import nova.cells.opts +import nova.exception import nova.openstack.common.importutils diff --git a/nova/compute/api.py b/nova/compute/api.py index 7198e5c919f1..eb74a4b9f92d 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -53,6 +53,7 @@ from nova import notifications from nova.objects import base as obj_base from nova.objects import instance as instance_obj from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common.notifier import api as notifier diff --git a/nova/compute/claims.py b/nova/compute/claims.py index 0d6d55aa4a0b..3e998cac9a9a 100644 --- a/nova/compute/claims.py +++ b/nova/compute/claims.py @@ -17,6 +17,7 @@ Claim objects for use with resource tracking. """ +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/compute/flavors.py b/nova/compute/flavors.py index cec7bf8e095f..73bd88ae3226 100644 --- a/nova/compute/flavors.py +++ b/nova/compute/flavors.py @@ -29,6 +29,7 @@ from nova import context from nova import db from nova import exception from nova.openstack.common.db import exception as db_exc +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import strutils from nova import utils diff --git a/nova/compute/manager.py b/nova/compute/manager.py index a119debfc98c..f2df82b26466 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -64,6 +64,7 @@ from nova.network.security_group import openstack_driver from nova.objects import base as obj_base from nova.objects import instance as instance_obj from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common.notifier import api as notifier diff --git a/nova/compute/resource_tracker.py b/nova/compute/resource_tracker.py index ae06a10120eb..037840b9d994 100644 --- a/nova/compute/resource_tracker.py +++ b/nova/compute/resource_tracker.py @@ -28,6 +28,7 @@ from nova.compute import vm_states from nova import conductor from nova import context from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/compute/rpcapi.py b/nova/compute/rpcapi.py index 4f1aac83b985..5fd93812485e 100644 --- a/nova/compute/rpcapi.py +++ b/nova/compute/rpcapi.py @@ -22,6 +22,7 @@ from oslo.config import cfg from nova import exception from nova.objects import base as objects_base +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import rpc import nova.openstack.common.rpc diff --git a/nova/compute/utils.py b/nova/compute/utils.py index e4aed54545de..ae11b4326fed 100644 --- a/nova/compute/utils.py +++ b/nova/compute/utils.py @@ -28,6 +28,7 @@ from nova import exception from nova.network import model as network_model from nova import notifications from nova.objects import instance as instance_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log from nova.openstack.common.notifier import api as notifier_api from nova.openstack.common import timeutils diff --git a/nova/conductor/api.py b/nova/conductor/api.py index efbd5e3393a9..93b603f75a8d 100644 --- a/nova/conductor/api.py +++ b/nova/conductor/api.py @@ -19,6 +19,7 @@ from oslo.config import cfg from nova import baserpc from nova.conductor import manager from nova.conductor import rpcapi +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common.rpc import common as rpc_common from nova import utils diff --git a/nova/conductor/manager.py b/nova/conductor/manager.py index 7cc49faf95f6..e4bb27a18b84 100644 --- a/nova/conductor/manager.py +++ b/nova/conductor/manager.py @@ -34,6 +34,7 @@ from nova import notifications from nova.objects import base as nova_object from nova.objects import instance as instance_obj from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common.notifier import api as notifier diff --git a/nova/conductor/tasks/live_migrate.py b/nova/conductor/tasks/live_migrate.py index 3c7f2ac160a9..03e98ba45b8f 100644 --- a/nova/conductor/tasks/live_migrate.py +++ b/nova/conductor/tasks/live_migrate.py @@ -20,6 +20,7 @@ from nova.compute import rpcapi as compute_rpcapi from nova import db from nova import exception from nova.image import glance +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import servicegroup diff --git a/nova/console/manager.py b/nova/console/manager.py index 382689381c95..481897df9772 100644 --- a/nova/console/manager.py +++ b/nova/console/manager.py @@ -24,6 +24,7 @@ from oslo.config import cfg from nova.compute import rpcapi as compute_rpcapi from nova import exception from nova import manager +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova import utils diff --git a/nova/console/vmrc_manager.py b/nova/console/vmrc_manager.py index 28d23ce9ca21..bb4691e599c5 100644 --- a/nova/console/vmrc_manager.py +++ b/nova/console/vmrc_manager.py @@ -22,6 +22,7 @@ from oslo.config import cfg from nova.compute import rpcapi as compute_rpcapi from nova import exception from nova import manager +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.virt.vmwareapi import driver as vmwareapi_conn diff --git a/nova/console/websocketproxy.py b/nova/console/websocketproxy.py index ce3fff8d5348..acf714495042 100644 --- a/nova/console/websocketproxy.py +++ b/nova/console/websocketproxy.py @@ -27,6 +27,7 @@ import websockify from nova.consoleauth import rpcapi as consoleauth_rpcapi from nova import context +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/console/xvp.py b/nova/console/xvp.py index b2810149907b..12e5c0156b58 100644 --- a/nova/console/xvp.py +++ b/nova/console/xvp.py @@ -26,6 +26,7 @@ from oslo.config import cfg from nova import context from nova import db from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova import paths diff --git a/nova/consoleauth/manager.py b/nova/consoleauth/manager.py index c3396b005ef5..021914b8fe10 100644 --- a/nova/consoleauth/manager.py +++ b/nova/consoleauth/manager.py @@ -25,6 +25,7 @@ from oslo.config import cfg from nova.cells import rpcapi as cells_rpcapi from nova.compute import rpcapi as compute_rpcapi from nova import manager +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import memorycache diff --git a/nova/context.py b/nova/context.py index cd4428e581e3..c527147576cc 100644 --- a/nova/context.py +++ b/nova/context.py @@ -23,6 +23,7 @@ import copy import uuid from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import local from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/crypto.py b/nova/crypto.py index b312aca2df2a..ca196cc547ab 100644 --- a/nova/crypto.py +++ b/nova/crypto.py @@ -40,6 +40,7 @@ from nova import db from nova import exception from nova.openstack.common import excutils from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova.openstack.common import timeutils diff --git a/nova/db/api.py b/nova/db/api.py index ea3b417a5251..a0c0fab943f8 100644 --- a/nova/db/api.py +++ b/nova/db/api.py @@ -48,6 +48,7 @@ from oslo.config import cfg from nova.cells import rpcapi as cells_rpcapi from nova import exception from nova.openstack.common.db import api as db_api +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index cd9b1f98c4f7..6e2354e136cc 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -57,6 +57,7 @@ from nova import exception from nova.openstack.common.db import exception as db_exc from nova.openstack.common.db.sqlalchemy import session as db_session from nova.openstack.common.db.sqlalchemy import utils as sqlalchemyutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils from nova.openstack.common import uuidutils diff --git a/nova/db/sqlalchemy/migrate_repo/versions/133_folsom.py b/nova/db/sqlalchemy/migrate_repo/versions/133_folsom.py index a24cabb2fc12..4d189db93ae7 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/133_folsom.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/133_folsom.py @@ -20,6 +20,7 @@ from sqlalchemy import Boolean, BigInteger, Column, DateTime, Float, ForeignKey from sqlalchemy import Index, Integer, MetaData, String, Table, Text from sqlalchemy import dialects +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/db/sqlalchemy/migrate_repo/versions/145_add_volume_usage_cache.py b/nova/db/sqlalchemy/migrate_repo/versions/145_add_volume_usage_cache.py index 41c4b6097a8e..f49b9cf405ab 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/145_add_volume_usage_cache.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/145_add_volume_usage_cache.py @@ -17,6 +17,7 @@ from sqlalchemy import Column, DateTime from sqlalchemy import Boolean, BigInteger, MetaData, Integer, String, Table +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/db/sqlalchemy/migrate_repo/versions/154_add_shadow_tables.py b/nova/db/sqlalchemy/migrate_repo/versions/154_add_shadow_tables.py index 7c9f69c2bf44..d8a8910c3101 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/154_add_shadow_tables.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/154_add_shadow_tables.py @@ -18,6 +18,7 @@ from sqlalchemy import BigInteger, Column, MetaData, Table from sqlalchemy.types import NullType +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/db/sqlalchemy/migrate_repo/versions/193_cinder_cleanup.py b/nova/db/sqlalchemy/migrate_repo/versions/193_cinder_cleanup.py index 62b01cf1f377..3b6fcb42a597 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/193_cinder_cleanup.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/193_cinder_cleanup.py @@ -19,6 +19,7 @@ from sqlalchemy import Boolean, Column, DateTime, ForeignKey from sqlalchemy import Integer, MetaData, String, Table from nova.db.sqlalchemy import utils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/db/sqlalchemy/migrate_repo/versions/200_add_transport_url_to_cell.py b/nova/db/sqlalchemy/migrate_repo/versions/200_add_transport_url_to_cell.py index 203a63b3ffd1..e3d1fe9bbc01 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/200_add_transport_url_to_cell.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/200_add_transport_url_to_cell.py @@ -19,6 +19,7 @@ from sqlalchemy import Column, Integer, MetaData, String, Table from sqlalchemy.sql.expression import select from nova.cells import rpc_driver +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/db/sqlalchemy/migrate_repo/versions/203_make_user_quotas_key_and_value.py b/nova/db/sqlalchemy/migrate_repo/versions/203_make_user_quotas_key_and_value.py index 243979444673..10755192dd4a 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/203_make_user_quotas_key_and_value.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/203_make_user_quotas_key_and_value.py @@ -19,6 +19,7 @@ from sqlalchemy import Index, UniqueConstraint, MetaData, String, Table from nova.db.sqlalchemy import api as db from nova.db.sqlalchemy import utils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/db/sqlalchemy/migration.py b/nova/db/sqlalchemy/migration.py index f2a3ef138921..4170c9350b3e 100644 --- a/nova/db/sqlalchemy/migration.py +++ b/nova/db/sqlalchemy/migration.py @@ -22,6 +22,7 @@ import os from nova.db import migration from nova import exception from nova.openstack.common.db.sqlalchemy import session as db_session +from nova.openstack.common.gettextutils import _ import migrate diff --git a/nova/db/sqlalchemy/utils.py b/nova/db/sqlalchemy/utils.py index fab0808e212f..4dda1d23cfc3 100644 --- a/nova/db/sqlalchemy/utils.py +++ b/nova/db/sqlalchemy/utils.py @@ -39,6 +39,7 @@ from sqlalchemy.types import NullType from nova.db.sqlalchemy import api as db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/exception.py b/nova/exception.py index 063980fc31b0..89b1c31db9d2 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -31,6 +31,7 @@ from oslo.config import cfg import webob.exc from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import safe_utils diff --git a/nova/filters.py b/nova/filters.py index 8c9015d85ed1..04757ecec183 100644 --- a/nova/filters.py +++ b/nova/filters.py @@ -18,6 +18,7 @@ Filter support """ from nova import loadables +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/hooks.py b/nova/hooks.py index a27fad76ba67..bf1af550177e 100644 --- a/nova/hooks.py +++ b/nova/hooks.py @@ -48,6 +48,7 @@ import functools import stevedore +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/image/glance.py b/nova/image/glance.py index bdc87107b3be..7b3acc43f10c 100644 --- a/nova/image/glance.py +++ b/nova/image/glance.py @@ -32,6 +32,7 @@ import glanceclient.exc from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/image/s3.py b/nova/image/s3.py index a1ae55b4e17e..5700d5e1e2cf 100644 --- a/nova/image/s3.py +++ b/nova/image/s3.py @@ -34,6 +34,7 @@ from nova.api.ec2 import ec2utils import nova.cert.rpcapi from nova import exception from nova.image import glance +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova import utils diff --git a/nova/ipv6/account_identifier.py b/nova/ipv6/account_identifier.py index d50a669492da..cbf0eabfd107 100644 --- a/nova/ipv6/account_identifier.py +++ b/nova/ipv6/account_identifier.py @@ -22,6 +22,8 @@ import hashlib import netaddr +from nova.openstack.common.gettextutils import _ + def to_global(prefix, mac, project_id): project_hash = netaddr.IPAddress( diff --git a/nova/ipv6/rfc2462.py b/nova/ipv6/rfc2462.py index 147fe6876beb..ba3bbcd76e04 100644 --- a/nova/ipv6/rfc2462.py +++ b/nova/ipv6/rfc2462.py @@ -21,6 +21,8 @@ import netaddr +from nova.openstack.common.gettextutils import _ + def to_global(prefix, mac, project_id): try: diff --git a/nova/manager.py b/nova/manager.py index 8fb5db81f757..6e940f7daf13 100644 --- a/nova/manager.py +++ b/nova/manager.py @@ -58,6 +58,7 @@ from oslo.config import cfg from nova import baserpc from nova.db import base from nova.objects import base as objects_base +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import periodic_task from nova.openstack.common.rpc import dispatcher as rpc_dispatcher diff --git a/nova/network/api.py b/nova/network/api.py index 4a3e4aa2edeb..092379f9710a 100644 --- a/nova/network/api.py +++ b/nova/network/api.py @@ -28,6 +28,7 @@ from nova.network import floating_ips from nova.network import model as network_model from nova.network import rpcapi as network_rpcapi from nova.objects import instance_info_cache as info_cache_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import policy from nova import utils diff --git a/nova/network/driver.py b/nova/network/driver.py index 47d043e09f57..aca906bb1f63 100644 --- a/nova/network/driver.py +++ b/nova/network/driver.py @@ -18,6 +18,7 @@ import sys from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging diff --git a/nova/network/floating_ips.py b/nova/network/floating_ips.py index 52ed4c63556b..ba29d4d26a4d 100644 --- a/nova/network/floating_ips.py +++ b/nova/network/floating_ips.py @@ -24,6 +24,7 @@ from nova.db import base from nova import exception from nova.network import rpcapi as network_rpcapi from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common.notifier import api as notifier diff --git a/nova/network/ldapdns.py b/nova/network/ldapdns.py index 19c862d38271..d1062bb82126 100644 --- a/nova/network/ldapdns.py +++ b/nova/network/ldapdns.py @@ -19,6 +19,7 @@ from oslo.config import cfg from nova import exception from nova.network import dns_driver +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import utils diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py index 0cc97d349dcd..4f8efa9986f3 100644 --- a/nova/network/linux_net.py +++ b/nova/network/linux_net.py @@ -31,6 +31,7 @@ from nova import db from nova import exception from nova.openstack.common import excutils from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/network/manager.py b/nova/network/manager.py index 5c1671cd1579..9769798b4c01 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -64,6 +64,7 @@ from nova.network import model as network_model from nova.network import rpcapi as network_rpcapi from nova.network.security_group import openstack_driver from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/network/minidns.py b/nova/network/minidns.py index b81f96275fb6..81fbda690255 100644 --- a/nova/network/minidns.py +++ b/nova/network/minidns.py @@ -20,6 +20,7 @@ from oslo.config import cfg from nova import exception from nova.network import dns_driver +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging CONF = cfg.CONF diff --git a/nova/network/model.py b/nova/network/model.py index 927554951eb2..2731d4d810b3 100644 --- a/nova/network/model.py +++ b/nova/network/model.py @@ -21,6 +21,7 @@ import eventlet import netaddr from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils diff --git a/nova/network/neutronv2/__init__.py b/nova/network/neutronv2/__init__.py index a7c9b4d316e6..0c6c2203879e 100644 --- a/nova/network/neutronv2/__init__.py +++ b/nova/network/neutronv2/__init__.py @@ -21,6 +21,7 @@ from neutronclient.v2_0 import client as clientv20 from oslo.config import cfg from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging CONF = cfg.CONF diff --git a/nova/network/neutronv2/api.py b/nova/network/neutronv2/api.py index 1a2d8b7b4209..097e2004dc7a 100644 --- a/nova/network/neutronv2/api.py +++ b/nova/network/neutronv2/api.py @@ -31,6 +31,7 @@ from nova.network import neutronv2 from nova.network.neutronv2 import constants from nova.network.security_group import openstack_driver from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import uuidutils diff --git a/nova/network/security_group/neutron_driver.py b/nova/network/security_group/neutron_driver.py index cef45d3372f5..f9b2db47c2a6 100644 --- a/nova/network/security_group/neutron_driver.py +++ b/nova/network/security_group/neutron_driver.py @@ -29,6 +29,7 @@ from nova import exception from nova.network import neutronv2 from nova.network.security_group import security_group_base from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import uuidutils from nova import utils diff --git a/nova/network/security_group/security_group_base.py b/nova/network/security_group/security_group_base.py index 2d0ffaa007c5..fe6b75290421 100644 --- a/nova/network/security_group/security_group_base.py +++ b/nova/network/security_group/security_group_base.py @@ -26,6 +26,7 @@ import urllib from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova import utils CONF = cfg.CONF diff --git a/nova/notifications.py b/nova/notifications.py index ebd30478c16f..8331cc3760ad 100644 --- a/nova/notifications.py +++ b/nova/notifications.py @@ -30,6 +30,7 @@ from nova.image import glance from nova import network from nova.network import model as network_model from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log from nova.openstack.common.notifier import api as notifier_api from nova.openstack.common import timeutils diff --git a/nova/objects/base.py b/nova/objects/base.py index f73db598f3ff..26eda2a22515 100644 --- a/nova/objects/base.py +++ b/nova/objects/base.py @@ -19,6 +19,7 @@ import collections from nova import context from nova import exception from nova.objects import utils as obj_utils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common.rpc import common as rpc_common import nova.openstack.common.rpc.dispatcher diff --git a/nova/objects/instance_info_cache.py b/nova/objects/instance_info_cache.py index 52779b4c92a3..ee7cc6cf42dd 100644 --- a/nova/objects/instance_info_cache.py +++ b/nova/objects/instance_info_cache.py @@ -18,6 +18,7 @@ from nova import db from nova import exception from nova.objects import base from nova.objects import utils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/openstack/common/config/generator.py b/nova/openstack/common/config/generator.py index a3b9de96d027..74605b3511a4 100644 --- a/nova/openstack/common/config/generator.py +++ b/nova/openstack/common/config/generator.py @@ -29,10 +29,8 @@ import textwrap from oslo.config import cfg -from nova.openstack.common import gettextutils from nova.openstack.common import importutils -gettextutils.install('nova') STROPT = "StrOpt" BOOLOPT = "BoolOpt" diff --git a/nova/policy.py b/nova/policy.py index 68f44969641e..12cf3648abc1 100644 --- a/nova/policy.py +++ b/nova/policy.py @@ -22,6 +22,7 @@ import os.path from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import policy from nova import utils diff --git a/nova/quota.py b/nova/quota.py index 78dde47cae50..615b4142cacc 100644 --- a/nova/quota.py +++ b/nova/quota.py @@ -24,6 +24,7 @@ from oslo.config import cfg from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/scheduler/chance.py b/nova/scheduler/chance.py index 0ff72a25b701..bda0a745c872 100644 --- a/nova/scheduler/chance.py +++ b/nova/scheduler/chance.py @@ -27,6 +27,7 @@ from oslo.config import cfg from nova.compute import rpcapi as compute_rpcapi from nova import exception +from nova.openstack.common.gettextutils import _ from nova.scheduler import driver CONF = cfg.CONF diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index f5949270edb4..8ef0b45ac196 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -31,6 +31,7 @@ from nova.conductor import api as conductor_api from nova import db from nova import exception from nova import notifications +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common.notifier import api as notifier diff --git a/nova/scheduler/filter_scheduler.py b/nova/scheduler/filter_scheduler.py index 3792e8a2ff24..2799e872e78a 100644 --- a/nova/scheduler/filter_scheduler.py +++ b/nova/scheduler/filter_scheduler.py @@ -27,6 +27,7 @@ from nova.compute import flavors from nova.compute import rpcapi as compute_rpcapi from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common.notifier import api as notifier from nova.scheduler import driver diff --git a/nova/scheduler/filters/affinity_filter.py b/nova/scheduler/filters/affinity_filter.py index 4ea46cd4d297..2fd21b1dd6d3 100644 --- a/nova/scheduler/filters/affinity_filter.py +++ b/nova/scheduler/filters/affinity_filter.py @@ -18,6 +18,7 @@ import netaddr from nova.compute import api as compute +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters diff --git a/nova/scheduler/filters/aggregate_instance_extra_specs.py b/nova/scheduler/filters/aggregate_instance_extra_specs.py index 5dfc42dd6222..d8fe8b1cc965 100644 --- a/nova/scheduler/filters/aggregate_instance_extra_specs.py +++ b/nova/scheduler/filters/aggregate_instance_extra_specs.py @@ -15,6 +15,7 @@ # under the License. from nova import db +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters from nova.scheduler.filters import extra_specs_ops diff --git a/nova/scheduler/filters/aggregate_multitenancy_isolation.py b/nova/scheduler/filters/aggregate_multitenancy_isolation.py index 258fd1b19f23..dd8ee7a0561c 100644 --- a/nova/scheduler/filters/aggregate_multitenancy_isolation.py +++ b/nova/scheduler/filters/aggregate_multitenancy_isolation.py @@ -14,6 +14,7 @@ # under the License. from nova import db +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters diff --git a/nova/scheduler/filters/compute_capabilities_filter.py b/nova/scheduler/filters/compute_capabilities_filter.py index 9b3fc20f1b7f..aec1017605cf 100644 --- a/nova/scheduler/filters/compute_capabilities_filter.py +++ b/nova/scheduler/filters/compute_capabilities_filter.py @@ -13,6 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters from nova.scheduler.filters import extra_specs_ops diff --git a/nova/scheduler/filters/compute_filter.py b/nova/scheduler/filters/compute_filter.py index 35627d4b0530..523836d30962 100644 --- a/nova/scheduler/filters/compute_filter.py +++ b/nova/scheduler/filters/compute_filter.py @@ -15,6 +15,7 @@ from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters from nova import servicegroup diff --git a/nova/scheduler/filters/core_filter.py b/nova/scheduler/filters/core_filter.py index 464c2825dc7c..ef5ea69deecd 100644 --- a/nova/scheduler/filters/core_filter.py +++ b/nova/scheduler/filters/core_filter.py @@ -18,6 +18,7 @@ from oslo.config import cfg from nova import db +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters diff --git a/nova/scheduler/filters/disk_filter.py b/nova/scheduler/filters/disk_filter.py index 37911d5d5f89..da62077b5e8b 100644 --- a/nova/scheduler/filters/disk_filter.py +++ b/nova/scheduler/filters/disk_filter.py @@ -15,6 +15,7 @@ from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters diff --git a/nova/scheduler/filters/image_props_filter.py b/nova/scheduler/filters/image_props_filter.py index 9486748d7c70..64327d1c3a3f 100644 --- a/nova/scheduler/filters/image_props_filter.py +++ b/nova/scheduler/filters/image_props_filter.py @@ -15,6 +15,7 @@ # License for the specific language governing permissions and limitations # under the License. +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters diff --git a/nova/scheduler/filters/io_ops_filter.py b/nova/scheduler/filters/io_ops_filter.py index 255563022300..570bb8921c7d 100644 --- a/nova/scheduler/filters/io_ops_filter.py +++ b/nova/scheduler/filters/io_ops_filter.py @@ -15,6 +15,7 @@ from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters diff --git a/nova/scheduler/filters/num_instances_filter.py b/nova/scheduler/filters/num_instances_filter.py index 2ed4a5454b60..33268354e445 100644 --- a/nova/scheduler/filters/num_instances_filter.py +++ b/nova/scheduler/filters/num_instances_filter.py @@ -15,6 +15,7 @@ from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters diff --git a/nova/scheduler/filters/ram_filter.py b/nova/scheduler/filters/ram_filter.py index a3dcfd07f0a2..4f95c9f826a7 100644 --- a/nova/scheduler/filters/ram_filter.py +++ b/nova/scheduler/filters/ram_filter.py @@ -17,6 +17,7 @@ from oslo.config import cfg from nova import db +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters diff --git a/nova/scheduler/filters/retry_filter.py b/nova/scheduler/filters/retry_filter.py index f82488527463..dea27ff060b5 100644 --- a/nova/scheduler/filters/retry_filter.py +++ b/nova/scheduler/filters/retry_filter.py @@ -13,6 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import filters diff --git a/nova/scheduler/filters/trusted_filter.py b/nova/scheduler/filters/trusted_filter.py index 522a6809678b..d5cf9678cde4 100644 --- a/nova/scheduler/filters/trusted_filter.py +++ b/nova/scheduler/filters/trusted_filter.py @@ -52,6 +52,7 @@ from oslo.config import cfg from nova import context from nova import db +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py index 68d998d02e3b..b88591d72d85 100644 --- a/nova/scheduler/host_manager.py +++ b/nova/scheduler/host_manager.py @@ -25,6 +25,7 @@ from nova.compute import task_states from nova.compute import vm_states from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils from nova.scheduler import filters diff --git a/nova/scheduler/scheduler_options.py b/nova/scheduler/scheduler_options.py index c1710cf9d7c1..d88c2174fe88 100644 --- a/nova/scheduler/scheduler_options.py +++ b/nova/scheduler/scheduler_options.py @@ -29,6 +29,7 @@ import os from oslo.config import cfg from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/scheduler/utils.py b/nova/scheduler/utils.py index 7df522c3e15c..316e88c6401b 100644 --- a/nova/scheduler/utils.py +++ b/nova/scheduler/utils.py @@ -20,6 +20,7 @@ from nova.compute import flavors from nova.compute import utils as compute_utils from nova import db from nova import notifications +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common.notifier import api as notifier diff --git a/nova/service.py b/nova/service.py index 715040323085..bf54a972d1b2 100644 --- a/nova/service.py +++ b/nova/service.py @@ -28,6 +28,7 @@ from oslo.config import cfg from nova import conductor from nova import context from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import rpc diff --git a/nova/servicegroup/api.py b/nova/servicegroup/api.py index 28b9432f9a7c..4ad52a4036fd 100644 --- a/nova/servicegroup/api.py +++ b/nova/servicegroup/api.py @@ -20,6 +20,7 @@ import random from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova import utils diff --git a/nova/servicegroup/drivers/db.py b/nova/servicegroup/drivers/db.py index d17b809e6a81..386269dc1e7d 100644 --- a/nova/servicegroup/drivers/db.py +++ b/nova/servicegroup/drivers/db.py @@ -17,6 +17,7 @@ from oslo.config import cfg from nova import conductor from nova import context +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils from nova.servicegroup import api diff --git a/nova/servicegroup/drivers/mc.py b/nova/servicegroup/drivers/mc.py index 39eadf364cca..a22aa7cf4d35 100644 --- a/nova/servicegroup/drivers/mc.py +++ b/nova/servicegroup/drivers/mc.py @@ -21,6 +21,7 @@ from oslo.config import cfg from nova import conductor from nova import context +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import memorycache from nova.openstack.common import timeutils diff --git a/nova/servicegroup/drivers/zk.py b/nova/servicegroup/drivers/zk.py index d318020adf5f..6c4e2da9b8cd 100644 --- a/nova/servicegroup/drivers/zk.py +++ b/nova/servicegroup/drivers/zk.py @@ -20,6 +20,7 @@ import eventlet from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import loopingcall diff --git a/nova/storage/linuxscsi.py b/nova/storage/linuxscsi.py index 4635411001f6..8bda99adaf6d 100644 --- a/nova/storage/linuxscsi.py +++ b/nova/storage/linuxscsi.py @@ -16,6 +16,7 @@ """Generic linux scsi subsystem utilities.""" +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import loopingcall from nova.openstack.common import processutils diff --git a/nova/tests/__init__.py b/nova/tests/__init__.py index fc945202be22..6cbd763ddddc 100644 --- a/nova/tests/__init__.py +++ b/nova/tests/__init__.py @@ -43,8 +43,3 @@ os.environ['EVENTLET_NO_GREENDNS'] = 'yes' import eventlet eventlet.monkey_patch(os=False) - -# See http://code.google.com/p/python-nose/issues/detail?id=373 -# The code below enables nosetests to work with i18n _() blocks -import __builtin__ -setattr(__builtin__, '_', lambda x: x) diff --git a/nova/tests/api/openstack/compute/plugins/v3/test_servers.py b/nova/tests/api/openstack/compute/plugins/v3/test_servers.py index 2ef12d063c5e..fa46bee71c8b 100644 --- a/nova/tests/api/openstack/compute/plugins/v3/test_servers.py +++ b/nova/tests/api/openstack/compute/plugins/v3/test_servers.py @@ -48,6 +48,7 @@ from nova.image import glance from nova.network import manager from nova.network.neutronv2 import api as neutron_api from nova.objects import instance as instance_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import policy as common_policy from nova.openstack.common import rpc diff --git a/nova/tests/api/openstack/compute/test_servers.py b/nova/tests/api/openstack/compute/test_servers.py index 42cebfdb775a..9dce329241fc 100644 --- a/nova/tests/api/openstack/compute/test_servers.py +++ b/nova/tests/api/openstack/compute/test_servers.py @@ -46,6 +46,7 @@ from nova.image import glance from nova.network import manager from nova.network.neutronv2 import api as neutron_api from nova.objects import instance as instance_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import policy as common_policy from nova.openstack.common import rpc diff --git a/nova/tests/api/openstack/compute/test_v3_extensions.py b/nova/tests/api/openstack/compute/test_v3_extensions.py index 4ea875aacfc7..22c36f5573ce 100644 --- a/nova/tests/api/openstack/compute/test_v3_extensions.py +++ b/nova/tests/api/openstack/compute/test_v3_extensions.py @@ -151,7 +151,7 @@ class ExtensionLoadingTestCase(test.TestCase): self.addCleanup(self._set_v3_core, v3_core) # if no core API extensions are missing then an exception will # not be raised when creating an instance of compute.APIRouterV3 - _ = compute.APIRouterV3() + compute.APIRouterV3() def test_core_extensions_missing(self): self.stubs.Set(stevedore.enabled, 'EnabledExtensionManager', diff --git a/nova/tests/api/test_auth.py b/nova/tests/api/test_auth.py index ed69474c8d60..8a39dbdd3dd9 100644 --- a/nova/tests/api/test_auth.py +++ b/nova/tests/api/test_auth.py @@ -16,6 +16,7 @@ import json import webob import nova.api.auth +from nova.openstack.common.gettextutils import _ from nova import test diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index 381ad7a5cf38..ad6434323bf8 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -51,6 +51,7 @@ from nova.network import model as network_model from nova.network.security_group import openstack_driver from nova.objects import base as obj_base from nova.objects import instance as instance_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/tests/compute/test_keypairs.py b/nova/tests/compute/test_keypairs.py index f82d69ccb0b7..147f636703ef 100644 --- a/nova/tests/compute/test_keypairs.py +++ b/nova/tests/compute/test_keypairs.py @@ -22,6 +22,7 @@ from nova.compute import api as compute_api from nova import context from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova import quota from nova.tests.compute import test_compute diff --git a/nova/tests/db/test_migrations.py b/nova/tests/db/test_migrations.py index 27cdeec07d24..08b30b431dec 100644 --- a/nova/tests/db/test_migrations.py +++ b/nova/tests/db/test_migrations.py @@ -61,6 +61,7 @@ import sqlalchemy.exc from nova.db.sqlalchemy import api as db import nova.db.sqlalchemy.migrate_repo from nova.db.sqlalchemy import utils as db_utils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils from nova.openstack.common import uuidutils diff --git a/nova/tests/fake_ldap.py b/nova/tests/fake_ldap.py index d7d1df9c543a..ddaef8a5f887 100644 --- a/nova/tests/fake_ldap.py +++ b/nova/tests/fake_ldap.py @@ -25,6 +25,7 @@ library to work with nova. import fnmatch +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils diff --git a/nova/tests/fake_processutils.py b/nova/tests/fake_processutils.py index 04d39e7e5b25..b5b57c15eac5 100644 --- a/nova/tests/fake_processutils.py +++ b/nova/tests/fake_processutils.py @@ -20,6 +20,7 @@ import re from eventlet import greenthread +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils diff --git a/nova/tests/fake_volume.py b/nova/tests/fake_volume.py index 8bb3258b6a12..54ed8e645245 100644 --- a/nova/tests/fake_volume.py +++ b/nova/tests/fake_volume.py @@ -19,6 +19,7 @@ import uuid from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/tests/integrated/api/client.py b/nova/tests/integrated/api/client.py index 958a5500bfd7..2c6b5c7c2200 100644 --- a/nova/tests/integrated/api/client.py +++ b/nova/tests/integrated/api/client.py @@ -18,6 +18,7 @@ import httplib import urllib import urlparse +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py index 366d4b798a72..4cee7332da21 100644 --- a/nova/tests/integrated/test_api_samples.py +++ b/nova/tests/integrated/test_api_samples.py @@ -43,6 +43,7 @@ from nova import db from nova.db.sqlalchemy import models from nova import exception from nova.network import api as network_api +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/tests/integrated/test_login.py b/nova/tests/integrated/test_login.py index 8f1601ee0efe..36561d32809f 100644 --- a/nova/tests/integrated/test_login.py +++ b/nova/tests/integrated/test_login.py @@ -16,6 +16,7 @@ # under the License. +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.tests.integrated import integrated_helpers diff --git a/nova/tests/objects/test_objects.py b/nova/tests/objects/test_objects.py index 0e49d4f7753e..0df5d13bcb64 100644 --- a/nova/tests/objects/test_objects.py +++ b/nova/tests/objects/test_objects.py @@ -14,12 +14,9 @@ import contextlib import datetime -import gettext import iso8601 import netaddr -gettext.install('nova') - from nova.conductor import rpcapi as conductor_rpcapi from nova import context from nova import exception diff --git a/nova/tests/test_nova_manage.py b/nova/tests/test_nova_manage.py index 3105343394f4..4f91da517c26 100644 --- a/nova/tests/test_nova_manage.py +++ b/nova/tests/test_nova_manage.py @@ -23,6 +23,7 @@ from nova.cmd import manage from nova import context from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova import test from nova.tests.db import fakes as db_fakes diff --git a/nova/tests/virt/hyperv/test_hypervapi.py b/nova/tests/virt/hyperv/test_hypervapi.py index 34844a58ba30..6954e982c9bc 100644 --- a/nova/tests/virt/hyperv/test_hypervapi.py +++ b/nova/tests/virt/hyperv/test_hypervapi.py @@ -35,6 +35,7 @@ from nova import context from nova import db from nova import exception from nova.image import glance +from nova.openstack.common.gettextutils import _ from nova import test from nova.tests import fake_network from nova.tests.image import fake as fake_image diff --git a/nova/tests/virt/libvirt/fakelibvirt.py b/nova/tests/virt/libvirt/fakelibvirt.py index 04a933601a7d..27c2a3686775 100644 --- a/nova/tests/virt/libvirt/fakelibvirt.py +++ b/nova/tests/virt/libvirt/fakelibvirt.py @@ -19,6 +19,8 @@ from lxml import etree import time import uuid +from nova.openstack.common.gettextutils import _ + # Allow passing None to the various connect methods # (i.e. allow the client to rely on default URLs) allow_default_uri_connection = True diff --git a/nova/tests/virt/xenapi/test_vm_utils.py b/nova/tests/virt/xenapi/test_vm_utils.py index f19367102536..59a4c9530bbc 100644 --- a/nova/tests/virt/xenapi/test_vm_utils.py +++ b/nova/tests/virt/xenapi/test_vm_utils.py @@ -28,6 +28,7 @@ from nova.compute import flavors from nova import context from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import timeutils from nova import test from nova.tests.virt.xenapi import stubs diff --git a/nova/tests/virt/xenapi/test_xenapi.py b/nova/tests/virt/xenapi/test_xenapi.py index e801d6d7ed07..950f3bcfecc0 100644 --- a/nova/tests/virt/xenapi/test_xenapi.py +++ b/nova/tests/virt/xenapi/test_xenapi.py @@ -37,6 +37,7 @@ from nova import context from nova import crypto from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/utils.py b/nova/utils.py index 77f1ab54596c..cab29b3f7046 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -43,6 +43,7 @@ from oslo.config import cfg from nova import exception from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import lockutils from nova.openstack.common import log as logging diff --git a/nova/virt/baremetal/db/sqlalchemy/api.py b/nova/virt/baremetal/db/sqlalchemy/api.py index 3c140556e792..fe281d8779cd 100644 --- a/nova/virt/baremetal/db/sqlalchemy/api.py +++ b/nova/virt/baremetal/db/sqlalchemy/api.py @@ -29,6 +29,7 @@ import nova.context from nova.db.sqlalchemy import api as sqlalchemy_api from nova import exception from nova.openstack.common.db import exception as db_exc +from nova.openstack.common.gettextutils import _ from nova.openstack.common import timeutils from nova.openstack.common import uuidutils from nova.virt.baremetal.db.sqlalchemy import models diff --git a/nova/virt/baremetal/db/sqlalchemy/migration.py b/nova/virt/baremetal/db/sqlalchemy/migration.py index 3fffd2098f37..ea0378124dd4 100644 --- a/nova/virt/baremetal/db/sqlalchemy/migration.py +++ b/nova/virt/baremetal/db/sqlalchemy/migration.py @@ -23,6 +23,7 @@ import os import sqlalchemy from nova import exception +from nova.openstack.common.gettextutils import _ from nova.virt.baremetal.db import migration from nova.virt.baremetal.db.sqlalchemy import session diff --git a/nova/virt/baremetal/driver.py b/nova/virt/baremetal/driver.py index cc9ce64cbc0a..47aac760ae9e 100755 --- a/nova/virt/baremetal/driver.py +++ b/nova/virt/baremetal/driver.py @@ -27,6 +27,7 @@ from nova.compute import power_state from nova import context as nova_context from nova import exception from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova import paths diff --git a/nova/virt/baremetal/ipmi.py b/nova/virt/baremetal/ipmi.py index 6fe33ad9a30f..ffadf4f4d611 100644 --- a/nova/virt/baremetal/ipmi.py +++ b/nova/virt/baremetal/ipmi.py @@ -28,6 +28,7 @@ import tempfile from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import loopingcall from nova import paths diff --git a/nova/virt/baremetal/pxe.py b/nova/virt/baremetal/pxe.py index 21fc2ce47246..354bca84a530 100644 --- a/nova/virt/baremetal/pxe.py +++ b/nova/virt/baremetal/pxe.py @@ -29,6 +29,7 @@ from nova.compute import flavors from nova import exception from nova.openstack.common.db import exception as db_exc from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import loopingcall from nova.openstack.common import timeutils diff --git a/nova/virt/baremetal/tilera.py b/nova/virt/baremetal/tilera.py index e1fd71d6d509..6431901f5d92 100755 --- a/nova/virt/baremetal/tilera.py +++ b/nova/virt/baremetal/tilera.py @@ -28,6 +28,7 @@ from nova.compute import flavors from nova import exception from nova.openstack.common.db import exception as db_exc from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import utils from nova.virt.baremetal import baremetal_states diff --git a/nova/virt/baremetal/tilera_pdu.py b/nova/virt/baremetal/tilera_pdu.py index b82ae68a65af..3d07d23fe495 100755 --- a/nova/virt/baremetal/tilera_pdu.py +++ b/nova/virt/baremetal/tilera_pdu.py @@ -25,6 +25,7 @@ import time from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova import utils diff --git a/nova/virt/baremetal/utils.py b/nova/virt/baremetal/utils.py index 382470050ee3..8b77b5e9e148 100644 --- a/nova/virt/baremetal/utils.py +++ b/nova/virt/baremetal/utils.py @@ -19,6 +19,7 @@ import errno import os import shutil +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.disk import api as disk_api from nova.virt.libvirt import utils as libvirt_utils diff --git a/nova/virt/baremetal/vif_driver.py b/nova/virt/baremetal/vif_driver.py index 627155f9ce45..ad1521cac29a 100644 --- a/nova/virt/baremetal/vif_driver.py +++ b/nova/virt/baremetal/vif_driver.py @@ -17,6 +17,7 @@ from oslo.config import cfg from nova import context from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.baremetal import db as bmdb diff --git a/nova/virt/baremetal/virtual_power_driver.py b/nova/virt/baremetal/virtual_power_driver.py index 303e5a009474..3239c41d782a 100644 --- a/nova/virt/baremetal/virtual_power_driver.py +++ b/nova/virt/baremetal/virtual_power_driver.py @@ -21,6 +21,7 @@ from oslo.config import cfg from nova import context as nova_context from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import processutils diff --git a/nova/virt/baremetal/volume_driver.py b/nova/virt/baremetal/volume_driver.py index f634fa76ab80..569100f3ce20 100644 --- a/nova/virt/baremetal/volume_driver.py +++ b/nova/virt/baremetal/volume_driver.py @@ -23,6 +23,7 @@ from oslo.config import cfg from nova import context as nova_context from nova.db import api as nova_db_api from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import processutils diff --git a/nova/virt/configdrive.py b/nova/virt/configdrive.py index d4038457f5a6..56b425cce0d1 100644 --- a/nova/virt/configdrive.py +++ b/nova/virt/configdrive.py @@ -25,6 +25,7 @@ from oslo.config import cfg from nova import exception from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import utils from nova import version diff --git a/nova/virt/disk/api.py b/nova/virt/disk/api.py index 975b7b52790c..4f9daf942659 100644 --- a/nova/virt/disk/api.py +++ b/nova/virt/disk/api.py @@ -35,6 +35,7 @@ if os.name != 'nt': from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import processutils diff --git a/nova/virt/disk/mount/api.py b/nova/virt/disk/mount/api.py index 7c442fd3d483..fb0ba8d5fe55 100644 --- a/nova/virt/disk/mount/api.py +++ b/nova/virt/disk/mount/api.py @@ -18,6 +18,7 @@ import os import time +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova import utils diff --git a/nova/virt/disk/mount/loop.py b/nova/virt/disk/mount/loop.py index 366d34715cb4..24fbe65b1fad 100644 --- a/nova/virt/disk/mount/loop.py +++ b/nova/virt/disk/mount/loop.py @@ -15,6 +15,7 @@ # under the License. """Support for mounting images with the loop device.""" +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import utils from nova.virt.disk.mount import api diff --git a/nova/virt/disk/mount/nbd.py b/nova/virt/disk/mount/nbd.py index d6414e96c4bc..ed5687bef5b5 100644 --- a/nova/virt/disk/mount/nbd.py +++ b/nova/virt/disk/mount/nbd.py @@ -22,6 +22,7 @@ import time from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import utils from nova.virt.disk.mount import api diff --git a/nova/virt/disk/vfs/api.py b/nova/virt/disk/vfs/api.py index b6cff39fb6c6..6071989d794d 100644 --- a/nova/virt/disk/vfs/api.py +++ b/nova/virt/disk/vfs/api.py @@ -14,6 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging diff --git a/nova/virt/disk/vfs/guestfs.py b/nova/virt/disk/vfs/guestfs.py index 29b396577594..76268ba18343 100644 --- a/nova/virt/disk/vfs/guestfs.py +++ b/nova/virt/disk/vfs/guestfs.py @@ -18,6 +18,7 @@ from eventlet import tpool import guestfs from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.disk.vfs import api as vfs from nova.virt.libvirt import driver as libvirt_driver diff --git a/nova/virt/disk/vfs/localfs.py b/nova/virt/disk/vfs/localfs.py index 5eaefc3b3d11..8742de8072c8 100644 --- a/nova/virt/disk/vfs/localfs.py +++ b/nova/virt/disk/vfs/localfs.py @@ -19,6 +19,7 @@ import tempfile from nova import exception from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import utils from nova.virt.disk.mount import loop diff --git a/nova/virt/driver.py b/nova/virt/driver.py index 3f83dc1dd68f..9ffec0615a9b 100755 --- a/nova/virt/driver.py +++ b/nova/virt/driver.py @@ -26,6 +26,7 @@ import sys from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova import utils diff --git a/nova/virt/fake.py b/nova/virt/fake.py index 95f08efa874b..cbe251c2d2e5 100755 --- a/nova/virt/fake.py +++ b/nova/virt/fake.py @@ -31,6 +31,7 @@ from nova.compute import power_state from nova.compute import task_states from nova import db from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt import driver from nova.virt import virtapi diff --git a/nova/virt/firewall.py b/nova/virt/firewall.py index ec2844b12be7..5ba6293437b0 100644 --- a/nova/virt/firewall.py +++ b/nova/virt/firewall.py @@ -22,6 +22,7 @@ from oslo.config import cfg from nova import context from nova import network from nova.network import linux_net +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova import utils diff --git a/nova/virt/hyperv/basevolumeutils.py b/nova/virt/hyperv/basevolumeutils.py index 8f880652ef4c..5125b483afbf 100644 --- a/nova/virt/hyperv/basevolumeutils.py +++ b/nova/virt/hyperv/basevolumeutils.py @@ -29,6 +29,7 @@ if sys.platform == 'win32': import wmi from nova import block_device +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt import driver diff --git a/nova/virt/hyperv/driver.py b/nova/virt/hyperv/driver.py index 345b26932a4c..d4e5f15777ff 100755 --- a/nova/virt/hyperv/driver.py +++ b/nova/virt/hyperv/driver.py @@ -19,6 +19,7 @@ A Hyper-V Nova Compute driver. """ +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt import driver from nova.virt.hyperv import hostops diff --git a/nova/virt/hyperv/hostops.py b/nova/virt/hyperv/hostops.py index 2294881238ca..8fb58cf7c12a 100644 --- a/nova/virt/hyperv/hostops.py +++ b/nova/virt/hyperv/hostops.py @@ -23,6 +23,7 @@ import platform from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.virt.hyperv import constants diff --git a/nova/virt/hyperv/imagecache.py b/nova/virt/hyperv/imagecache.py index 6186b81c200b..a5bca5c610e4 100644 --- a/nova/virt/hyperv/imagecache.py +++ b/nova/virt/hyperv/imagecache.py @@ -23,6 +23,7 @@ from oslo.config import cfg from nova.compute import flavors from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import utils from nova.virt.hyperv import pathutils diff --git a/nova/virt/hyperv/livemigrationops.py b/nova/virt/hyperv/livemigrationops.py index adca7b8f3f0b..061501886326 100644 --- a/nova/virt/hyperv/livemigrationops.py +++ b/nova/virt/hyperv/livemigrationops.py @@ -21,6 +21,7 @@ Management class for live migration VM operations. from oslo.config import cfg from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.hyperv import imagecache from nova.virt.hyperv import livemigrationutils diff --git a/nova/virt/hyperv/livemigrationutils.py b/nova/virt/hyperv/livemigrationutils.py index 9fce5343aa9c..bc0a553fa989 100644 --- a/nova/virt/hyperv/livemigrationutils.py +++ b/nova/virt/hyperv/livemigrationutils.py @@ -21,6 +21,7 @@ if sys.platform == 'win32': import wmi from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.hyperv import vmutils from nova.virt.hyperv import volumeutilsv2 diff --git a/nova/virt/hyperv/migrationops.py b/nova/virt/hyperv/migrationops.py index 19afdd717654..e91f705c87f4 100644 --- a/nova/virt/hyperv/migrationops.py +++ b/nova/virt/hyperv/migrationops.py @@ -21,6 +21,7 @@ Management class for migration / resize operations. import os from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.hyperv import hostutils from nova.virt.hyperv import imagecache diff --git a/nova/virt/hyperv/networkutils.py b/nova/virt/hyperv/networkutils.py index 626240ca33dc..dd351d23dabc 100644 --- a/nova/virt/hyperv/networkutils.py +++ b/nova/virt/hyperv/networkutils.py @@ -25,6 +25,7 @@ import uuid if sys.platform == 'win32': import wmi +from nova.openstack.common.gettextutils import _ from nova.virt.hyperv import vmutils diff --git a/nova/virt/hyperv/pathutils.py b/nova/virt/hyperv/pathutils.py index 21bb82f72af7..53ac29673647 100644 --- a/nova/virt/hyperv/pathutils.py +++ b/nova/virt/hyperv/pathutils.py @@ -19,6 +19,7 @@ import os import shutil from eventlet.green import subprocess +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from oslo.config import cfg diff --git a/nova/virt/hyperv/snapshotops.py b/nova/virt/hyperv/snapshotops.py index c75b54e9e0d6..e35a6faf6ba8 100644 --- a/nova/virt/hyperv/snapshotops.py +++ b/nova/virt/hyperv/snapshotops.py @@ -24,6 +24,7 @@ from oslo.config import cfg from nova.compute import task_states from nova.image import glance +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.hyperv import pathutils from nova.virt.hyperv import vhdutils diff --git a/nova/virt/hyperv/vif.py b/nova/virt/hyperv/vif.py index f6ab07ad9ae4..e70e3f866605 100644 --- a/nova/virt/hyperv/vif.py +++ b/nova/virt/hyperv/vif.py @@ -20,6 +20,7 @@ import abc from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.hyperv import networkutils from nova.virt.hyperv import vmutils diff --git a/nova/virt/hyperv/vmops.py b/nova/virt/hyperv/vmops.py index 967b00e2372d..4bb35153c070 100644 --- a/nova/virt/hyperv/vmops.py +++ b/nova/virt/hyperv/vmops.py @@ -26,6 +26,7 @@ from oslo.config import cfg from nova.api.metadata import base as instance_metadata from nova import exception from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import processutils diff --git a/nova/virt/hyperv/vmutils.py b/nova/virt/hyperv/vmutils.py index dd03eb88b3c4..5698f77c999d 100644 --- a/nova/virt/hyperv/vmutils.py +++ b/nova/virt/hyperv/vmutils.py @@ -30,6 +30,7 @@ if sys.platform == 'win32': from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.hyperv import constants diff --git a/nova/virt/hyperv/volumeops.py b/nova/virt/hyperv/volumeops.py index b378070c931a..8b57b525496c 100644 --- a/nova/virt/hyperv/volumeops.py +++ b/nova/virt/hyperv/volumeops.py @@ -24,6 +24,7 @@ import time from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt import driver from nova.virt.hyperv import hostutils diff --git a/nova/virt/hyperv/volumeutils.py b/nova/virt/hyperv/volumeutils.py index ec1ba1f1b493..2a64d6e0a698 100644 --- a/nova/virt/hyperv/volumeutils.py +++ b/nova/virt/hyperv/volumeutils.py @@ -26,6 +26,7 @@ import time from eventlet.green import subprocess from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova import utils from nova.virt.hyperv import basevolumeutils from nova.virt.hyperv import vmutils diff --git a/nova/virt/images.py b/nova/virt/images.py index bbb57cd39990..2a4d94c4a416 100755 --- a/nova/virt/images.py +++ b/nova/virt/images.py @@ -29,6 +29,7 @@ from oslo.config import cfg from nova import exception from nova.image import glance from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import strutils from nova import utils diff --git a/nova/virt/libvirt/blockinfo.py b/nova/virt/libvirt/blockinfo.py index dad369274445..3da113663608 100644 --- a/nova/virt/libvirt/blockinfo.py +++ b/nova/virt/libvirt/blockinfo.py @@ -70,6 +70,7 @@ from oslo.config import cfg from nova import block_device from nova.compute import flavors from nova import exception +from nova.openstack.common.gettextutils import _ from nova.virt import configdrive from nova.virt import driver diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 53e5510da51b..95fbf3ae0735 100755 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -73,6 +73,7 @@ from nova import exception from nova.image import glance from nova.openstack.common import excutils from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/virt/libvirt/firewall.py b/nova/virt/libvirt/firewall.py index f9e948a5e555..7192cfb52edd 100644 --- a/nova/virt/libvirt/firewall.py +++ b/nova/virt/libvirt/firewall.py @@ -21,6 +21,7 @@ from eventlet import tpool from oslo.config import cfg from nova.cloudpipe import pipelib +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging import nova.virt.firewall as base_firewall from nova.virt import netutils diff --git a/nova/virt/libvirt/imagebackend.py b/nova/virt/libvirt/imagebackend.py index 2f29c0540a6a..a4406ca359f7 100755 --- a/nova/virt/libvirt/imagebackend.py +++ b/nova/virt/libvirt/imagebackend.py @@ -24,6 +24,7 @@ from oslo.config import cfg from nova import exception from nova.openstack.common import excutils from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import utils from nova.virt.disk import api as disk diff --git a/nova/virt/libvirt/imagecache.py b/nova/virt/libvirt/imagecache.py index c084ac569770..c754a1d36460 100644 --- a/nova/virt/libvirt/imagecache.py +++ b/nova/virt/libvirt/imagecache.py @@ -33,6 +33,7 @@ from oslo.config import cfg from nova.compute import task_states from nova.compute import vm_states from nova.openstack.common import fileutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova import utils diff --git a/nova/virt/libvirt/utils.py b/nova/virt/libvirt/utils.py index eb963b91df8f..7f54b1189235 100755 --- a/nova/virt/libvirt/utils.py +++ b/nova/virt/libvirt/utils.py @@ -27,6 +27,7 @@ from lxml import etree from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova import utils diff --git a/nova/virt/libvirt/vif.py b/nova/virt/libvirt/vif.py index 8ec55564b36f..13310e24ed12 100644 --- a/nova/virt/libvirt/vif.py +++ b/nova/virt/libvirt/vif.py @@ -26,6 +26,7 @@ from oslo.config import cfg from nova import exception from nova.network import linux_net from nova.network import model as network_model +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova import utils diff --git a/nova/virt/libvirt/volume.py b/nova/virt/libvirt/volume.py index d8dc18c1e3c8..26ffaae759d2 100644 --- a/nova/virt/libvirt/volume.py +++ b/nova/virt/libvirt/volume.py @@ -27,6 +27,7 @@ import urlparse from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import loopingcall from nova.openstack.common import processutils diff --git a/nova/virt/powervm/blockdev.py b/nova/virt/powervm/blockdev.py index 3e98c5791b11..6820ad1a41f3 100644 --- a/nova/virt/powervm/blockdev.py +++ b/nova/virt/powervm/blockdev.py @@ -25,6 +25,7 @@ from nova.compute import flavors from nova.compute import task_states from nova.image import glance from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova.virt import images diff --git a/nova/virt/powervm/common.py b/nova/virt/powervm/common.py index 9cc3e9dbd24b..8d658f2c1e19 100644 --- a/nova/virt/powervm/common.py +++ b/nova/virt/powervm/common.py @@ -21,6 +21,7 @@ import uuid import paramiko +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova.virt.powervm import constants diff --git a/nova/virt/powervm/driver.py b/nova/virt/powervm/driver.py index 43dc0d1d784f..086547c879fb 100755 --- a/nova/virt/powervm/driver.py +++ b/nova/virt/powervm/driver.py @@ -21,6 +21,7 @@ from oslo.config import cfg from nova.compute import flavors from nova.image import glance +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt import driver from nova.virt.powervm import exception diff --git a/nova/virt/powervm/exception.py b/nova/virt/powervm/exception.py index 471c0fa6affc..ac5e2b4ee587 100644 --- a/nova/virt/powervm/exception.py +++ b/nova/virt/powervm/exception.py @@ -15,6 +15,7 @@ # under the License. from nova import exception +from nova.openstack.common.gettextutils import _ class PowerVMConnectionFailed(exception.NovaException): diff --git a/nova/virt/powervm/lpar.py b/nova/virt/powervm/lpar.py index a6c782692039..6f64f1215183 100644 --- a/nova/virt/powervm/lpar.py +++ b/nova/virt/powervm/lpar.py @@ -21,6 +21,7 @@ PowerVM LPAR configuration attributes. import shlex +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.powervm import exception diff --git a/nova/virt/powervm/operator.py b/nova/virt/powervm/operator.py index 9ea6417de381..8a676ee6c8ec 100644 --- a/nova/virt/powervm/operator.py +++ b/nova/virt/powervm/operator.py @@ -23,6 +23,7 @@ from oslo.config import cfg from nova.compute import power_state from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova.virt.powervm import blockdev diff --git a/nova/virt/vmwareapi/driver.py b/nova/virt/vmwareapi/driver.py index 5a2fece81253..543f032dc07d 100644 --- a/nova/virt/vmwareapi/driver.py +++ b/nova/virt/vmwareapi/driver.py @@ -44,6 +44,7 @@ from eventlet import event from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import loopingcall diff --git a/nova/virt/vmwareapi/error_util.py b/nova/virt/vmwareapi/error_util.py index 9527c51d1509..666804dfbd63 100644 --- a/nova/virt/vmwareapi/error_util.py +++ b/nova/virt/vmwareapi/error_util.py @@ -19,6 +19,9 @@ Exception classes and SOAP response error checking module. """ +from nova.openstack.common.gettextutils import _ + + FAULT_NOT_AUTHENTICATED = "NotAuthenticated" FAULT_ALREADY_EXISTS = "AlreadyExists" diff --git a/nova/virt/vmwareapi/fake.py b/nova/virt/vmwareapi/fake.py index 21d50fb78460..56f6b29d3ece 100644 --- a/nova/virt/vmwareapi/fake.py +++ b/nova/virt/vmwareapi/fake.py @@ -26,6 +26,7 @@ import pprint import uuid from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.vmwareapi import error_util diff --git a/nova/virt/vmwareapi/host.py b/nova/virt/vmwareapi/host.py index 4bba8f9f0d0b..59af3a48eb0a 100644 --- a/nova/virt/vmwareapi/host.py +++ b/nova/virt/vmwareapi/host.py @@ -19,6 +19,7 @@ Management class for host-related functions (start, reboot, etc). """ from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.vmwareapi import vim_util from nova.virt.vmwareapi import vm_util diff --git a/nova/virt/vmwareapi/io_util.py b/nova/virt/vmwareapi/io_util.py index 3e182bf725ed..50fda9980ca7 100644 --- a/nova/virt/vmwareapi/io_util.py +++ b/nova/virt/vmwareapi/io_util.py @@ -26,6 +26,7 @@ from eventlet import greenthread from eventlet import queue from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/virt/vmwareapi/network_util.py b/nova/virt/vmwareapi/network_util.py index 2778b16debaf..f4d19689d6c3 100644 --- a/nova/virt/vmwareapi/network_util.py +++ b/nova/virt/vmwareapi/network_util.py @@ -21,6 +21,7 @@ Utility functions for ESX Networking. """ from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.vmwareapi import error_util from nova.virt.vmwareapi import vim_util diff --git a/nova/virt/vmwareapi/read_write_util.py b/nova/virt/vmwareapi/read_write_util.py index 026113f5c18a..94010ec50166 100644 --- a/nova/virt/vmwareapi/read_write_util.py +++ b/nova/virt/vmwareapi/read_write_util.py @@ -27,6 +27,7 @@ import urllib import urllib2 import urlparse +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/nova/virt/vmwareapi/vim.py b/nova/virt/vmwareapi/vim.py index deb4262db5f2..7f0cb2134694 100644 --- a/nova/virt/vmwareapi/vim.py +++ b/nova/virt/vmwareapi/vim.py @@ -29,6 +29,7 @@ except ImportError: from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.virt.vmwareapi import error_util RESP_NOT_XML_ERROR = 'Response is "text/html", not "text/xml"' diff --git a/nova/virt/vmwareapi/vmops.py b/nova/virt/vmwareapi/vmops.py index d7e37a4fbc68..ed8958d0e8f4 100644 --- a/nova/virt/vmwareapi/vmops.py +++ b/nova/virt/vmwareapi/vmops.py @@ -37,6 +37,7 @@ from nova import conductor from nova import context as nova_context from nova import exception from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt import driver from nova.virt.vmwareapi import vif as vmwarevif diff --git a/nova/virt/vmwareapi/vmware_images.py b/nova/virt/vmwareapi/vmware_images.py index 7107302a1cf9..831bad394b08 100644 --- a/nova/virt/vmwareapi/vmware_images.py +++ b/nova/virt/vmwareapi/vmware_images.py @@ -21,6 +21,7 @@ Utility functions for Image transfer. from nova import exception from nova.image import glance +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.vmwareapi import io_util from nova.virt.vmwareapi import read_write_util diff --git a/nova/virt/vmwareapi/volume_util.py b/nova/virt/vmwareapi/volume_util.py index 40e6fc7d0fc2..11dfce9403c0 100644 --- a/nova/virt/vmwareapi/volume_util.py +++ b/nova/virt/vmwareapi/volume_util.py @@ -22,6 +22,7 @@ and storage repositories import re import string +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.vmwareapi import vim_util from nova.virt.vmwareapi import vm_util diff --git a/nova/virt/vmwareapi/volumeops.py b/nova/virt/vmwareapi/volumeops.py index a5fb0f2027e8..b5af1d5da3aa 100644 --- a/nova/virt/vmwareapi/volumeops.py +++ b/nova/virt/vmwareapi/volumeops.py @@ -22,6 +22,7 @@ Management class for Storage-related functions (attach, detach, etc). from oslo.config import cfg from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.vmwareapi import vim_util from nova.virt.vmwareapi import vm_util diff --git a/nova/virt/xenapi/agent.py b/nova/virt/xenapi/agent.py index 0bd6d776e0ce..ee44757ebad1 100644 --- a/nova/virt/xenapi/agent.py +++ b/nova/virt/xenapi/agent.py @@ -28,6 +28,7 @@ from nova.compute import api as compute_api from nova import context from nova import crypto from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import strutils diff --git a/nova/virt/xenapi/driver.py b/nova/virt/xenapi/driver.py index 385a05b6357c..19f961f4e160 100755 --- a/nova/virt/xenapi/driver.py +++ b/nova/virt/xenapi/driver.py @@ -48,6 +48,7 @@ from oslo.config import cfg from nova import context from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import utils from nova.virt import driver diff --git a/nova/virt/xenapi/fake.py b/nova/virt/xenapi/fake.py index 3a6b6162235e..e4d7ea27593b 100644 --- a/nova/virt/xenapi/fake.py +++ b/nova/virt/xenapi/fake.py @@ -60,6 +60,7 @@ import zlib import pprint from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import timeutils diff --git a/nova/virt/xenapi/firewall.py b/nova/virt/xenapi/firewall.py index e911b71d51a4..904955d6a50b 100644 --- a/nova/virt/xenapi/firewall.py +++ b/nova/virt/xenapi/firewall.py @@ -18,6 +18,7 @@ # under the License. from nova import context +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.virt import firewall diff --git a/nova/virt/xenapi/host.py b/nova/virt/xenapi/host.py index eb79cde6c18c..a6c74d19627c 100644 --- a/nova/virt/xenapi/host.py +++ b/nova/virt/xenapi/host.py @@ -24,6 +24,7 @@ from nova.compute import vm_states from nova import context from nova import exception from nova.objects import instance as instance_obj +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.virt.xenapi import pool_states diff --git a/nova/virt/xenapi/imageupload/glance.py b/nova/virt/xenapi/imageupload/glance.py index cd32c798e373..5e3edb78da90 100644 --- a/nova/virt/xenapi/imageupload/glance.py +++ b/nova/virt/xenapi/imageupload/glance.py @@ -19,6 +19,7 @@ from oslo.config import cfg from nova import exception from nova.image import glance +from nova.openstack.common.gettextutils import _ import nova.openstack.common.log as logging from nova.virt.xenapi import agent from nova.virt.xenapi import vm_utils diff --git a/nova/virt/xenapi/network_utils.py b/nova/virt/xenapi/network_utils.py index dceaed949da4..2a6d9e1cad78 100644 --- a/nova/virt/xenapi/network_utils.py +++ b/nova/virt/xenapi/network_utils.py @@ -20,6 +20,8 @@ records and their attributes like bridges, PIFs, QoS, as well as their lookup functions. """ +from nova.openstack.common.gettextutils import _ + def find_network_with_name_label(session, name_label): networks = session.call_xenapi('network.get_by_name_label', name_label) diff --git a/nova/virt/xenapi/pool.py b/nova/virt/xenapi/pool.py index 700b5f36aac2..43025ea279c4 100644 --- a/nova/virt/xenapi/pool.py +++ b/nova/virt/xenapi/pool.py @@ -25,6 +25,7 @@ from oslo.config import cfg from nova.compute import rpcapi as compute_rpcapi from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.virt.xenapi import pool_states diff --git a/nova/virt/xenapi/vif.py b/nova/virt/xenapi/vif.py index 1155ad8b3cab..89f2c69d7cff 100644 --- a/nova/virt/xenapi/vif.py +++ b/nova/virt/xenapi/vif.py @@ -21,6 +21,7 @@ from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.virt.xenapi import network_utils from nova.virt.xenapi import vm_utils diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 5d2e4bf363d2..b18b868fae5f 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -43,6 +43,7 @@ from nova.compute import task_states from nova import exception from nova.image import glance from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import processutils from nova.openstack.common import strutils diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 20b558b9a867..cf895e12202c 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -39,6 +39,7 @@ from nova import conductor from nova import context as nova_context from nova import exception from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging diff --git a/nova/virt/xenapi/volume_utils.py b/nova/virt/xenapi/volume_utils.py index 845f059fa111..0fae60a9e81a 100644 --- a/nova/virt/xenapi/volume_utils.py +++ b/nova/virt/xenapi/volume_utils.py @@ -25,6 +25,7 @@ import string from oslo.config import cfg +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging CONF = cfg.CONF diff --git a/nova/virt/xenapi/volumeops.py b/nova/virt/xenapi/volumeops.py index 9e5995316afe..7d81070b0ad9 100644 --- a/nova/virt/xenapi/volumeops.py +++ b/nova/virt/xenapi/volumeops.py @@ -21,6 +21,7 @@ Management class for Storage-related functions (attach, detach, etc). from nova import exception from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.virt.xenapi import vm_utils from nova.virt.xenapi import volume_utils diff --git a/nova/vnc/xvp_proxy.py b/nova/vnc/xvp_proxy.py index 920f24b7aa27..9b0adfe48954 100644 --- a/nova/vnc/xvp_proxy.py +++ b/nova/vnc/xvp_proxy.py @@ -29,6 +29,7 @@ from oslo.config import cfg from nova.consoleauth import rpcapi as consoleauth_rpcapi from nova import context +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova import version from nova import wsgi diff --git a/nova/volume/cinder.py b/nova/volume/cinder.py index 1306dc82644e..e0f3d45e1920 100644 --- a/nova/volume/cinder.py +++ b/nova/volume/cinder.py @@ -30,6 +30,7 @@ from oslo.config import cfg from nova.db import base from nova import exception +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging cinder_opts = [ diff --git a/nova/wsgi.py b/nova/wsgi.py index 2e3f66f0d0c3..7e88e6b8bbe3 100644 --- a/nova/wsgi.py +++ b/nova/wsgi.py @@ -35,6 +35,7 @@ import webob.exc from nova import exception from nova.openstack.common import excutils +from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging # Raise the default from 8192 to accommodate large tokens diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py b/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py index f51f5fce4530..72d499664642 100644 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py @@ -20,7 +20,6 @@ # import gettext -gettext.install('nova', unicode=1) import httplib import logging import logging.handlers @@ -29,6 +28,10 @@ import time import XenAPI +translations = gettext.translation('nova', fallback=True) +_ = translations.ugettext + + ##### Logging setup def configure_logging(name): diff --git a/smoketests/run_tests.py b/smoketests/run_tests.py index 3c3ed057416c..fb429f7ff989 100644 --- a/smoketests/run_tests.py +++ b/smoketests/run_tests.py @@ -55,7 +55,6 @@ To run a single test module: """ -import gettext import os import sys import unittest @@ -69,13 +68,14 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): sys.path.insert(0, possible_topdir) -gettext.install('nova', unicode=1) - from nose import config from nose import core from nose import result from smoketests import flags + +from nova.openstack.common.gettextutils import _ + FLAGS = flags.FLAGS diff --git a/tools/db/schema_diff.py b/tools/db/schema_diff.py index 406a2b665227..d2fd493914c6 100755 --- a/tools/db/schema_diff.py +++ b/tools/db/schema_diff.py @@ -37,6 +37,8 @@ import os import subprocess import sys +from nova.openstack.common.gettextutils import _ + ### Dump diff --git a/tools/esx/guest_tool.py b/tools/esx/guest_tool.py index 2c2793010a2c..99cd62a64de0 100644 --- a/tools/esx/guest_tool.py +++ b/tools/esx/guest_tool.py @@ -21,7 +21,6 @@ On Windows we require pyWin32 installed on Python. """ import array -import gettext import logging import os import platform @@ -31,7 +30,8 @@ import subprocess import sys import time -gettext.install('nova', unicode=1) +from nova.openstack.common.gettextutils import _ + PLATFORM_WIN = 'win32' PLATFORM_LINUX = 'linux2' diff --git a/tools/xenserver/populate_other_config.py b/tools/xenserver/populate_other_config.py index 7151fee6151e..cf73e45dae28 100644 --- a/tools/xenserver/populate_other_config.py +++ b/tools/xenserver/populate_other_config.py @@ -30,9 +30,6 @@ Run on compute-worker (not Dom0): python ./tools/xenserver/populate_other_config.py [--dry-run|--verbose] """ -import gettext -gettext.install('nova', unicode=1) - import os import sys diff --git a/tools/xenserver/vm_vdi_cleaner.py b/tools/xenserver/vm_vdi_cleaner.py index fde666d93652..f5f6357b977f 100755 --- a/tools/xenserver/vm_vdi_cleaner.py +++ b/tools/xenserver/vm_vdi_cleaner.py @@ -17,15 +17,12 @@ """vm_vdi_cleaner.py - List or clean orphaned VDIs/instances on XenServer.""" import doctest -import gettext import os import sys from oslo.config import cfg import XenAPI -gettext.install('nova', unicode=1) - possible_topdir = os.getcwd() if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): sys.path.insert(0, possible_topdir) @@ -38,6 +35,7 @@ from nova.openstack.common import timeutils from nova.virt import virtapi from nova.virt.xenapi import driver as xenapi_driver + cleaner_opts = [ cfg.IntOpt('zombie_instance_updated_at_window', default=172800, diff --git a/tox.ini b/tox.ini index 7182c5bafed8..bf47ac871a4f 100644 --- a/tox.ini +++ b/tox.ini @@ -48,7 +48,6 @@ commands = {posargs} # H501 Do not use locals() for string formatting ignore = E121,E122,E123,E124,E126,E127,E128,E711,E712,H102,H232,H233,H302,H303,H404,F403,H501,F811,F841,N309 -builtins = _ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,*plugins/xenserver*,tools [hacking]