Module: Fog::OpenStack::Auth::Domain

Included in:
ProjectScope, User
Defined in:
lib/fog/openstack/auth/name.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#domainObject

Returns the value of attribute domain.



7
8
9
# File 'lib/fog/openstack/auth/name.rb', line 7

def domain
  @domain
end

Instance Method Details

#identityObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/fog/openstack/auth/name.rb', line 9

def identity
  data = {}
  if !id.nil?
    data.merge!(to_h(:id))
  elsif !name.nil? && !domain.nil?
    data.merge!(to_h(:name))
    data[:domain] = @domain.identity
  else
    raise Fog::OpenStack::Auth::CredentialsError,
          "#{self.class}: An Id, or a name with its domain, must be provided"
  end
  data
end