aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org
diff options
context:
space:
mode:
authorsarada prasad sahoo <sarada.prasad.sahoo@huawei.com>2019-04-23 10:16:13 +0530
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-05-01 10:56:28 +0000
commit2f1d6225bef920a217a25441b7dcaeb457113dc5 (patch)
tree288542e28cd4661ecc63630278801d65ffe04464 /catalog-be/src/main/java/org
parent3f1f8e80daac1f28adb53a96e211170b5b45dda6 (diff)
enabled NFV Affinity and Anti-affinity Rules1.4.0
Fix the issue tosca.policies.nfv.AffinityRule and tosca.policies.nfv.AntiAffinityRule which was getting failed at first attempt with 404 error Change-Id: I6630193343729051b41e4eb880832dee85b098ee Issue-ID: SDC-2231 Signed-off-by: sarada prasad sahoo <sarada.prasad.sahoo@huawei.com>
Diffstat (limited to 'catalog-be/src/main/java/org')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java
index 5aedb4ee0e..edd3b936a2 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java
@@ -97,9 +97,6 @@ public class PolicyTypeImportManager {
if (result.isLeft()) {
for (String targetId : policyType.getTargets()) {
boolean isValid = toscaOperationFacade.getLatestByToscaResourceName(targetId).isLeft();
- if (!isValid) {
- isValid = groupOperation.isGroupExist(targetId, false);
- }
if (!isValid) { // check if it is a groupType
final Either<GroupTypeDefinition, StorageOperationStatus> groupTypeFound = groupTypeOperation
@@ -108,6 +105,10 @@ public class PolicyTypeImportManager {
}
if (!isValid) {
+ isValid = groupOperation.isGroupExist(targetId, false);
+ }
+
+ if (!isValid) {
ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.TARGETS_NON_VALID, policyType.getType(), targetId);
result = Either.right(responseFormat);
break;