Method: OpenStack::Identity::ConnectionV3#create_user

Defined in:
lib/openstack/identity/connection_v3.rb

#create_user(options) ⇒ Object

create_user(name: ‘user1’, password: ‘password1’, email: ‘[email protected]’)



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

def create_user(options)
  options.merge!(domain_id: @connection.domain_id)
  req_body = JSON.generate('user' => options)
  response = @connection.req('POST', '/users', data: req_body)
  OpenStack::Identity::User.new(JSON.parse(response.body)['user'])
end