diff options
author | Michael Lando <ml636r@att.com> | 2017-09-14 03:01:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-14 03:01:34 +0000 |
commit | 67b4ec2d8d3c3db4758a73e81378d01787eb94a1 (patch) | |
tree | afc3eb63e6a7983d18ca13b2ac38cc96babf4b85 /catalog-model/src | |
parent | bf85f501f2492cbac7a0d5a5082f6224a0ae2a67 (diff) | |
parent | 8d530f3f8918274ad220d2ab66a5ff493de22096 (diff) |
Merge "Fix - Blockstorage and Compute in VF linking"
Diffstat (limited to 'catalog-model/src')
-rw-r--r-- | catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/NodeTypeOperation.java | 14 |
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 27b9ba2d4d..d986d77450 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; @@ -469,6 +470,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()) { |