cinder/cinder/tests/unit/api/v2
Vincent Hou 21bc0537e0 Volume status management during migration
This patch proposes a new implementation for the status and
the migration_status for volumes.

* The initial migration_status is None, meaning no migration has been
done; Migration_status 'error' means the previous migration failed.
Migration_status 'success' means the previous migration succeeded.

* If the key 'lock_volume' is set to True from the request, the volume
status should be set to 'maintenance' during migration and goes
back to its original status after migration. Otherwise, if the
key 'lock_volume' is set to False, the volume status will remain the
same as its original status. The default value for lock_volume is
False and it applies to the available volume.

* From the REST's perspectives, all the create, update and delete
actions are not allowed if the volume is in 'maintenance', because
it means the volume is out of service. If it is not in maintenance
mode, the migration can be interrupted if other requests are
issued, e.g. attach. For the termination of migration, another
patch will target to resolve it.

DocImpact
APIImpact The key 'lock_volume' has been added into the API,
telling the volume to change the status to 'maintenance' or not.
The migration_status has been added into results returned
from volume list command, if the request is from an admin.

Change-Id: Ia86421f2d6fce61dcfeb073f8e7b9c9dde517373
Partial-implements: blueprint migration-improvement
2015-08-28 09:54:28 +08:00
..
__init__.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
stubs.py Add pagination to snapshots 2015-08-25 22:07:46 +02:00
test_limits.py Fix argument order for assertEqual in tests 2015-08-11 10:09:40 -07:00
test_snapshot_metadata.py Avoid race condition at snapshot deletion stage 2015-07-02 15:50:01 +03:00
test_snapshots.py Add pagination to snapshots 2015-08-25 22:07:46 +02:00
test_types.py Fix order of arguments in assertEqual 2015-08-03 19:26:08 -07:00
test_volume_metadata.py Volume status management during migration 2015-08-28 09:54:28 +08:00
test_volumes.py Volume status management during migration 2015-08-28 09:54:28 +08:00