openstack/python-novaclient — pull request #10 by jbardin (2013-04-04 20:53:31+00:00)
Title: Set requests to retry on ConnectionError

Try to prevent novaclient from throwing requests.ConnectionErrors with
unstable api servers. This is kind of ugly (especially since requests1.0 got rid of max_retries config in defaults), but it does seem work work well.

We frequently get ConnectionErrors from the rackspace api endpoints. I've found that increasing retries to 3 virtually eliminates them. Wrapping all novaclient (or pyrax) calls to retry on a requests.ConnectionError is kind of ugly, so I started inserting this block into modules where we use nova.