Remove gettextutils _ injection

Now that ironic supports oslo.i18n, using the install function to
inject _ into the builtin has been deprecated. New i18n common module
used instead. In one module _ was imported from gettextutils, now
also changed to i18n import.

Closes-bug: #1346406
Change-Id: I672a975d479991982c24031e834a26e2c2811890
This commit is contained in:
Vladyslav Drok 2014-08-22 15:26:12 +03:00 committed by Jim Rollenhagen
parent 49877f6bf7
commit 39a5a507bf
49 changed files with 53 additions and 5 deletions

View File

@ -23,6 +23,7 @@ import wsmeext.pecan as wsme_pecan
from ironic.api.controllers import base
from ironic.api.controllers import link
from ironic.common import exception
from ironic.common.i18n import _
# Property information for drivers:

View File

@ -30,6 +30,7 @@ from ironic.api.controllers.v1 import port
from ironic.api.controllers.v1 import types
from ironic.api.controllers.v1 import utils as api_utils
from ironic.common import exception
from ironic.common.i18n import _
from ironic.common import states as ir_states
from ironic.common import utils
from ironic import objects

View File

@ -28,6 +28,7 @@ from ironic.api.controllers.v1 import collection
from ironic.api.controllers.v1 import types
from ironic.api.controllers.v1 import utils as api_utils
from ironic.common import exception
from ironic.common.i18n import _
from ironic import objects

View File

@ -20,6 +20,7 @@ import wsme
from wsme import types as wtypes
from ironic.common import exception
from ironic.common.i18n import _
from ironic.common import utils

View File

@ -18,6 +18,8 @@ import wsme
from oslo.config import cfg
from ironic.common.i18n import _
CONF = cfg.CONF

View File

@ -17,6 +17,7 @@ import re
from keystonemiddleware import auth_token
from ironic.common import exception
from ironic.common.i18n import _
from ironic.common import utils
from ironic.openstack.common import log

View File

@ -26,6 +26,7 @@ import json
import webob
from xml import etree as et
from ironic.common.i18n import _
from ironic.openstack.common import log
LOG = log.getLogger(__name__)

View File

@ -25,6 +25,7 @@ from six.moves import socketserver
from wsgiref import simple_server
from ironic.api import app
from ironic.common.i18n import _
from ironic.common import service as ironic_service
from ironic.openstack.common import log

View File

@ -18,6 +18,7 @@ import re
from oslo.config import cfg
from ironic.common import exception
from ironic.common.i18n import _
from ironic.common import utils
from ironic.openstack.common import log as logging
from ironic.openstack.common import loopingcall

View File

@ -16,6 +16,7 @@
from oslo.config import cfg
from ironic.common import exception
from ironic.common.i18n import _
from ironic.openstack.common import lockutils
from ironic.openstack.common import log
from stevedore import dispatch

View File

@ -28,6 +28,7 @@ import six.moves.urllib.parse as urlparse
from ironic.common import exception
from ironic.common.glance_service import service_utils
from ironic.common.i18n import _
from oslo.config import cfg

View File

@ -20,6 +20,7 @@ from ironic.common import exception as exc
from ironic.common.glance_service import base_image_service
from ironic.common.glance_service import service
from ironic.common.glance_service import service_utils
from ironic.common.i18n import _
from ironic.common import utils

View File

