From b85bdc2d6c958a76ef0e274e1cf74ce1a4bb2e07 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Wed, 20 Jun 2012 22:21:24 +1000 Subject: [PATCH] Use the resource.state_description Change-Id: I114067f3bb91c6d38b3c4c69af842f4f3585810b Signed-off-by: Angus Salkeld --- heat/engine/manager.py | 1 + heat/engine/resources.py | 1 + 2 files changed, 2 insertions(+) diff --git a/heat/engine/manager.py b/heat/engine/manager.py index 59276afe..7b8eb945 100644 --- a/heat/engine/manager.py +++ b/heat/engine/manager.py @@ -600,4 +600,5 @@ def format_resource_attributes(stack, resource): 'ResourceType': resource_type, 'LastUpdatedTimestamp': last_updated_time.isoformat(), 'ResourceStatus': resource.state, + 'ResourceStatusReason': resource.state_description, } diff --git a/heat/engine/resources.py b/heat/engine/resources.py index f21e709c..67cd13e5 100644 --- a/heat/engine/resources.py +++ b/heat/engine/resources.py @@ -250,6 +250,7 @@ class Resource(object): try: rs = db_api.resource_get(self.stack.context, self.id) rs.update_and_save({'state': self.state, + 'state_description': reason, 'nova_instance': self.instance_id}) if rs.stack: -- 2.45.2