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