Fix GET ALL for vertices created asynchronously 11/51211/1
authorRavi Geda <gravik@amdocs.com>
Tue, 12 Jun 2018 13:54:41 +0000 (14:54 +0100)
committerRavi Geda <gravik@amdocs.com>
Tue, 12 Jun 2018 13:54:41 +0000 (14:54 +0100)
Vertices created asynchronously are not being returned in the GET ALL
vertices. This commit addresses this problem

Change-Id: I83ee7a59dc2005447706fa0a43ba2c9d2f0e4592
Issue-ID: AAI-1223
Signed-off-by: Ravi Geda <gravik@amdocs.com>
src/main/java/org/onap/crud/service/CrudAsyncGraphDataService.java

index dc30a4e..5d37acb 100644 (file)
@@ -202,6 +202,7 @@ public class CrudAsyncGraphDataService extends AbstractGraphDataService {
     public String addVertex(String version, String type, VertexPayload payload) throws CrudException {
         // Validate the incoming payload
         Vertex vertex = OxmModelValidator.validateIncomingUpsertPayload(null, version, type, payload.getProperties());
+        vertex.getProperties().put(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
         // Create graph request event
         GraphEvent event = GraphEvent.builder(GraphEventOperation.CREATE)
                 .vertex(GraphEventVertex.fromVertex(vertex, version)).build();