summaryrefslogtreecommitdiff
path: root/heat/objects/stack.py
diff options
context:
space:
mode:
Diffstat (limited to 'heat/objects/stack.py')
-rw-r--r--heat/objects/stack.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/heat/objects/stack.py b/heat/objects/stack.py
index ee19cf2b2..65280fca8 100644
--- a/heat/objects/stack.py
+++ b/heat/objects/stack.py
@@ -15,10 +15,9 @@
"""Stack object."""
-import six
-
from oslo_versionedobjects import base
from oslo_versionedobjects import fields
+import six
from heat.common import exception
from heat.common.i18n import _
@@ -146,6 +145,16 @@ class Stack(
pass
@classmethod
+ def get_all_by_root_owner_id(cls, context, root_owner_id):
+ db_stacks = db_api.stack_get_all_by_root_owner_id(context,
+ root_owner_id)
+ for db_stack in db_stacks:
+ try:
+ yield cls._from_db_object(context, cls(context), db_stack)
+ except exception.NotFound:
+ pass
+
+ @classmethod
def count_all(cls, context, **kwargs):
return db_api.stack_count_all(context, **kwargs)