
On 11/08/2016 09:46 AM, nicolas@devels.es wrote:
Hi,
We're running oVirt 4.0.4.4 with engine python SDK version 3.6.7, and currently we're developing an application that first creates a VmPool and afterwards it updates it. However, sometimes happens that both operations occur at the same time, which results in an oVirt error claiming that a VmPool cannot be updated if there are still pending operations to do.
We want to control this situation, so we've checked if the VmPool class has a .get_status() method but it seems it doesn't, so I'm asking for alternative ways of handling this. Would it be enough to say a VmPool is not "busy" if all its VMs are not in a blocked state (for example, with a blocked disk due to clonation)?
You are right, there is no "status" attribute in VM pools, the only way to check if the pool is busy is as you suggest. I take the opportunity to remind you that we will drop version 3 of the API and version 3 of the SDKs in oVirt 4.2. Consider switching to versin 4 of the API and version 4 of the SDK. There are documentation and examples here: https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples Also, when checking what attributes are available in the API you can use the documentation that is included in the system itself. For example, to see the attributes of the "vm_pool" type you can go here: https://myengine.example.com/ovirt-engine/api/model#types/vm_pool -- Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3ºD, 28016 Madrid, Spain Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.