Esempio n. 1
0
 def _get_service_profile(self, context, sp_id):
     try:
         return self._get_by_id(context, flavor_models.ServiceProfile,
                                sp_id)
     except sa_exc.NoResultFound:
         raise ext_flavors.ServiceProfileNotFound(sp_id=sp_id)
Esempio n. 2
0
 def _get_service_profile(self, context, sp_id):
     service_profile = obj_flavor.ServiceProfile.get_object(
         context, id=sp_id)
     if not service_profile:
         raise ext_flavors.ServiceProfileNotFound(sp_id=sp_id)
     return service_profile