]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Adding Read-Only volume attaching support to Cinder
authorZhi Yan Liu <zhiyanl@cn.ibm.com>
Fri, 19 Jul 2013 22:18:24 +0000 (06:18 +0800)
committerZhi Yan Liu <zhiyanl@cn.ibm.com>
Wed, 28 Aug 2013 17:25:19 +0000 (01:25 +0800)
commit900851ffe36e3f4143ec9126c5bf69dea0853114
tree991d878ada988c4d4ffbc8cd635086a3929f7b92
parent4daffc63e757508873a9dbf955970f3d7de0f6dc
Adding Read-Only volume attaching support to Cinder

1. Adding an API extension to allow clients set volume Read-Only flag on
demand.
2. Require client to provide and be aware of volume attaching mode when
they call 'os-attach' API.
3. Adding a 'access_mode' field to connection info which
'os-initialize_connection' API returned. This field should be used by
client such as Nova to use correct mode accessing attached volume.
Currently access mode can be 'rw' or 'ro'.
4. In future, the driver within Cinder need to ensure the volume be
exposed under the correct access mode which connection info described,
for example backend should set volume to readonly mode when connection
info ask client using 'ro' access mode consume attached volume. That
means Read-Only is not only a attaching mode but also a status for a
volume.

blueprint read-only-volumes

Change-Id: I4c84614d6541d5f7c358abadb957da7b8c3d9c48
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
27 files changed:
cinder/api/contrib/volume_actions.py
cinder/api/v1/volumes.py
cinder/api/v2/volumes.py
cinder/db/api.py
cinder/db/sqlalchemy/api.py
cinder/db/sqlalchemy/migrate_repo/versions/014_sqlite_downgrade.sql
cinder/db/sqlalchemy/migrate_repo/versions/020_add_volume_admin_metadata_table.py [new file with mode: 0644]
cinder/db/sqlalchemy/models.py
cinder/exception.py
cinder/tests/api/contrib/test_admin_actions.py
cinder/tests/api/contrib/test_volume_actions.py
cinder/tests/api/contrib/test_volume_host_attribute.py
cinder/tests/api/contrib/test_volume_image_metadata.py
cinder/tests/api/v1/stubs.py
cinder/tests/api/v1/test_volumes.py
cinder/tests/api/v2/stubs.py
cinder/tests/api/v2/test_volumes.py
cinder/tests/fake_driver.py
cinder/tests/policy.json
cinder/tests/test_migrations.py
cinder/tests/test_volume.py
cinder/tests/test_volume_rpcapi.py
cinder/volume/api.py
cinder/volume/driver.py
cinder/volume/manager.py
cinder/volume/rpcapi.py
etc/cinder/policy.json