Description of problem: Add REST API for the VM leases feature that allows the user to see leases on each VM/template and add or remove leases Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Tal, how can I create new lease for vm via rest? I couldn't find it in the rest documentation.
You send a POST/PUT request for the VM with the storage domain id in the lease field, for instance: <vm> <lease> <storage_domain id="11be3393-739e-4157-b89f-40c00b4bb2ab"/> </lease> </vm>
Tal, there are still two issues with the REST API: 1. when creating new lease the lease is created but the high availability option is not updated to enabled 'true' <high_availability> <enabled>false</enabled> <priority>1</priority> </high_availability> … <lease> <storage_domain href="/ovirt-engine/api/v4/storagedomains/1b67fa07-406c-42bb-b2fb-a5d92ea24c83" id="1b67fa07-406c-42bb-b2fb-a5d92ea24c83"/> </lease> it also affects the gui, and after you create lease without changing the HA option, you can also do that in the gui as well. before that you had you enable first the HA, and while it's disabled the drop down menu is greyed out. 2. is there an option to delete lease using the REST API?
For the 1st please open a separate bug an explain there how do you think the behavior should be As for deleting a lease, you just send an empty one: <lease> </lease>
-------------------------------------- Tested with the following code: ---------------------------------------- rhevm-4.1.0.3-0.1.el7.noarch Moving to VERIFIED!
*** Bug 1410320 has been marked as a duplicate of this bug. ***