'Sanity check that domain/project is correct.'

def _check_stack_domain_user(self, user_id, project_id, action):

    user = self.domain_admin_client.users.get(user_id)
    if (user.domain_id != self.stack_domain_id):
        raise ValueError((_('User    %s    in    invalid    domain') % action))
    if (user.default_project_id != project_id):
        raise ValueError((_('User    %s    in    invalid    project') % action))
