Skip to content

Instantly share code, notes, and snippets.

@wchrisjohnson
Forked from elight/identity.rb
Created March 20, 2014 16:19
Show Gist options
  • Save wchrisjohnson/9667648 to your computer and use it in GitHub Desktop.
Save wchrisjohnson/9667648 to your computer and use it in GitHub Desktop.
require "fog/openstack/rackspace/version"
module Fog
module Openstack
module Rackspace
class Identity < Fog::Service
US_ENDPOINT = 'https://identity.api.rackspacecloud.com/v2.0'
UK_ENDPOINT = 'https://lon.identity.api.rackspacecloud.com/v2.0'
requires :rackspace_username, :rackspace_api_key
recognizes :rackspace_auth_url, :rackspace_region
model_path 'fog/rackspace/models/identity'
model :user
collection :users
model :role
collection :roles
model :credential
collection :credentials
model :tenant
collection :tenants
model :service_catalog
def initialize(options = {})
options[:authenticator] ||= RackspaceAuthenticator
@osc_identity = Fog::OpenStackCommon::Identity.new(options)
end
def method_missing(method, *args)
@osc_identity.send(method, *args)
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment