Merge "keystone_user: Remove redundant domain parameter input check"
This commit is contained in:
@@ -35,11 +35,9 @@ Puppet::Type.type(:keystone_tenant).provide(
|
|||||||
properties << '--disable'
|
properties << '--disable'
|
||||||
end
|
end
|
||||||
if resource[:description]
|
if resource[:description]
|
||||||
properties << '--description'
|
properties << '--description' << resource[:description]
|
||||||
properties << resource[:description]
|
|
||||||
end
|
end
|
||||||
properties << '--domain'
|
properties << '--domain' << resource[:domain]
|
||||||
properties << resource[:domain]
|
|
||||||
|
|
||||||
@property_hash = self.class.system_request('project', 'create', properties)
|
@property_hash = self.class.system_request('project', 'create', properties)
|
||||||
@property_hash[:name] = resource[:name]
|
@property_hash[:name] = resource[:name]
|
||||||
|
@@ -28,8 +28,7 @@ Puppet::Type.type(:keystone_user).provide(
|
|||||||
if self.class.do_not_manage
|
if self.class.do_not_manage
|
||||||
fail("Not managing Keystone_user[#{@resource[:name]}] due to earlier Keystone API failures.")
|
fail("Not managing Keystone_user[#{@resource[:name]}] due to earlier Keystone API failures.")
|
||||||
end
|
end
|
||||||
user_name, user_domain = resource[:name], resource[:domain]
|
properties = [resource[:name]]
|
||||||
properties = [user_name]
|
|
||||||
if resource[:enabled] == :true
|
if resource[:enabled] == :true
|
||||||
properties << '--enable'
|
properties << '--enable'
|
||||||
elsif resource[:enabled] == :false
|
elsif resource[:enabled] == :false
|
||||||
@@ -44,13 +43,10 @@ Puppet::Type.type(:keystone_user).provide(
|
|||||||
if resource[:email]
|
if resource[:email]
|
||||||
properties << '--email' << resource[:email]
|
properties << '--email' << resource[:email]
|
||||||
end
|
end
|
||||||
if user_domain
|
properties << '--domain' << resource[:domain]
|
||||||
properties << '--domain'
|
|
||||||
properties << user_domain
|
|
||||||
end
|
|
||||||
@property_hash = self.class.system_request('user', 'create', properties)
|
@property_hash = self.class.system_request('user', 'create', properties)
|
||||||
@property_hash[:name] = resource[:name]
|
@property_hash[:name] = resource[:name]
|
||||||
@property_hash[:domain] = user_domain
|
@property_hash[:domain] = resource[:domain]
|
||||||
@property_hash[:ensure] = :present
|
@property_hash[:ensure] = :present
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user