diff options
author | 2017-10-13 17:37:48 +0800 | |
---|---|---|
committer | 2017-10-13 17:37:48 +0800 | |
commit | 9a82dd739ab46624dcd48d1d794f39cbbdd82306 (patch) | |
tree | 4e8061c503c562d166d87cbcdce63079544da4f4 /esr-mgr/src | |
parent | 0980560f94390708f187cf89476fad8d8427f839 (diff) |
Input Tenant to A&AI while register VIM.
Change-Id: I62498d12592e1b96fbd1b00465bde6248fca747e
Issue-ID: AAI-435
Signed-off-by: lizi <li.zi30@zte.com.cn>
Diffstat (limited to 'esr-mgr/src')
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); |