summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model/src/main')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTypeOperation.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTypeOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTypeOperation.java
index 77677a9245..d9318f5510 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTypeOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTypeOperation.java
@@ -83,7 +83,10 @@ public class NodeTypeOperation extends ToscaElementOperation {
nodeType.generateUUID();
+ //Set missing props such as names, default lifecycle state, dates etc...
nodeType = getResourceMetaDataFromResource(nodeType);
+
+ //Set unique ID
String resourceUniqueId = nodeType.getUniqueId();
if (resourceUniqueId == null) {
resourceUniqueId = UniqueIdBuilder.buildResourceUniqueId();
@@ -100,9 +103,11 @@ public class NodeTypeOperation extends ToscaElementOperation {
derivedResources = derivedResourcesResult.left().value();
}
+ //Create Vertext Object and fill according to given NodeType
GraphVertex nodeTypeVertex = new GraphVertex(VertexTypeEnum.NODE_TYPE);
fillToscaElementVertexData(nodeTypeVertex, nodeType, JsonParseFlagEnum.ParseAll);
+ //Create Node Type in Graph
Either<GraphVertex, TitanOperationStatus> createdVertex = titanDao.createVertex(nodeTypeVertex);
if (createdVertex.isRight()) {
TitanOperationStatus status = createdVertex.right().value();