
Hi Team, 1) I perform the VM clone using the following API api/vms/{vmId}/clone 2) The above API is returning the job id 3) Using the job Id, we continuously query the oVirt to get the status of the clone operation. /api/jobs/${vmCloneJobId} We are able to successfully get the status of the clone operation. But the problem is, we are not able to identify the newly created VM (created using clone). AFAIK, The only way to get the newly created VM is to get all the VM list from oVirt. Is there an easy way to identify the newly created VM using the jobId? Thanks, Hari -- DISCLAIMER The information in this e-mail is confidential and may be subject to legal privilege. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you have received this communication in error, please address with the subject heading "Received in error," send to it@msystechnologies.com, then delete the e-mail and destroy any copies of it. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. The views, opinions, conclusions and other information expressed in this electronic mail and any attachments are not given or endorsed by the company unless otherwise indicated by an authorized representative independent of this message. MSys cannot guarantee that e-mail communications are secure or error-free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses, though all reasonable precautions have been taken to ensure no viruses are present in this e-mail. As our company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments we recommend that you subject these to your virus checking procedures prior to use

On 03/29/2018 11:09 AM, Hari Prasanth Loganathan wrote:
Hi Team,
1) I perform the VM clone using the following API
api/vms/{vmId}/clone
2) The above API is returning the job id 3) Using the job Id, we continuously query the oVirt to get the status of the clone operation. /api/jobs/${vmCloneJobId} We are able to successfully get the status of the clone operation.
But the problem is, we are not able to identify the newly created VM (created using clone).
AFAIK, The only way to get the newly created VM is to get all the VM list from oVirt. Is there an easy way to identify the newly created VM using the jobId?
In order to run the clone operation you must pas the VM name, so you know the name, so later to fetch the VM you can just run: api/vms?search=name=thenameofclonnedvm Is this approach OK for you?
Thanks, Hari
DISCLAIMER
The information in this e-mail is confidential and may be subject to legal privilege. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you have received this communication in error, please address with the subject heading "Received in error," send to it@msystechnologies.com <mailto:it@msystechnologies.com>, then delete the e-mail and destroy any copies of it. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. The views, opinions, conclusions and other information expressed in this electronic mail and any attachments are not given or endorsed by the company unless otherwise indicated by an authorized representative independent of this message.
MSys cannot guarantee that e-mail communications are secure or error-free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses, though all reasonable precautions have been taken to ensure no viruses are present in this e-mail. As our company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments we recommend that you subject these to your virus checking procedures prior to use
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

--=-wo2nGnyOI44kEAxtQC3J Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2018-03-29 at 11:21 +0200, Ondra Machacek wrote:
On 03/29/2018 11:09 AM, Hari Prasanth Loganathan wrote:
Hi Team, =20 1) I perform the VM clone using the following API =20 api/vms/{vmId}/clone =20 2) The above API is returning the job id 3) Using the job Id, we continuously query the oVirt to get the status=20 of the clone operation. /api/jobs/${vmCloneJobId} We are able to successfully get the status of the clone operation. =20 But the problem is, we are not able to identify the newly created VM=20 (created using clone). =20 AFAIK, The only way to get the newly created VM is to get all the VM=20 list from oVirt. Is there an easy way to identify the newly created VM=20 using the jobId? =20 In order to run the clone operation you must pas the VM name, so you=20 know the name, so later to fetch the VM you can just run: =20 api/vms?search=3Dname=3Dthenameofclonnedvm
Hijacking this a little, because I got curious about something:) Is it possible to do regex searches? Because I remember working on something different, the searches could potentially end up with multiple matched objects, like "thenameofclonnedvm", "thenameofclonnedvm-berta", "thenameofclonnedvm3" and so on. So I was always forced to treat the result as a potential array, loop the objects (this was with Python) and test for an exact match, even if it was just one object. So it would be nicer if you could go like: api/vms?search=3Dname=3D'^thenameofclonnedvm$' And be sure to have an exact match every time. Is that possible? TIA /K
=20 Is this approach OK for you? =20
=20 Thanks, Hari =20 DISCLAIMER =20 The information in this e-mail is confidential and may be subject to=20 legal privilege. It is intended solely for the addressee. Access to this=20 e-mail by anyone else is unauthorized. If you have received this=20 communication in error, please address with the subject heading=20 "Received in error," send to it@msystechnologies.com=20 <mailto:it@msystechnologies.com>, then delete the e-mail and destroy=20 any copies of it. If you are not the intended recipient, any disclosure,=20 copying, distribution or any action taken or omitted to be taken in=20 reliance on it, is prohibited and may be unlawful. The views, opinions,=20 conclusions and other information expressed in this electronic mail and=20 any attachments are not given or endorsed by the company unless=20 otherwise indicated by an authorized representative independent of this=20 message. =20 MSys cannot guarantee that e-mail communications are secure or=20 error-free, as information could be intercepted, corrupted, amended,=20 lost, destroyed, arrive late or incomplete, or contain viruses, though=20 all reasonable precautions have been taken to ensure no viruses are=20 present in this e-mail. As our company cannot accept responsibility for=20 any loss or damage arising from the use of this e-mail or attachments we=20 recommend that you subject these to your virus checking procedures prior=20 to use =20 =20 _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users =20 =20
Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users --=-wo2nGnyOI44kEAxtQC3J Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE----- iQEcBAABCAAGBQJavMepAAoJEBpo164N2cuRTWcIALX1OtV2EzmEr0mzYhMufeCE xzLdCC3cdlVTm+KU16Nc0b2MEgh5UTtn32D68k7t3KM5E5WHEn4IreJgmD5V8AyK 6d1UkGhTPhDJFgQvnvIILvf4R7cSArO4kr6KyK3UO2zYtyrLCS+5ANGiG/JN+3sT 3jDgjh7hofV2MYQaBap5uEls7NoaubQwSbQLoBGoMnsIRXydiecu3pJxmJBWUoKd k4wnWIx77P6Cg9ANhE3TW/ST5KhJXVbbYJE/bvas9p4QwIN+x9PtoI/5RviyRraO W3czYt+uYRW+3NdFHY97pTDh0PssJHuOUme8gVOp4zSj8FL5h9KLr28tvJhBdRM= =pID1 -----END PGP SIGNATURE----- --=-wo2nGnyOI44kEAxtQC3J--

