def validate_allowed_values(data_input, mode):

    passed = False
    if mode == MODE.NONE:
        passed = True
    else:
        data = data_input.data

        LOGGER.debug('validating allowed values: %s in %s', data, data_input.allowed_values)
        for value in data_input.allowed_values:

            if value.allowed_type == ALLOWEDVALUETYPE.VALUE:
                passed = _validate_value(value, data)

            elif value.allowed_type == ALLOWEDVALUETYPE.RANGE:
                passed = _validate_range(value, data)

            if passed is True:
                break

    LOGGER.debug('validation result: %r', passed)
    return passed
Returns True if node OS is Ubuntu, False otherwise
dataset/ETHPy150Open geopython/pywps/pywps/validator/literalvalidator.py/validate_allowed_values--crossover with--dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/extensions/volume_manager/objects/adapters.py/NailgunNodeAdapter.is_ubuntu