VMware {code} Community
kvp511
Enthusiast
Enthusiast

How do you work with the Task?

I've noticed that some operations return a <Task>. I'd like to monitor the <Progress> before I execute another API call. When doing an operation such as updating and Edge Gateway, I can see in vCloud Director that its "still working" however when running the href provided by <Task> the <Progress> is always 0. Has anyone worked with tasks that can give me some pointers?

Thanks

Tags (1)
0 Kudos
3 Replies
kvp511
Enthusiast
Enthusiast

I see that I can lock in on status="success" to verify completion. Maybe my calls simply are not taking long enough to have the progress update.

0 Kudos
cfor
Expert
Expert

That is possible - not all tasks update progress (I am not sure why).  Also make sure you are using 5.1 connection - I have seen 1.5 SDK connections not get the progress.

Another thing to be aware of, if a task is completed sometimes on query it will no longer exist; I have been looking for details on this, but have not been able to find anything.

ChrisF (VCP4, VCP5, VCP-Cloud) - If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
kvp511
Enthusiast
Enthusiast

Thanks for the reply. It is a nice feature and would be a shame if the progress is not fully implemented. For now I'll go by the status attribute.

0 Kudos