fog/fog — pull request #1361 by dprince (2012-12-10 13:07:29+00:00)
Title: Auth improvements

OpenStack auth updates to select by service name.

This patch updates the OpenStack auth implementation so that it supports selecting API service by both 'name' and 'type'. This makes Fog's openstack implementation usable with providers which have multiple services for a given type (compute for example).

Previously the implementation was confusing because it used a config param called :openstack_service_name to select the service 'type' from the catalog. This patch swaps it so that :openstack_service_name actually selects by 'name'.

The previous logic to select service by type ('compute' for example) has been preserved in a new :openstack_service_type parameter. This option is used just as it was before for backwards compatibility.

This change is potentially breaking for anyone previously using :openstack_service_name directly (which I don't think is that common). As such we should probably make a release note saying that previous users of :openstack_service_name should migrate to use :openstack_service_type instead.

----

This patch also fixes some exception class names and cleans up some unused exceptions in the OpenStack implementation.