aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/main/java
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2022-08-05 14:19:19 +0200
committerLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2022-08-05 14:19:57 +0200
commitb0f785e99096f230281d17e0fa89c21aca00fbac (patch)
treeecaa9d853037faa87310ab8c6562a3454e687179 /mso-api-handlers/mso-api-handler-infra/src/main/java
parent0d39f06a571e48ee3c8a05aca0c244d2595468e8 (diff)
parent2ef42cd813c85015322da874de668b79e790c5eb (diff)
Merge branch 'recursive-orch'
Issue-ID: SO-3980 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: Ie0cd0f973800196d5cb1e038db4a49208a6c4a3b
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java
index 3b87d91d3f..801065fdde 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java
@@ -185,7 +185,10 @@ public class RelatedInstancesValidation implements ValidationRule {
&& !(requestScope.equalsIgnoreCase(ModelType.instanceGroup.toString())
&& action == Action.createInstance)) {
isRelatedServiceInstancePresent = true;
- if (!relatedInstance.getInstanceId().equals(sir.getServiceInstanceId())) {
+ // InstanceDirection.source indicates child service and this validation is for all
+ // except child services.
+ if (!InstanceDirection.source.equals(relatedInstance.getInstanceDirection())
+ && !relatedInstance.getInstanceId().equals(sir.getServiceInstanceId())) {
throw new ValidationException(
"serviceInstanceId matching the serviceInstanceId in request URI");
}