[Kimchi-devel] [PATCH 3/5] Change doc and controllor to support cdrom eject
Aline Manera
alinefm at linux.vnet.ibm.com
Mon Jun 9 21:19:46 UTC 2014
Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>
On 06/03/2014 04:20 AM, lvroyce at linux.vnet.ibm.com wrote:
> From: Royce Lv <lvroyce at linux.vnet.ibm.com>
>
> Add eject action to vmstorage actions,
> and add this action to doc.
> Instead of reuse 'update', make eject a single action to avoid empty
> path introduced confusion.
>
> Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
> ---
> docs/API.md | 3 +++
> src/kimchi/control/vm/storages.py | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/docs/API.md b/docs/API.md
> index 9217a37..6c14806 100644
> --- a/docs/API.md
> +++ b/docs/API.md
> @@ -155,6 +155,9 @@ Represents a snapshot of the Virtual Machine's primary monitor.
> * path: Path of cdrom iso. Can not be blank. Now just support cdrom type.
> * **DELETE**: Remove the storage.
>
> +**Actions (POST):**
> +
> +* eject: Eject cdrom from device.
>
>
> ### Collection: Templates
> diff --git a/src/kimchi/control/vm/storages.py b/src/kimchi/control/vm/storages.py
> index 984c4d2..a8a037a 100644
> --- a/src/kimchi/control/vm/storages.py
> +++ b/src/kimchi/control/vm/storages.py
> @@ -39,6 +39,7 @@ class VMStorage(Resource):
> self.info = {}
> self.model_args = [self.vm, self.ident]
> self.uri_fmt = '/vms/%s/storages/%s'
> + self.eject = self.generate_action_handler('eject')
> self.update_params = ['path']
>
> @property
More information about the Kimchi-devel
mailing list