Open stevekaten opened 9 years ago
Unfortunately, that's a result of the dependency on novaclient. You can work around it like this:
image_id = cs.servers.create_image(server, "NAME")
image_obj = cs.images.get(image_id)
pyrax.utils.wait_until(image, "status", ["ACTIVE", "ERROR"], interval=10, attempts=30)
Note that I added a second condition to the wait_until
call; image creation fails sometimes, and you always want to be able to handle that condition, too.
Example:
The wait_until function requires an object. The create_image function returns a string. This requires another request to get the object just to use wait_until: