Hello

Any ideas how to retrieve the job Id of an async job at the time of creation or from a job to know which entities (VM, disk, template) Id it was created from 

Thanks 

On Sat, Jan 23, 2021, 10:04 AM Martin Perina <mperina@redhat.com> wrote:
Hi Ori,

could you please take a look?

Thanks,
Martin

On Thu, Jan 21, 2021 at 9:52 PM <pascal@butterflyit.com> wrote:
I am using the rest api to create a VM, because the VM is cloned from the template and it takes a long time, I am also passing the async parameters hoping to receive back a job id, which I could then query

https://xxxxx/ovirt-engine/api/vms?async=true&clone=true

however I get the new VM record which is fine but then I have no way of knowing the job id I should query to know when it is finished. And looking at all jobs there is no reference back to the VM execept for the description


 <job href="/ovirt-engine/api/jobs/d17125c7-6668-4b6c-ad22-95121cb66a31" id="d17125c7-6668-4b6c-ad22-95121cb66a31">
    <actions>
      <link href="/ovirt-engine/api/jobs/d17125c7-6668-4b6c-ad22-95121cb66a31/clear" rel="clear"/>
      <link href="/ovirt-engine/api/jobs/d17125c7-6668-4b6c-ad22-95121cb66a31/end" rel="end"/>
    </actions>
    <description>Creating VM DEMO-PCC-4 from Template MASTER-W10-20H2-CDrive in Cluster d1-c2</description>
    <link href="/ovirt-engine/api/jobs/d17125c7-6668-4b6c-ad22-95121cb66a31/steps" rel="steps"/>
    <auto_cleared>true</auto_cleared>
    <external>false</external>
    <last_updated>2021-01-21T12:49:06.700-08:00</last_updated>
    <start_time>2021-01-21T12:48:59.453-08:00</start_time>
    <status>started</status>
    <owner href="/ovirt-engine/api/users/0f2291fa-872a-11e9-b13c-00163e449339" id="0f2291fa-872a-11e9-b13c-00163e449339"/>
  </job>
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/TGZQLI55EFZOSEBNEU5CCBDZ2EDXMINQ/


--
Martin Perina
Manager, Software Engineering
Red Hat Czech s.r.o.
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/SETMGF2ZNYGU6OJKJAY7WRPKTWUQGF7F/