diff options
Diffstat (limited to 'esr-mgr/src/main/java/org/onap')
6 files changed, 10 insertions, 21 deletions
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java b/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java index f0b6097..0ac6d7a 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java @@ -73,8 +73,8 @@ public class ExtsysAppConfiguration extends Configuration { } @JsonProperty - public String setMsbDiscoveryIp() { - return msbDiscoveryIp; + public void setMsbDiscoveryIp(String discoveryIp) { + this.msbDiscoveryIp = discoveryIp; } @JsonProperty diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/util/EmsManagerUtil.java b/esr-mgr/src/main/java/org/onap/aai/esr/util/EmsManagerUtil.java index 916c9e7..238683d 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/util/EmsManagerUtil.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/util/EmsManagerUtil.java @@ -25,13 +25,14 @@ import org.onap.aai.esr.entity.rest.EmsRegisterInfo; import org.onap.aai.esr.entity.rest.FtpAddr; public class EmsManagerUtil { + private static ExtsysUtil extsysUtil = new ExtsysUtil(); public EsrEmsDetail emsRegisterInfo2EsrEms(EmsRegisterInfo emsRegisterInfo) { EsrEmsDetail esrEms = new EsrEmsDetail(); esrEms.setEmsId(ExtsysUtil.generateId()); ArrayList<EsrSystemInfo> authInfos = new ArrayList<EsrSystemInfo>(); authInfos = getAuthInfosFromRegisterData(emsRegisterInfo); - esrEms.setEsrSystemInfoList(ExtsysUtil.getEsrSystemInfoListFromAuthInfoList(authInfos)); + esrEms.setEsrSystemInfoList(extsysUtil.getEsrSystemInfoListFromAuthInfoList(authInfos)); return esrEms; } diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/util/ExtsysUtil.java b/esr-mgr/src/main/java/org/onap/aai/esr/util/ExtsysUtil.java index d0ba1d8..8e1d323 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/util/ExtsysUtil.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/util/ExtsysUtil.java @@ -20,25 +20,18 @@ import com.google.gson.Gson; //import org.slf4j.Logger; //import org.slf4j.LoggerFactory; -import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.Date; import java.util.UUID; import org.onap.aai.esr.entity.aai.EsrSystemInfo; import org.onap.aai.esr.entity.aai.EsrSystemInfoList; public class ExtsysUtil { -// private final static Logger logger = LoggerFactory.getLogger(ExtsysUtil.class); public static String generateId() { return UUID.randomUUID().toString(); } - public static boolean isNotEmpty(String str) { - return str != null && !"".equals(str) && str.length() > 0; - } - /** * change object to str. */ @@ -51,12 +44,7 @@ public class ExtsysUtil { } } - public static String getNowTime() { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - return sdf.format(new Date()); - } - - public static EsrSystemInfoList getEsrSystemInfoListFromAuthInfo(EsrSystemInfo esrSystemInfoObj) { + public EsrSystemInfoList getEsrSystemInfoListFromAuthInfo(EsrSystemInfo esrSystemInfoObj) { EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList(); ArrayList<EsrSystemInfo> esrSystemInfo = new ArrayList<EsrSystemInfo>(); esrSystemInfo.add(esrSystemInfoObj); @@ -64,7 +52,7 @@ public class ExtsysUtil { return esrSystemInfoList; } - public static EsrSystemInfoList getEsrSystemInfoListFromAuthInfoList(ArrayList<EsrSystemInfo> esrSystemInfo) { + public EsrSystemInfoList getEsrSystemInfoListFromAuthInfoList(ArrayList<EsrSystemInfo> esrSystemInfo) { EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList(); esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);; return esrSystemInfoList; diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/util/VimManagerUtil.java b/esr-mgr/src/main/java/org/onap/aai/esr/util/VimManagerUtil.java index 6393f12..2670866 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/util/VimManagerUtil.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/util/VimManagerUtil.java @@ -27,6 +27,7 @@ import org.onap.aai.esr.entity.rest.VimRegisterInfo; public class VimManagerUtil { + private static ExtsysUtil extsysUtil = new ExtsysUtil(); public CloudRegionDetail vimRegisterInfo2CloudRegion(VimRegisterInfo vimRegisterInfo) { CloudRegionDetail cloudRegion = new CloudRegionDetail(); @@ -44,7 +45,7 @@ public class VimManagerUtil { esrSystemInfoObj = vimAuthInfo2EsrSystemInfoObj(vimRegisterInfo.getVimAuthInfos()); esrSystemInfoObj.setSystemStatus(vimRegisterInfo.getStatus()); - esrSystemInfoList = ExtsysUtil.getEsrSystemInfoListFromAuthInfo(esrSystemInfoObj); + esrSystemInfoList = extsysUtil.getEsrSystemInfoListFromAuthInfo(esrSystemInfoObj); cloudRegion.setEsrSystemInfoList(esrSystemInfoList); return cloudRegion; } diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/util/VnfmManagerUtil.java b/esr-mgr/src/main/java/org/onap/aai/esr/util/VnfmManagerUtil.java index ca6babd..9c1a353 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/util/VnfmManagerUtil.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/util/VnfmManagerUtil.java @@ -22,6 +22,7 @@ import org.onap.aai.esr.entity.aai.EsrVnfmDetail; import org.onap.aai.esr.entity.rest.VnfmRegisterInfo; public class VnfmManagerUtil { + private static ExtsysUtil extsysUtil = new ExtsysUtil(); public EsrVnfmDetail vnfmRegisterInfo2EsrVnfm(VnfmRegisterInfo vnfmRegisterInfo) { EsrVnfmDetail esrVnfm = new EsrVnfmDetail(); @@ -32,7 +33,7 @@ public class VnfmManagerUtil { esrVnfm.setVimId(vnfmRegisterInfo.getVimId()); esrVnfm.setVnfmId(ExtsysUtil.generateId()); authInfo = getAuthInfoFromVnfmRegisterInfo(vnfmRegisterInfo); - esrSystemInfo = ExtsysUtil.getEsrSystemInfoListFromAuthInfo(authInfo); + esrSystemInfo = extsysUtil.getEsrSystemInfoListFromAuthInfo(authInfo); esrVnfm.setEsrSystemInfoList(esrSystemInfo); return esrVnfm; } diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpatySdncWrapper.java b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpatySdncWrapper.java index effc244..0aa21da 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpatySdncWrapper.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/ThirdpatySdncWrapper.java @@ -22,12 +22,10 @@ import javax.ws.rs.core.Response; import org.onap.aai.esr.entity.aai.EsrSystemInfo; import org.onap.aai.esr.entity.aai.EsrThirdpartySdncDetail; import org.onap.aai.esr.entity.aai.EsrThirdpartySdncList; -import org.onap.aai.esr.entity.aai.EsrVnfmDetail; import org.onap.aai.esr.entity.rest.CommonRegisterResponse; import org.onap.aai.esr.entity.rest.ThirdpartySdncRegisterInfo; import org.onap.aai.esr.externalservice.aai.ExternalSystemProxy; import org.onap.aai.esr.util.ThirdpartySdncManagerUtil; -import org.onap.aai.esr.util.VnfmManagerUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; |