Adding Ondra

On Thu, Aug 16, 2018 at 1:28 PM, Kaustav Majumder <kmajumde@redhat.com> wrote:
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
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/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.

kmajumder@redhat.com    M: 08981884037     IM: IRC: kmajumder


_______________________________________________
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/CQZHPBPR6RQEX5EXN2Y2LADBMOTCN7VT/




--
Martin Perina
Associate Manager, Software Engineering
Red Hat Czech s.r.o.