@@ -0,0 +1,765 @@
+from openstackx.api import base%0A%0A%0Aclass RoleRef(base.Resource):%0A    pass%0A%0Aclass RoleRefManager(base.ManagerWithFind):%0A    resource_class = RoleRef%0A%0A    def get_for_user(self, user_id):%0A        return self._get(%22/users/%25s/roleRefs%22 %25 user_id, %22roleRefs%22)%0A%0A    def add_for_tenant_user(self, tenant_id, user_id, role_id):%0A        params = %7B%22roleRef%22: %7B%22tenantId%22: tenant_id, %22roleId%22: role_id%7D%7D%0A        return self._create(%22/users/%25s/roleRefs%22 %25 user_id, params, %22roleRef%22)%0A%0A    def delete_for_tenant_user(self, tenant_id, user_id, role_id):%0A%0A        role_refs = self.get_for_user(user_id)%0A%0A        for role_ref in role_refs.values:%0A            if role_ref%5B'roleId'%5D == role_id:%0A                return self._delete(%22/users/%25s/roleRefs/%25s%22 %25 (user_id, role_ref%5B'id'%5D))%0A

add role_refs.py