Merge "bug fix for evaluator"

This commit is contained in:
Jenkins 2016-03-06 10:47:01 +00:00 committed by Gerrit Code Review
commit 7091d3cad3
2 changed files with 3 additions and 5 deletions

View File

@ -256,11 +256,9 @@ class Processor(processor.ProcessorBase):
def _calculate_aggregated_state(self, vertex, action):
LOG.debug("calculate event state")
if action == EventAction.UPDATE_ENTITY or \
action == EventAction.DELETE_ENTITY:
if action in [EventAction.UPDATE_ENTITY, EventAction.DELETE_ENTITY,
EventAction.CREATE_ENTITY]:
graph_vertex = self.entity_graph.get_vertex(vertex.vertex_id)
elif action == EventAction.CREATE_ENTITY:
graph_vertex = None
elif action == EventAction.END_MESSAGE:
return None
else:

View File

@ -167,7 +167,7 @@ class ZoneTransformer(transformer_base.TransformerBase):
vitrage_id,
entity_id=host_name,
entity_category=EntityCategory.RESOURCE,
entity_type=self.ZONE_TYPE,
entity_type=EntityType.NOVA_HOST,
entity_state=host_state,
update_timestamp=timestamp)