Aded rescue for users whos primary tenant is non existant
This commit is contained in:
parent
9295b14e45
commit
f6921199b5
@ -128,7 +128,12 @@ Puppet::Type.type(:keystone_user).provide(
|
||||
if tenantId.nil? or tenantId == 'None' or tenantId.empty?
|
||||
tenant = 'None'
|
||||
else
|
||||
tenant = get_keystone_object('tenant', tenantId, 'name')
|
||||
# this prevents is from failing if tenant no longer exists
|
||||
begin
|
||||
tenant = get_keystone_object('tenant', tenantId, 'name')
|
||||
rescue
|
||||
tenant = 'None'
|
||||
end
|
||||
end
|
||||
password = 'nil'
|
||||
hash[user[1]] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user