10 Commits

Author SHA1 Message Date
xing-yang
708b9be9c0 Add group snapshots - APIs
This is the fifth patch that implements the generic-volume-group
bluerpint. It adds APIs for group snapshots and create group
from source.

This patch depends on the fourth patch which implements group
snapshots support in the volume manager:
    https://review.openstack.org/#/c/361376/

Client side patch is here:
    https://review.openstack.org/#/c/329770/

Current microversion is 3.14. The following CLI's are supported:
cinder --os-volume-api-version 3.14 group-create-from-src
    --name my_group --group-snapshot <group snapshot uuid>
cinder --os-volume-api-version 3.14 group-create-from-src
    --name my_group --source-group <source group uuid>
cinder --os-volume-api-version 3.14 group-snapshot-create
    --name <name> <group uuid>
cinder --os-volume-api-version 3.14 group-snapshot-list
cinder --os-volume-api-version 3.14 group-snapshot-show
    <group snapshot uuid>
cinder --os-volume-api-version 3.14 group-snapshot-delete
    <group snapshot uuid>

APIImpact
DocImpact
Partial-Implements: blueprint generic-volume-group

Change-Id: I2e628968afcf058113e1f1aeb851570c7f0f3a08
2016-07-19 11:27:15 -04:00
zhufl
3ef1fad8f8 Remove unused config.CONF
This is to remove unused config.CONF to keep code clean.

Change-Id: I6e8d19ec06e7df84b2bbd86dd3b99b4489402ddd
2016-08-30 10:01:46 +08:00
xing-yang
8c74c74695 Add generic volume groups
This is the second patch that implements the generic-volume-group
bluerpint. It adds the groups table and introduces create/delete/
update/list/show APIs for groups.

It depends on the first patch which adds group types and group specs:
    https://review.openstack.org/#/c/320165/

Client side patch is here:
    https://review.openstack.org/#/c/322627/

Current microversion is 3.13. The following CLI's are supported:
cinder --os-volume-api-version 3.13 group-create --name my_group
    <group type uuid> <volume type uuid>
cinder --os-volume-api-version 3.13 group-list
cinder --os-volume-api-version 3.13 create --group-id <group uuid>
    --volume-type <volume type uuid> <size>
cinder --os-volume-api-version 3.13 group-update <group uuid>
    --name new_name  description new_description
    --add-volumes <uuid of volume to add>
    --remove-volumes <uuid of volume to remove>
cinder --os-volume-api-version 3.13 group-show <group uuid>
cinder --os-volume-api-version 3.13 group-delete
    --delete-volumes <group uuid>

APIImpact
DocImpact
Change-Id: I35157439071786872bc9976741c4ef75698f7cb7
Partial-Implements: blueprint generic-volume-group
2016-07-16 19:34:39 -04:00
Satish Venkatasubramanian
3db21d003f Add volumes/summary API support
Add a new API to display volumes summary with total number of volumes
and total size in GB (total_size: 500 and total_count: 20).

DocImpact
APIImpact
Partially-Implements: blueprint display-volumes-summary-details

Co-Authored-By: MR Swami Reddy <swamireddy@gmail.com>

Change-Id: I0117a233afbd834a165ade9e1358f8dd38fbcfac
2016-08-15 05:30:04 +05:30
wanghao
3eafcf5720 Improvement to query cg detail(Part 1)
This feature allows users to query volume details
filtering by consistency group id.

According the spec, this is part 1 to implement
whole bp. Next part will be implemented after
Generic Volume group done.

APIImpact
1. User can use consistency group id to filter volume detail
   in cinder API. The query url is like this:
   "volumes/detail?group_id={consistency_group_id}".

2. This change will add a new version "3.10".

Co-Authored-By: wangxiyuan<wangxiyuan@huawei.com>

Change-Id: If3354cfaee5ca57d281b9270b4aebf4d26d42b2c
Partial-Implements: blueprint improvement-to-query-consistency-group-detail
2016-07-30 09:13:47 +08:00
Eric Harney
c899cee195 Tests: Remove notification_driver config
This is not needed since we mock out the notifier
in the base tests.  Removing this reduces the amount
our tests depend on oslo.messaging details.

Change-Id: Id6e660733c11ddf0fdd9a732b9aeb3329ca1fc31
2016-06-13 11:35:18 -04:00
wanghao
54bc12a4c4 Remove inappropriate Copyright
In new api/v3/test_volumes.py, there is
inappropriate copyright, should remove it.

Closes-Bug: #1583413
Change-Id: Idffc7837b0e9e1dc956c1898db4bb03a8dec49e2
2016-05-19 11:18:36 +08:00
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
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
Sheel Rana
0b6c68a8c1 Microversion of Bootable filter in cinder list
Currently cinder treats all non zero values passed to it
as True for bootable filter in volume GET call.
For ex, if bootable=invalid, it converts it into True being
bootable as boolean value in db table 'volume'.

Need to update filtering functionality in cinder to address
'True' and 'False' values separately and raise exception if
anything than True/False/true/false/0/1 is passed in this filter.

But as this will change the API behavior, microversioning is done
for this fix.

Closes-Bug: #1551535

Change-Id: Idd57014c1504eb4fc9ea0eabe894d2000ea9c364
2016-04-21 15:17:15 +00:00