예제 #1
0
 def get_all(cls, context):
     resources_db = db_api.resource_get_all(context)
     resources = [
         (resource_name,
          cls._from_db_object(cls(context), context, resource_db))
         for resource_name, resource_db in six.iteritems(resources_db)
     ]
     return dict(resources)
예제 #2
0
파일: reality.py 프로젝트: Hopebaytech/heat
 def resources_by_logical_name(self, logical_name):
     ret = []
     resources = db_api.resource_get_all(self.cntxt)
     for res in resources:
         if (res.name == logical_name and res.action in ("CREATE", "UPDATE")
            and res.status == "COMPLETE"):
             ret.append(res)
     return ret
예제 #3
0
 def resources_by_logical_name(self, logical_name):
     ret = []
     resources = db_api.resource_get_all(self.cntxt)
     for res in resources:
         if (res.name == logical_name and res.action in ("CREATE", "UPDATE")
                 and res.status == "COMPLETE"):
             ret.append(res)
     return ret
예제 #4
0
파일: resource.py 프로젝트: dims/heat
 def get_all(cls, context):
     resources_db = db_api.resource_get_all(context)
     resources = [
         (
             resource_name,
             cls._from_db_object(cls(context), context, resource_db)
         )
         for resource_name, resource_db in six.iteritems(resources_db)
     ]
     return dict(resources)
예제 #5
0
파일: reality.py 프로젝트: Hopebaytech/heat
    def all_resources(self):
        try:
            resources = db_api.resource_get_all(self.cntxt)
        except exception.NotFound:
            return []

        ret = []
        for res in resources:
            if res.action in ("CREATE", "UPDATE") and res.status == "COMPLETE":
                ret.append(res)
        return ret
예제 #6
0
    def all_resources(self):
        try:
            resources = db_api.resource_get_all(self.cntxt)
        except exception.NotFound:
            return []

        ret = []
        for res in resources:
            if res.action in ("CREATE", "UPDATE") and res.status == "COMPLETE":
                ret.append(res)
        return ret