[Engine-devel] Floating Disks implementation in REST-API

Geert Jansen gjansen at redhat.com
Wed Apr 11 14:29:31 UTC 2012



On 04/11/2012 02:53 PM, Itamar Heim wrote:
>>> Detach a disk from VM (becomes floating):
>>> DELETE api/vms/{vm:id}/disks/{disk:id}
>>>
>>> Delete a disk ('real' delete)"
>>> DELETE api/disks/{disk:id}
>>
>> Assuming this also works when the disk is attached to a VM then the
>> above seems to me like the simplest and clearest path. i.e.
>> DELETE in VM context detaches
>
> this would break backward compatibility of the API, as today this
> deletes the disk as well.
> geert - thoughts on this?

Yes, the way this is proposed by Ayal would be incompatible. The default 
semantics for a DELETE in a VM context has to be delete, not detach. But 
I don't see that as a problem. We can pass in a 
<detach>true|false</detach> parameter.

Arguably this also more closely aligns with how people will use the API. 
I expect that normally 99% of disks in an environment will be 
non-floating. Therefore a DELETE even in VM context should by default 
really delete the disk, instead of creating a floating disk.

Regards,
Geert



More information about the Devel mailing list