Class: OpenStack::Compute::Authentication

Inherits:
Object
  • Object
show all
Defined in:
lib/openstack/compute/authentication.rb

Class Method Summary collapse

Class Method Details

.init(conn) ⇒ Object

Performs an authentication to the OpenStack auth server. If it succeeds, it sets the svrmgmthost, svrmgtpath, svrmgmtport, svrmgmtscheme, authtoken, and authok variables on the connection. If it fails, it raises an exception.



11
12
13
14
15
16
17
# File 'lib/openstack/compute/authentication.rb', line 11

def self.init(conn)
  if conn.auth_path =~ /.*v2.0\/?$/
    AuthV20.new(conn)
  else
    AuthV10.new(conn)
  end
end