Class: Fog::Identity::OpenStack::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/openstack/identity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



33
34
35
36
37
# File 'lib/fog/openstack/identity.rb', line 33

def initialize(options = {})
  @openstack_auth_uri = URI.parse(options[:openstack_auth_url])
  @openstack_identity_prefix = options[:openstack_identity_prefix]
  @config = options
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



31
32
33
# File 'lib/fog/openstack/identity.rb', line 31

def config
  @config
end

Instance Method Details

#v3?Boolean

Returns:

  • (Boolean)


39
40
41
42
43
44
45
# File 'lib/fog/openstack/identity.rb', line 39

def v3?
  if @openstack_identity_prefix
    @openstack_identity_prefix =~ /v3/
  else
    @openstack_auth_uri && @openstack_auth_uri.path =~ %r{/v3}
  end
end