]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Convert volume_type id from int to uuid.
authorjohn-griffith <john.griffith@solidfire.com>
Sun, 2 Dec 2012 07:01:49 +0000 (00:01 -0700)
committerJohn Griffith <john.griffith@solidfire.com>
Tue, 4 Dec 2012 18:50:49 +0000 (11:50 -0700)
commit51a438c8f3f0d13c6779602264d72cde82feab9c
tree5dafb78b0a0dc7110bc3bea862b57174309e69df
parentb1e423299632016b7ee0528cba8ecb44016cf941
Convert volume_type id from int to uuid.

This converts the volume_type id from int to uuid.  In
addition, this also corrects an issue of deleting volume_types
by name.  Even though the client/api is taking the id, it was
converting to the name of the volume_type for the db access.

We also want to continue enforcing that the name is unique on creation
so as to avoid any confusion and for clarity in Horizon.  The api
has also been enhanced to allow you to specify the type by name
or by uuid.

This does NOT modify the things like the volume details display field
(currently shows the type 'name' not 'uuid'), these types of changes
will go in to V2 of the API.

Implements blueprint vol-type-to-uuid

Change-Id: I1c54ff2a1e0c5df5891408fc11b15176db4028c3
12 files changed:
cinder/api/v1/volumes.py
cinder/db/api.py
cinder/db/sqlalchemy/api.py
cinder/db/sqlalchemy/migrate_repo/versions/004_volume_type_to_uuid.py [new file with mode: 0644]
cinder/db/sqlalchemy/models.py
cinder/exception.py
cinder/tests/api/openstack/fakes.py
cinder/tests/api/v1/test_volumes.py
cinder/tests/test_migrations.py
cinder/tests/test_volume_types.py
cinder/tests/test_volume_types_extra_specs.py
cinder/volume/volume_types.py