]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Only showing the Outputs when the status of a stack is CREATE_COMPLETE
authorChris Alfonso <calfonso@redhat.com>
Thu, 3 May 2012 13:10:13 +0000 (09:10 -0400)
committerChris Alfonso <calfonso@redhat.com>
Thu, 3 May 2012 13:13:04 +0000 (09:13 -0400)
This fixes issues #96

heat/engine/manager.py

index 2bd4f95c6daad6382ce97e3b4dc8a80b8c02e302..ad9eee3ead0f8b1a34609dc7fcbf3ebc5ac0586e 100644 (file)
@@ -89,13 +89,17 @@ class EngineManager(manager.Manager):
             mem['creation_at'] = str(s.created_at)
             mem['updated_at'] = str(s.updated_at)
             mem['NotificationARNs'] = 'TODO'
-            mem['Outputs'] = ps.get_outputs()
             mem['Parameters'] = ps.t['Parameters']
             mem['StackStatusReason'] = 'TODO'
             mem['TimeoutInMinutes'] = 'TODO'
             mem['TemplateDescription'] = ps.t.get('Description',
                                                   'No description')
             mem['StackStatus'] = ps.t.get('stack_status', 'unknown')
+            
+            # only show the outputs on a completely created stack
+            if ps.t['stack_status'] == ps.CREATE_COMPLETE:
+                mem['Outputs'] = ps.get_outputs()
+
             res['stacks'].append(mem)
 
         return res