]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add a provider_id column to Volumes and Snapshots
authorJohn Griffith <john.griffith8@gmail.com>
Fri, 19 Dec 2014 22:14:22 +0000 (15:14 -0700)
committerJohn Griffith <john.griffith8@gmail.com>
Sat, 20 Dec 2014 00:06:01 +0000 (17:06 -0700)
commit9f34d34d0ab92400223e3cc87285d0d4fbdf21f9
treeccd78bde2b22e3231eac1d93f093252221d05ff9
parenta20330d64fc24d1421660b49d196609cd6127979
Add a provider_id column to Volumes and Snapshots

There are a number of cases where there's some really ugly mapping
work in drivers to try and map the backend device-id to the
Cinder ID of a Volume or Snapshot.  Most drivers seem to work around this in
their own creative ways using their own mechanisms (metadata,
naming schemes etc).

It seems like it would be useful for a number of reasons however to
go ahead and add a simple column to the Volumes table that could be
used for storing a backend ID for the Volume and Snapshot.

Change-Id: Id07cdd1e03feac71ff34325d5abc68c5adc48266
cinder/db/sqlalchemy/migrate_repo/versions/035_add_provider_id_column.py [new file with mode: 0644]
cinder/db/sqlalchemy/migrate_repo/versions/036_add_provider_id_column_to_snapshots.py [new file with mode: 0644]
cinder/db/sqlalchemy/models.py
cinder/tests/test_migrations.py