def parse_job_config(bench, job, component, log_dir):
    bench['component'] = component
    bench['step-hosts'] = get_default_value(job, 'step-hosts', 1)
    bench['name'] = get_default_value(job, 'name', '')
    bench['affinity'] = get_default_value(job, 'affinity', SCHED_FAIR)
    bench['runtime'] = get_default_value(job, 'runtime', bench['runtime'])
    affinity_list = get_default_value(job, 'affinity-hosts', '')
    affinity_hosts = []
    if affinity_list:
        for manual_host in affinity_list.split(","):
            affinity_hosts.append(manual_host.strip())

    bench['affinity-hosts'] = affinity_hosts
    if len(bench['affinity-hosts']) > 0:
        if len(bench['affinity-hosts']) != len(compute_affinity(bench)):
            HP.logger.error("ERROR: Available hypervisors is different than affinity-hosts")
            HP.logger.error("ERROR: %d hypervisors while we expect %d" % (len(compute_affinity(bench)), len(bench['affinity-hosts'])))
            HP.logger.error("ERROR: Please check %s/affinity to see detected hypervisors" % log_dir)
            return False

    required_hosts = get_default_value(job, 'required-hosts',
                                       bench['required-hosts'])
    if str(required_hosts) in "-":
        min_hosts = int(str(required_hosts).split("-")[0])
        max_hosts = int(str(required_hosts).split("-")[1])
    else:
        min_hosts = required_hosts
        max_hosts = min_hosts

    if max_hosts < 1:
        max_hosts = min_hosts
        HP.logger.error("ERROR: required-hosts shall be greater than"
                        " 0, defaulting to global required-hosts=%d"
                        % max_hosts)
        return False

    if max_hosts > bench['required-hosts']:
        HP.logger.error("ERROR: The maximum number of hosts to tests"
                        " is greater than the amount of available"
                        " hosts.")
        return False

    bench['min_hosts'] = min_hosts
    bench['max_hosts'] = max_hosts

    return True
dataset/ETHPy150Open redhat-cip/edeploy/src/health-server.py/parse_job_config/swapped operands of `in`