OpenStack Compute (Nova)
Go to file
Mark McLoughlin 9447e59b70 Remove gettext.install() from nova/__init__.py
The gettext.install() function installs a builtin _() function which
translates a string in the translation domain supplied to the install()
function. If gettext.install() is called multiple times, it's the last
call to the function which wins and the last supplied translation domain
which is used e.g.

 >>> import os
 >>> os.environ['LANG'] = 'ja.UTF-8'
 >>> import gettext
 >>> gettext.install('keystone', unicode=1, localedir='/opt/stack/keystone/keystone/locale')
 >>> print _('Invalid syslog facility')
 無効な syslog ファシリティ
 >>> gettext.install('nova', unicode=1, localedir='/opt/stack/nova/nova/locale')
 >>> print _('Invalid syslog facility')
 Invalid syslog facility

Usually this function is called early on in a toplevel script and we
assume that no other code will call it and override the installed _().
However, in Nova, we have taken a shortcut to avoid having to call it
explicitly from each script and instead call it from nova/__init__.py.

This shortcut would be perfectly fine if we were absolutely sure that
nova modules would never be imported from another program. It's probably
quite incorrect for a program to use nova code (indeed, if we wanted to
support this, Nova code shouldn't use the default _() function) but
nevertheless there are some corner cases where it happens. For example,
the keystoneclient auth_token middleware tries to import cfg from
nova.openstack.common and this in turn causes gettext.install('nova')
in other projects like glance or quantum.

To avoid any doubt here, let's just rip out the shortcut and always
call gettext.install() from the top-level script.

Change-Id: If4125d6bcbde63df95de129ac5c83b4a6d6f130a
2013-04-01 13:44:47 -04:00
bin Remove gettext.install() from nova/__init__.py 2013-04-01 13:44:47 -04:00
contrib Enable N302: Import modules only 2013-01-25 12:11:54 -05:00
doc Remove gettext.install() from nova/__init__.py 2013-04-01 13:44:47 -04:00
etc/nova Adds Tilera back-end for baremetal 2013-03-26 17:58:04 -04:00
nova Remove gettext.install() from nova/__init__.py 2013-04-01 13:44:47 -04:00
plugins/xenserver xenapi: rpmbuild fixes 2013-03-20 15:29:09 +00:00
smoketests Removed print stmts in test cases 2013-01-29 12:55:14 -05:00
tools Remove gettext.install() from nova/__init__.py 2013-04-01 13:44:47 -04:00
.coveragerc Update .coveragerc 2013-02-06 16:47:06 +02:00
.gitignore add .idea folder to .gitignore pycharm creates this folder 2013-03-07 17:00:22 -06:00
.gitreview Add .gitreview config file for gerrit. 2011-10-24 15:07:19 -04:00
.mailmap Add the missing replacement text in devref doc. 2012-12-14 09:47:32 +08:00
.testr.conf Invert test stream capture logic for debugging. 2013-01-07 11:03:30 -08:00
CONTRIBUTING.rst Add a CONTRIBUTING file. 2012-11-21 17:04:48 -05:00
HACKING.rst docs should indicate proper git commit limit 2013-03-04 13:23:45 -07:00
LICENSE initial commit 2010-05-27 23:05:26 -07:00
MANIFEST.in Finish AUTHORS transition. 2012-07-05 09:11:37 -05:00
README.rst Rename VMWare to VMware 2013-03-04 21:46:23 -08:00
babel.cfg Get rid of distutils.extra. 2012-02-08 19:30:39 -08:00
openstack-common.conf Reformat openstack-common.conf 2013-03-25 07:34:04 +00:00
pylintrc Don't warn about C0111 (No docstrings) 2011-03-16 15:28:09 -07:00
run_tests.sh Bring back colorizer again with error results. 2013-03-26 17:59:08 -07:00
setup.cfg Use testr to run nova unittests. 2012-12-14 14:22:20 -08:00
setup.py Set version to 2013.2 2013-03-20 16:21:48 +01:00
tox.ini Enable tox use of site-packages for libvirt. 2013-03-19 12:11:10 +02:00

README.rst

OpenStack Nova README

OpenStack Nova provides a cloud computing fabric controller, supporting a wide variety of virtualization technologies, including KVM, Xen, LXC, VMware, and more. In addition to its native API, it includes compatibility with the commonly encountered Amazon EC2 and S3 APIs.

OpenStack Nova is distributed under the terms of the Apache License, Version 2.0. The full terms and conditions of this license are detailed in the LICENSE file.

Nova primarily consists of a set of Python daemons, though it requires and integrates with a number of native system components for databases, messaging and virtualization capabilities.

To keep updated with new developments in the OpenStack project follow @openstack on Twitter.

To learn how to deploy OpenStack Nova, consult the documentation available online at:

http://docs.openstack.org

In the unfortunate event that bugs are discovered, they should be reported to the appropriate bug tracker. If you obtained the software from a 3rd party operating system vendor, it is often wise to use their own bug tracker for reporting problems. In all other cases use the master OpenStack bug tracker, available at:

http://bugs.launchpad.net/nova

Developers wishing to work on the OpenStack Nova project should always base their work on the latest Nova code, available from the master GIT repository at:

http://github.com/openstack/nova

Developers should also join the discussion on the mailing list, at:

https://lists.launchpad.net/openstack/

Any new code must follow the development guidelines detailed in the HACKING.rst file, and pass all unit tests. Further developer focused documentation is available at:

http://nova.openstack.org/

For information on how to contribute to Nova, please see the contents of the CONTRIBUTING.rst file.

-- End of broadcast