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)
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
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)
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