On 2014年01月11日 00:42, Aline Manera wrote:
On 01/06/2014 07:32 AM, lvroyce(a)linux.vnet.ibm.com wrote:
> From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
>
> Add cdrom sub-collection CDROMs and sub-resource CDROM to vm resource.
>
> Signed-off-by: Royce Lv <lvroyce(a)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
Good point, they
share the same implementation, only difference is type.
> +#* **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