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

Crístian Viana vianac at linux.vnet.ibm.com
Tue Aug 19 19:03:39 UTC 2014


On 19-08-2014 13:53, Crístian Viana wrote:
> On 19-08-2014 10:49, Aline Manera wrote:
>> Just one more comment along the others made by Royce.
>>
>> Yes - download and upload functionality will be available to all pools.
>
> Ok! So I'll update the RFC to support multiple storage pools and to 
> use the Tasks API to handle the pause/resume/cancel operations.

Well, Aline and I found a problem with this proposal. Currently, the 
REST API always redirects "POST" requests in a Collection to the 
function "<colletion-name>_create". In our case, if we send "POST 
/storagepools/<pool-name>/storagevolumes/download", that would be 
redirected to the backend function "storagevolumes_create". There is no 
way to redirect those requests to different functions (like, ideally, 
"storagevolumes_download" and "storagevolumes_upload").

So I see two options from here:

     1) Use the first API proposed by Aline: "POST 
/storagepools/<pool-name>/storagevolumes". By looking at the parameters 
(i.e. whether 'url' starts with "file://" or "[http|ftp]://") we can 
tell if the operation is download or upload.

     2) Remodel the control code to support multiple actions when 
POST'ing to a Collection.




More information about the Kimchi-devel mailing list