[Kimchi-devel] [PATCH v3 1/4] CDROM Management: Add storage sub-collection to sub-resource to guest resource

Daniel H Barboza danielhb at linux.vnet.ibm.com
Wed Feb 12 11:24:48 UTC 2014


Hello Royce,

On 02/12/2014 01:46 AM, Royce Lv wrote:
> Thanks Rodrigo and Daniel to help on this task, some comments below.
>
> After considering CDROM manage for second time,common usecases for 
> CDROM are 'insert' and 'eject'.
> It means the CDROM device is there, just change the media in it.
>
> For Kimchi that is to PUT the path of CDROM.
> Basically, I think it is rare to add a new CDROM device or remove a 
> CDROM device.
> But I agree with for hard disks we want devices add or remove.
>
> What do you think?

I agree that the "eject" function is better represented by a PUT with 
blank path. I'll make the required adjustments to reflect this.

About the removal of a CDROM device, I agree that it is kind of rare 
too. But shouldn't we support it anyway? I am a little worried about 
removing this support just to later in the road someone miss it and then 
ask to add it again.

I've read your comments about providing support to CDROM only and forget 
about hard disks. I haven't participated in the RFC or any discussion 
about the design of this feature, but at this point, and I beg your 
pardon if I sound "lazy", it is easier and faster to just leave hard 
disk support in this contribution than to chop the patches and make it 
CDROM only. If we realize that the hard disk support provided in these 
patches are incomplete, we can just complement it with further patches 
in the future.

How does that sound to you?

>
> On 2014年02月12日 10:38, Daniel Barboza wrote:
>> From: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
>>
>> This patch changes API.md with new storage sub-collection/sub-resource
>> information.
>>
>> Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
>> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
>> ---
>>   docs/API.md | 21 +++++++++++++++++++++
>>   1 file changed, 21 insertions(+)
>>
>> diff --git a/docs/API.md b/docs/API.md
>> index 48a293f..b1a49cd 100644
>> --- a/docs/API.md
>> +++ b/docs/API.md
>> @@ -115,6 +115,27 @@ Represents a snapshot of the Virtual Machine's 
>> primary monitor.
>>
>>   * **GET**: Redirect to the latest screenshot of a Virtual Machine 
>> in PNG format
>>
>> +
>> +### Sub-collection: Virtual Machine storages
>> +**URI:** /vms/*:name*/storages
>> +* **GET**: Retrieve a summarized list of all storages of specified 
>> guest
>> +* **POST**: Attach a new storage or virtual drive to specified 
>> virtual machine.
>> +    * dev: The name of the storage in the vm.
>> +    * type: The type of the storage (cdrom, disk).
>> +    * path: Path of cdrom iso or disk.
>> +
>> +### Sub-resource: storage
>> +**URI:** /vms/*:name*/storages/*:dev*
>> +* **GET**: Retrieve storage information
>> +    * dev: The name of the storage in the vm.
>> +    * type: The type of the storage (cdrom, disk).
>> +    * path: Path of cdrom iso or disk.
>> +* **PUT**: Update storage information
>> +    * path: Path of cdrom iso or disk.
>> +* **DELETE**: Remove the storage. Simulate eject a cdrom
> I think for DELETE we mean to delete the device, so eject will be 
> simulated by PUT '' to this device.
>> +
>> +
>> +
>>   ### Collection: Templates
>>
>>   **URI:** /templates
>




More information about the Kimchi-devel mailing list