summaryrefslogtreecommitdiffstats
path: root/catalog-model
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2020-08-28 11:50:52 +0100
committerSébastien Determe <sebastien.determe@intl.att.com>2020-09-07 07:11:49 +0000
commit798f858d18403a31a4d464b07bb1a9a74666c9c7 (patch)
tree9b5e2a6e59dbb803fb0bdcafd3fff6ae08c412f2 /catalog-model
parentc572ed8873bee57ad925fb231464efbca98a8007 (diff)
Update node_filter capabilities
Issue-ID: SDC-3265 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: Ib2dbd299ff5fc336258bf29a303210eacfd984cf
Diffstat (limited to 'catalog-model')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeFilterOperation.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeFilterOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeFilterOperation.java
index 1bad8b097f..050709d6d5 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeFilterOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeFilterOperation.java
@@ -143,16 +143,29 @@ public class NodeFilterOperation extends BaseOperation {
}
public Either<CINodeFilterDataDefinition, StorageOperationStatus> updateProperties(
- final String serviceId, final String componentInstanceId,
+ final String componentId, final String componentInstanceId,
final CINodeFilterDataDefinition nodeFilterDataDefinition,
final List<RequirementNodeFilterPropertyDataDefinition> requirementNodeFilterPropertyDataDefinition) {
- ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> properties =
+ final ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> properties =
nodeFilterDataDefinition.getProperties();
properties.getListToscaDataDefinition().clear();
properties.getListToscaDataDefinition().addAll(requirementNodeFilterPropertyDataDefinition);
nodeFilterDataDefinition.setProperties(properties);
- return addOrUpdateNodeFilter(true, serviceId, componentInstanceId, nodeFilterDataDefinition);
+ return addOrUpdateNodeFilter(true, componentId, componentInstanceId, nodeFilterDataDefinition);
+ }
+
+ public Either<CINodeFilterDataDefinition, StorageOperationStatus> updateCapabilities(
+ final String componentId, final String componentInstanceId,
+ final CINodeFilterDataDefinition nodeFilterDataDefinition,
+ final List<RequirementNodeFilterCapabilityDataDefinition> requirementNodeFilterCapabilityDataDefinitions) {
+
+ final ListDataDefinition<RequirementNodeFilterCapabilityDataDefinition> capabilities =
+ nodeFilterDataDefinition.getCapabilities();
+ capabilities.getListToscaDataDefinition().clear();
+ capabilities.getListToscaDataDefinition().addAll(requirementNodeFilterCapabilityDataDefinitions);
+ nodeFilterDataDefinition.setCapabilities(capabilities);
+ return addOrUpdateNodeFilter(true, componentId, componentInstanceId, nodeFilterDataDefinition);
}
public Either<CINodeFilterDataDefinition, StorageOperationStatus> updateNodeFilter(final String serviceId,
@@ -201,7 +214,6 @@ public class NodeFilterOperation extends BaseOperation {
VertexTypeEnum.NODE_FILTER_TEMPLATE, toscaDataList, JsonPresentationFields.UNIQUE_ID);
}
}
-
}