Jump to: navigation, search

Difference between revisions of "Cinder/blueprints/read-only-volumes"

(Created page with "Test")
 
Line 1: Line 1:
Test
+
* '''Launchpad Entry''': [[CinderSpec]]:read-only-volumes
 +
* '''Created''': 3 July 2013
 +
* '''Contributors''': Anastasia Guzikova
 +
 
 +
== Summary ==
 +
 
 +
Note this is a big spec and where possible it is broken down into sub-specs to make it easier to share work.
 +
 
 +
== Release Note ==
 +
 
 +
== Rationale ==
 +
 
 +
== User stories ==
 +
The purpose is to provide the ability to attach volumes in the read-only mode.
 +
 
 +
Some examples
 +
* unmutable volumes
 +
* cinder as a backend for glance https://blueprints.launchpad.net/glance/+spec/glance-cinder-driver
 +
* shared volume https://blueprints.launchpad.net/cinder/+spec/shared-volume
 +
 
 +
=== How can you use Read Only volumes ===
 +
 
 +
Create a Read Only by default volume
 +
 
 +
<pre><nowiki>
 +
{
 +
POST /v1/<tenant_id>/volumes
 +
 
 +
body:
 +
{
 +
    "volume":
 +
    {
 +
        "status": "creating",
 +
        '''"read_only": true,'''
 +
        "availability_zone": null,
 +
        "source_volid": null,
 +
        "display_description": null,
 +
        "snapshot_id": null,
 +
        "user_id": null,
 +
        "size": 1,
 +
        "display_name": null,
 +
        "imageRef": null,
 +
        "attach_status": "detached",
 +
        "volume_type": null,
 +
        "project_id": null,
 +
        "metadata": {}
 +
    }
 +
}
 +
</nowiki></pre>
 +
 
 +
Create a VolumePermission to get Read/Write permission for User or Project:
 +
<pre><nowiki>
 +
{
 +
POST /v1/<tenant_id>/os-volume-permission
 +
 
 +
body:
 +
{
 +
    "volume_permission":
 +
    {
 +
      "volume_id": null,
 +
        "read_only": false,
 +
        "project_id": null,
 +
        "user_id": null,
 +
    }
 +
}
 +
</nowiki></pre>
 +
 
 +
== Assumptions ==
 +
 
 +
== Design ==
 +
 
 +
Workflow is:
 +
 
 +
'''Read Only volumes'''
 +
 
 +
Add an ability to mark a volume as Read Only by default.
 +
Add an ability to create ACL for a volume.
 +
 
 +
"Blueprint: https://blueprints.launchpad.net/cinder/+spec/read-only-volumes"
 +
 
 +
== Implementation ==
 +
 
 +
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:
 +
 
 +
=== API Changes ===
 +
 
 +
* new volume permission resource
 +
 
 +
=== Code Changes ===
 +
 
 +
Code changes should include an overview of what needs to change, and in some cases even the specific details.
 +
 
 +
=== Migration ===
 +
 
 +
Include:
 +
* data migration, if any
 +
* redirects from old URLs to new ones, if any
 +
* how users will be pointed to the new way of doing things, if necessary.
 +
 
 +
== Test/Demo Plan ==
 +
 
 +
This need not be added or completed until the specification is nearing beta.
 +
 
 +
== Unresolved issues ==
 +
 
 +
== BoF agenda and discussion ==
 +
 
 +
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.
 +
 
 +
----
 +
[[Category:Spec]]

Revision as of 09:57, 3 July 2013

  • Launchpad Entry: CinderSpec:read-only-volumes
  • Created: 3 July 2013
  • Contributors: Anastasia Guzikova

Summary

Note this is a big spec and where possible it is broken down into sub-specs to make it easier to share work.

Release Note

Rationale

User stories

The purpose is to provide the ability to attach volumes in the read-only mode.

Some examples

How can you use Read Only volumes

Create a Read Only by default volume

{
POST /v1/<tenant_id>/volumes

body:
{
    "volume": 
    {
        "status": "creating",
        '''"read_only": true,''' 
        "availability_zone": null,
        "source_volid": null,
        "display_description": null,
        "snapshot_id": null,
        "user_id": null,
        "size": 1,
        "display_name": null,
        "imageRef": null,
        "attach_status": "detached",
        "volume_type": null,
        "project_id": null,
        "metadata": {}
    }
}

Create a VolumePermission to get Read/Write permission for User or Project:

{
POST /v1/<tenant_id>/os-volume-permission

body:
{
    "volume_permission": 
    {
       "volume_id": null,
        "read_only": false,
        "project_id": null,
        "user_id": null,
    }
}

Assumptions

Design

Workflow is:

Read Only volumes

Add an ability to mark a volume as Read Only by default. Add an ability to create ACL for a volume.

"Blueprint: https://blueprints.launchpad.net/cinder/+spec/read-only-volumes"

Implementation

This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:

API Changes

  • new volume permission resource

Code Changes

Code changes should include an overview of what needs to change, and in some cases even the specific details.

Migration

Include:

  • data migration, if any
  • redirects from old URLs to new ones, if any
  • how users will be pointed to the new way of doing things, if necessary.

Test/Demo Plan

This need not be added or completed until the specification is nearing beta.

Unresolved issues

BoF agenda and discussion

Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.