The openstack_service_type for the Openstack Storage Service (Swift) currently
defaults to "object-store". However, if the Swift service is unvailable, the
authenticate_v2 method attempts to call:
service_type.join ", "
The problem is that the String "object-store" doesn't have a join method.
The new tests show that "object-store" is an invalid service_type, whereas
["object-store"] is a valid service_type.
https://github.com/fog/fog/issues/3112
This patch updates the OpenStack auth implementation so that
it supports selecting API service by both 'name' and 'type'.
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 compatability.
This change is potentially breaking for anyone previously using
:openstack_service_name (which I don't think is that common but is
possible). 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.
Fixes an exception class name error for the custom
OpenStack ServiceUnavailable exception. Previously the wrong
class name was being used.
Also cleans up and simplifies some other exceptions in the OpenStack
implementation. (We can simply use NotFound from Fog::Errors instead)
Previously a NoMethodError would be raised giving no information about
what was missing. Now an appropriate exception with a useful message is
returned.