summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimRegisterInfo.java13
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/util/VimManagerUtil.java12
2 files changed, 16 insertions, 9 deletions
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimRegisterInfo.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimRegisterInfo.java
index e5fc132..dd3fa95 100644
--- a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimRegisterInfo.java
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimRegisterInfo.java
@@ -15,6 +15,8 @@
*/
package org.onap.aai.esr.entity.rest;
+import java.util.ArrayList;
+
public class VimRegisterInfo {
private String cloudOwner;
@@ -33,7 +35,7 @@ public class VimRegisterInfo {
private String cloudExtraInfo;
- private VimAuthInfo vimAuthInfo;
+ private ArrayList<VimAuthInfo> vimAuthInfos;
public String getCloudOwner() {
return cloudOwner;
@@ -99,13 +101,12 @@ public class VimRegisterInfo {
this.cloudExtraInfo = cloudExtraInfo;
}
- public VimAuthInfo getVimAuthInfo() {
- return vimAuthInfo;
+ public ArrayList<VimAuthInfo> getVimAuthInfos() {
+ return vimAuthInfos;
}
- public void setVimAuthInfo(VimAuthInfo vimAuthInfo) {
- this.vimAuthInfo = vimAuthInfo;
+ public void setVimAuthInfos(ArrayList<VimAuthInfo> vimAuthInfos) {
+ this.vimAuthInfos = vimAuthInfos;
}
-
}
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 9952fad..de10ac1 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
@@ -16,6 +16,8 @@
package org.onap.aai.esr.util;
+import java.util.ArrayList;
+
import org.onap.aai.esr.common.SystemStatus;
import org.onap.aai.esr.common.SystemType;
import org.onap.aai.esr.entity.aai.EsrSystemInfo;
@@ -41,14 +43,16 @@ public class VimManagerUtil {
cloudRegion.setOwnerDefinedType(vimRegisterInfo.getOwnerDefinedType());
cloudRegion.setCloudExtraInfo(vimRegisterInfo.getCloudExtraInfo());
- esrSystemInfoObj = vimAuthInfo2EsrSystemInfoObj(vimRegisterInfo.getVimAuthInfo());
+ esrSystemInfoObj = vimAuthInfo2EsrSystemInfoObj(vimRegisterInfo.getVimAuthInfos());
esrSystemInfoList = ExtsysUtil.getEsrSystemInfoListFromAuthInfo(esrSystemInfoObj);
cloudRegion.setEsrSystemInfoList(esrSystemInfoList);
return cloudRegion;
}
- private static EsrSystemInfo vimAuthInfo2EsrSystemInfoObj(VimAuthInfo vimAuthInfo) {
+ private static EsrSystemInfo vimAuthInfo2EsrSystemInfoObj(ArrayList<VimAuthInfo> vimAuthInfos) {
EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
+ VimAuthInfo vimAuthInfo = new VimAuthInfo();
+ vimAuthInfo = vimAuthInfos.get(0);
esrSystemInfoObj.setCloudDomain(vimAuthInfo.getCloudDomain());
esrSystemInfoObj.setUserName(vimAuthInfo.getUserName());
esrSystemInfoObj.setPassword(vimAuthInfo.getPassword());
@@ -75,8 +79,10 @@ public class VimManagerUtil {
public static VimRegisterInfo cloudRegion2VimRegisterInfo(CloudRegionDetail cloudRegion) {
VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
VimAuthInfo vimAuthInfo = new VimAuthInfo();
+ ArrayList<VimAuthInfo> vimAuthInfos = new ArrayList<VimAuthInfo>();
vimAuthInfo = authInfo2VimAuthInfo(cloudRegion.getEsrSystemInfoList().getEsrSystemInfo().get(0));
- vimRegisterInfo.setVimAuthInfo(vimAuthInfo);
+ vimAuthInfos.add(vimAuthInfo);
+ vimRegisterInfo.setVimAuthInfos(vimAuthInfos);
vimRegisterInfo.setCloudExtraInfo(cloudRegion.getCloudExtraInfo());
vimRegisterInfo.setCloudOwner(cloudRegion.getCloudOwner());
vimRegisterInfo.setCloudRegionId(cloudRegion.getCloudRegionId());