Merge "Refactor of domain_name_from_id"

This commit is contained in:
Jenkins
2016-01-14 20:26:17 +00:00
committed by Gerrit Code Review

View File

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