Ejemplo n.º 1
0
def constraint_plain(constraint_type, options_dict, with_id=False):
    """return console shape for any constraint_type of plain constraint"""
    type_report_map = {"rsc_colocation": colocation_plain, "rsc_order": order_plain, "rsc_ticket": ticket_plain}

    if constraint_type not in type_report_map:
        return constraint_plain_default(constraint_type, options_dict, with_id)

    return type_report_map[constraint_type](options_dict, with_id)
Ejemplo n.º 2
0
def constraint_plain(constraint_type, options_dict, with_id=False):
    """return console shape for any constraint_type of plain constraint"""
    type_report_map = {
        "rsc_colocation": colocation_plain,
        "rsc_order": order_plain,
        "rsc_ticket": ticket_plain,
    }

    if constraint_type not in type_report_map:
        return constraint_plain_default(constraint_type, options_dict, with_id)

    return type_report_map[constraint_type](options_dict, with_id)