Hi,Currently the job id cannot be fetched from the function volume.rebalance() .Although you can try to fetch the job id via a POST request with a blank action <action/>Eg :-POST /ovirt-engine/api/clusters/65dec1c0-9c85-11e8-be65- 8c1645709524/glustervolumes/ ee55f809-ff07-42f4-86f8- 10a4eb8930f5/rebalance HTTP/1.1 Host: localhost:8080Authorization: Basic YWRtaW5AaW50ZXJuYWw6cGFzc0AxMjM= Content-Type: application/xmlAccept: application/xmlCache-Control: no-cache<action/>Equivalent python code : https://pastebin.com/aE65Pyiw Sample output : https://pastebin.com/mVVtLiJH On Wed, Aug 15, 2018 at 11:06 AM <chokko@126.com> wrote:when in version 3 sdk ,i use:
req_cluster = api.clusters.get(id=c_uid)
req_volume = req_cluster.glustervolumes.get(id=volume_id)
req_volume.rebalance().job.get_id()
to get a rebalance job id to trace if the job is finished.
Now I use ovirt python sdk4 for develop:
cluster = clustersservice.cluster_service(clusterid)
volume = cluster.gluster_volumes_service().volume_service( volumeid)
response=volume.rebalance()
the response is none,how can i get the rebalance job id?
_______________________________________________
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: https://www.ovirt.org/community/about/community- guidelines/
List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/ message/ P2QN6VG2CRBF55U4FRA65PX3W5SBLP WG/
Ondra is there an equivalent ovirt python sdk4 code for the above, if not we can open a bug for the same.--
_______________________________________________
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: https://www.ovirt.org/community/about/community- guidelines/
List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/ message/ CQZHPBPR6RQEX5EXN2Y2LADBMOTCN7 VT/