Advertisement
kmajumder

Untitled

Aug 16th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 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. }
  13.  
  14. conn.request("POST", "/ovirt-engine/api/clusters/65dec1c0-9c85-11e8-be65-8c1645709524/glustervolumes/ee55f809-ff07-42f4-86f8-10a4eb8930f5/rebalance", payload, headers)
  15.  
  16. res = conn.getresponse()
  17. data = res.read()
  18.  
  19. print(data.decode("utf-8"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement