<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div>Couple of quick observations on the REST semantics :</div><div>a)    What is the context of calls in 1.1 ? A user ? Looks like you are assuming the context of a user/group that will own both VMs and disks, which is fine. Just wanted to make sure that what it is. You might want to consider the case for disk sharing (not simultaneously) where a use creates a data set and then others attach it</div><div>b)    Looks like there is always RW; no RO disks<br></div><div>c)    You could also extend this for volumes; don't think there is any difference between a block device and a volume for the kinds of operations listed here</div><div>d)    yep, 1.4 PUT /servers/id/disks/id is redundant. No need and it is error prone</div><div>e)    I think 1.6 requires an id ie POST /servers/id/disks/id</div><div>f)     Have you looked at OCCI ? <br></div><div>Cheers</div><div><k/><br></div>
<blockquote id="replyBlockquote" webmail="1" style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px; font-size: 10pt; color: black; font-family: verdana;">
<div id="wmQuoteWrapper">
-------- Original Message --------<br>
Subject: [Openstack] Block storage management API (Cloud Disks API)<br>
From: Vangelis Koukis <<a href="mailto:vkoukis@cslab.ece.ntua.gr">vkoukis@cslab.ece.ntua.gr</a>><br>
Date: Mon, January 17, 2011 9:13 am<br>
To: <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Cc: <a href="mailto:cven@cslab.ece.ntua.gr">cven@cslab.ece.ntua.gr</a><br>
<br>
Hello,<br>
<br>
We are currently working with GRNET (<a href="http://www.grnet.gr">http://www.grnet.gr</a>),<br>
the Greek National Research and Education Network, to build<br>
a scalable public cloud infrastructure based on commodity hardware and<br>
software components.<br>
<br>
We are building a custom cloud infrastructure around the Rackspace Cloud<br>
Servers API, for the management of VM instances. We find it's a simple,<br>
elegant, more-or-less self-explanatory API, with clear REST semantics.<br>
<br>
However, there doesn't seem to be a similar API for the management of<br>
dynamically allocated block-based storage volumes, i.e. the<br>
creation/query/destruction of volumes and their attachment to, or<br>
detachment from VMs, analogous to the EBS component of the Amazon EC2<br>
API.<br>
<br>
Since we plan to support such functionality, we have been looking into a<br>
way to extend the Cloud Servers API. We began from the latest<br>
specification of the API<br>
[<a href="http://docs.rackspacecloud.com/servers/api/cs-devguide-latest.pdf">http://docs.rackspacecloud.com/servers/api/cs-devguide-latest.pdf</a>]<br>
to provide a similar RESTful interface for the management of raw block<br>
devices.<br>
<br>
This is what we've come up with so far:<br>
<br>
[we use the term "disk" or "storage volume" interchangeably to refer to<br>
a piece of raw block-based storage which can be dynamically attached to<br>
or detached from a virtual machine]<br>
<br>
-- cut here --<br>
<br>
1. Disks <br>
    1.1 List disks<br>
        GET /disks<br>
            List all storage volumes (IDs and names only)<br>
        GET /disks/detail<br>
            List all storage volumes (all details) <br>
        GET /servers/id/disks<br>
            List all storage volumes attached to a specific server<br>
            (IDs and names only)<br>
        GET /servers/id/disks/detail<br>
            List all storage volumes attached to a specific server<br>
            (all details)<br>
       <br>
    1.2 Create disks<br>
        POST /disks <br>
            Provision a new storage volume asynchronously.<br>
            The progress of the request can be checked by performing a<br>
            GET on /disks/id. <br>
    1.3 Get disk details<br>
        GET /disks/id<br>
            List details of a storage volume, specified by its id. <br>
        GET /servers/id/disks/id <br>
            List details of a storage volume, specified by its id.<br>
            [perhaps this is superseded by the GET /disks/id operation,<br>
             no need to replicate it here].<br>
   <br>
    1.4 Update disk name <br>
        PUT /disks/id<br>
            Update the specified storage volume's name.<br>
        PUT /servers/id/disks/id<br>
            Update the specified storage volume's name.<br>
            [perhaps this is superseded by the PUT /disks/id operation,<br>
             no need to replicate it here].<br>
<br>
    1.5 Delete disk<br>
        DELETE /disks/id <br>
            Destroy the specified storage volume, free all of its data.<br>
    <br>
    1.6 Attach disk to a VM<br>
        POST /servers/id/disks<br>
            Attaches a storage volume to the specified server.<br>
    <br>
    1.7 Detach disk from a VM<br>
        DELETE /servers/id/disks/id<br>
            Detaches the specified storage volume from the specified server.<br>
<br>
-- cut here --<br>
<br>
Essentially this is a RESTful API with an almost 1-1 correspondence with<br>
the Cloud Servers API. The aim is to make its integration with the Cloud<br>
Servers API as easy as possible.<br>
<br>
We are now beginning to implement this, and would appreciate your<br>
thoughts/suggestions, or any pointers you may have to any similar efforts.<br>
<br>
Thank you,<br>
Vangelis.<br>
<br>
-- <br>
Vangelis Koukis, PhD<br>
Computing Systems Laboratory,<br>
National Technical University of Athens.<br>
<a href="mailto:vkoukis@cslab.ece.ntua.gr">vkoukis@cslab.ece.ntua.gr</a><br>
<hr>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br>

</div>
</blockquote></span></body></html>