1 package org.openecomp.mso.client.aai;
3 import java.io.IOException;
6 import org.openecomp.aai.domain.yang.GenericVnf;
7 import org.openecomp.aai.domain.yang.Pserver;
8 import org.springframework.beans.factory.annotation.Autowired;
9 import org.springframework.stereotype.Service;
14 public class AAIValidatorImpl implements AAIValidator {
18 protected AAIRestClient client;
20 public AAIRestClient getClient() {
25 public void setClient(AAIRestClient client) {
30 public boolean isPhysicalServerLocked(String vnfId, String transactionLoggingUuid) throws IOException {
31 List<Pserver> pservers;
32 boolean isLocked = false;
33 pservers = client.getPhysicalServerByVnfId(vnfId, transactionLoggingUuid);
34 for (Pserver pserver : pservers)
35 if (pserver.isInMaint())
42 public boolean isVNFLocked(String vnfId, String transactionLoggingUuid) throws Exception {
43 boolean isLocked = false;
44 GenericVnf genericVnf = client.getVnfByName(vnfId, transactionLoggingUuid);
45 if (genericVnf.isInMaint())