fog/fog — pull request #1497 by rubiojr (2013-01-24 10:26:59+00:00)
Title: [openstack|volume] 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:

require 'fog'

conn = Fog::Volume.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.