WHY THIS HAD TO BE DONE

OpenStack Alpha at http://alpha.auth.api.rackspacecloud.com:5000/v2.0/ has 
started conforming to the spec and not returning any node data back except for 
new password on node create.

See: 
http://docs.openstack.org/cactus/openstack-compute/developer/openstack-compute-api-1.1/content/CreateServers.html

"Note that when creating a server only the server ID, its links, and the admin 
password are guaranteed to be returned in the request. Additional attributes 
may be retrieved by performing subsequent GETs on the server."

Specifically the OpenStack 1.1 node driver was failing on create_node as it was 
attempting to fill the information to create a libcloud node from the server 
response (which is not just returning ID and admin password).

WHAT

The implementation I took here was to do the follow-up GET to get the node 
information.  There is enough information returned there to make a libcloud 
node object, though some of it won't be filled in until the server has gone 
from BUILD to ACTIVE (for example, ip addresses).

I changed some of the create_node test data to match the existing asserts.

You can merge this Pull Request by running:

  git pull https://github.com/tildedave/libcloud 
fix_openstack_alpha_only_returning_id

Or you can view, comment on it, or merge it online at:

  https://github.com/apache/libcloud/pull/40

-- Commit Summary --

* Update test data to include new create response.  Do a follow-up GET after 
creating a node to get all of the necessary information (name, status, ip 
addresses, metadata)

-- File Changes --

M libcloud/compute/drivers/openstack.py (7)
A 
test/compute/fixtures/openstack_v1.1/_servers_26f7fbee_8ce1_4c28_887a_bfe8e4bb10fe.json
 (49)
A test/compute/fixtures/openstack_v1.1/_servers_create.json (16)
M test/compute/test_openstack.py (22)

-- Patch Links --

  https://github.com/apache/libcloud/pull/40.patch
  https://github.com/apache/libcloud/pull/40.diff

--- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/libcloud/pull/40

Reply via email to