Advertisement
kmajumder

getJobIdForRebalance

Aug 16th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. import http.client
  2.  
  3. conn = http.client.HTTPConnection("localhost:8080")
  4.  
  5. payload = "<action/>"
  6.  
  7. headers = {
  8.     'authorization': "Basic YWRtaW5AaW50ZXJuYWw6cGFzc0AxMjM=",
  9.     'content-type': "application/xml",
  10.     'accept': "application/xml",
  11.     'cache-control': "no-cache",
  12.     'postman-token': "658f8dfd-2760-9dff-3693-8f1928d93a72"
  13.     }
  14.  
  15. conn.request("POST", "/ovirt-engine/api/clusters/65dec1c0-9c85-11e8-be65-8c1645709524/glustervolumes/ee55f809-ff07-42f4-86f8-10a4eb8930f5/rebalance", payload, headers)
  16.  
  17. res = conn.getresponse()
  18. data = res.read()
  19.  
  20. print(data.decode("utf-8"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement