aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main/java/org
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2017-09-13 17:33:39 +0300
committerTal Gitelman <tg851x@intl.att.com>2017-09-13 17:33:39 +0300
commit8d530f3f8918274ad220d2ab66a5ff493de22096 (patch)
treebdd711bd5433668d0883191aeb732feefb25f7b5 /catalog-model/src/main/java/org
parent45e38d57442499a535f2915aab95a057e106d79f (diff)
Fix - Blockstorage and Compute in VF linking
Change-Id: I5b79be033ad547b4d3f4d5443bd2b3a74dff6242 Issue-ID:SDC-267 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'catalog-model/src/main/java/org')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTypeOperation.java14
1 files changed, 14 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 d52aa038a3..71e2010ccd 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
@@ -36,6 +36,7 @@ import org.openecomp.sdc.be.datatypes.elements.ListRequirementDataDefinition;
import org.openecomp.sdc.be.datatypes.elements.MapPropertiesDataDefinition;
import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
+import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
import org.openecomp.sdc.be.model.ComponentParametersView;
import org.openecomp.sdc.be.model.DerivedNodeTypeResolver;
@@ -468,6 +469,19 @@ public class NodeTypeOperation extends ToscaElementOperation {
ToscaDataDefinition.mergeDataMaps(capabiltiesAll, capabilties);
}
+
+ capabiltiesAll.values().forEach(l -> {
+ l.getListToscaDataDefinition().forEach(c -> {
+ List<String> capabilitySources = c.getCapabilitySources();
+ if ( capabilitySources == null ){
+ capabilitySources = new ArrayList<>();
+ }
+ capabilitySources.add((String) nodeType.getMetadataValue(JsonPresentationFields.TOSCA_RESOURCE_NAME));
+ c.setCapabilitySources(capabilitySources);
+ });
+ });
+
+
if (!capabiltiesAll.isEmpty()) {
Either<GraphVertex, StorageOperationStatus> assosiateElementToData = assosiateElementToData(nodeTypeVertex, VertexTypeEnum.CAPABILTIES, EdgeLabelEnum.CAPABILITIES, capabiltiesAll);
if (assosiateElementToData.isRight()) {