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:8080 Authorization: Basic YWRtaW5AaW50ZXJuYWw6cGFzc0AxMjM= Content-Type: application/xml Accept: application/xml Cache-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 <cho...@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-le...@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/P2QN6VG2CRBF55U4FRA65PX3W5SBLPWG/ > Ondra is there an equivalent ovirt python sdk4 code for the above, if not we can open a bug for the same. -- KAUSTAV MAJUMDER ASSOCIATE SOFTWARE ENGINEER Red Hat India PVT LTD. <https://www.redhat.com/> kmajum...@redhat.com M: 08981884037 IM: IRC: kmajumder <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> @redhatway <https://twitter.com/redhatway> @redhatinc <https://instagram.com/redhatinc> @redhatsnaps <https://snapchat.com/add/redhatsnaps>
_______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-le...@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/CQZHPBPR6RQEX5EXN2Y2LADBMOTCN7VT/