[Kimchi-devel] [RFC] ISO pool: Support to download ISO from URL

Aline Manera alinefm at linux.vnet.ibm.com
Tue Aug 19 13:49:32 UTC 2014


On 08/18/2014 09:42 PM, Crístian Viana wrote:
> The following API changes should be made to implement the remote 
> download ISO feature:
>
> 1) POST /storagepools/ISO/storagevolumes/download {'url': 
> <http|https|ftp|ftps>, 'name': <volume name>}
>     Description: Starts downloading a remote ISO image to Kimchi's 
> storage pool.
>     Parameters:
>         'url': specifies where the image is hosted. Required.
>         'name': specifies the name of the local file when the download 
> finishes. If this parameter is omitted, Kimchi will try to use the 
> same file name as the remote file. Optional.
>     Return codes:
> 200: the remote URL is valid and the download started successfully.
> 400: the remote URL is not valid;
>               the provided 'name' is already in use (this error 
> shouldn't happen if 'name' is omitted).
>               the storage pool doesn't have enough free space to hold 
> the remote file.
>     Return data:
> {'name': <vol-name>}
>
> 2) POST /storagepools/ISO/storagevolumes/download/pause {'name': 
> <volume name>}
>     Description: Pauses a remote ISO download.
>     Parameters:
>         'name': the remote volume name to be paused. Required.
>     Return codes:
> 200: 'name' is an ongoing download file and the operation was paused 
> successfully.
> 400: 'name' is an invalid volume name (doesn't exist / isn't an 
> ongoing download);
>               download referred by 'name' cannot be paused.
>     Return data:
> {}
>
> 3) POST /storagepools/ISO/storagevolumes/download/resume {'name': 
> <volume name>}
>     Description: Resumes a paused remote ISO download.
>     Parameters:
>         'name': the remote volume name to be resumed. Required.
>     Return codes:
> 200: 'name' is a paused download file and the operation was resumed 
> successfully.
> 400: 'name' is an invalid volume name (doesn't exist / isn't a paused 
> download).
>     Return data:
> {}
>
> 4) POST /storagepools/ISO/storagevolumes/download/cancel {'name': 
> <volume name>}
>     Description: Cancels a remote ISO download.
>     Parameters:
>         'name': the remote volume name to be canceled. Required.
>     Return codes:
> 200: 'name' is an ongoing download file and the operation was canceled 
> successfully. Whatever data has been downloaded so far should be deleted.
> 400: 'name' is an invalid volume name (doesn't exist / isn't an 
> ongoing download).
>     Return data:
> {}
>
> 5) POST /storagepools/ISO/storagevolumes/download/status {'name': 
> <volume name>}
>     Description: Provides status of a remote ISO download.
>     Parameters:
>         'name': the remote volume name. Required.
>     Return codes:
> 200: 'name' is a download file and its status information was returned 
> successfully.
> 400: 'name' is an invalid volume name (doesn't exist / isn't a remote 
> download).
>     Return data:
> {'name': <volume name>, 'status': [downloading|paused], 'total_size': 
> <size in bytes>, 'downloaded_size': <size in bytes>}
>
> I tried to put together the feedback given in another e-mail thread, 
> especially by Aline, Royce and Yu Xin Huo, along with some ideas of my 
> own. This RFC doesn't support choosing a different storage pool other 
> than "ISO" to host the downloaded files. If we're doing this, wel need 
> to update this new API accordingly.
>

Just one more comment along the others made by Royce.

Yes - download and upload functionality will be available to all pools.

> The implementation details will be discussed later.
>
> Please share your feedback with us.
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>




More information about the Kimchi-devel mailing list