def get_case_ids(self, plan_id, run_id, tags, priorities, is_tcms):
        case_ids = []
        if is_tcms:
            if run_id == '':
                if plan_id == '':
                    print 'Plan ID is required option!!!'
                    sys.exit(255)
                else:
                    run_id = self.create_run(plan_id, tags, priorities)
                    print '\n', 'New Run ID: %s'.center(70, '*') % run_id, '\n'
                    cases = self.get_case_from_run(run_id)
                    case_ids = [case['case_id'] for case in cases]
            else:
                cases_in_run = self.get_case_from_run(run_id)
                case_ids_in_run = [case['case_id'] for case in cases_in_run]
                valid_case_ids = self.get_valid_cases(plan_id, tags,
                                                      priorities)
                case_ids = [id for id in case_ids_in_run
                            if id in valid_case_ids]
                # only collect idel case
                idel_case_ids = self.filter_case_via_status(run_id, 'IDLE')
                case_ids = list(set(case_ids) & set(idel_case_ids))
                print '\n', 'Existing Run ID: %s'.center(70, '*') % run_id
                print '\n'
        elif plan_id == '':
            print 'Plan ID is required option!!!'
            sys.exit(255)
        else:
            case_ids = self.get_valid_cases(plan_id, tags, priorities)
        return str(run_id), case_ids
return specified and automated case ids
dataset/ETHPy150Open idumpling/robotx/robotx/core/nitrateclient.py/TCMS.get_case_ids