summaryrefslogtreecommitdiff
path: root/heat/engine/stack.py
diff options
context:
space:
mode:
authorCrag Wolfe <cwolfe@redhat.com>2017-03-21 01:52:50 -0400
committerZane Bitter <zbitter@redhat.com>2017-07-31 21:13:49 -0400
commit705625cee79a566ad5f13b0969a5b2b58f118987 (patch)
tree38401260885f0d0500c41994a9b1bf6195a3c03b /heat/engine/stack.py
parent8c7b66a8a35180b5c352279e2800ec89cc8b77dc (diff)
downloadheat-705625cee79a566ad5f13b0969a5b2b58f118987.tar.gz
Eager load resource_properties_data in resource
Eager load resource_properties_data in resources in the typical resource-loading scenarios where properties data will be accessed. Thus, we can save an extra db query per resource when loading all the resources in a stack, for instance. Fall back to lazy loading properties data in other scenarios. Also, the resource object doesn't need to store a copy of its ResourcePropertiesData object in self.rsrc_prop_data, so don't. Change-Id: Ib7684af3fe06f818628fd21f1216de5047872948 Closes-Bug: #1665503
Diffstat (limited to 'heat/engine/stack.py')
-rw-r--r--heat/engine/stack.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/heat/engine/stack.py b/heat/engine/stack.py
index d28617adb..01c68211b 100644
--- a/heat/engine/stack.py
+++ b/heat/engine/stack.py
@@ -922,7 +922,7 @@ class Stack(collections.Mapping):
def _add_event(self, action, status, reason):
"""Add a state change event to the database."""
ev = event.Event(self.context, self, action, status, reason,
- self.id, None,
+ self.id, None, None,
self.name, 'OS::Heat::Stack')
ev.store()