Hi Marcin,
Thanks for replying. In short, this is what I am doing:
~~~
from vdsm import client
cli = client.connect('localhost', 54321, use_tls=True)
cli.SDM.update_volume(job_id=job, vol_info=vol, vol_attr=changes)
~~~
This last line does an API call. A taskID is generated in vdsm, I can only
specify the JobID as a parameter of the call. From what I read, the taskID
should be sent on the HTTP header if I want to set it. But I cannot find
how to do it.
The whole point is that I want to know the taskID, so I can monitor the
task and clear it after it is finished.
So:
* How do I retrieve the taskID vdsm generated for this?
or
* How to I query VDSM to give me the taskID for the JobID I passed as
argument
or
* How can I specify the taskID to be used given I'm using vdsm client (from
vdsm import client).
or
* any other idea you have on how to handle this?
Am I missing something or there is some missing implementation for doing
this?
Thanks
On Mon, Sep 17, 2018 at 10:19 PM Marcin Sobczyk <msobczyk(a)redhat.com> wrote:
Hi,
I'm currently doing some work around vdsm API so maybe I can. I need some
more detailed description of your problem though - a pseudo-code of the
calls you're making with explanation what exactly is the problem would be
ideal.
Marcin
On 9/17/18 7:04 AM, Germano Veit Michel wrote:
Hello,
I've been struggling with TaskID/FlowID when talking to the VDSM API. I am
trying to write a tool that uses the vdsm-api to facilitate the
troubleshooting of image issues (snapshots). This tool does a series of API
calls, but I cannot find a nice way to track the taskID and clear the
completed tasks after completion of the tool commands. Currently I'm
clearing all Tasks that match the verb and are finished, which is not
ideal. I would like to have the exact TaskID to track and dont want to
leave Tasks behind. I don't want also to clear tasks from other entities
(like engine!).
I understand that if I want to specify the task/flow ids when calling the
vdsm API, these two need to be passed as headers (http) so they end up in
the context of the call. Is this correct? But using vdsm/client.py I cannot
figure out how to do this, but I understand it is possible.
I've been looking at vdsm/common/api.py and vdsm/client.py and trying
several things but nothing seems to do it. Could anyone please put some
light on this?
Thanks,
Germano
_______________________________________________
Devel mailing list -- devel(a)ovirt.org
To unsubscribe send an email to devel-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/devel@ovirt.org/message/MSWIR7AEWS7...
_______________________________________________
Devel mailing list -- devel(a)ovirt.org
To unsubscribe send an email to devel-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/devel@ovirt.org/message/J3UUC3EBLGU...