def validate_flavor_config(
    config, flavor_id, whole_check=False, **kwargs
):
    load_metadatas()
    if not flavor_id:
        logging.info('There is no flavor, skipping flavor validation...')
    elif flavor_id not in FLAVOR_METADATA_MAPPING:
        raise exception.InvalidParameter(
            'flavor %s is not found in flavor metedata mapping' % flavor_id
        )
    else:
        _validate_config(
            '', config, FLAVOR_METADATA_MAPPING[flavor_id],
            whole_check, **kwargs
        )
Validate flavor config.
dataset/ETHPy150Open openstack/compass-core/compass/db/api/metadata_holder.py/validate_flavor_config