diff --git a/vitrage/datasources/heat/stack/driver.py b/vitrage/datasources/heat/stack/driver.py index 9b298291a..4de9d1d1b 100644 --- a/vitrage/datasources/heat/stack/driver.py +++ b/vitrage/datasources/heat/stack/driver.py @@ -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']) diff --git a/vitrage/datasources/heat/stack/transformer.py b/vitrage/datasources/heat/stack/transformer.py index b24f6d3e3..6497f0f2a 100644 --- a/vitrage/datasources/heat/stack/transformer.py +++ b/vitrage/datasources/heat/stack/transformer.py @@ -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,