]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Update volume type name for volume type API
authorGloria Gu <gloria.gu@hp.com>
Wed, 10 Dec 2014 22:58:21 +0000 (14:58 -0800)
committerWalter A. Boring IV (hemna) <walter.boring@hp.com>
Mon, 2 Mar 2015 19:14:49 +0000 (19:14 +0000)
commitd275831841d9bb7e879f77eb28b0b236d70703d1
tree55f600a6e9bc6d2fb8a0d3b7d8e0e4e8512e766a
parentdafa5f643d96c1283909a8467eab72593d50f4b5
Update volume type name for volume type API

This continues the change for updating volume type to
include changing name.

- Updated the following APIs and tests for volume type

* update volume type
PUT http://<openstackhost>:8776/v2/${tenant_id}/types/${vol_type_id}
body
{
    "volume_type": {
      "name": "test_updated",
      "description":"updated_desc"
    }
}

** user can update name
** if update name, name can not be empty spaces.
** if update name, can not change the name to be the same as the one
in another volume type
** name and description can not be both None

Implements: blueprint volume-type-description
Change-Id: Idc08f796932df709ff20c17f6bc8d4753d85ad3c
cinder/api/contrib/types_manage.py
cinder/db/sqlalchemy/api.py
cinder/tests/api/contrib/test_types_manage.py
cinder/tests/test_volume_types.py
cinder/volume/volume_types.py