Re: [PVE-User] Proxmox API catch response

2016-02-05 Thread Thomas Lamprecht
On 02/05/2016 04:46 PM, Mohamed Sadok Ben Jazia wrote: I think those last lines are good for my work do { sleep (1) task = APICALL(get nodes/nina/tasks/UPID:nina:7F77:0029667A:56B36272:vncproxy:104:tom@pam:/status) } while (task->{status} != 'stopped') Do you think proxmox

[PVE-User] Proxmox API catch response

2016-02-05 Thread Mohamed Sadok Ben Jazia
Hello list, i'm using proxmox api to create Containers and managing ressources. proxmox commands don't have a fixed duration so you need to refresh calls to see that an action is correctly done.. Are there a method to catch the end of an action when using API calls?

Re: [PVE-User] Proxmox API catch response

2016-02-05 Thread Thomas Lamprecht
If it's a call where a worker gets forked we have an UPID which represents this action and we have a UPID wait function where you can wait for this task to finish. If you're making perl scripts on a PVE host it'd be really easy: use PVE::API2::Qemu; use PVE::ProcFSTools; my