Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use oslo.i18n

oslo.i18n provides the i18n functions that were provided by
oslo-incubator's gettextutils module. Some tests that were
using internal details of the library were removed.

Change-Id: I44cfd5552e0dd86af21073419d31622f5fdb28e0
  • Loading branch information...
commit 826aed0ec7e59d52d515a86569b6e23b08c6c072 1 parent ff756a0
@dims dims authored
Showing with 411 additions and 366 deletions.
  1. +1 −1  doc/source/devref/il8n.rst
  2. +1 −1  nova/api/auth.py
  3. +2 −2 nova/api/ec2/__init__.py
  4. +1 −1  nova/api/ec2/cloud.py
  5. +1 −1  nova/api/ec2/ec2utils.py
  6. +1 −1  nova/api/metadata/handler.py
  7. +1 −1  nova/api/metadata/password.py
  8. +1 −1  nova/api/metadata/vendordata_json.py
  9. +4 −8 nova/api/openstack/__init__.py
  10. +1 −1  nova/api/openstack/common.py
  11. +1 −1  nova/api/openstack/compute/contrib/admin_actions.py
  12. +1 −1  nova/api/openstack/compute/contrib/aggregates.py
  13. +1 −1  nova/api/openstack/compute/contrib/assisted_volume_snapshots.py
  14. +1 −1  nova/api/openstack/compute/contrib/attach_interfaces.py
  15. +1 −1  nova/api/openstack/compute/contrib/baremetal_nodes.py
  16. +1 −1  nova/api/openstack/compute/contrib/cells.py
  17. +1 −1  nova/api/openstack/compute/contrib/certificates.py
  18. +1 −1  nova/api/openstack/compute/contrib/cloudpipe.py
  19. +1 −1  nova/api/openstack/compute/contrib/cloudpipe_update.py
  20. +1 −1  nova/api/openstack/compute/contrib/console_auth_tokens.py
  21. +1 −1  nova/api/openstack/compute/contrib/console_output.py
  22. +1 −1  nova/api/openstack/compute/contrib/consoles.py
  23. +1 −1  nova/api/openstack/compute/contrib/disk_config.py
  24. +1 −1  nova/api/openstack/compute/contrib/evacuate.py
  25. +1 −1  nova/api/openstack/compute/contrib/fixed_ips.py
  26. +1 −1  nova/api/openstack/compute/contrib/flavor_access.py
  27. +1 −1  nova/api/openstack/compute/contrib/flavorextraspecs.py
  28. +1 −1  nova/api/openstack/compute/contrib/flavormanage.py
  29. +1 −1  nova/api/openstack/compute/contrib/floating_ip_dns.py
  30. +1 −1  nova/api/openstack/compute/contrib/floating_ips.py
  31. +1 −1  nova/api/openstack/compute/contrib/floating_ips_bulk.py
  32. +1 −1  nova/api/openstack/compute/contrib/fping.py
  33. +1 −1  nova/api/openstack/compute/contrib/hosts.py
  34. +1 −1  nova/api/openstack/compute/contrib/hypervisors.py
  35. +1 −1  nova/api/openstack/compute/contrib/instance_usage_audit_log.py
  36. +1 −1  nova/api/openstack/compute/contrib/keypairs.py
  37. +1 −1  nova/api/openstack/compute/contrib/multinic.py
  38. +1 −1  nova/api/openstack/compute/contrib/networks_associate.py
  39. +1 −1  nova/api/openstack/compute/contrib/os_networks.py
  40. +1 −1  nova/api/openstack/compute/contrib/os_tenant_networks.py
  41. +1 −1  nova/api/openstack/compute/contrib/quota_classes.py
  42. +1 −1  nova/api/openstack/compute/contrib/quotas.py
  43. +1 −1  nova/api/openstack/compute/contrib/rescue.py
  44. +1 −1  nova/api/openstack/compute/contrib/scheduler_hints.py
  45. +1 −1  nova/api/openstack/compute/contrib/security_group_default_rules.py
  46. +1 −1  nova/api/openstack/compute/contrib/security_groups.py
  47. +1 −1  nova/api/openstack/compute/contrib/server_external_events.py
  48. +1 −1  nova/api/openstack/compute/contrib/server_groups.py
  49. +1 −1  nova/api/openstack/compute/contrib/server_start_stop.py
  50. +1 −1  nova/api/openstack/compute/contrib/services.py
  51. +1 −1  nova/api/openstack/compute/contrib/shelve.py
  52. +1 −1  nova/api/openstack/compute/contrib/simple_tenant_usage.py
  53. +1 −1  nova/api/openstack/compute/contrib/volumes.py
  54. +1 −1  nova/api/openstack/compute/extensions.py
  55. +1 −1  nova/api/openstack/compute/flavors.py
  56. +1 −1  nova/api/openstack/compute/image_metadata.py
  57. +1 −1  nova/api/openstack/compute/images.py
  58. +1 −1  nova/api/openstack/compute/ips.py
  59. +1 −1  nova/api/openstack/compute/limits.py
  60. +1 −1  nova/api/openstack/compute/plugins/__init__.py
  61. +1 −1  nova/api/openstack/compute/plugins/v3/access_ips.py
  62. +1 −1  nova/api/openstack/compute/plugins/v3/admin_actions.py
  63. +1 −1  nova/api/openstack/compute/plugins/v3/admin_password.py
  64. +1 −1  nova/api/openstack/compute/plugins/v3/aggregates.py
  65. +1 −1  nova/api/openstack/compute/plugins/v3/attach_interfaces.py
  66. +1 −1  nova/api/openstack/compute/plugins/v3/cells.py
  67. +1 −1  nova/api/openstack/compute/plugins/v3/certificates.py
  68. +1 −1  nova/api/openstack/compute/plugins/v3/console_auth_tokens.py
  69. +1 −1  nova/api/openstack/compute/plugins/v3/console_output.py
  70. +1 −1  nova/api/openstack/compute/plugins/v3/evacuate.py
  71. +1 −1  nova/api/openstack/compute/plugins/v3/extended_volumes.py
  72. +1 −1  nova/api/openstack/compute/plugins/v3/flavor_access.py
  73. +1 −1  nova/api/openstack/compute/plugins/v3/flavors.py
  74. +1 −1  nova/api/openstack/compute/plugins/v3/flavors_extraspecs.py
  75. +1 −1  nova/api/openstack/compute/plugins/v3/hosts.py
  76. +1 −1  nova/api/openstack/compute/plugins/v3/hypervisors.py
  77. +1 −1  nova/api/openstack/compute/plugins/v3/ips.py
  78. +1 −1  nova/api/openstack/compute/plugins/v3/keypairs.py
  79. +1 −1  nova/api/openstack/compute/plugins/v3/multiple_create.py
  80. +1 −1  nova/api/openstack/compute/plugins/v3/pause_server.py
  81. +1 −1  nova/api/openstack/compute/plugins/v3/quota_sets.py
  82. +1 −1  nova/api/openstack/compute/plugins/v3/remote_consoles.py
  83. +1 −1  nova/api/openstack/compute/plugins/v3/rescue.py
  84. +1 −1  nova/api/openstack/compute/plugins/v3/scheduler_hints.py
  85. +1 −1  nova/api/openstack/compute/plugins/v3/server_actions.py
  86. +1 −1  nova/api/openstack/compute/plugins/v3/server_external_events.py
  87. +1 −1  nova/api/openstack/compute/plugins/v3/server_metadata.py
  88. +1 −1  nova/api/openstack/compute/plugins/v3/servers.py
  89. +1 −1  nova/api/openstack/compute/plugins/v3/services.py
  90. +1 −1  nova/api/openstack/compute/server_metadata.py
  91. +1 −1  nova/api/openstack/compute/servers.py
  92. +1 −1  nova/api/openstack/compute/views/servers.py
  93. +1 −1  nova/api/openstack/extensions.py
  94. +6 −11 nova/api/openstack/wsgi.py
  95. +1 −1  nova/api/openstack/xmlutil.py
  96. +1 −1  nova/api/sizelimit.py
  97. +1 −1  nova/api/validation/validators.py
  98. +1 −1  nova/block_device.py
  99. +1 −1  nova/cells/filters/target_cell.py
  100. +1 −1  nova/cells/manager.py
  101. +1 −1  nova/cells/messaging.py
  102. +1 −1  nova/cells/rpcapi.py
  103. +1 −1  nova/cells/scheduler.py
  104. +1 −1  nova/cells/state.py
  105. +1 −1  nova/cells/weights/mute_child.py
  106. +1 −1  nova/cloudpipe/pipelib.py
  107. +1 −1  nova/cmd/all.py
  108. +1 −1  nova/cmd/baremetal_deploy_helper.py
  109. +1 −1  nova/cmd/baremetal_manage.py
  110. +1 −1  nova/cmd/compute.py
  111. +1 −1  nova/cmd/dhcpbridge.py
  112. +1 −1  nova/cmd/manage.py
  113. +1 −1  nova/cmd/network.py
  114. +1 −1  nova/compute/api.py
  115. +1 −1  nova/compute/claims.py
  116. +1 −1  nova/compute/flavors.py
  117. +4 −4 nova/compute/manager.py
  118. +1 −1  nova/compute/monitors/__init__.py
  119. +1 −1  nova/compute/monitors/virt/cpu_monitor.py
  120. +1 −1  nova/compute/resource_tracker.py
  121. +1 −1  nova/compute/rpcapi.py
  122. +1 −1  nova/compute/utils.py
  123. +1 −1  nova/conductor/api.py
  124. +1 −1  nova/conductor/manager.py
  125. +1 −1  nova/conductor/tasks/live_migrate.py
  126. +1 −1  nova/console/websocketproxy.py
  127. +1 −1  nova/console/xvp.py
  128. +1 −1  nova/consoleauth/manager.py
  129. +1 −1  nova/context.py
  130. +1 −1  nova/crypto.py
  131. +1 −1  nova/db/api.py
  132. +1 −1  nova/db/sqlalchemy/api.py
  133. +1 −1  nova/db/sqlalchemy/migrate_repo/versions/216_havana.py
  134. +1 −1  nova/db/sqlalchemy/migration.py
  135. +1 −1  nova/db/sqlalchemy/utils.py
  136. +1 −1  nova/debugger.py
  137. +1 −1  nova/exception.py
  138. +1 −1  nova/filters.py
  139. +1 −1  nova/hooks.py
  140. +66 −0 nova/i18n.py
  141. +1 −1  nova/image/download/__init__.py
  142. +1 −1  nova/image/download/file.py
  143. +1 −1  nova/image/glance.py
  144. +1 −1  nova/image/s3.py
  145. +1 −1  nova/ipv6/account_identifier.py
  146. +1 −1  nova/ipv6/rfc2462.py
  147. +1 −1  nova/keymgr/conf_key_mgr.py
  148. +1 −1  nova/keymgr/mock_key_mgr.py
  149. +1 −1  nova/keymgr/single_key_mgr.py
  150. +1 −1  nova/network/api.py
  151. +1 −1  nova/network/base_api.py
  152. +1 −1  nova/network/driver.py
  153. +1 −1  nova/network/floating_ips.py
  154. +1 −1  nova/network/ldapdns.py
  155. +1 −1  nova/network/linux_net.py
  156. +1 −1  nova/network/manager.py
  157. +1 −1  nova/network/minidns.py
  158. +1 −1  nova/network/model.py
  159. +1 −1  nova/network/neutronv2/api.py
  160. +1 −1  nova/network/security_group/neutron_driver.py
  161. +1 −1  nova/network/security_group/security_group_base.py
  162. +1 −1  nova/notifications.py
  163. +1 −1  nova/objects/base.py
  164. +1 −1  nova/objects/block_device.py
  165. +1 −1  nova/objects/fields.py
  166. +1 −1  nova/objects/instance.py
  167. +1 −1  nova/objects/instance_fault.py
  168. +1 −1  nova/objects/instance_info_cache.py
  169. +1 −1  nova/pci/pci_manager.py
  170. +1 −1  nova/quota.py
  171. +1 −1  nova/scheduler/chance.py
  172. +1 −1  nova/scheduler/driver.py
  173. +1 −1  nova/scheduler/filter_scheduler.py
  174. +1 −1  nova/scheduler/filters/compute_filter.py
  175. +1 −1  nova/scheduler/filters/core_filter.py
  176. +1 −1  nova/scheduler/filters/ram_filter.py
  177. +1 −1  nova/scheduler/filters/trusted_filter.py
  178. +1 −1  nova/scheduler/filters/utils.py
  179. +1 −1  nova/scheduler/host_manager.py
  180. +1 −1  nova/scheduler/scheduler_options.py
  181. +1 −1  nova/scheduler/utils.py
  182. +1 −1  nova/service.py
  183. +1 −1  nova/servicegroup/api.py
  184. +1 −1  nova/servicegroup/drivers/db.py
  185. +1 −1  nova/servicegroup/drivers/mc.py
  186. +1 −1  nova/servicegroup/drivers/zk.py
  187. +1 −1  nova/storage/linuxscsi.py
  188. +1 −1  nova/tests/api/openstack/compute/plugins/v3/test_servers.py
  189. +1 −1  nova/tests/api/openstack/compute/test_servers.py
  190. +1 −1  nova/tests/api/openstack/fakes.py
  191. +18 −16 nova/tests/api/openstack/test_faults.py
  192. +7 −7 nova/tests/api/openstack/test_wsgi.py
  193. +1 −1  nova/tests/api/test_auth.py
  194. +1 −1  nova/tests/compute/test_compute.py
  195. +1 −1  nova/tests/compute/test_keypairs.py
  196. +1 −1  nova/tests/db/test_migrations.py
  197. +1 −1  nova/tests/fake_ldap.py
  198. +1 −1  nova/tests/fake_volume.py
  199. +1 −1  nova/tests/integrated/api/client.py
  200. +1 −1  nova/tests/integrated/api_samples_test_base.py
  201. +0 −11 nova/tests/test_exception.py
  202. +1 −1  nova/tests/test_nova_manage.py
  203. +1 −1  nova/tests/virt/hyperv/test_hypervapi.py
  204. +1 −1  nova/tests/virt/libvirt/fakelibvirt.py
  205. +1 −1  nova/tests/virt/vmwareapi/fake.py
  206. +1 −1  nova/tests/virt/vmwareapi/test_ds_util.py
  207. +1 −1  nova/tests/virt/xenapi/image/test_bittorrent.py
  208. +1 −1  nova/tests/virt/xenapi/test_vm_utils.py
  209. +1 −4 nova/utils.py
  210. +1 −1  nova/version.py
  211. +1 −1  nova/virt/baremetal/common.py
  212. +1 −1  nova/virt/baremetal/db/sqlalchemy/api.py
  213. +1 −1  nova/virt/baremetal/db/sqlalchemy/migration.py
  214. +1 −1  nova/virt/baremetal/driver.py
  215. +1 −1  nova/virt/baremetal/iboot_pdu.py
  216. +1 −1  nova/virt/baremetal/ipmi.py
  217. +1 −1  nova/virt/baremetal/pxe.py
  218. +1 −1  nova/virt/baremetal/tilera.py
  219. +1 −1  nova/virt/baremetal/tilera_pdu.py
  220. +1 −1  nova/virt/baremetal/utils.py
  221. +1 −1  nova/virt/baremetal/vif_driver.py
  222. +1 −1  nova/virt/baremetal/virtual_power_driver.py
  223. +1 −1  nova/virt/baremetal/volume_driver.py
  224. +1 −1  nova/virt/block_device.py
  225. +1 −1  nova/virt/disk/api.py
  226. +1 −1  nova/virt/disk/mount/api.py
  227. +1 −1  nova/virt/disk/mount/loop.py
  228. +1 −1  nova/virt/disk/mount/nbd.py
  229. +1 −1  nova/virt/disk/vfs/guestfs.py
  230. +1 −1  nova/virt/disk/vfs/localfs.py
  231. +1 −1  nova/virt/driver.py
  232. +1 −1  nova/virt/event.py
  233. +1 −1  nova/virt/fake.py
  234. +2 −2 nova/virt/firewall.py
  235. +1 −1  nova/virt/hardware.py
  236. +1 −1  nova/virt/hyperv/basevolumeutils.py
  237. +1 −1  nova/virt/hyperv/driver.py
  238. +1 −1  nova/virt/hyperv/imagecache.py
  239. +1 −1  nova/virt/hyperv/livemigrationops.py
  240. +1 −1  nova/virt/hyperv/livemigrationutils.py
  241. +1 −1  nova/virt/hyperv/migrationops.py
  242. +1 −1  nova/virt/hyperv/networkutils.py
  243. +1 −1  nova/virt/hyperv/networkutilsv2.py
  244. +1 −1  nova/virt/hyperv/pathutils.py
  245. +1 −1  nova/virt/hyperv/snapshotops.py
  246. +1 −1  nova/virt/hyperv/vhdutils.py
  247. +1 −1  nova/virt/hyperv/vhdutilsv2.py
  248. +1 −1  nova/virt/hyperv/vmops.py
  249. +1 −1  nova/virt/hyperv/vmutils.py
  250. +1 −1  nova/virt/hyperv/volumeops.py
  251. +1 −1  nova/virt/hyperv/volumeutils.py
  252. +1 −1  nova/virt/hyperv/volumeutilsv2.py
  253. +1 −1  nova/virt/images.py
  254. +1 −1  nova/virt/libvirt/blockinfo.py
  255. +4 −4 nova/virt/libvirt/driver.py
  256. +2 −2 nova/virt/libvirt/firewall.py
  257. +2 −2 nova/virt/libvirt/imagebackend.py
  258. +3 −3 nova/virt/libvirt/imagecache.py
  259. +3 −3 nova/virt/libvirt/lvm.py
  260. +3 −3 nova/virt/libvirt/utils.py
  261. +3 −3 nova/virt/libvirt/vif.py
  262. +3 −3 nova/virt/libvirt/volume.py
  263. +1 −1  nova/virt/storage_users.py
  264. +1 −2  nova/virt/vmwareapi/driver.py
  265. +1 −1  nova/virt/vmwareapi/ds_util.py
  266. +1 −1  nova/virt/vmwareapi/error_util.py
  267. +1 −1  nova/virt/vmwareapi/imagecache.py
  268. +1 −1  nova/virt/vmwareapi/io_util.py
  269. +1 −1  nova/virt/vmwareapi/network_util.py
  270. +1 −1  nova/virt/vmwareapi/vif.py
  271. +1 −1  nova/virt/vmwareapi/vim.py
  272. +1 −1  nova/virt/vmwareapi/vim_util.py
  273. +1 −1  nova/virt/vmwareapi/vm_util.py
  274. +1 −1  nova/virt/vmwareapi/vmops.py
  275. +1 −1  nova/virt/vmwareapi/volumeops.py
  276. +1 −1  nova/virt/xenapi/agent.py
  277. +1 −1  nova/virt/xenapi/client/session.py
  278. +1 −1  nova/virt/xenapi/driver.py
  279. +1 −1  nova/virt/xenapi/fake.py
  280. +1 −1  nova/virt/xenapi/host.py
  281. +1 −1  nova/virt/xenapi/image/bittorrent.py
  282. +1 −1  nova/virt/xenapi/network_utils.py
  283. +1 −1  nova/virt/xenapi/pool.py
  284. +1 −1  nova/virt/xenapi/vif.py
  285. +1 −1  nova/virt/xenapi/vm_utils.py
  286. +1 −1  nova/virt/xenapi/vmops.py
  287. +1 −1  nova/virt/xenapi/volume_utils.py
  288. +1 −1  nova/virt/xenapi/volumeops.py
  289. +1 −1  nova/vnc/xvp_proxy.py
  290. +1 −1  nova/volume/cinder.py
  291. +1 −1  nova/volume/encryptors/__init__.py
  292. +1 −1  nova/wsgi.py
  293. +1 −0  requirements.txt
  294. +1 −1  tools/db/schema_diff.py
  295. +1 −1  tools/esx/guest_tool.py
  296. +1 −1  tox.ini
