lib/kaname/resource.rb in kaname-0.3.3 vs lib/kaname/resource.rb in kaname-0.4.0

- old
+ new

@@ -10,19 +10,19 @@ nil end end def users - @_users ||= Fog::Identity[:openstack].users + @_users ||= Yao::User.list end def tenants - @_tenants ||= Fog::Identity[:openstack].tenants + @_tenants ||= Yao::Tenant.list end def roles - @_roles ||= Fog::Identity[:openstack].roles + @_roles ||= Yao::Role.list end def users_hash return @h if @h @@ -31,12 +31,12 @@ next if ignored_users.include?(u.name) @h[u.name] = {} @h[u.name]["email"] = u.email @h[u.name]["tenants"] = {} tenants.each do |t| - r = u.roles(t.id) + r = Yao::Role.list_for_user(u.name, on: t.name) if r.size > 0 - @h[u.name]["tenants"][t.name] = r.first["name"] + @h[u.name]["tenants"][t.name] = r.first.name end end end @h end