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

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

doc: http://ovirt.github.io/ovirt-engine-api-model/4.3/#services/assigned_tags 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/4V3FPZFWVOIBLB...
-- GREG SHEREMETA SENIOR SOFTWARE ENGINEER - TEAM LEAD - RHV UX Red Hat NA <https://www.redhat.com/> gshereme@redhat.com IRC: gshereme <https://red.ht/sig>

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:
doc: http://ovirt.github.io/ovirt-engine-api-model/4.3/#services/assigned_tags
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/4V3FPZFWVOIBLB...
--
GREG SHEREMETA
SENIOR SOFTWARE ENGINEER - TEAM LEAD - RHV UX
Red Hat NA
gshereme@redhat.com IRC: gshereme <https://red.ht/sig>

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<mailto:gshereme@redhat.com>> wrote: doc: http://ovirt.github.io/ovirt-engine-api-model/4.3/#services/assigned_tags 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<mailto: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<mailto:nsoffer@redhat.com>> Cc: Pavan Chavva <pchavva@redhat.com<mailto:pchavva@redhat.com>>; Nisan, Tal <tnisan@redhat.com<mailto:tnisan@redhat.com>>; Erin Howrigan <ehowriga@redhat.com<mailto:ehowriga@redhat.com>>; Adelino Barbosa <adbarbos@redhat.com<mailto:adbarbos@redhat.com>>; devel <devel@ovirt.org<mailto:devel@ovirt.org>>; Navin Tah <Navin.Tah@veritas.com<mailto:Navin.Tah@veritas.com>>; Abhay Marode <Abhay.Marode@veritas.com<mailto:Abhay.Marode@veritas.com>>; James Olson <James.Olson@veritas.com<mailto:James.Olson@veritas.com>>; Ranjit DSouza <Ranjit.DSouza@veritas.com<mailto:Ranjit.DSouza@veritas.com>>; Daniel Erez <derez@redhat.com<mailto:derez@redhat.com>>; Suchitra Herwadkar <Suchitra.Herwadkar@veritas.com<mailto: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<mailto:devel@ovirt.org> To unsubscribe send an email to devel-leave@ovirt.org<mailto: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/4V3FPZFWVOIBLB... -- GREG SHEREMETA SENIOR SOFTWARE ENGINEER - TEAM LEAD - RHV UX Red Hat NA <https://www.redhat.com/> gshereme@redhat.com<mailto:gshereme@redhat.com> IRC: gshereme [https://www.redhat.com/files/brand/email/sig-redhat.png]<https://red.ht/sig>
participants (3)
-
Greg Sheremeta
-
Mahesh Falmari
-
Ori Liel