rackspace/pyrax — pull request #56 by sivel (2013-04-09 16:07:00+00:00)
Title: Bring pyrax.utils._wait_until operations for cloud servers in alignment with other objects

Currently pyrax.utils._wait_until uses `obj = obj.manager.get()` on cloudservers, because novaclient server objects do not support the `.reload()` method that pyrax objects do. novaclient, however has a similarly named method, called `.get()` that performs the same operations as the pyrax `.reload()` methods.

These changes will attempt to call `obj.get()` if an AttributeError is raised when attempting `obj.reload()`. If a subsequent AttributeError is raised `obj = obj.manager.get()` will run before finally resulting in an exception if all previous method calls do not exist.

Tests have been updated as well, and are passing successfully.

A side effect from this is that we are not "destroying" the original object, and are updating it's attributes. This also allows us to use "pass by reference" functionality in python for cloud server objects, and not be required to accept a return value. This was already the case with other objects that supported `.reload()`

See also https://github.com/rackspace/pyrax/issues/33