+1


On March 17, 2014 at 11:42:42 AM, Chris Johnson (notifications@github.com) wrote:

In lib/fog/openstackcommon/models/identity/role.rb:

> @@ -20,30 +20,20 @@ def destroy
>            true
>          end
>   
> -        def add_to_user(user, tenant)
> -          add_remove_to_user(user, tenant, :add)
> -        end
> -
> -        def remove_to_user(user, tenant)
> -          add_remove_to_user(user, tenant, :remove)
> +        def add_to_user(user_id, tenant_id)
> +          requires :id
> +          result = service.add_role_to_user_on_tenant(tenant_id, user_id, self.id)
> +          return true if [200,201].include? result.status
Yeah - @mwhagedorn and I had a conversation late last week about this. I'd like to see all request level stuff (status code, response and it's associated data) kept (or at least wrapped) at the request layer. IMO, we should never be dealing with a specific HTTP transport or it's attributes above the request layer. Period.

—
Reply to this email directly or view it on GitHub.