3338 Commits

Author SHA1 Message Date
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
Jenkins
e7413091c3 Merge "Clean up DatabaseMigrationError" 2014-02-08 06:59:34 +00:00
Jenkins
a41b30af01 Merge "Enable H302 check" 2014-02-08 06:43:44 +00:00
Jenkins
73f6b68deb Merge "Fix misspellings in glance" 2014-02-08 01:05:49 +00:00
Julia Varlamova
c6e08732bf Clean up DatabaseMigrationError
Exception DatabaseMigrationError from glance/common/exception.py
is unused, so we get rid of it.

Change-Id: I36f70dcc7d5b282d3c9d9e82a0c3f673d008e71e
2014-02-07 19:08:55 +04:00
Julia Varlamova
1d0327f13c Enable H302 check
Enable H302 (import only modules) which passes without any changes to files.

Change-Id: Ibcc609ffad404e8d73a4828b7b18892444e7454d
2014-02-07 16:29:36 +04:00
Jenkins
1570fa2b85 Merge "Enable H202 check" 2014-02-07 09:15:21 +00:00
OpenStack Jenkins
d20dbb5c58 Merge "Updated from global requirements" 2014-02-07 06:51:28 +00:00
Shane Wang
e85da5ba21 Fix misspellings in glance
Fix misspellings detected by:
* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: Ib65747384763fa43bcf2441669d9903181c65cc6
Closes-Bug: #1257295
2014-02-07 14:49:58 +08:00
Jenkins
7f9c2760bc Merge "Depending on python-swiftclient>=1.6" 2014-02-07 05:15:03 +00:00
Fei Long Wang
7998dbe33d Expose image property 'owner' in v2 API
The 'owner' property on an image is exposed in v1 but does
not appear in the v2 image response. It would be useful to
have this available.

docImpact
Implement blueprint expose-owner-in-v2

Change-Id: I90f68d57e185f4a5ee63cd97bd5597948dde33ea
2014-02-07 05:29:23 +08:00
Jenkins
8782526a91 Merge "Removes logging of location uri" 2014-02-06 19:49:40 +00:00
Jenkins
cfa4def2e0 Merge "glance-manage wont take version into consideration" 2014-02-06 17:07:47 +00:00
Nikhil Komawar
f6e41e9c0f Removes logging of location uri
This patch removes logging of sensitive store location uri, which
is logged when an exception occurs while trying to get the object
from the store or due to a failure in getting the store api due to
unauthorized context.

fixes bug 1275062

Change-Id: I679baa0897f242f4b8372c9c1c7ab28ae811f5e5
2014-02-06 11:28:40 -05:00
OpenStack Jenkins
b249db1bdc Updated from global requirements
Change-Id: Iad328b1d0887d3f31f3db73b7ad699bd20b6847f
2014-02-06 15:37:54 +00:00
Fei Long Wang
8496dad347 Remove duplicate type defination of v2 images schema
Closes-Bug: #1276011

Change-Id: I53565fcaaf9fde064fb28c63bf00a4a7a0f602eb
2014-02-06 21:14:03 +08:00
Julia Varlamova
fa3575d8fe Enable H202 check
Enable H202 check: assertRaises Exception too broad.

Make changes to glance/tests/unit/test_notifier.py

Change-Id: I258367172e77312ddda06132d2e8371e8fff81e7
2014-02-06 15:30:47 +04:00
Alex Meade
0a7ea662a8 Modify my mailmap
Changing my preferred email.

Change-Id: Idbe6a77d6e007c317acb5eda354edbb0dd6e87f3
2014-02-05 19:25:49 +00:00
AmalaBasha
55b0e5f50b glance-manage wont take version into consideration
A glance-manage db upgrade/db downgrade will do either an 'upgrade to
latest' or 'downgrade to None' even though a version argument is
provided. The version being passed isn't being picked up and None is
passed across.

