xenserver / xscontainer

Support for Docker and Container Management
BSD 2-Clause "Simplified" License
25 stars 14 forks source link

Update api_helper.py #15

Closed danielschonfeld closed 9 years ago

danielschonfeld commented 9 years ago

In case the VM and subsequently the config disk are on a different host, XAPI would return a 302 redirect. We make sure here that the curl command issued would follow that redirect and bring back the raw data of the export_disk we seek.

This PR solves the second half of the problem described in #14 causing XenCenter to hang when looking at Properties of a VM hosted on a host other than the pool's master.

cc @robertbreker

robertbreker commented 9 years ago

Thanks for this - looks good to me!

Any chance that you could also add your sign-off to the commit, to indicate that you're happy to contribute this under the terms outlined in the "LICENSE"-file?

Best wishes, Robert

danielschonfeld commented 9 years ago

@robertbreker all done :) sorry it took a while

robertbreker commented 9 years ago

Thanks again!

danielschonfeld commented 9 years ago

@robertbreker anytime :)

fabiorauber commented 8 years ago

For me curl did not follow the HTTP 302, even when using the -L switch. So I replaced with wget --no-check-certificate, and it worked fine.