9198 Commits

Author SHA1 Message Date
wanghao
fca31fc95e Add ability to filter by volume_glance_metadata
This feature allows users to more conveniently query volume details by
filtering the volume list by certain image metadata.
For example, users can query a specific bootable volume quickly
filtering by image_name or other glance metadata.

APIImpact
1. User can use glance metadata to filter volume detail in cinder api.
   The query url is like this:
   "volumes/detail?glance_metadata={"image_name":"xxx"}"

2. Since microversion is implemented in M, this change will add a new
   version "3.4".

DocImpact
1.Operator would need to add glance_metadata to 'query_volume_filters'
option for new functionality to work.

Change-Id: I1d276d93ad5e799401b48d2234e61c28a3aaf790
Implements: blueprint support-volume-glance-metadata-query
2016-05-06 08:22:29 +08:00
Jenkins
8091e9f737 Merge "VMware: Support for paraVirtual image adapter type" 2016-05-05 19:18:20 +00:00
Jenkins
f5a558416e Merge "Fix gate-cinder-tox-db-functional job" 2016-05-05 17:22:19 +00:00
Jenkins
2f05fe7c5d Merge "NetApp: Use Local Cache to Copy an Available Image" 2016-05-05 17:21:45 +00:00
Jenkins
3680f09533 Merge "Updated from global requirements" 2016-05-05 17:21:26 +00:00
Jenkins
844b7ef784 Merge "Add ordering possibilities to conditional update" 2016-05-05 16:48:34 +00:00
Jenkins
b56b1c49c2 Merge "ibm flashsystem: Fixing hardcoded attribute" 2016-05-05 15:54:13 +00:00
Ivan Kolodyazhny
da4b17e7b0 Fix gate-cinder-tox-db-functional job
oslo.versionedobjects will enforce to use real UUIDs instead of
fakes in the future. This patch uses UUID from fake_constants for
funcitonal tests.

Change-Id: Id93ebc2054501941c9969f62367ddcbdda81dd82
2016-05-05 13:24:31 +00:00
Jenkins
4c9a37b4f1 Merge "Add provider_location to cloned volume" 2016-05-05 09:28:08 +00:00
Gorka Eguileor
d060e8ae13 Add ordering possibilities to conditional update
Some DBs' update method are order dependent, and they behave differently
depending on the order of the values, example on a volume with
'available' status:

   UPDATE volumes SET previous_status=status, status='retyping'
   WHERE id='44f284f9-877d-4fce-9eb4-67a052410054';

Will result in a volume with 'retyping' status and 'available'
previous_status both on SQLite and MariaDB, but

   UPDATE volumes SET status='retyping', previous_status=status
       WHERE id='44f284f9-877d-4fce-9eb4-67a052410054';

Will yield the same result in SQLite but will result in a volume with
status and previous_status set to 'retyping' in MariaDB, which is not
what we want, so order must be taken into consideration.

This patch will allow conditional update to auto order the update
including the possibility of accepting a spefic ordering that takes
precedence over the automatic ordering.

Automatic order is as follow:

 1- Order specified in argument order
 2- Values that refer to other ORM field (simple and using operations,
    like size + 10)
 3- Values that use Case clause (since they may be using fields as well)
 4- All other values

Specs: https://review.openstack.org/232599/

Depends-On: I7de421252330fa27b0ad3cadbc4395a8f28a9dad
Implements: blueprint cinder-volume-active-active-support
Change-Id: Ic3a42a5bd2c7436328dc3bf449d463e170d9f807
2016-05-05 11:27:50 +02:00
Jenkins
797610591a Merge "Huawei: Do not do split if replication pair abnormal" 2016-05-05 05:14:05 +00:00
OpenStack Proposal Bot
5291406058 Updated from global requirements
Change-Id: Ie92bae1ee3b874028e6d4c20894426563bedf4c4
2016-05-04 22:06:27 +00:00
Vipin Balachandran
93490b2c9e VMware: Support for paraVirtual image adapter type
Currently the VMDK driver does not support creating volumes
with paraVirtual adapter type. It fails the copy image to
volume operation if the image's 'vmware_adaptertype' property
is set to 'paraVirtual'. This patch adds the paraVirtual
adapter type to the list of valid adapter types to fix this.

Closes-bug: #1578399
Change-Id: I981b1737974ae1fbb3eb3fef3811bcb50030d670
2016-05-04 14:59:34 -07:00
Ivan Kolodyazhny
6425d9a323 Pass default executor to os-brick
os-brick uses processutils.execute in the current version by default. It
will priv_rootwrap.execute in the new version if nothing will be passed.
So we don't need to pass anything to os-brick explicitly.

Change-Id: I489193c18ae6603f0bc750c7b63e1dd0b4a71e28
2016-05-04 21:49:43 +03:00
Jenkins
696ca898e9 Merge "Removed extra line of code" 2016-05-04 18:21:24 +00:00
Chuck Fouts
fdca451cbd NetApp: Use Local Cache to Copy an Available Image
This fixes a defect where a locally cached image is not
always used by the Copy Offload feature. By using an available
image, local to the same backend as the share, performance can be
improved as a clone operation is executed instead of a remote copy.

Also, moved and refactored tests from test_netapp_nfs.py to the
correct test class under the netapp driver test directory. This is
part of the ongoing refactoring of test_netapp_nfs.py to meet
current code standards.

Change-Id: Ia4d4435d81d2f7dabd12582553b89f9b9d5ab38a
Closes-Bug: 1568998
2016-05-04 15:39:03 +00:00
Ollie Leahy
616a2bd34d Add provider_location to cloned volume
Forced backup was failing when the driver returned a 'provider_location'
for a cloned volume, because the return value for create_cloned_volume()
was ignored in _create_temp_cloned_volume().

Change-Id: I709996316e4c212243629e461d36da4152e995e4
Closes-Bug: 1573126
2016-05-04 14:50:36 +01:00
Jenkins
120f8bb795 Merge "Move and rename tempest_tests to cinder/tests/tempest" 2016-05-04 05:08:40 +00:00
Chandan Kumar
427f0f06b3 Move and rename tempest_tests to cinder/tests/tempest
To avoid conflicts, it needs to be done and
the subdirs 'api' and 'scenario' directly under
the cinder/tests/tempest directory

Closes-Bug: #1577016

Change-Id: I5b8d1411e0917ecb7e70eb5a6b139d75437ba032
2016-05-03 17:55:20 +00:00
Tom Barron
8c3abfdfb0 Tests: lower case all fake uuid constants
Midway through the valid uuid conversion project, we decided
to use upper-case fake constant uuids.  For backwards compatibility,
we put both upper-case and lower-case versions of each constant
in the fake_constants file, with the goal of returning and removing
the lower-case versions when their usages had been converted to
upper-case.

This commit converts the lower-case usages of the constants to
upper-case and removes the lower-case definitions from the
constants file.

Change-Id: I89e394fe6d0e0483c0816ae133f929616b340538
2016-05-03 13:36:22 -04:00
Eric Harney
ed6d50bed6 Tests: Fail if oslo.versionedobjects issues Invalid UUID warnings
There are many places in Cinder where we break this rule.

Filter them out ahead of time, before oslo.versionedobjects no
longer allows this behavior.

Change-Id: I34c48ff55a7d3e1b607fb8630bddbe5a1a14764d
2016-05-02 10:57:31 +00:00
Sheel Rana
b1eddc7ffd Removed extra line of code
One extra line of code is present which is not doing anything
specific, just one a == b statement which does not have any
impact.

So, removing extra statement which does not have any impact.

Change-Id: I23b75d7c74ed6cc90ffc3607d2c144565781f871
Closes-Bug:#1575592
2016-05-01 06:47:35 +00:00
Tom Barron
1fe4ed1a0e Fix uuid warnings in various api contrib unit tests
This commit fixes invalid uuid usage in various
unit tests under cinder/tests/unit/api/contrib,
cleaning up FutureWarnings from oslo_versioned_objects [1].

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: Ieb2f63b16d3d2ca264409a37863da47eeaa66206
2016-05-01 00:26:38 -04:00
Tom Barron
93be776287 Fix snapshot test uuid warnings in api.contrib
This commit fixes invalid uuid usage in the various
snapshot unit tests under cinder/tests/unit/api/contrib,
cleaning up FutureWarnings from oslo_versioned_objects [1].

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: Ic3be860fd18ef8dedfa04adb07952495b7a8b422
2016-05-01 00:25:11 -04:00
Tom Barron
453e4a563a Fix volume test uuid warnings in api.contrib
This commit fixes invalid uuid usage in the various
volume unit tests under cinder/tests/unit/api/contrib,
cleaning up FutureWarnings from oslo_versioned_objects [1].

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: I526f9cf1c383f75490f1ac86c0fc5182376f5b3e
2016-05-01 00:23:50 -04:00
Tom Barron
358f78bccd Fix vol type/spec uuid warnings in api.contrib
This commit fixes invalid uuid usage in the volume type, extra
spec, and encryption unit tests under cinder/tests/unit/api/contrib,
cleaning up FutureWarnings from oslo_versioned_objects [1].

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: Ie502a20cf54bd1d500b15e4ef1ac0c6d64d4cf3f
2016-05-01 00:22:10 -04:00
Tom Barron
3a914ba226 Fix qos_manage uuid warnings in api.contrib tests
This commit fixes invalid uuid usage in the qos_manage unit tests
under cinder/tests/unit/api/contrib, cleaning up FutureWarnings
from oslo_versioned_objects [1].

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: Ibc17282732521e6c51e314e3d9e9f0fad80a2fd6
2016-05-01 00:21:27 -04:00
Tom Barron
be49c76136 Fix CG uuid warnings in api.contrib unit tests
This commit fixes invalid uuid usage in the consistency group
and cgsnapshot  unit tests under cinder/tests/unit/api/contrib,
cleaning up FutureWarnings from oslo_versioned_objects [1].

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: I87b5212e5e5d64f9051819003b3717f72ba602d9
2016-05-01 00:19:20 -04:00
Tom Barron
f167681cc5 Fix admin_actions uuid warnings in api.contrib
This commit fixes invalid uuid usage in the admin_actions unit
tests under cinder/tests/unit/api/contrib, cleaning up
FutureWarnings from oslo_versioned_objects [1].

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Depends-On: I784a5dd89ea667fafbb84a5685d03796aa1c9fc5

Change-Id: I7ecf2df4ba5dea4d95c12b5b9c20438474fec73a
2016-05-01 00:16:32 -04:00
Tom Barron
c3cb40bc17 Fix uuid warnings from api.contrib backup tests
This commit fixes invalid uuid usage in the backup unit tests
under cinder/tests/unit/api/contrib, cleaning up FutureWarnings
from oslo_versioned_objects [1].

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: I784a5dd89ea667fafbb84a5685d03796aa1c9fc5
2016-05-01 00:15:36 -04:00
Tom Barron
dacf0df995 Fix uuid warnings from test_db_api unit tests
The test_db_api unit tests emit FutureWarnings [1] from
oslo_versioned_objects due to use of invalid faked test values.

This commit uses fake values from cinder/tests/unit/fake_constants.py
to clean up these warnings consistent with other similar cleanups in
the codebase.

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: Ib0b38bac57a62ffbb0e71729193efc7039956a35
2016-05-01 00:12:39 -04:00
Jenkins
2b330c02c3 Merge "fix invalid uuid in emc extremio unit tests" 2016-04-30 21:58:55 +00:00
Jenkins
9686de8288 Merge "VMware: Remove TODO for port config option" 2016-04-30 17:27:50 +00:00
Jenkins
6899d238c0 Merge "fix invalid uuid warnings from test_cmd" 2016-04-30 16:37:57 +00:00
Jenkins
2180098dfd Merge "Fix invalid uuids in tintri unit tests" 2016-04-30 16:37:48 +00:00
Jenkins
f82eb12bb7 Merge "Fix uuid warnings from db unit tests" 2016-04-30 16:37:39 +00:00
Jenkins
ae70901df0 Merge "Fix invalid uuids in EMC scaleio unit tests" 2016-04-30 16:37:29 +00:00
Jenkins
a2bf1dd8fc Merge "Tests: Fix invalid UUIDs in EMC VNX tests" 2016-04-30 16:36:54 +00:00
Alex Meade
53cfde43b8 User messages API for error cases
This patch implements basic user messages with the following APIs.
GET /messages
GET /messages/<message_id>
DELETE /messages/<message_id>

Implements : blueprint summarymessage

Co-Authored-By: Alex Meade <mr.alex.meade@gmail.com>
Co-Authored-By: Sheel Rana <ranasheel2000@gmail.com>

Change-Id: Id8a4a700c1159be24b15056f401a2ea77804d0a0
2016-04-29 18:41:10 +00:00
OpenStack Proposal Bot
db57966c1f Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ib0f1fa08219d02a9266d2c9fe9ea3d1ced230f73
2016-04-29 07:13:31 +00:00
Jenkins
2f0e3fc45e Merge "Add in-tree tempest tests" 2016-04-28 14:56:11 +00:00
OpenStack Proposal Bot
3200dd4157 Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I038c5dcf31445f55c9228d453805b3b3b44611b7
2016-04-28 07:14:03 +00:00
OpenStack Proposal Bot
2482a54f15 Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I0195818b4ab30b59aa7eb0eca256de6a8cd878c8
2016-04-27 07:16:37 +00:00
Jenkins
fb732eeb8d Merge "Microversion of Bootable filter in cinder list" 2016-04-23 16:51:40 +00:00
Jenkins
23ba93fa52 Merge "3PAR: Remove metadata that tracks the instance id" 2016-04-22 21:47:49 +00:00
Tom Barron
30ac868a6f fix invalid uuid in emc extremio unit tests
The EMC extremio unit tests emit a FutureWarning [1] from
oslo_versioned_objects due to use of an invalid faked test value.

This commit uses a fake value from cinder/tests/unit/fake_constants.py
to clean up this warning consistent with other similar cleanups in the
codebase.

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: Ie1819e8ba68da49b02618e282f18a78bf9dbaff8
2016-04-22 13:01:31 -04:00
Tom Barron
4dd7cf675a fix invalid uuid warnings from test_cmd
The test_cmd unit tests are emitting several FutureWarnings [1]
from oslo_versioned_objects due to use of invalid faked test values.

This commit uses fake values from cinder/tests/unit/fake_constants.py
to clean up this test module consistent with similar cleanups in the
codebase.

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: Id54026f0219c77d0e9a30668b448225d805cf270
2016-04-22 12:59:03 -04:00
Tom Barron
caab3d9b3d Fix invalid uuids in tintri unit tests
The tintri unit tests emit several FutureWarnings [1] from
oslo_versioned_ovjects due to use of invalid uuids in faked
test values.

This commit uses values from cinder/tests/unit/fake_constants.py
to resolve this issue.

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: Ia76d5cdcb691e700412d48a927759efe9e046375
2016-04-22 12:58:30 -04:00
Tom Barron
9aeeffb99b Fix uuid warnings from db unit tests
This commit uses fake constants with real uuids to clean up
the oslo_versioned_objects FutureWarnings[1] emitted when running
   'tox -epy27 -- --regex cinder.tests.unit.db'

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: Ia540a1feaea3f586472eec971bc38f1e2a8fe5a6
2016-04-22 12:57:26 -04:00
Tom Barron
9662f1311a Fix invalid uuids in EMC scaleio unit tests
The EMC scaleio unit tests emit a number of FutureWarnings [1] from
oslo_versioned_objects due to use of invalid uuids in faked test
values.

This commit uses values from cinder/tests/unit/fake_constants.py
to resolve this issue.

[1] http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField

Change-Id: I650284e7895f3015c42907eb6cce775a90fa617a
2016-04-22 12:57:03 -04:00