152 Commits

Author SHA1 Message Date
Jenkins
b98c33002a Merge "Fix missing translations for error and info" 2015-03-13 20:32:44 +00:00
ankitagrawal
8a95bf893d Fix missing translations for error and info
Fixed log message translations at several missing places.

Closes-Bug: 1431239
Change-Id: I23ae9395a91ce88e0877c0a0ef55189c6e42700b
2015-03-12 22:37:15 -07:00
Louis Taylor
0acff569e0 Move to graduated oslo.log module
This removes the log module from the oslo incubator directory.

Change-Id: Ib017cc2777e27c58b376c3138c9fba614783cc34
2015-03-12 11:48:24 +00:00
Louis Taylor
d759a6fd1a Move from oslo.config to oslo_config
oslo_config was moved out of the oslo namespace in oslo.config>=1.6.0.

Related-to: blueprint drop-namespace-packages

Change-Id: I30ecbf8f9de77496fcb643c7ad9738d79ad359f0
2015-01-12 14:34:22 +00:00
Pranali Deore
6eebebc80b Replace '_' with '_LI', '_LE', '_LW', '_LC'
oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack

Added hacking rules for warning, info, critical, error and exception
about checking translation for log messages and fixed for below cases only,
1. LOG.error(_(""))
2. LOG.info(_(""))
3. LOG.exception(_(""))
4. LOG.critical(_(""))
5. LOG.warning(_(""))

