[Kimchi-devel] [PATCH 1/5] cdrom: Update API.md for add cdrom and query cdrom

Aline Manera alinefm at linux.vnet.ibm.com
Fri Jan 10 16:42:04 UTC 2014


On 01/06/2014 07:32 AM, lvroyce at linux.vnet.ibm.com wrote:
> From: Royce Lv <lvroyce at linux.vnet.ibm.com>
>
> Add cdrom sub-collection CDROMs and sub-resource CDROM to vm resource.
>
> Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
> ---
>   docs/API.md | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
>
> diff --git a/docs/API.md b/docs/API.md
> index 0013e86..f352e9e 100644
> --- a/docs/API.md
> +++ b/docs/API.md
> @@ -103,6 +103,21 @@ 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 CDROMs
> +**URI:** /vms/*:name*/cdroms

Maybe we can use /vms/<name>/storages

That way we can use the same API to add/remove different kind of 
storages to the vm: cdrom, scsi disk, ide disk, etc

What do you think?

/vms/<name>/storages/<storage-id> in which 'storage-id' is a unique 
value: cdrom1, cdrom2 or even the device it points to - hdc, sda

> +#* **GET**: Retrieve a summarized list of all CDROMs of specified virtual machine
> +* **POST**: Attatch a new CDROM to specified virtual machine.
> +    * name : The name of CDROM in VM.
> +    * path *(optional)*: Path of ISO to insert in the CDROM.
> +
> +
> +### Sub-resource: Virtual Machine CDROM
> +**URI:** /vms/*:name*/cdroms/*:name*
> +#* **GET**: Retrieve cdrom information
> +    * path: Path of ISO img.
> +
> +
>   ### Collection: Templates
>
>   **URI:** /templates




More information about the Kimchi-devel mailing list