Fixes bug 1258068
Change-Id: Iaab4cf5eeb6d7c9c94fc741841a6b0797a058d40
2014-02-05 12:29:35 +05:30
Jenkins
fd99958b33 Merge "Fix indentation errors found by Pep8 1.4.6+" 2014-02-05 01:45:45 +00:00
Jenkins
011fb9f422 Merge "Provide explicit image create value in Registry v2 Client test" 2014-02-04 21:01:11 +00:00
Jenkins
368dc7cdd7 Merge "Move scrubber outside the store package" 2014-02-04 20:25:27 +00:00
Jenkins
cdd28a6217 Merge "Now psutil>=1.1.0 is actually on PyPI" 2014-02-04 11:01:56 +00:00
Jenkins
cfc639d06d Merge "glance requires pyOpenSSL>=0.11" 2014-02-04 10:18:04 +00:00
Flavio Percoco
7fba9a42eb Move scrubber outside the store package
Glance's scrubber was created under the store package because it is
intended to clean up images from stores when `delayed_delete` is
enabled. However, it doesn't really belong there.

Soft delete is a Glance feature that allows images to be deleted
asynchronously as opposed of blocking clients requests during the image
deletion. Therefore, it needs to be store agnostic and live within
Glance's codebase.

Partially-Implements blueprint: create-store-package

Change-Id: I25ddbe1f0f1191f33d814dbae5788da7d511773a
2014-02-04 09:15:02 +01:00
Fei Long Wang
4fe9213c6d Depending on python-swiftclient>=1.6
Now we're depending on python-swiftclient>=1.6 since the parameter
'headers' was introduced since python-swiftclient 1.6. This is a
regression issue introduced by patch:
https://review.openstack.org/#/c/48913/

get_object(container, obj, resp_chunk_size=None, query_string=None,
response_dict=None, headers=None)

Closes-Bug: #1276033

Change-Id: I174f2dc53a402d48301b17839be8b5fa97064805
2014-02-04 15:55:12 +08:00
Jenkins
c5decb13e1 Merge "Restore image status to 'queued' if upload failed" 2014-02-04 07:18:03 +00:00
Jenkins
7eeb900152 Merge "Provide explicit task create and update value in controller tests" 2014-02-04 07:13:14 +00:00
Jenkins
cbe2c3684c Merge "Add VMware storage backend to location strategy" 2014-02-03 22:01:46 +00:00
Jenkins
8f87162a4f Merge "Don't rewrite the NotFound error message" 2014-02-03 15:41:33 +00:00
Fei Long Wang
5662243a49 Now psutil>=1.1.0 is actually on PyPI
Version 1.1.0 doesn't work, so exclude it from the version list.

Patch of requirements: https://review.openstack.org/#/c/68946

Closes-Bug: #1275716

Change-Id: I1e676f96070d1704de84f89bddbc5b23a6c6d966
2014-02-03 20:35:35 +08:00
Jenkins
3a4a4300cf Merge "Don't override transport_url with old configs" 2014-02-03 09:03:17 +00:00
Dirk Mueller
b3e5756ddb Fix indentation errors found by Pep8 1.4.6+
As a preparation in order to switch to a newer
Pep8 version in the future, fix the indentation errors
that are missed by Pep8 1.4.5 due to bugs.

Change-Id: I30acf8fdc1ae7eadcbc1849409c989c2422f0f8f
Closes-Bug: #1267994
2014-02-02 14:41:21 +01:00
Jenkins
22408ff5bc Merge "Log a warning when a create fails due to quota" 2014-02-01 17:05:40 +00:00
Arnaud Legendre
2c94b11c40 Add VMware storage backend to location strategy
The store to scheme map used in the location strategy module
doesn't contain the VMware datastore backend.

Change-Id: I5d1faeb464dab79c300a525bab6e7e0ecb4ea489
Closes-Bug: #1275126
2014-01-31 16:06:00 -08:00
OpenStack Jenkins
233ef86466 Merge "Imported Translations from Transifex" 2014-01-31 23:32:14 +00:00
Matt Fischer
1777e019e0 Log a warning when a create fails due to quota
When a create call fails due to user_storage_quota
being exceeded, log a warning message.

Closes-Bug: #1270832

