Thank you very much RedHat team for answering these queries. This is very much helpful.

 

Thanks & Regards,
Mahesh Falmari

 

From: Ori Liel <oliel@redhat.com>
Sent: Thursday, December 20, 2018 9:41 PM
To: Greg Sheremeta <gshereme@redhat.com>
Cc: Mahesh Falmari <Mahesh.Falmari@veritas.com>; Ondra Machacek <omachace@redhat.com>; Nir Soffer <nsoffer@redhat.com>; Pavan Chavva <pchavva@redhat.com>; Erin Howrigan <ehowriga@redhat.com>, Adelino Barbosa <adbarbos@redhat.com>, devel <devel@ovirt.org>; Abhay Marode <Abhay.Marode@veritas.com>; Suchitra Herwadkar <Suchitra.Herwadkar@veritas.com>; Navin Tah <Navin.Tah@veritas.com>; James Olson <James.Olson@veritas.com>
Subject: [EXTERNAL] Re: [ovirt-devel] Re: Adding multiple VM NICs or VM tags in a single request

 

Hi,

 

Indeed, it is not possible to create multiple entities in a single POST request. It adds some complexity - for example what happens if the creation of one of the entities has succeeded and another has not? There are all sorts of corner cases which complicates matters and this goes against the simplicity and straightforwardness that a RESTful API should have. In summary, the way to created multiple resources is to issue a separate POST request for each one. 

 

Hope this helps, 

 

Ori

 

On Thu, Dec 20, 2018 at 3:42 PM Greg Sheremeta <gshereme@redhat.com> wrote:

 

It looks impossible, and it might not be "RESTful". Ondra or Ori would know for sure (cc'd)

 

Best wishes,

Greg

 

On Thu, Dec 20, 2018 at 8:26 AM Mahesh Falmari <Mahesh.Falmari@veritas.com> wrote:

Hi Nir and RedHat Team,


Any updates on this?

 

Thanks & Regards,
Mahesh Falmari

 

From: Mahesh Falmari
Sent: Tuesday, December 18, 2018 5:16 PM
To: 'Nir Soffer' <nsoffer@redhat.com>
Cc: Pavan Chavva <pchavva@redhat.com>; Nisan, Tal <tnisan@redhat.com>; Erin Howrigan <ehowriga@redhat.com>; Adelino Barbosa <adbarbos@redhat.com>; devel <devel@ovirt.org>; Navin Tah <Navin.Tah@veritas.com>; Abhay Marode <Abhay.Marode@veritas.com>; James Olson <James.Olson@veritas.com>; Ranjit DSouza <Ranjit.DSouza@veritas.com>; Daniel Erez <derez@redhat.com>; Suchitra Herwadkar <Suchitra.Herwadkar@veritas.com>
Subject: Adding multiple VM NICs or VM tags in a single request

 

Hi Nir and RedHat Team,

Would like to confirm if it is possible to create multiple VM tags or multiple VM NICs in a single POST request. Currently, I could see that a single request creates a single VM NIC or VM tag for a given virtual machine.
We are using the following APIs but looks like it doesn’t allows us to add multiple VM NICs or VM tags in a single request. If it is possible, please let us know how the request body should look like in that case.


POST /vms/{vm:id}/tags

Request body:
<tags>

<name>tag1</name>

</tags>

POST /vms/{vm:id}/nics
Request body:
<nic>

<name>network1</name>

</nic>

Thanks & Regards,
Mahesh Falmari

_______________________________________________
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/4V3FPZFWVOIBLB473WAFOFLUMNAESE7N/


 

--

GREG SHEREMETA

SENIOR SOFTWARE ENGINEER - TEAM LEAD - RHV UX

Red Hat NA

gshereme@redhat.com    IRC: gshereme