Enrich aodh sync event so it can be connected to the graph
Change-Id: I56c9f31c1160cb635e58b5ebd3001e8b3f7b0381
This commit is contained in:
parent
b7775ca30d
commit
d1e1dcb654
@ -72,7 +72,7 @@ class AodhTransformer(BaseAlarmTransformer):
|
||||
metadata=metadata)
|
||||
|
||||
def _create_neighbors(self, entity_event):
|
||||
graph_neighbors = entity_event[self.QUERY_RESULT]
|
||||
graph_neighbors = entity_event.get(self.QUERY_RESULT, [])
|
||||
result = []
|
||||
for vertex in graph_neighbors:
|
||||
edge = graph_utils.create_edge(
|
||||
@ -105,5 +105,5 @@ class AodhTransformer(BaseAlarmTransformer):
|
||||
def get_enrich_query(event):
|
||||
affected_resource_id = event.get(AodhProps.RESOURCE_ID, None)
|
||||
if not affected_resource_id:
|
||||
return {}
|
||||
return None
|
||||
return {VProps.ID: affected_resource_id}
|
||||
|
Loading…
x
Reference in New Issue
Block a user