

def get_data_sources(job_execution, job, data_source_urls, cluster=None):

    def _construct(ctx, ds_id):
        source = conductor.data_source_get(ctx, ds_id)
        if (source and (source.id not in data_source_urls)):
            url = _construct_data_source_url(source.url, job_execution.id)
            runtime_url = _runtime_url(url, cluster)
            data_source_urls[source.id] = (url, runtime_url)
        return source
    ctx = context.ctx()
    input_source = _construct(ctx, job_execution.input_id)
    output_source = _construct(ctx, job_execution.output_id)
    return (input_source, output_source)

dataset/ETHPy150Open openstack/sahara/sahara/service/edp/job_utils.py get_data_sources/original