Refactor of domain_name_from_id

Small refactoring of domain_name_from_id for keystone provider.

Change-Id: I5f63fb2705a59ac233c0dc1c2e323322751ebb87
This commit is contained in:
Denis Egorenko
2016-01-13 20:00:10 +03:00
parent 4d1fd0ea3b
commit ae556eec8f

View File

@@ -105,10 +105,8 @@ class Puppet::Provider::Keystone < Puppet::Provider::Openstack
end end
unless @domain_hash.include?(id) unless @domain_hash.include?(id)
name = request('domain', 'show', id)[:name] name = request('domain', 'show', id)[:name]
@domain_hash[id] = name if name err("Could not find domain with id [#{id}]") unless name
end @domain_hash[id] = name
unless @domain_hash.include?(id)
err("Could not find domain with id [#{id}]")
end end
@domain_hash[id] @domain_hash[id]
end end