Add WaitForReady function
Initial test
Test timeout
Reduce timeout in test
Test WaitUntilReady passes errors through
Switch to using WaitUntilReady for backups
Handle connection refused errors
Fix lp:1399229
Merge pull request #1272 from perrito666/fix_1399229

Fix lp:1399229



(Review request: http://reviews.vapour.ws/r/586/)
Minor test fixes
Merge branch 'master' into backup-replicaset
Test fix
Switch to majority check instead of all healthy check
Use a new client for the download call.
Better error checking
Add a comment about why we are using a new API client for download.
Merge pull request #1269 from voidspace/backup-replicaset

Backup waits for replicaset

A new WaitUntilReady function that waits for replicaset.IsReady to return true. Backups use this function to wait (up to 60 seconds) for the replicaset to be ready, rather than failing.

It also changes the IsReady implementation to check that a majority of members are healthy instead of all members. This permits a backup when one member is down (which we don't want to prevent!).

(Review request: http://reviews.vapour.ws/r/583/)
Add a todo comment.
Merge pull request #1275 from ericsnowcurrently/backups-fix-api-conn

Use a new client for the backups download call.

Apparently an API client is good for only one connection.

(See http://juju-ci.vapour.ws:8080/job/functional-ha-backup-restore/1190/console.)

(Review request: http://reviews.vapour.ws/r/590/)
Return the proper NotFound error.