Esempio n. 1
0
 def _check_service_uuid(self):
     try:
         db.service_get_by_uuid(self.context, None)
     except exception.ServiceNotFound:
         volumes = db.volume_get_all(self.context,
                                     limit=1,
                                     filters={'service_uuid': None})
         if not volumes:
             return uc.Result(SUCCESS)
     return uc.Result(
         FAILURE,
         'Services and volumes must have a service UUID. Please fix this '
         'issue by running Queens online data migrations.')
Esempio n. 2
0
 def get_by_uuid(cls, context, service_uuid):
     db_service = db.service_get_by_uuid(context, service_uuid)
     return cls._from_db_object(context, cls(), db_service)
Esempio n. 3
0
 def get_by_uuid(cls, context, service_uuid):
     db_service = db.service_get_by_uuid(context, service_uuid)
     return cls._from_db_object(context, cls(), db_service)