From b206d04b36eb66fc69c1ac96c700d19ca0fbbd37 Mon Sep 17 00:00:00 2001 From: franciscovila Date: Tue, 30 May 2023 17:03:07 +0100 Subject: Support INDEX in node filter tosca functions Issue-ID: SDC-4517 Signed-off-by: franciscovila Change-Id: I36e33821ef72c3375d9525513f2394b9b772c696 --- .../be/components/validation/NodeFilterValidator.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'catalog-be/src/main') 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")) { -- cgit 1.2.3-korg