Esempio n. 1
0
def extract_our_flavors(avail_flavors, product, version, partial_updates):
    if is_rc(version, partial_updates):
        product_key = f'{product}_rc'
    else:
        product_key = product
    # sanity check
    all_flavors = set([fl['name'] for fl in SUPPORTED_FLAVORS[product_key]])
    if not set(avail_flavors).issuperset(all_flavors):
        description = f'Some flavors are not in actions.json: {all_flavors.difference(set(avail_flavors))}.'
        raise UnsupportedFlavor(description=description)
    return SUPPORTED_FLAVORS[product_key]
Esempio n. 2
0
def extract_our_flavors(avail_flavors, product, version, partial_updates):
    if is_rc(version, partial_updates):
        product_key = f'{product}_rc'
    else:
        product_key = product
    # sanity check
    all_flavors = set([fl['name'] for fl in SUPPORTED_FLAVORS[product_key]])
    if not set(avail_flavors).issuperset(all_flavors):
        description = f'Some flavors are not in actions.json: {all_flavors.difference(set(avail_flavors))}.'
        raise UnsupportedFlavor(description=description)
    return SUPPORTED_FLAVORS[product_key]
Esempio n. 3
0
def extract_our_flavors(avail_flavors, product, version, partial_updates, product_key=None):
    if not product_key:
        product_key = product

    if is_rc(product_key, version, partial_updates):
        product_key = f"{product_key}_rc"

    # sanity check
    all_flavors = set([fl["name"] for fl in SUPPORTED_FLAVORS[product_key]])
    if not set(avail_flavors).issuperset(all_flavors):
        description = f"Some flavors are not in actions.json: {all_flavors.difference(set(avail_flavors))}."
        raise UnsupportedFlavor(description=description)
    return SUPPORTED_FLAVORS[product_key]
Esempio n. 4
0
def test_is_rc(version, partial_updates, result):
    assert is_rc(version, partial_updates) == result
Esempio n. 5
0
def test_is_rc(version, partial_updates, result):
    assert is_rc(version, partial_updates) == result