aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main')
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java b/common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java
index 6ece8a2620..1bd7720e55 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java
@@ -26,8 +26,7 @@ import java.util.List;
import org.onap.aai.domain.yang.GenericVnf;
import org.onap.aai.domain.yang.Pserver;
import org.springframework.beans.factory.annotation.Autowired;
-
-
+import org.springframework.stereotype.Component;
public class AAIValidatorImpl implements AAIValidator {
@@ -50,10 +49,12 @@ public class AAIValidatorImpl implements AAIValidator {
List<Pserver> pservers;
boolean isLocked = false;
pservers = client.getPhysicalServerByVnfId(vnfId);
- for (Pserver pserver : pservers)
- if (pserver.isInMaint())
+ for (Pserver pserver : pservers) {
+ if (pserver.isInMaint()) {
isLocked = true;
-
+ return isLocked;
+ }
+ }
return isLocked;
}