Change-Id: Ic7ec266aace03cff0a1f72dc3ba6f17b89f5fd55
2014-01-31 13:39:31 -07:00
Jenkins
0ff61940b7 Merge "Prevent E500 when delayed delete is enabled" 2014-01-31 18:56:58 +00:00
Jenkins
c5588da78a Merge "Add multifilesystem store to support NFS servers as backend" 2014-01-31 09:53:10 +00:00
Dmitry Kulishenko
8e861d396f glance requires pyOpenSSL>=0.11
glance uses  OpenSSL.crypto.sign() and OpenSSL.crypto.verify(), which
are new in pyOpenSSL 0.11. Global requirements already fixed, do the
same change in glance

Change-Id: Ide1d180cd1966cac454d7d5d3b6475a04591735c
Partial-Bug: #1268966
2014-01-31 09:57:42 +02:00
OpenStack Jenkins
899736b7c1 Imported Translations from Transifex
Change-Id: If70a924e01fa75a129ef97aed5a432eeb552c437
2014-01-31 06:02:06 +00:00
Jenkins
84954a8522 Merge "Retry failed image download from Swift" 2014-01-31 05:50:59 +00:00
Arnaud Legendre
f9589bd010 VMware Datastore storage backend
Customers using a VMware environment with OpenStack should be able to
store their Glance images in VMware datastores. This is a first step to solve
the problem where Nova needs to copy the bits over the network
from Glance to the datastore when spawning an instance.
Also, this give the ability to provide some optimizations for specific
image formats in the future (fast cloning for example).

This patch contains a 'glance/store/vmware/' folder with the code
to manage the connection with vCenter or an ESX(i) host.
This code will go away as soon as it is merged to Olso:
see review https://review.openstack.org/#/c/65075/

The current implementation give this ability to specify the vCenter or
ESX(i) IP. In case of a vCenter IP, there is no optimization to reduce
the datapath (no host selected).
Consequently, it is recommended to specify an ESX IP if the ESX host
API endpoint is accessible from Glance.

docImpact
Implements bp vmware-datastore-storage-backend

Change-Id: I3837912e0d1614b9c31a689f71c2e34d453e2dc3
2014-01-30 18:14:15 -08:00
Fei Long Wang
623246dda2 Restore image status to 'queued' if upload failed
In v2, we're removing 'killed' status so as to let user
can retry upload if there is a failure. But based on
current implement, the image will be stuck in 'saving'
status when upload failed. This fix will restore the
image status to 'queued' to avoid the issue.

Closes-Bug: #1273087

Change-Id: Icd318e3e8d90b6837c84666c47f720b93febe228
2014-01-30 16:40:38 +08:00
Jenkins
4d8c3f1553 Merge "Update all the glance manpages" 2014-01-30 03:20:21 +00:00
Jenkins
64d5c9786f Merge "Sync with global requirements" 2014-01-29 16:55:12 +00:00
Flavio Percoco
7e13cf73f1 Don't override transport_url with old configs
The backwards compatibility support turned out being a forward
compatibility blocker. This patch attempts to first load the notifier
transport using the transport_url and then, if the transport_url was not
configured, it loads the transport by using the old strategy config
params.

Closes-bug: #1263945

Change-Id: I4c80c64e2d1afaf518886b51a50300a576ee6317
2014-01-29 09:23:02 +01:00
Zhi Yan Liu
8143d814f2 Provide explicit image create value in Registry v2 Client test
Assign an explicit created_at datetime value to image db fixtures,
it be used to fixes race condition in Registry v2 Client test cases.

Closes-Bug: #1272136
Change-Id: Ib9f1c7072c6ac828479c6a2e5bddd0f3ad057653
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-01-28 15:37:45 +08:00
Zhi Yan Liu
7f3e27ab06 Provide explicit task create and update value in controller tests
Assign an explicit created_at and updated_at datetime value to task DB
fixtures, it be used to fixes race condition in TasksController test
cases.

Closes-Bug: #1274365

Change-Id: I9f13c7e0e97085faac15713342808722a6692178
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-01-28 15:35:29 +08:00
Jenkins
d390e85cee Merge "Enable hacking H703 check" 2014-01-28 04:39:29 +00:00