fog/fog — pull request #1409 by rubiojr (2012-12-21 17:56:57+00:00)
Title: [openstack|image] Configurable :openstack_endpoint_type

: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 now:

require 'fog'
conn = Fog::Image.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, internalURL
})

Defaults to adminURL to maintain backwards compatibility.