Sha256: c6542b33bea5966352778cf2a6917f5cd70c562d7ea9e86f650bb7e046e62f65
Contents?: true
Size: 977 Bytes
Versions: 91
Compression:
Stored size: 977 Bytes
Contents
module Fog module Identity class OpenStack class Real def list_roles_for_user_on_tenant(tenant_id, user_id) request( :expects => [200], :method => 'GET', :path => "tenants/#{tenant_id}/users/#{user_id}/roles" ) end # def list_roles_for_user_on_tenant end # class Real class Mock def list_roles_for_user_on_tenant(tenant_id, user_id) self.data[:user_tenant_membership][tenant_id] ||= {} self.data[:user_tenant_membership][tenant_id][user_id] ||= [] roles = self.data[:user_tenant_membership][tenant_id][user_id].map do |role_id| self.data[:roles][role_id] end Excon::Response.new( :body => { 'roles' => roles }, :status => 200 ) end # def list_roles_for_user_on_tenant end # class Mock end # class OpenStack end # module Identity end # module Fog
Version data entries
91 entries across 91 versions & 10 rubygems