fog/fog — pull request #1542 by rubiojr (2013-02-01 09:34:35+00:00)
Title: [openstack|compute] 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 'publicURL'

That is, you can create the connection to the service as follows:

require 'fog'

conn = Fog::Compute.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 => 'adminURL', # publicURL, adminURL, etc
})

Defaults to publicURL to maintain backwards compatibility.