aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2018-11-15 14:25:56 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2018-11-15 14:26:04 +0800
commitea038a991d222393c93f319cfb759e2067a48539 (patch)
treefda97f0f40da2a1b1603bae79858665f32f9af2b
parent9c8d55e99ad3f20bdf6ea6a5cdc023436ba16a2d (diff)
Support OTN Domain Management
Change-Id: I6c3cb7f2fcb6432857346281cfaab3a2e11724f8 Issue-ID: USECASEUI-178 Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java5
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java9
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/sotn/SOTNService.java2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/sotn/impl/SOTNServiceImpl.java20
4 files changed, 36 insertions, 0 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java b/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java
index 976942b6..d787f87d 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java
@@ -94,6 +94,11 @@ public class SotnController {
return sotnService.getHostUrl(aaiId);
}
+ @RequestMapping(value = {"/getExtAaiId/{aaiId:.+}"}, method = RequestMethod.GET)
+ public String getExtAaiId(@PathVariable(value="aaiId") String aaiId){
+ return sotnService.getExtAaiId(aaiId);
+ }
+
@RequestMapping(value = {"/createHostUrl/{aaiId:.+}"}, method = RequestMethod.PUT)
public String createHostUrl(HttpServletRequest request,@PathVariable(value="aaiId") String aaiId){
return sotnService.createHostUrl(request, aaiId);
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
index 84b56222..81ee6efe 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
@@ -153,6 +153,15 @@ public interface AAIService {
"Authorization: Basic QUFJOkFBSQ==",
"Accept: application/json"
})
+ @GET("/api/aai-network/v13/ext-aai-networks/ext-aai-network/{aai-id}")
+ Call<ResponseBody> getExtAaiId(@Path("aai-id") String aaiId);
+
+ @Headers({
+ "X-TransactionId: 7777",
+ "X-FromAppId: uui",
+ "Authorization: Basic QUFJOkFBSQ==",
+ "Accept: application/json"
+ })
@GET("/api/aai-network/v13/ext-aai-networks/ext-aai-network/{aai-id}/esr-system-info")
Call<ResponseBody> getHostUrl(@Path("aai-id") String aaiId);
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/sotn/SOTNService.java b/server/src/main/java/org/onap/usecaseui/server/service/sotn/SOTNService.java
index 3bef80b5..08094a65 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/sotn/SOTNService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/sotn/SOTNService.java
@@ -33,6 +33,8 @@ public interface SOTNService {
public String getHostUrl(String aaiId);
+ public String getExtAaiId(String aaiId);
+
public String createHostUrl(HttpServletRequest request,String aaiId);
public String createTopoNetwork(HttpServletRequest request,String networkId);
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/sotn/impl/SOTNServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/sotn/impl/SOTNServiceImpl.java
index a65aa90a..a70bb07e 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/sotn/impl/SOTNServiceImpl.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/sotn/impl/SOTNServiceImpl.java
@@ -157,6 +157,26 @@ public class SOTNServiceImpl implements SOTNService{
}
@Override
+ public String getExtAaiId(String aaiId) {
+ String result="";
+ try {
+ logger.info("aai getExtAaiId is starting!");
+ Response<ResponseBody> response = this.aaiService.getExtAaiId(aaiId).execute();
+ logger.info("aai getExtAaiId has finished!");
+ if (response.isSuccessful()) {
+ result=new String(response.body().bytes());
+ } else {
+ logger.info(String.format("Can not get getExtAaiId[code=%s, message=%s]", response.code(), response.message()));
+ result=Constant.CONSTANT_FAILED;
+ }
+ } catch (IOException e) {
+ logger.error("getExtAaiId occur exception:"+e);
+ result=Constant.CONSTANT_FAILED;;
+ }
+ return result;
+ }
+
+ @Override
public String createHostUrl(HttpServletRequest request,String aaiId) {
String result = "";
try {