apache/libcloud — pull request #58 by morgabra (2012-02-06 20:07:08+00:00)
Title: Openstack Service Catalog (Discussion)

I've changed the openstack base connection and inheriting drivers a bit to make using the service catalog a little easier (hopefully).

Now, every connection class that inherits from the openstack base connection must implement get_endpoint(), who's job is to return the correct endpoint out of the service catalog.

The upside to this is we don't have to generalize parsing the service catalog anymore, which makes it much easier to support things like regions or multiple endpoints of the same type.

The downside is that no other drivers behave this way, although you'll get a pretty obvious NotImplementedError if you do it wrong.

I've also added a new driver for the rackspace nova private beta, which is a pretty simple reference implementation of how you would properly subclass the base openstack infrastructure to make a driver for a specific implementation.

Future TODO: Split out rackspace-specific code from the openstack base classes/drivers and create new providers for openstack implementations/regions.