[ovirt-users] Attaching storage to VM via JSON REST

Juan Hernandez jhernand at redhat.com
Thu May 8 11:09:53 UTC 2014


On 05/08/2014 12:59 PM, Sven Kieske wrote:
> May I ask if there is any reason why this is so inconsistent?
> (id vs name)
> 

I guess it is for historical reasons. We should probably accept both id
and name in both cases, giving precedence to id if both are given. Care
to open a RFE requesting so?

> Am 08.05.2014 11:34, schrieb Juan Hernandez:
>> When adding a disk to a VM both a single domain storage and a list of
>> storage domains are accepted. The JSON representation is the following:
>>
>>   "storage_domain": {
>>     "id": "6fbee79d-5b71-48c1-b86c-ee9755a46013"
>>   }
>>
>> Note that "name" isn't accepted here, you have to use the "id".
>>
>> The JSON representation for multiple domains is the following (note that
>> only the first one is used):
>>
>>   "storage_domains": {
>>     "storage_domain": [ {
>>       "name": "am_data"
>>     } ]
>>   }
>>
>> Note that "id" isn't accepted here, you have to use "name".
> 


-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.



More information about the Users mailing list