Remove the monkey patching of _ into the builtins
Previous _ was monkey patched into builtins whenever certain modules were imported. This removes that and simply imports it when it is needed. Change-Id: I0af2c6d8a230e94440d655d13cab9107ac20d13c
This commit is contained in:
parent
84b730b70f
commit
cd9d8e45c6
@ -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 _
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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__)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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__)
|
||||
|
@ -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__)
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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
|
||||
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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')
|
||||
|
@ -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__)
|
||||
|
@ -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')
|
||||
|
@ -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
|
||||
|
@ -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')
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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__)
|
||||
|
@ -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__)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
|
@ -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 = [
|
||||
|
@ -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
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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__)
|
||||
|
@ -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__)
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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__)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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__)
|
||||
|
@ -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"
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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"
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
import base64
|
||||
import re
|
||||
|
||||
from nova.openstack.common.gettextutils import _
|
||||
from nova.openstack.common import log as logging
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user