Bump preversion to 2014.2 to formally open Juno development.
The Icehouse release branch (milestone-proposed) will be cut
from the last commit before this one.
Change-Id: I8fe4b32d60fb7c32e80258f60e2c843b76eb4115
OpenStack as a whole is moving towards using testrepository and
testtools for running tests. To that end, bring Glance into line by
switching it to use testrepository to run tests.
This copies run_tests.sh and tools/colorizer.py from Nova.
This change also has some minor changes to make run_test.sh work well.
Partial fixes bug: 1179009
Fixes bug: 1271806
Change-Id: Ic265bc0d2f1528358f6e8ee5b4139f991923fc72
Signed-off-by: Steve Kowalik <steven@wedontsleep.org>
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
An image can be saved to more than one backend storage by multi-location
mechanism, Glance should have a capability to select the best backend
storage for improving image consuming performance. This change
implements two strategy modules: "location_order" and "store_type", and
allow Admin configure some strategy-specified options for Glance as
their deployment required.
As an end user, he can get VM or consuming image faster base on this
enhancement. This is not only for 'download' transport handling on the
API server side but also for client since they can obtain locations by
standard 'direct URL' interface.
docImpact
Implements bp: image-location-selection-strategy
Change-Id: I86f192aeae8e5f21a72f946552f6507654c25a6c
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
This should be accepted/merged once all the RC1 bugfixes are in.
This bumps the target version to 2014.1, effectively opening the master
branch to Icehouse development, ending the feature freeze.
The Havana release branch is cut from the previous commit in master.
Change-Id: Ib8aedc149750ce32558f1fbbf51263f2110be3ac
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 Glance, we have taken a shortcut to avoid having to call it
explicitly from each script and instead call it from glance/__init__.py.
This shortcut would be perfectly fine if we were absolutely sure that
glance modules would never be imported from another program. It's probably
quite incorrect for a program to use glance code (indeed, if we wanted to
support this, Glance 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
gance.openstack.common and this in turn causes gettext.install('glance')
to be called 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.
However, there's a bit of an annoying detail here - by default,
nosetests starts in the current directly and tries to import all modules
it finds to look for tests. Without the _() builtin installed, importing
some modules like glance.common.exception will fail.
Since it only ever makes sense to load tests from the glance/tests dir,
we can ask nose to do that by using the --tests argument via setup.cfg.
Note, this means that if you previously did this:
$> tox -- glance.tests.foo glance.tests.bar
then you must now do this:
$> tox -- --tests glance.tests.foo,glance.tests.bar
Change-Id: If4125d6bcbde63df95de129ac5c83b4a6d6f130a
Because of the move to testtools, the detailed-errors plugin is not only no
longer useful, it actually causes problems, as it fails to process the
error information sent up by testtools.
Part of blueprint grizzly-testtools
Change-Id: I0c8ff489fa92bb4cf7dcd06dd73f14701c013608