'Get the roles associated with a user within given domain.
:returns: a list of role ids.
:raises keystone.exception.DomainNotFound: If the domain doesn\'t exist.'

@MEMOIZE_COMPUTED_ASSIGNMENTS
def get_roles_for_user_and_domain(self, user_id, domain_id):

    self.resource_api.get_domain(domain_id)
    assignment_list = self.list_role_assignments(user_id=user_id, domain_id=domain_id, effective=True)
    return list(set([x['role_id'] for x in assignment_list]))
