def action(): if job_schedule_id: option1 = JobListFromJobScheduleOptions(filter=filter, select=select, expand=expand) return list( client.list_from_job_schedule( job_schedule_id=job_schedule_id, job_list_from_job_schedule_options=option1)) option2 = JobListOptions(filter=filter, select=select, expand=expand) return list(client.list(job_list_options=option2))
def list_job(client, job_schedule_id=None, filter=None, # pylint: disable=redefined-builtin select=None, expand=None): if job_schedule_id: option1 = JobListFromJobScheduleOptions(filter=filter, select=select, expand=expand) return list(client.list_from_job_schedule(job_schedule_id=job_schedule_id, job_list_from_job_schedule_options=option1)) option2 = JobListOptions(filter=filter, select=select, expand=expand) return list(client.list(job_list_options=option2))