summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimAuthInfo.java10
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/util/VimManagerUtil.java2
-rw-r--r--esr-mgr/src/test/java/org/onap/aai/esr/util/VimManagerUtilTest.java4
3 files changed, 16 insertions, 0 deletions
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimAuthInfo.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimAuthInfo.java
index c0dd349..4bd251f 100644
--- a/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimAuthInfo.java
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/rest/VimAuthInfo.java
@@ -25,6 +25,8 @@ public class VimAuthInfo {
private String authUrl;
+ private String defaultTenant;
+
private String sslCacert;
private Boolean sslInsecure;
@@ -77,4 +79,12 @@ public class VimAuthInfo {
this.sslInsecure = sslInsecure;
}
+ public String getDefaultTenant() {
+ return defaultTenant;
+ }
+
+ public void setDefaultTenant(String defaultTenant) {
+ this.defaultTenant = defaultTenant;
+ }
+
}
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 2a390d9..88cceea 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
@@ -59,6 +59,7 @@ public class VimManagerUtil {
esrSystemInfoObj.setServiceUrl(vimAuthInfo.getAuthUrl());
esrSystemInfoObj.setSslCassert(vimAuthInfo.getSslCacert());
esrSystemInfoObj.setSslInsecure(vimAuthInfo.getSslInsecure());
+ esrSystemInfoObj.setDefaultTenant(vimAuthInfo.getDefaultTenant());
esrSystemInfoObj.setEsrSystemInfoId(extsysUtil.generateId());
esrSystemInfoObj.setSystemType(SystemType.VIM.toString());
// esrSystemInfoObj.setSystemStatus(SystemStatus.normal.toString());
@@ -73,6 +74,7 @@ public class VimManagerUtil {
vimAuthInfo.setSslCacert(authInfo.getSslCassert());
vimAuthInfo.setSslInsecure(authInfo.getSslInsecure());
vimAuthInfo.setUserName(authInfo.getUserName());
+ vimAuthInfo.setDefaultTenant(authInfo.getDefaultTenant());
return vimAuthInfo;
}
diff --git a/esr-mgr/src/test/java/org/onap/aai/esr/util/VimManagerUtilTest.java b/esr-mgr/src/test/java/org/onap/aai/esr/util/VimManagerUtilTest.java
index 7ec84ed..647c952 100644
--- a/esr-mgr/src/test/java/org/onap/aai/esr/util/VimManagerUtilTest.java
+++ b/esr-mgr/src/test/java/org/onap/aai/esr/util/VimManagerUtilTest.java
@@ -41,6 +41,7 @@ public class VimManagerUtilTest {
vimAuthInfo.setSslCacert("test");
vimAuthInfo.setSslInsecure(true);
vimAuthInfo.setUserName("onap");
+ vimAuthInfo.setDefaultTenant("admin");
vimRegisterInfo.setCloudExtraInfo("{}");
vimRegisterInfo.setCloudOwner("zte");
vimRegisterInfo.setCloudRegionId("RegionOne");
@@ -73,6 +74,7 @@ public class VimManagerUtilTest {
+ "\"ssl-cassert\":\"test\","
+ "\"ssl-insecure\":true,"
+ "\"cloud-domain\":\"default\","
+ + "\"default-tenant\":\"admin\","
+ "\"system-status\":\"normal\"}]}}";
assertEquals(expectResult, cloudRegionDetailStr);
}
@@ -96,6 +98,7 @@ public class VimManagerUtilTest {
+ "\"service-url\":\"http://10.11.22.33:5000/v3\","
+ "\"user-name\":\"onap\","
+ "\"password\":\"123456\","
+ + "\"default-tenant\":\"admin\","
+ "\"system-type\":\"VIM\","
+ "\"ssl-cassert\":\"test\","
+ "\"ssl-insecure\":true,"
@@ -118,6 +121,7 @@ public class VimManagerUtilTest {
+ "\"userName\":\"onap\","
+ "\"password\":\"123456\","
+ "\"authUrl\":\"http://10.11.22.33:5000/v3\","
+ + "\"defaultTenant\":\"admin\","
+ "\"sslCacert\":\"test\","
+ "\"sslInsecure\":true}]}";
assertEquals(expectResult, vimRegisterInfoStr);