View
2  doc/source/devref/il8n.rst
@@ -21,4 +21,4 @@ in nova/tests/test_localization.py.
The ``_()`` function is found by doing::
- from nova.openstack.common.gettextutils import _
+ from nova.i18n import _
View
2  nova/api/auth.py
@@ -21,7 +21,7 @@
import webob.exc
from nova import context
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
from nova.openstack.common.middleware import request_id
View
4 nova/api/ec2/__init__.py
@@ -32,8 +32,8 @@
from nova.api import validator
from nova import context
from nova import exception
-from nova.openstack.common.gettextutils import _
-from nova.openstack.common.gettextutils import _LE
+from nova.i18n import _
+from nova.i18n import _LE
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
View
2  nova/api/ec2/cloud.py
@@ -38,12 +38,12 @@
from nova.compute import vm_states
from nova import db
from nova import exception
+from nova.i18n import _
from nova.image import s3
from nova import network
from nova.network.security_group import neutron_driver
from nova import objects
from nova.objects import base as obj_base
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
from nova import quota
View
2  nova/api/ec2/ec2utils.py
@@ -21,10 +21,10 @@
from nova import context
from nova import db
from nova import exception
+from nova.i18n import _
from nova.network import model as network_model
from nova import objects
from nova.objects import base as obj_base
-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
View
2  nova/api/metadata/handler.py
@@ -27,7 +27,7 @@
from nova.api.metadata import base
from nova import conductor
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
from nova.openstack.common import memorycache
from nova import utils
View
2  nova/api/metadata/password.py
@@ -16,8 +16,8 @@
from webob import exc
from nova import context
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
from nova import utils
View
2  nova/api/metadata/vendordata_json.py
@@ -20,7 +20,7 @@
from oslo.config import cfg
from nova.api.metadata import base
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
View
12 nova/api/openstack/__init__.py
@@ -27,9 +27,9 @@
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova import exception
+from nova.i18n import _
+from nova.i18n import translate
from nova import notifications
-from nova.openstack.common import gettextutils
-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
@@ -107,12 +107,8 @@ def _error(self, inner, req):
# inconsistent with the EC2 API to hide every exception,
# including those that are safe to expose, see bug 1021373
if safe:
- if isinstance(inner.msg_fmt, gettextutils.Message):
- user_locale = req.best_match_language()
- inner_msg = gettextutils.translate(
- inner.msg_fmt, user_locale)
- else:
- inner_msg = unicode(inner)
+ user_locale = req.best_match_language()
+ inner_msg = translate(inner.message, user_locale)
outer.explanation = '%s: %s' % (inner.__class__.__name__,
inner_msg)
View
2  nova/api/openstack/common.py
@@ -29,7 +29,7 @@
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.i18n import _
from nova.openstack.common import log as logging
from nova import quota
View
2  nova/api/openstack/compute/contrib/admin_actions.py
@@ -24,7 +24,7 @@
from nova import compute
from nova.compute import vm_states
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
from nova.openstack.common import strutils
View
2  nova/api/openstack/compute/contrib/aggregates.py
@@ -22,7 +22,7 @@
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.i18n import _
from nova.openstack.common import log as logging
from nova import utils
View
2  nova/api/openstack/compute/contrib/assisted_volume_snapshots.py
@@ -19,7 +19,7 @@
from nova.api.openstack import xmlutil
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
View
2  nova/api/openstack/compute/contrib/attach_interfaces.py
@@ -21,8 +21,8 @@
from nova.api.openstack import extensions
from nova import compute
from nova import exception
+from nova.i18n import _
from nova import network
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
View
2  nova/api/openstack/compute/contrib/baremetal_nodes.py
@@ -22,7 +22,7 @@
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.virt.baremetal import db
authorize = extensions.extension_authorizer('compute', 'baremetal_nodes')
View
2  nova/api/openstack/compute/contrib/cells.py
@@ -28,7 +28,7 @@
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.i18n import _
from nova.openstack.common import log as logging
from nova.openstack.common import strutils
from nova.openstack.common import timeutils
View
2  nova/api/openstack/compute/contrib/certificates.py
@@ -18,7 +18,7 @@
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
import nova.cert.rpcapi
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
authorize = extensions.extension_authorizer('compute', 'certificates')
View
2  nova/api/openstack/compute/contrib/cloudpipe.py
@@ -25,9 +25,9 @@
from nova.compute import utils as compute_utils
from nova.compute import vm_states
from nova import exception
+from nova.i18n import _
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
View
2  nova/api/openstack/compute/contrib/cloudpipe_update.py
@@ -17,8 +17,8 @@
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
authorize = extensions.extension_authorizer('compute', 'cloudpipe_update')
View
2  nova/api/openstack/compute/contrib/console_auth_tokens.py
@@ -18,7 +18,7 @@
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova.consoleauth import rpcapi as consoleauth_rpcapi
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
authorize = extensions.extension_authorizer('compute', 'console_auth_tokens')
View
2  nova/api/openstack/compute/contrib/console_output.py
@@ -22,7 +22,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
authorize = extensions.extension_authorizer('compute', 'console_output')
View
2  nova/api/openstack/compute/contrib/consoles.py
@@ -18,7 +18,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
authorize = extensions.extension_authorizer('compute', 'consoles')
View
2  nova/api/openstack/compute/contrib/disk_config.py
@@ -19,7 +19,7 @@
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.i18n import _
from nova.openstack.common import strutils
ALIAS = 'OS-DCF'
View
2  nova/api/openstack/compute/contrib/evacuate.py
@@ -20,7 +20,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import strutils
from nova import utils
View
2  nova/api/openstack/compute/contrib/fixed_ips.py
@@ -16,8 +16,8 @@
from nova.api.openstack import extensions
from nova import exception
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
authorize = extensions.extension_authorizer('compute', 'fixed_ips')
View
2  nova/api/openstack/compute/contrib/flavor_access.py
@@ -21,8 +21,8 @@
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import exception
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
soft_authorize = extensions.soft_extension_authorizer('compute',
View
2  nova/api/openstack/compute/contrib/flavorextraspecs.py
@@ -22,8 +22,8 @@
from nova.api.openstack import xmlutil
from nova.compute import flavors
from nova import exception
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
from nova import utils
authorize = extensions.extension_authorizer('compute', 'flavorextraspecs')
View
2  nova/api/openstack/compute/contrib/flavormanage.py
@@ -18,7 +18,7 @@
from nova.api.openstack import wsgi
from nova.compute import flavors
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
authorize = extensions.extension_authorizer('compute', 'flavormanage')
View
2  nova/api/openstack/compute/contrib/floating_ip_dns.py
@@ -20,8 +20,8 @@
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import exception
+from nova.i18n import _
from nova import network
-from nova.openstack.common.gettextutils import _
from nova import utils
View
2  nova/api/openstack/compute/contrib/floating_ips.py
@@ -24,8 +24,8 @@
from nova import compute
from nova.compute import utils as compute_utils
from nova import exception
+from nova.i18n import _
from nova import network
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.openstack.common import uuidutils
View
2  nova/api/openstack/compute/contrib/floating_ips_bulk.py
@@ -18,8 +18,8 @@
from nova.api.openstack import extensions
from nova import exception
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
CONF = cfg.CONF
View
2  nova/api/openstack/compute/contrib/fping.py
@@ -24,7 +24,7 @@
from nova.api.openstack import extensions
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova import utils
authorize = extensions.extension_authorizer('compute', 'fping')
View
2  nova/api/openstack/compute/contrib/hosts.py
@@ -22,7 +22,7 @@
from nova.api.openstack import xmlutil
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
View
2  nova/api/openstack/compute/contrib/hypervisors.py
@@ -22,7 +22,7 @@
from nova.api.openstack import xmlutil
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
authorize = extensions.extension_authorizer('compute', 'hypervisors')
View
2  nova/api/openstack/compute/contrib/instance_usage_audit_log.py
@@ -21,7 +21,7 @@
from nova.api.openstack import extensions
from nova import compute
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova import utils
CONF = cfg.CONF
View
2  nova/api/openstack/compute/contrib/keypairs.py
@@ -24,7 +24,7 @@
from nova.api.openstack import xmlutil
from nova.compute import api as compute_api
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
authorize = extensions.extension_authorizer('compute', 'keypairs')
View
2  nova/api/openstack/compute/contrib/multinic.py
@@ -22,7 +22,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
View
2  nova/api/openstack/compute/contrib/networks_associate.py
@@ -15,8 +15,8 @@
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova import exception
+from nova.i18n import _
from nova import network
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
View
2  nova/api/openstack/compute/contrib/os_networks.py
@@ -21,8 +21,8 @@
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova import exception
+from nova.i18n import _
from nova import network
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
View
2  nova/api/openstack/compute/contrib/os_tenant_networks.py
@@ -22,8 +22,8 @@
from nova.api.openstack import extensions
from nova import context as nova_context
from nova import exception
+from nova.i18n import _
import nova.network
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova import quota
View
2  nova/api/openstack/compute/contrib/quota_classes.py
@@ -21,7 +21,7 @@
import nova.context
from nova import db
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova import quota
from nova import utils
View
2  nova/api/openstack/compute/contrib/quotas.py
@@ -22,7 +22,7 @@
import nova.context
from nova import db
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
from nova.openstack.common import strutils
from nova import quota
View
2  nova/api/openstack/compute/contrib/rescue.py
@@ -23,7 +23,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova import utils
View
2  nova/api/openstack/compute/contrib/scheduler_hints.py
@@ -16,7 +16,7 @@
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
class SchedulerHintsController(wsgi.Controller):
View
2  nova/api/openstack/compute/contrib/security_group_default_rules.py
@@ -20,8 +20,8 @@
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import exception
+from nova.i18n import _
from nova.network.security_group import openstack_driver
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.openstack.common import xmlutils
View
2  nova/api/openstack/compute/contrib/security_groups.py
@@ -29,9 +29,9 @@
from nova import compute
from nova.compute import api as compute_api
from nova import exception
+from nova.i18n import _
from nova.network.security_group import neutron_driver
from nova.network.security_group import openstack_driver
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.openstack.common import xmlutils
from nova.virt import netutils
View
2  nova/api/openstack/compute/contrib/server_external_events.py
@@ -19,9 +19,9 @@
from nova.api.openstack import xmlutil
from nova import compute
from nova import exception
+from nova.i18n import _
from nova import objects
from nova.objects import external_event as external_event_obj
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
View
2  nova/api/openstack/compute/contrib/server_groups.py
@@ -23,8 +23,8 @@
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
import nova.exception
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
from nova import utils
# NOTE(russellb) There is one other policy, 'legacy', but we don't allow that
View
2  nova/api/openstack/compute/contrib/server_start_stop.py
@@ -18,8 +18,8 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
View
2  nova/api/openstack/compute/contrib/services.py
@@ -20,7 +20,7 @@
from nova.api.openstack import xmlutil
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova import servicegroup
from nova import utils
View
2  nova/api/openstack/compute/contrib/shelve.py
@@ -22,7 +22,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
auth_shelve = exts.extension_authorizer('compute', 'shelve')
View
2  nova/api/openstack/compute/contrib/simple_tenant_usage.py
@@ -23,9 +23,9 @@
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import exception
+from nova.i18n import _
from nova import objects
from nova.objects import instance as instance_obj
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import timeutils
authorize_show = extensions.extension_authorizer('compute',
View
2  nova/api/openstack/compute/contrib/volumes.py
@@ -24,8 +24,8 @@
from nova.api.openstack import xmlutil
from nova import compute
from nova import exception
+from nova.i18n import _
from nova import objects
-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
View
2  nova/api/openstack/compute/extensions.py
@@ -16,7 +16,7 @@
from oslo.config import cfg
from nova.api.openstack import extensions as base_extensions
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
ext_opts = [
View
2  nova/api/openstack/compute/flavors.py
@@ -20,7 +20,7 @@
from nova.api.openstack import xmlutil
from nova.compute import flavors
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import strutils
from nova import utils
View
2  nova/api/openstack/compute/image_metadata.py
@@ -18,8 +18,8 @@
from nova.api.openstack import common
from nova.api.openstack import wsgi
from nova import exception
+from nova.i18n import _
from nova.image import glance
-from nova.openstack.common.gettextutils import _
class Controller(object):
View
2  nova/api/openstack/compute/images.py
@@ -20,8 +20,8 @@
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import exception
+from nova.i18n import _
import nova.image.glance
-from nova.openstack.common.gettextutils import _
import nova.utils
View
2  nova/api/openstack/compute/ips.py
@@ -20,7 +20,7 @@
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 _
+from nova.i18n import _
def make_network(elem):
View
2  nova/api/openstack/compute/limits.py
@@ -44,7 +44,7 @@
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.i18n import _
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
from nova import quota
View
2  nova/api/openstack/compute/plugins/__init__.py
@@ -14,7 +14,7 @@
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
View
2  nova/api/openstack/compute/plugins/v3/access_ips.py
@@ -16,7 +16,7 @@
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
from nova import utils
View
2  nova/api/openstack/compute/plugins/v3/admin_actions.py
@@ -21,7 +21,7 @@
from nova import compute
from nova.compute import vm_states
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
View
2  nova/api/openstack/compute/plugins/v3/admin_password.py
@@ -21,7 +21,7 @@
from nova.api import validation
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
ALIAS = "os-admin-password"
View
2  nova/api/openstack/compute/plugins/v3/aggregates.py
@@ -25,7 +25,7 @@
from nova.api import validation
from nova.compute import api as compute_api
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
from nova import utils
View
2  nova/api/openstack/compute/plugins/v3/attach_interfaces.py
@@ -24,8 +24,8 @@
from nova.api import validation
from nova import compute
from nova import exception
+from nova.i18n import _
from nova import network
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
View
2  nova/api/openstack/compute/plugins/v3/cells.py
@@ -27,7 +27,7 @@
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.i18n import _
from nova.openstack.common import log as logging
from nova.openstack.common import strutils
from nova.openstack.common import timeutils
View
2  nova/api/openstack/compute/plugins/v3/certificates.py
@@ -18,8 +18,8 @@
from nova.api.openstack import wsgi
import nova.cert.rpcapi
from nova import exception
+from nova.i18n import _
from nova import network
-from nova.openstack.common.gettextutils import _
ALIAS = "os-certificates"
authorize = extensions.extension_authorizer('compute', 'v3:' + ALIAS)
View
2  nova/api/openstack/compute/plugins/v3/console_auth_tokens.py
@@ -18,7 +18,7 @@
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova.consoleauth import rpcapi as consoleauth_rpcapi
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
ALIAS = "os-console-auth-tokens"
authorize = extensions.extension_authorizer('compute', 'v3:' + ALIAS)
View
2  nova/api/openstack/compute/plugins/v3/console_output.py
@@ -23,7 +23,7 @@
from nova.api import validation
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
ALIAS = "os-console-output"
authorize = extensions.extension_authorizer('compute', "v3:" + ALIAS)
View
2  nova/api/openstack/compute/plugins/v3/evacuate.py
@@ -23,7 +23,7 @@
from nova.api import validation
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
from nova.openstack.common import strutils
from nova import utils
View
2  nova/api/openstack/compute/plugins/v3/extended_volumes.py
@@ -23,8 +23,8 @@
from nova.api import validation
from nova import compute
from nova import exception
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova import volume
View
2  nova/api/openstack/compute/plugins/v3/flavor_access.py
@@ -22,8 +22,8 @@
from nova.api.openstack import wsgi
from nova.api import validation
from nova import exception
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
ALIAS = 'flavor-access'
soft_authorize = extensions.soft_extension_authorizer('compute',
View
2  nova/api/openstack/compute/plugins/v3/flavors.py
@@ -20,7 +20,7 @@
from nova.api.openstack import wsgi
from nova.compute import flavors
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import strutils
from nova import utils
View
2  nova/api/openstack/compute/plugins/v3/flavors_extraspecs.py
@@ -19,8 +19,8 @@
from nova.api.openstack import wsgi
from nova.compute import flavors
from nova import exception
+from nova.i18n import _
from nova import objects
-from nova.openstack.common.gettextutils import _
class FlavorExtraSpecsController(object):
View
2  nova/api/openstack/compute/plugins/v3/hosts.py
@@ -21,7 +21,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
View
2  nova/api/openstack/compute/plugins/v3/hypervisors.py
@@ -20,7 +20,7 @@
from nova.api.openstack import extensions
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
ALIAS = "os-hypervisors"
View
2  nova/api/openstack/compute/plugins/v3/ips.py
@@ -20,7 +20,7 @@
from nova.api.openstack.compute.views import addresses as views_addresses
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
class IPsController(wsgi.Controller):
View
2  nova/api/openstack/compute/plugins/v3/keypairs.py
@@ -24,7 +24,7 @@
from nova.api import validation
from nova.compute import api as compute_api
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
ALIAS = 'keypairs'
View
2  nova/api/openstack/compute/plugins/v3/multiple_create.py
@@ -17,7 +17,7 @@
from nova.api.openstack import extensions
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import strutils
from nova import utils
View
2  nova/api/openstack/compute/plugins/v3/pause_server.py
@@ -21,7 +21,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
View
2  nova/api/openstack/compute/plugins/v3/quota_sets.py
@@ -23,7 +23,7 @@
import nova.context
from nova import db
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
from nova.openstack.common import strutils
from nova import quota
View
2  nova/api/openstack/compute/plugins/v3/remote_consoles.py
@@ -21,7 +21,7 @@
from nova.api import validation
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
ALIAS = "os-remote-consoles"
View
2  nova/api/openstack/compute/plugins/v3/rescue.py
@@ -25,7 +25,7 @@
from nova.api import validation
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova import utils
View
2  nova/api/openstack/compute/plugins/v3/scheduler_hints.py
@@ -15,7 +15,7 @@
import webob.exc
from nova.api.openstack import extensions
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
ALIAS = "os-scheduler-hints"
View
2  nova/api/openstack/compute/plugins/v3/server_actions.py
@@ -19,7 +19,7 @@
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova import compute
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
ALIAS = "os-server-actions"
authorize_actions = extensions.extension_authorizer('compute',
View
2  nova/api/openstack/compute/plugins/v3/server_external_events.py
@@ -18,9 +18,9 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
+from nova.i18n import _
from nova import objects
from nova.objects import external_event as external_event_obj
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
View
2  nova/api/openstack/compute/plugins/v3/server_metadata.py
@@ -20,7 +20,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
class ServerMetadataController(wsgi.Controller):
View
2  nova/api/openstack/compute/plugins/v3/servers.py
@@ -31,9 +31,9 @@
from nova import compute
from nova.compute import flavors
from nova import exception
+from nova.i18n import _
from nova.image import glance
from nova import objects
-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 timeutils
View
2  nova/api/openstack/compute/plugins/v3/services.py
@@ -19,7 +19,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova import servicegroup
from nova import utils
View
2  nova/api/openstack/compute/server_metadata.py
@@ -19,7 +19,7 @@
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
class Controller(object):
View
2  nova/api/openstack/compute/servers.py
@@ -33,9 +33,9 @@
from nova import compute
from nova.compute import flavors
from nova import exception
+from nova.i18n import _
from nova import objects
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 strutils
from nova.openstack.common import timeutils
View
2  nova/api/openstack/compute/views/servers.py
@@ -21,8 +21,8 @@
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.i18n import _
from nova.objects import base as obj_base
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
from nova import utils
View
2  nova/api/openstack/extensions.py
@@ -26,7 +26,7 @@
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import importutils
from nova.openstack.common import log as logging
import nova.policy
View
17 nova/api/openstack/wsgi.py
@@ -25,8 +25,8 @@
from nova.api.openstack import xmlutil
from nova import exception
-from nova.openstack.common import gettextutils
-from nova.openstack.common.gettextutils import _
+from nova import i18n
+from nova.i18n import _
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
from nova import utils
@@ -193,7 +193,7 @@ def best_match_language(self):
if not self.accept_language:
return None
return self.accept_language.best_match(
- gettextutils.get_available_languages('nova'))
+ i18n.get_available_languages())
class ActionDispatcher(object):
@@ -1197,8 +1197,7 @@ def __call__(self, req):
LOG.debug("Returning %(code)s to user: %(explanation)s",
{'code': code, 'explanation': explanation})
- explanation = gettextutils.translate(explanation,
- user_locale)
+ explanation = i18n.translate(explanation, user_locale)
fault_data = {
fault_name: {
'code': code,
@@ -1261,13 +1260,9 @@ def __call__(self, request):
metadata = {"attributes": {"overLimit": ["code", "retryAfter"]}}
self.content['overLimit']['message'] = \
- gettextutils.translate(
- self.content['overLimit']['message'],
- user_locale)
+ i18n.translate(self.content['overLimit']['message'], user_locale)
self.content['overLimit']['details'] = \
- gettextutils.translate(
- self.content['overLimit']['details'],
- user_locale)
+ i18n.translate(self.content['overLimit']['details'], user_locale)
xml_serializer = XMLDictSerializer(metadata, XMLNS_V11)
serializer = {
View
2  nova/api/openstack/xmlutil.py
@@ -23,7 +23,7 @@
import six
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova import utils
View
2  nova/api/sizelimit.py
@@ -20,7 +20,7 @@
import webob.dec
import webob.exc
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova import wsgi
View
2  nova/api/validation/validators.py
@@ -19,7 +19,7 @@
import jsonschema
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import uuidutils
View
2  nova/block_device.py
@@ -18,7 +18,7 @@
from oslo.config import cfg
from nova import exception
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
from nova.openstack.common import strutils
from nova import utils
View
2  nova/cells/filters/target_cell.py
@@ -22,7 +22,7 @@
"""
from nova.cells import filters
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
View
2  nova/cells/manager.py
@@ -27,10 +27,10 @@
from nova.cells import utils as cells_utils
from nova import context
from nova import exception
+from nova.i18n import _
from nova import manager
from nova import objects
from nova.objects import base as base_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 import periodic_task
View
2  nova/cells/messaging.py
@@ -44,12 +44,12 @@
from nova import context
from nova.db import base
from nova import exception
+from nova.i18n import _
from nova.network import model as network_model
from nova import objects
from nova.objects import base as objects_base
from nova.objects import instance_fault as instance_fault_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
View
2  nova/cells/rpcapi.py
@@ -27,8 +27,8 @@
from oslo import messaging
from nova import exception
+from nova.i18n import _
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 import rpc
View
2  nova/cells/scheduler.py
@@ -30,10 +30,10 @@
from nova import conductor
from nova.db import base
from nova import exception
+from nova.i18n import _
from nova import objects
from nova.objects import base as obj_base
from nova.objects import instance_action as instance_action_obj
-from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.scheduler import utils as scheduler_utils
from nova import utils
View
2  nova/cells/state.py
@@ -26,8 +26,8 @@
from nova import context
from nova.db import base
from nova import exception
+from nova.i18n import _
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
View
2  nova/cells/weights/mute_child.py
@@ -21,7 +21,7 @@
from oslo.config import cfg
from nova.cells import weights
-from nova.openstack.common.gettextutils import _
+from nova.i18n import _
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
View
2  nova/cloudpipe/pipelib.py
@@ -31,8 +31,8 @@
from nova import crypto
from nova import db
from nova import exception
+from nova.i18n import _
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
View
2  nova/cmd/all.py
@@ -29,9 +29,9 @@
from oslo.config import cfg
from nova import config
+from nova.i18n import _
from nova import objects
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
View
2  nova/cmd/baremetal_deploy_helper.py
@@ -29,9 +29,9 @@
from nova import config
from nova import context as nova_context
+from nova.i18n import _
from nova import objects
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 units
View
2  nova/cmd/baremetal_manage.py
@@ -58,9 +58,9 @@
import six
from nova import config
+from nova.i18n import _
from nova import objects
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
View
2  nova/cmd/compute.py
@@ -25,9 +25,9 @@
from nova import config
import nova.db.api
from nova import exception
+from nova.i18n import _
from nova import objects
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.report import guru_meditation_report as gmr
from nova import service
View
2  nova/cmd/dhcpbridge.py
@@ -31,11 +31,11 @@
from nova import context
import nova.db.api
from nova import exception
+from nova.i18n import _
from nova.network import rpcapi as network_rpcapi
from nova import objects
from nova.objects import base as objects_base
from nova.objects import network as network_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
View
2  nova/cmd/manage.py
@@ -72,10 +72,10 @@
from nova import db
from nova.db import migration
from nova import exception
+from nova.i18n import _
from nova import objects
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 import quota
View
2  nova/cmd/network.py
@@ -25,9 +25,9 @@
from nova import config
import nova.db.api
from nova import exception
+from nova.i18n import _
from nova import objects
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.report import guru_meditation_report as gmr
from nova import service