Below scenario is not handled in this patch,
If message is passed to LOG call using separate variable,
ex.
    msg = (_("")
    LOG.error(msg)

Change-Id: Idbf8779cdfc41ca1424bebcd101096bec482872f
2014-12-19 02:34:55 -08:00
Zhi Yan Liu
d4f890798a Update glance.openstack.common
1. Sync openstack.common modules up to latest version
from oslo-inc. The follow modules got updated: 
 * fileutils
 * install_venv_common
 * lockutils
 * log
 * processutils

2. Add _i18n module as the dependency for new code.

3. Remove openstack.common.test module.
Glance and dependencies now use oslotest instead.

4. Remote unused openstack.common.excutils module.
Glance now use the module from oslo.utils instead.

5. Add missing modules back to openstack-common.conf.
Below ones are still using currently. But they will
be removed when the latest policy module get synced.
 * jsonutils
 * strutils

Change-Id: Ibbc2cda81a4e3c13643fe5c5bf6471c3f544add7
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-10-16 11:12:18 +08:00
Julien Danjou
fadbef8511 hacking: upgrade to 0.9.x serie
Change-Id: I252758fd633662de9659a402c5e3d7e3ce1fae0f
2014-10-06 14:41:03 +02:00
Jenkins
f4598907ad Merge "colorizer: use staticmethod rather than classmethod" 2014-06-19 18:06:40 +00:00
Jenkins
64ae671f33 Merge "To fixes import error for run_tests.sh" 2014-06-17 11:44:09 +00:00
Julien Danjou
2d2a3f3780 colorizer: use staticmethod rather than classmethod
The methods are actually not class methods at all as they do not use the
class nor the instance.

Change-Id: I04721bcaef30da291389a1144bdcfe65f10753b2
2014-06-16 11:53:33 +02:00
Christian Berendt
213b2f5006 use /usr/bin/env python instead of /usr/bin/python
The usage of /usr/bin/env ensures that the first interpreter
found in the environment's $PATH variable is used.

Change-Id: I61b27bb9a5fc1f8d2a3981472215bc0aa6a389e2
2014-05-23 15:45:46 +02:00
Zhi Yan Liu
95d81a0b03 To fixes import error for run_tests.sh
Change-Id: Iacce978001750c9cb8f398dba78361dee22ed2fb
Closes-bug: #1314007
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-04-29 13:12:23 +08:00
Julia Varlamova
5843e071d4 Enable H304 check
Enable H304: no relative imports

Fix import in tools/install_venv.py

Change-Id: I099ed65db9b42223eaa4b66a3a5c6113d1cc56fe
2014-03-20 10:34:26 +00:00
Zhi Yan Liu
d7f1221684 Switch to testrepository for running tests
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>
2014-01-29 08:30:55 +08:00
Noboru arai
8de10b0f34 Remove vim header
No need to set tabstop tons of times, this can be set in your vimrc
file instead.

More disucssion:
http://openstack.10931.n7.nabble.com/Remove-vim-modelines-td21780.html

Change-Id: I3b830a5bb831a63c188109e6fad66ba48884fff3
Partial-Bug: #1229324
2014-01-14 16:03:28 +00:00
Dirk Mueller
f7358a0d13 Sync with oslo-incubator (git 6827012)
This syncs the common/ modules with oslo-incubator, which
brings a few hacking fixes and py3k compat fixes.

Change-Id: I948aafebd25ae0b3aad119c41d0a121c8b9c5ae8
2014-01-02 15:19:29 +01:00
Dirk Mueller
d6114f914c Fix and enable gating on H306
Fix fallout of Hacking check: Imports should be in alphabetical order

Change-Id: I179711c8448208592490ffa47d51419779940014
2014-01-01 16:44:19 +01:00
Yanis Guenane
317ad31637 Make Glance code base H102 compliant
Add the Apache headers where it was missing so the Glance
code base can be H102 compliant

Change-Id: If19841d1752f7ec364098333429ce090374e79cd
Closes-bug: #1263537
2013-12-23 13:12:12 +00:00
Victor Sergeyev
88bb1af1d5 Enable F40X checking
Clean up imports due to F401 and F403 checks.
F401  'module' imported but unused
F403  unable to detect undefined names with wildcard import

Change-Id: I487edb157de1a6babc7ad8a3fb65f195e476c490
2013-11-27 18:15:48 +02:00
Jenkins
93edd1bdc6 Merge "Changed header from LLC to Foundation based on trademark policies" 2013-11-12 13:41:45 +00:00
Jenkins
29c0c00605 Merge "Use built-in print() instead of print statement" 2013-10-17 14:12:54 +00:00
Chang Bo Guo
e8e293d43e Use built-in print() instead of print statement
In python 3 print statement is not supported, so we should use
only print() functions.

Fixes bug 1226943

Change-Id: I0ae4cc7e5996ed30c69e153ba51438c56e56c09a
2013-09-24 08:12:26 -07:00
ZhiQiang Fan
dab794e6fb Enclose command args in with_venv.sh
Sync tools/with_venv.sh from oslo, it will support argument with
blanks.

Change-Id: Ibb802b21d609ea6b54fc168b17705f06ad1cb86a
Closes-Bug: #1220937
2013-09-20 05:50:40 +08:00
Dirk Mueller
518bbf7298 Changed header from LLC to Foundation based on trademark policies
Fixes: Bug 1214176

Change-Id: I4e394c33d810fe7d48066ff7cb6143f7eae25f13
2013-09-10 18:29:53 +02:00
Monty Taylor
d0314c0973 Rename requirements files to standard names.
Change-Id: Icde92cdff054f8c1efb4a518ab7cf166a8eb791a
2013-07-30 00:34:26 -04:00
Brian Elliott
fcaf7d4e62 Use cross-platform 'ps' for test_multiprocessing
This fixes _get_children() on OS X.

bug 1205367

Change-Id: I296ea18dbd601f18fe7367b42bf5aecd9ccf9646
2013-07-19 23:15:02 +00:00
Jenkins
ef22c4f745 Merge "Use oslo.sphinx and remove local copy of doc theme" 2013-07-19 23:56:16 +00:00
Zhi Yan Liu
d13493be80 Adding Cinder backend storage driver to Glance
This change allows Glance drive Cinder as a block storage backend to
store image data.
Before this we already use swift as an object storage backend to save
image.

Currently the patch is a partial implementation, after Cinder expose
'brick' library, 'host-volume-attaching' and 'multiple-attaching'
enhancement ready, the store will support ADD/GET/DELETE interface
finally.

blueprint: glance-cinder-driver

Change-Id: I4cdeccdb518972c0280e59c984ed6b001dafe243
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2013-07-17 06:27:59 +08:00
Jenkins
bcb8713f7a Merge "Pin kombu and anyjson versions" 2013-07-12 01:33:17 +00:00
Monty Taylor
30f75e31ef Sync install_venv_common from oslo
Change-Id: Idd7fd1310b58e81ceb9ae06bb1e9710aee1f4a65
2013-07-05 22:39:20 -04:00
Doug Hellmann
670b07eb56 Use oslo.sphinx and remove local copy of doc theme
Use the new oslo.sphinx version of the OpenStack doc
theme instead of copying it into this repo.

blueprint oslo.sphinx

Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Change-Id: I0bd91f7bb43f97b99051fed65b75fc05d5149cc8
2013-07-05 16:10:20 -04:00
Doug Hellmann
e099eb2522 Pin kombu and anyjson versions
The minimum version of kombu in the requirements
list has been updated to ensure that compatible
kombu and msgpack libraries are used across all
projects. That update also requires an update
to anyjson.

Addresses bug #1134575

Change-Id: I1520af1315fe649f52ab62769164dc67f4396651
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2013-06-24 12:16:43 -04:00
Monty Taylor
c867fc7e44 Remove explicit distribute depend.
Causes issues with the recent re-merge with setuptools. Advice from
upstream is to stop doing explicit depends.

Change-Id: Ie875bbaae191cd0719db76cc375cd97d5bf90de7
2013-06-11 11:30:07 -07:00
Jenkins
1797d833b8 Merge "Add qpid-python to test-requires" 2013-05-31 22:18:28 +00:00
Michael Still
f09c52c8b0 Sync oslo imports to the latest version.
Change-Id: I36193d00930e5c82c46841b64650863c811b95a4
2013-05-27 06:00:46 +10:00
Ben Nemec
42de74116e Add qpid-python to test-requires
The qpid notification tests are not run if the qpid-python package
is not installed.  This change adds it to the test-requires list
and removes the check for it since it should always be present.

Fixes bug 1173380

Change-Id: I2763e320e6018fde196c903f515920ad33f28aa6
2013-05-15 16:16:52 +00:00
Monty Taylor
66b3e5ec83 Use flake8/hacking instead of pep8.
Change-Id: Ia99bc9116d7d8b558002b302cafe354d05d57f72
2013-05-03 11:28:22 -04:00
John Bresnahan
28b1129753 Verify SSL certificates at boot time
When Glance is configured to run with SSL this patch will check
that the certificate and key exist, are readable, and match each
other at boot time.  If any of the above conditions fail an friendly
error message is logged directing the operator at a solution.
Previously the keys were not checked until a client connected.

fixes bug: 1160529

Change-Id: I16975608f9ae40ac5b84b3caa52ed5f8e22f296e
2013-04-03 07:29:15 -10:00
Jenkins
0fc6972024 Merge "Pin SQLAlchemy to 0.7.x" 2013-03-28 18:43:37 +00:00
Dirk Mueller
733d89d7cf Pin SQLAlchemy to 0.7.x
0.7.10 has been released and is compatible with 0.7.x. Instead
of pinning to 0.7.9, simply pin to 0.7.x to avoid SQLAlchemy 0.8

Also sync the 0.7.x requirements to 0.7.8 (to be in sync with other
OpenStack core components)

Fixes: Bug #1153983

Change-Id: I6f47e7d27fcf0c7271bb2c91a4615ef0bb5e2643
2013-03-15 14:23:30 +01:00
Mark McLoughlin
7fe636f781 Switch to final 1.1.0 oslo.config release
Fixes bug #1128256

oslo.config has now been released to PyPI in time for Grizzly RC1 so
we can switch to using it directly.

Change-Id: I655f831718ae5f4e25e941ee206fe195214a9a91
2013-03-12 16:31:35 +00:00
Dan Prince
8acda7c44a Switch to oslo.config.
The oslo-config package has been renamed. Switch to the new
version. (should fix SmokeStack).

Change-Id: I6744337008825498a2f0f5c74139661410968f50
2013-03-05 22:26:49 -05:00
Matthew Treinish
2b180a2b6d Add PostgreSQL support to test migrations.
This commit adds support for running the migrations tests
with a PostgreSQL backend.

Migration 012 was changed because PostgreSQL's constraint
drop uses a different name to identify the foreign key
to be removed. The migration now handles it properly for
both postgres and mysql.

Change-Id: Ie8850608fc5f4bccda57a0b12c3b4adc8d1f61d0
2013-02-28 11:59:26 -05:00
Matthew Treinish
70907328ea Enable support for MySQL with test migrations.
This commit makes the necessary changes to enable the migrations
tests to pass with both mysql and sqlite. However the proper mysql
database still needs to be created beforehand for the tests to run
with mysql.

The sqlalchemy alter() method breaks on sqlite when mysql is enabled
for other databases. So for sqlite testing the alter() calls are now
done manually.

This also adds the MySQL-python module to the test-requires list
so that it will get installed for CI and the virtualenv used for
unit tests.

Change-Id: Ic72476b8e6a910c25747641ef1882639019b433e
2013-02-28 11:57:33 -05:00
Brian Waldon
5e1b199a0f Fix broken JSON schemas in v2 tests
* The required attribute is not allowed in draft 4 of JSON schema
* The dependency on jsonschema can be relaxed back to all versions

Change-Id: Id0767cfe2fe46d73999563896f851ffb01aa9489
2013-02-25 15:16:25 -08:00
Matthew Treinish
c48d59690c Pin jsonschema version below 1.0.0.
The latest jsonschema version breaks the unit tests. This commit pins
the version to be less than the latest release.

Fixes bug 1132840

Change-Id: Ib4db4782f995cee179445ca11d2b6a7f13a6b457
2013-02-25 11:58:04 -05:00
Jenkins
6a91505175 Merge "Update oslo-config version." 2013-02-21 20:45:22 +00:00
Russell Bryant
780a1c7b03 Update oslo-config version.
Update the oslo-config version in pip-requires that includes a fix that
breaks oslo.config imports.

Change-Id: Iea037215b1f89beb9480968077f1517285f2f071
2013-02-20 15:44:59 -05:00
Matthew Treinish
b1da386afb Sync latest install_venv_common.py
Syncs:

c78b2ab Avoid using cfg in install_venv_common

So that people don't need oslo-config installed to run install_venv

Fixes bug 1130853

Change-Id: I9dfc8d8417455ff22a0d0e911c762983952c75ee
2013-02-20 14:50:31 -05:00
Mark McLoughlin
98552376f3 Use oslo-config-2013.1b3
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.

Add the 2013.1b3 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.

Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.

Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).

Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
2013-02-19 10:19:36 +00:00