[ovirt-devel] possible 3.4.1 blocker

Juan Hernandez jhernand at redhat.com
Tue May 6 08:36:02 UTC 2014


On 05/06/2014 08:56 AM, Sven Kieske wrote:
> I can confirm that the following json works
> to run-once a vm via rest, notice there are
> some differences to the json submitted by juan.
> 
> I don't use this to create and start the vm
> in one step, the vm is already created:
> 
> {"vm":{"initialization":{"cloud_init":{"host":{"address":"test"},"network_configuration":{"nics":{"nic":[{"name":"eth0","boot_protocol":"STATIC","network":{"ip":{"address":"10.211.0.244","netmask":"255.255.255.248","gateway":"10.211.0.241"}},"on_boot":true}]},"dns":{"servers":{"host":[{"address":"46.30.62.99"},{"address":"46.30.62.98"},{"address":"46.30.62.97"}]}}},"users":{"user":[{"name":"root","password":"#9Dh2--3xz-h95Zy"}]},"files":{"file":[{"name":"\/foo\/test","content":"test","type":"PLAINTEXT"}]}}}}}
> 

Ok, I assumed that you were creating a VM, not starting it.

The main difference between that JSON and the one I sent previously is
the outer "vm" element. The reason for that is that starting a VM is
different than creating it. Creating receives a VM entity as parameter,
so it doesn't need the outer "vm" element. Starting doesn't receive a
VM, but an Action entity, and the VM is just a member of that action.
The outer "action" element isn't needed. Taking that into account your
JSON is correct.

I don't see other differences. Did I miss something?

Anyhow, there is still a bug in the error reporting path. That needs to
be fixed.

-- 
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 Devel mailing list