@utils.supported_filters([])
@database.run_in_session()
@user_api.check_user_permission(
    permission.PERMISSION_LIST_METADATAS
)
@utils.wrap_to_dict(RESP_FLAVORS_FIELDS)
def get_flavor(flavor_id, user=None, session=None, **kwargs):
    """Get flavor."""
    load_flavors()
    if flavor_id not in FLAVOR_MAPPING:
        raise exception.RecordNotExists(
            'flavor %s does not exist' % flavor_id
        )
    return FLAVOR_MAPPING[flavor_id]
dataset/ETHPy150Open openstack/compass-core/compass/db/api/adapter_holder.py/get_flavor/original