@ -21,6 +21,7 @@ import threading
from oslo.config import cfg
from ironic.common import exception
from ironic.common.i18n import _
from ironic.db import api as dbapi
hash_opts = [

View File

@ -27,6 +27,7 @@ from oslo.config import cfg
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import image_service as service
from ironic.common import paths
from ironic.common import utils

View File

@ -19,6 +19,7 @@ from oslo.config import cfg
from six.moves.urllib import parse
from ironic.common import exception
from ironic.common.i18n import _
CONF = cfg.CONF

View File

@ -23,6 +23,7 @@ from oslo import messaging
from oslo.utils import importutils
from ironic.common import config
from ironic.common.i18n import _
from ironic.common import rpc
from ironic.objects import base as objects_base
from ironic.openstack.common import context

View File

@ -21,6 +21,7 @@ from swiftclient import exceptions as swift_exceptions
from swiftclient import utils as swift_utils
from ironic.common import exception
from ironic.common.i18n import _
from ironic.common import keystone
from ironic.openstack.common import log as logging

View File

@ -34,6 +34,7 @@ import paramiko
import six
from ironic.common import exception
from ironic.common.i18n import _
from ironic.openstack.common import log as logging
from ironic.openstack.common import processutils

View File

@ -57,6 +57,7 @@ from ironic.common import driver_factory
from ironic.common import exception
from ironic.common import hash_ring as hash
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import rpc
from ironic.common import states
from ironic.common import utils as ironic_utils

View File

@ -24,6 +24,7 @@ from oslo import messaging
from ironic.common import exception
from ironic.common import hash_ring as hash
from ironic.common.i18n import _
from ironic.common import rpc
from ironic.conductor import manager
from ironic.objects import base as objects_base

View File

@ -15,6 +15,7 @@
from oslo.utils import excutils
from ironic.common import exception
from ironic.common.i18n import _
from ironic.common import states
from ironic.conductor import task_manager
from ironic.openstack.common.gettextutils import _LI

View File

@ -27,6 +27,7 @@ from oslo.utils import timeutils
from sqlalchemy.orm.exc import NoResultFound
from ironic.common import exception
from ironic.common.i18n import _
from ironic.common import states
from ironic.common import utils
from ironic.db import api

View File

@ -22,6 +22,7 @@ from oslo.config import cfg
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import keystone
from ironic.common import network
from ironic.dhcp import base

View File

@ -22,6 +22,7 @@ import abc
import six
from ironic.common import exception
from ironic.common.i18n import _
@six.add_metaclass(abc.ABCMeta)

View File

@ -15,6 +15,7 @@ DRAC Driver for remote system management using Dell Remote Access Card.
"""
from ironic.common import exception
from ironic.common.i18n import _
from ironic.drivers import base
from ironic.drivers.modules.drac import power
from ironic.drivers.modules import ipmitool

View File

@ -20,6 +20,7 @@ Fake drivers used in testing.
from oslo.utils import importutils
from ironic.common import exception
from ironic.common.i18n import _
from ironic.drivers import base
from ironic.drivers.modules import agent
from ironic.drivers.modules.drac import power as drac_power

View File

@ -21,6 +21,7 @@ from oslo.utils import excutils
from ironic.common import dhcp_factory
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import image_service
from ironic.common import keystone
from ironic.common import paths

View File

@ -16,6 +16,7 @@ from oslo.config import cfg
import requests
from ironic.common import exception
from ironic.common.i18n import _
from ironic.openstack.common import jsonutils
from ironic.openstack.common import log

View File

@ -28,6 +28,7 @@ from oslo.config import cfg
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import utils
from ironic.openstack.common import log as logging
from ironic.openstack.common import loopingcall

View File

@ -25,6 +25,7 @@ from oslo.utils import excutils
from ironic.common import disk_partitioner
from ironic.common import exception
from ironic.common.i18n import _
from ironic.common import utils
from ironic.drivers.modules import image_cache
from ironic.openstack.common import log as logging
@ -153,9 +154,9 @@ def mkfs_ephemeral(dev, ephemeral_format, label="ephemeral0"):
def block_uuid(dev):
"""Get UUID of a block device."""
out, _ = utils.execute('blkid', '-s', 'UUID', '-o', 'value', dev,
run_as_root=True,
check_exit_code=[0])
out, _err = utils.execute('blkid', '-s', 'UUID', '-o', 'value', dev,
run_as_root=True,
check_exit_code=[0])
return out.strip()

View File

@ -16,6 +16,7 @@ Common functionalities shared between different DRAC modules.
"""
from ironic.common import exception
from ironic.common.i18n import _
from ironic.drivers.modules.drac import client as drac_client
from ironic.openstack.common import importutils

View File

@ -26,6 +26,7 @@ on seprate vendor_passthru methods.
from ironic.common import boot_devices
from ironic.common import exception
from ironic.common.i18n import _
from ironic.common import states
from ironic.drivers import base

View File

@ -23,6 +23,7 @@ from oslo.utils import importutils
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers import base

View File

@ -20,6 +20,7 @@ from oslo.config import cfg
from oslo.utils import importutils
from ironic.common import exception
from ironic.common.i18n import _
from ironic.openstack.common import log as logging
ilo_client = importutils.try_import('proliantutils.ilo.ribcl')

View File

@ -20,6 +20,7 @@ from oslo.config import cfg
from oslo.utils import importutils
from ironic.common import exception
from ironic.common.i18n import _
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers import base

View File

@ -26,6 +26,7 @@ from oslo.config import cfg
from ironic.common import exception
from ironic.common.glance_service import service_utils
from ironic.common.i18n import _
from ironic.common import images
from ironic.common import utils
from ironic.openstack.common import fileutils

View File

@ -25,6 +25,7 @@ from oslo.utils import importutils
from ironic.common import boot_devices
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers import base

View File

@ -42,6 +42,7 @@ from oslo.utils import excutils
from ironic.common import boot_devices
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import states
from ironic.common import utils
from ironic.conductor import task_manager

View File

@ -19,6 +19,7 @@ from oslo.config import cfg
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import image_service as service
from ironic.common import keystone
from ironic.common import states

View File

@ -25,6 +25,7 @@ from oslo.config import cfg
from ironic.common import dhcp_factory
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import image_service as service
from ironic.common import paths
from ironic.common import pxe_utils

View File

@ -25,6 +25,7 @@ from oslo.utils import importutils
from ironic.common import boot_devices
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers import base

View File

@ -33,12 +33,12 @@ from oslo.config import cfg
from ironic.common import boot_devices
from ironic.common import exception
from ironic.common import i18n
from ironic.common.i18n import _
from ironic.common import states
from ironic.common import utils
from ironic.conductor import task_manager
from ironic.drivers import base
from ironic.drivers import utils as driver_utils
from ironic.openstack.common.gettextutils import _
from ironic.openstack.common import log as logging
from ironic.openstack.common import processutils

View File

@ -20,6 +20,7 @@ PXE Driver and supporting meta-classes.
from oslo.utils import importutils
from ironic.common import exception
from ironic.common.i18n import _
from ironic.drivers import base
from ironic.drivers.modules import iboot
from ironic.drivers.modules.ilo import power as ilo_power

View File

@ -13,6 +13,7 @@
# under the License.
from ironic.common import exception
from ironic.common.i18n import _
from ironic.drivers import base

View File

@ -21,6 +21,7 @@ from oslo import messaging
import six
from ironic.common import exception
from ironic.common.i18n import _
from ironic.objects import utils as obj_utils
from ironic.openstack.common import context
from ironic.openstack.common import log as logging

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from ironic.common.i18n import _
from ironic.db import api as db_api
from ironic.objects import base
from ironic.objects import utils

View File

@ -22,6 +22,8 @@ import netaddr
from oslo.utils import timeutils
import six
from ironic.common.i18n import _
def datetime_or_none(dt):
"""Validate a datetime or None value."""

View File

@ -49,6 +49,7 @@ from oslo.db.sqlalchemy import utils as db_utils
import sqlalchemy
import sqlalchemy.exc
from ironic.common.i18n import _
from ironic.common import utils
from ironic.db.sqlalchemy import migration
from ironic.db.sqlalchemy import models

View File

@ -43,7 +43,6 @@ commands = {posargs}
ignore = E12,E711
select = E713
builtins = _
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,*ironic/nova*
[hacking]