Merge "bug fix in heat. 1. show heat stack in error state. 2. event property changed to "project" insead of "project_id""

This commit is contained in:
Jenkins 2016-11-22 16:38:25 +00:00 committed by Gerrit Code Review
commit 6f38337dcf
2 changed files with 3 additions and 5 deletions

View File

@ -28,8 +28,6 @@ class HeatStackDriver(DriverBase):
_client = None
conf = None
FAILED = 'FAILED'
RESOURCE_TYPE_CONVERSION = {
'OS::Nova::Server': NOVA_INSTANCE_DATASOURCE,
'OS::Cinder::Volume': CINDER_VOLUME_DATASOURCE,
@ -90,8 +88,7 @@ class HeatStackDriver(DriverBase):
HeatStackDriver.RESOURCE_TYPE_CONVERSION = tmp_dict
def _make_stacks_list(self, stacks):
return [stack.__dict__ for stack in stacks
if self.FAILED not in stack.__dict__['stack_status']]
return [stack.__dict__ for stack in stacks]
def _append_stacks_resources(self, stacks):
return [self._retrieve_stack_resources(stack, stack['id'])

View File

@ -49,11 +49,12 @@ class HeatStackTransformer(ResourceTransformerBase):
super(HeatStackTransformer, self).__init__(transformers, conf)
def _create_snapshot_entity_vertex(self, entity_event):
stack_name = extract_field_value(entity_event, 'stack_name')
stack_id = extract_field_value(entity_event, 'id')
stack_state = extract_field_value(entity_event, 'stack_status')
timestamp = extract_field_value(entity_event, 'creation_time')
project_id = extract_field_value(entity_event, 'project_id')
project_id = extract_field_value(entity_event, 'project')
return self._create_vertex(entity_event,
stack_name,