def _get_flavors(self, req, is_detail=True):
        ctxt = req.environ['nova.context']
        flavors = db.api.instance_type_get_all(ctxt)
        builder = self._get_view_builder(req)
        items = [builder.build(flavor, is_detail=is_detail)
                 for flavor in flavors.values()]
        return items
Helper function that returns a list of flavor dicts.
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/openstack/flavors.py/Controller._get_flavors