Use the resource.state_description

Change-Id: I114067f3bb91c6d38b3c4c69af842f4f3585810b
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2012-06-20 22:21:24 +10:00
parent 1530a29cfd
commit b85bdc2d6c
2 changed files with 2 additions and 0 deletions

View File

@ -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,
}

View File

@ -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: