Hi Ondra,
El 2018-07-12 08:02, Ondra Machacek escribió:
On 07/11/2018 10:10 AM, nicolas(a)devels.es wrote:
> Hi,
>
> We're using ovirt-engine-sdk-python 4.1.6 on oVirt 4.1.9, currently
> we're trying to delete some snapshots via a script like this:
>
> sys_serv = conn.system_service()
> vms_service = sys_serv.vms_service()
> vm_service = vms_service.vm_service(vmid)
> snaps_service = vm_service.snapshots_service()
> snaps_service.service('SNAPSHOT-ID').remove()
In case of failure this line should raise Error, so you should know it
failed.
It doesn't, actually. This call is asynchronous, and the snapshot
deletion seems to fail after about 10 seconds, so initially it seems to
be correct but fails afterwards, that's why I need a way to check if the
task ended correctly or not.
>>
>> This works, mostly... however, sometimes the deletion fails:
>>
>> Failed to delete snapshot 'snapshot name' for VM 'vm'.
>>
>> Is it currently possible to know via Python-SDK that the deletion
>> actually failed? I know I can check the state of a snapshot, but I'd
>> like to check the result of the task. Is that possible somehow?
>>
>> Thanks.
>> _______________________________________________
>> Users mailing list -- users(a)ovirt.org
>> To unsubscribe send an email to users-leave(a)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/users@ovirt.org/message/AFGSUUJ3RNW...