Class: Ropenstack::Identity
- Inherits:
-
OpenstackService
- Object
- Rest
- OpenstackService
- Ropenstack::Identity
- Defined in:
- lib/ropenstack/identity.rb
Overview
-
Name: Identity
-
Description: An implementation of the Identity API Client in Ruby
-
Author: Sam ‘Tehsmash’ Betts, John Davidge
-
Date: 30/16/2014
Defined Under Namespace
Instance Method Summary collapse
-
#initialize(location, port, token, type) ⇒ Identity
constructor
A new instance of Identity.
Methods inherited from Rest
#build_headers, #build_http, #delete_request, #do_request, #error_manager, #get_request, #post_request, #put_request
Constructor Details
#initialize(location, port, token, type) ⇒ Identity
Returns a new instance of Identity.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ropenstack/identity.rb', line 15 def initialize(location, port, token, type) super(location + ":" + port.to_s, token) case type when "identityv2" then extend Version2 when "identityv3" then extend Version3 else raise Ropenstack::RopenstackError, "Invalid Type Passed to Identity" end unless token.nil? @data = { "access" => { "token" => { "id" => token } } } end end |