On 03/29/2018 01:02 PM, Karli Sjöberg wrote:
On Thu, 2018-03-29 at 11:21 +0200, Ondra Machacek wrote:
On 03/29/2018 11:09 AM, Hari Prasanth Loganathan wrote:
Hi Team,
1) I perform the VM clone using the following API
api/vms/{vmId}/clone
2) The above API is returning the job id 3) Using the job Id, we continuously query the oVirt to get the status of the clone operation. /api/jobs/${vmCloneJobId} We are able to successfully get the status of the clone operation.
But the problem is, we are not able to identify the newly created VM (created using clone).
AFAIK, The only way to get the newly created VM is to get all the VM list from oVirt. Is there an easy way to identify the newly created VM using the jobId?
In order to run the clone operation you must pas the VM name, so you know the name, so later to fetch the VM you can just run:
api/vms?search=name=thenameofclonnedvm
Hijacking this a little, because I got curious about something:)
Is it possible to do regex searches? Because I remember working on something different, the searches could potentially end up with multiple matched objects, like "thenameofclonnedvm", "thenameofclonnedvm-berta", "thenameofclonnedvm3" and so on. So I was always forced to treat the result as a potential array, loop the objects (this was with Python) and test for an exact match, even if it was just one object. So it would be nicer if you could go like:
api/vms?search=name='^thenameofclonnedvm$'
And be sure to have an exact match every time. Is that possible?
You can read more about search engine here: https://www.ovirt.org/documentation/admin-guide/appe-Using_Search_Bookmarks_... So if you have for example following VMs in system: vm vm1 vm2 vm3 And you do search like: api/vms?search=name=vm It will return only single Vm called 'vm', but it always return a collection, but with just single item. And you do search like: api/vms?search=name=vm* It will return all VMs starting on 'vm' string. So it's collection of vm, vm1, vm2 and vm3. So by default it search for exact string, but you may use wildcards to improve the search.
TIA
/K
Is this approach OK for you?
Thanks, Hari
DISCLAIMER
The information in this e-mail is confidential and may be subject to legal privilege. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you have received this communication in error, please address with the subject heading "Received in error," send to it@msystechnologies.com <mailto:it@msystechnologies.com>, then delete the e-mail and destroy any copies of it. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. The views, opinions, conclusions and other information expressed in this electronic mail and any attachments are not given or endorsed by the company unless otherwise indicated by an authorized representative independent of this message.
MSys cannot guarantee that e-mail communications are secure or error-free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses, though all reasonable precautions have been taken to ensure no viruses are present in this e-mail. As our company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments we recommend that you subject these to your virus checking procedures prior to use
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On Thursday, March 29, 2018 7:59:36 AM EDT Ondra Machacek wrote:
On 03/29/2018 01:02 PM, Karli Sjöberg wrote:
On Thu, 2018-03-29 at 11:21 +0200, Ondra Machacek wrote:
On 03/29/2018 11:09 AM, Hari Prasanth Loganathan wrote:
Hi Team,
1) I perform the VM clone using the following API
api/vms/{vmId}/clone
2) The above API is returning the job id 3) Using the job Id, we continuously query the oVirt to get the status of the clone operation. /api/jobs/${vmCloneJobId}
We are able to successfully get the status of the clone
operation.
But the problem is, we are not able to identify the newly created VM (created using clone).
AFAIK, The only way to get the newly created VM is to get all the VM list from oVirt. Is there an easy way to identify the newly created VM using the jobId?
In order to run the clone operation you must pas the VM name, so you know the name, so later to fetch the VM you can just run:
api/vms?search=name=thenameofclonnedvm
Hijacking this a little, because I got curious about something:)
Is it possible to do regex searches? Because I remember working on something different, the searches could potentially end up with multiple matched objects, like "thenameofclonnedvm", "thenameofclonnedvm-berta", "thenameofclonnedvm3" and so on. So I was always forced to treat the result as a potential array, loop the objects (this was with Python) and test for an exact match, even if it was just one object. So it would be nicer if you could go like:
api/vms?search=name='^thenameofclonnedvm$'
And be sure to have an exact match every time. Is that possible?
You can read more about search engine here:
https://www.ovirt.org/documentation/admin-guide/appe-Using_Search_Bookmarks_ and_Tags/
So if you have for example following VMs in system:
vm vm1 vm2 vm3
And you do search like:
api/vms?search=name=vm
It will return only single Vm called 'vm', but it always return a collection, but with just single item.
And you do search like:
api/vms?search=name=vm*
It will return all VMs starting on 'vm' string. So it's collection of vm, vm1, vm2 and vm3.
So by default it search for exact string, but you may use wildcards to improve the search.
You can also 'and' and 'or' different parameters, for instance api/vms?search=name%3DVM1+or+name%3DVM2 which will return VM1 and VM2 if they exist. Note that you will need to URL encode your search string to replace all the '=' with %3D and space with +, etc. The only = that shouldn't be encoded is the = after search. For an easy way to find what is available to search on for a particular entity, if you go into the webadmin in the search bar you can start typing and it will auto complete the different available options. AFAIC those match exactly to the search in the REST api.
TIA
/K
Is this approach OK for you?
Thanks, Hari
DISCLAIMER
The information in this e-mail is confidential and may be subject to legal privilege. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you have received this communication in error, please address with the subject heading "Received in error," send to it@msystechnologies.com <mailto:it@msystechnologies.com>, then delete the e-mail and destroy any copies of it. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. The views, opinions, conclusions and other information expressed in this electronic mail and any attachments are not given or endorsed by the company unless otherwise indicated by an authorized representative independent of this message.
MSys cannot guarantee that e-mail communications are secure or error-free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses, though all reasonable precautions have been taken to ensure no viruses are present in this e-mail. As our company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments we recommend that you subject these to your virus checking procedures prior to use
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Thanks, Ondra. Appreciated. On Thu, Mar 29, 2018 at 2:51 PM, Ondra Machacek <omachace@redhat.com> wrote:
On 03/29/2018 11:09 AM, Hari Prasanth Loganathan wrote:
Hi Team,
1) I perform the VM clone using the following API
api/vms/{vmId}/clone
2) The above API is returning the job id 3) Using the job Id, we continuously query the oVirt to get the status of the clone operation. /api/jobs/${vmCloneJobId} We are able to successfully get the status of the clone operation.
But the problem is, we are not able to identify the newly created VM (created using clone).
AFAIK, The only way to get the newly created VM is to get all the VM list from oVirt. Is there an easy way to identify the newly created VM using the jobId?
In order to run the clone operation you must pas the VM name, so you know the name, so later to fetch the VM you can just run:
api/vms?search=name=thenameofclonnedvm
Is this approach OK for you?
Thanks, Hari
DISCLAIMER
The information in this e-mail is confidential and may be subject to legal privilege. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you have received this communication in error, please address with the subject heading "Received in error," send to it@msystechnologies.com <mailto:it@msystechnologies.co m>, then delete the e-mail and destroy any copies of it. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. The views, opinions, conclusions and other information expressed in this electronic mail and any attachments are not given or endorsed by the company unless otherwise indicated by an authorized representative independent of this message.
MSys cannot guarantee that e-mail communications are secure or error-free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses, though all reasonable precautions have been taken to ensure no viruses are present in this e-mail. As our company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments we recommend that you subject these to your virus checking procedures prior to use
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- DISCLAIMER The information in this e-mail is confidential and may be subject to legal privilege. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you have received this communication in error, please address with the subject heading "Received in error," send to it@msystechnologies.com, then delete the e-mail and destroy any copies of it. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. The views, opinions, conclusions and other information expressed in this electronic mail and any attachments are not given or endorsed by the company unless otherwise indicated by an authorized representative independent of this message. MSys cannot guarantee that e-mail communications are secure or error-free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses, though all reasonable precautions have been taken to ensure no viruses are present in this e-mail. As our company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments we recommend that you subject these to your virus checking procedures prior to use
participants (4)
-
Alexander Wels
-
Hari Prasanth Loganathan
-
Karli Sjöberg
-
Ondra Machacek