summaryrefslogtreecommitdiffstats
path: root/catalog-model
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2020-06-17 14:20:46 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-06-24 08:07:08 +0000
commit7027b33eb41947e6799392d392283b09110158d1 (patch)
tree8b65f36d70c4f69002d9a65a90d4a4d5ea0a4ae8 /catalog-model
parentcb30f3a566b73c78c3ea666acfcd3f288098684a (diff)
Add Node Filter Business Logic Unit Tests
Issue-ID: SDC-3125 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: I80c755f4fffa813396ceb85c6aa7fde5b32590cd
Diffstat (limited to 'catalog-model')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeFilterOperation.java12
1 files changed, 7 insertions, 5 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 7ed7818ab4..5f0284a159 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
@@ -97,18 +97,20 @@ public class NodeFilterOperation extends BaseOperation {
return addOrUpdateNodeFilter(true, serviceId, componentInstanceId, nodeFilterDataDefinition);
}
- public Either<CINodeFilterDataDefinition, StorageOperationStatus> addNewProperty(String serviceId,
- String componentInstanceId, CINodeFilterDataDefinition nodeFilterDataDefinition,
- RequirementNodeFilterPropertyDataDefinition requirementNodeFilterPropertyDataDefinition) {
+ public Either<CINodeFilterDataDefinition, StorageOperationStatus> addNewProperty(
+ final String componentId, final String componentInstanceId,
+ final CINodeFilterDataDefinition nodeFilterDataDefinition,
+ final RequirementNodeFilterPropertyDataDefinition requirementNodeFilterPropertyDataDefinition) {
+
ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> properties =
- nodeFilterDataDefinition.getProperties();
+ nodeFilterDataDefinition.getProperties();
if (properties == null) {
properties = new ListDataDefinition<>();
nodeFilterDataDefinition.setProperties(properties);
}
properties.getListToscaDataDefinition().add(requirementNodeFilterPropertyDataDefinition);
nodeFilterDataDefinition.setProperties(properties);
- return addOrUpdateNodeFilter(true, serviceId, componentInstanceId, nodeFilterDataDefinition);
+ return addOrUpdateNodeFilter(true, componentId, componentInstanceId, nodeFilterDataDefinition);
}
public Either<CINodeFilterDataDefinition, StorageOperationStatus> updateProperties(String serviceId,