mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[openstack|identity] Update users model initialization and save
This commit is contained in:
parent
040cd20021
commit
8d084194b4
1 changed files with 1 additions and 1 deletions
|
@ -16,13 +16,13 @@ module Fog
|
|||
|
||||
def initialize(attributes)
|
||||
@connection = attributes[:connection]
|
||||
attributes[:enabled] ||= true
|
||||
super
|
||||
end
|
||||
|
||||
def save
|
||||
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if identity
|
||||
requires :name, :tenant_id, :password
|
||||
enabled = true if enabled.nil?
|
||||
data = connection.create_user(name, password, email, tenant_id, enabled)
|
||||
merge_attributes(data.body['user'])
|
||||
true
|
||||
|
|
Loading…
Reference in a new issue