:openstack_endpoint_type is missing as a recognized parameter. This
patch fixes that, and allows the :openstack_endpoint_type to be
configurable instead of hardcoding the value to 'adminURL'
That is, you can create the connection to the service as follows:
require 'fog'
conn = Fog::Identity.new({
:provider => 'OpenStack',
:openstack_api_key => ENV['OS_PASSWORD'],
:openstack_username => ENV["OS_USERNAME"],
:openstack_auth_url => ENV["OS_AUTH_URL"]
:openstack_tenant => ENV["OS_TENANT_NAME"],
:openstack_endpoint_type => 'publicURL', # publicURL, adminURL, etc
})
Defaults to adminURL to maintain backwards compatibility.
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.
Altered the paths for EC2 credential requests to remove an extra / in
the request URIs.
Altered Fog::Open::Identity::Real#request to retry only once when given
a 401 error response code. The EC2 API returns 401 when attempting to
fetch nonexistent EC2 credentials instead of something sensible like
404, leading to an infinite loop. Also, the "Bad username or password"
check was removed. My version of OpenStack does not return this message
when a token is expired, but returns the same message as for a missing
EC2 credential.
This wraps API discovered from python-keystoneclient that allows CRUD
for EC2 credentials for an OpenStack service. Unfortunately I haven't
been able to find documentation for this API.