aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authorfranciscovila <javier.paradela.vila@est.tech>2023-05-30 17:03:07 +0100
committerMichael Morris <michael.morris@est.tech>2023-06-02 14:29:33 +0000
commitb206d04b36eb66fc69c1ac96c700d19ca0fbbd37 (patch)
tree54bea30b1f70670b5763f1499eed8af55a45cd6d /catalog-be/src/main
parent38812c3d47f0426f1c4108145b696441da5a5c1f (diff)
Support INDEX in node filter tosca functions
Issue-ID: SDC-4517 Signed-off-by: franciscovila <javier.paradela.vila@est.tech> Change-Id: I36e33821ef72c3375d9525513f2394b9b772c696
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java
index 30fe3dcad1..a0716fe4ce 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java
@@ -415,6 +415,22 @@ public class NodeFilterValidator {
}
return null;
}
+ else {
+ if (null != ((PropertyDefinition) sourcePropDefinition).getSchemaProperty()){
+ if (((PropertyDefinition) sourcePropDefinition).getSchemaProperty().getType().equals(targetType)) {
+ if (TYPES_WITH_SCHEMA.contains(((PropertyDefinition) sourcePropDefinition).getSchemaProperty().getType())) {
+ final String sourceSchemaType = sourcePropDefinition.getSchemaType();
+ final String targetSchemaType = targetPropDefinition.getSchemaType();
+ if (sourceSchemaType != null && !sourceSchemaType.equals(targetSchemaType)) {
+ return componentsUtils.getResponseFormat(ActionStatus.SOURCE_TARGET_SCHEMA_MISMATCH,
+ targetPropDefinition.getName(), targetSchemaType, sourcePropDefinition.getName(),
+ sourceSchemaType);
+ }
+ }
+ return null;
+ }
+ }
+ }
}
else {
if (sourceType.equalsIgnoreCase("integer")) {