aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml2
-rw-r--r--server/pom.xml2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/config/AAIClientConfig.java12
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImpl.java6
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/intent/IntentAaiClient.java (renamed from server/src/main/java/org/onap/usecaseui/server/service/intent/IntentAaiService.java)2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImpl.java36
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/GeneralConvertImpl.java8
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceConvert.java20
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImpl.java38
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceConvert.java6
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImpl.java16
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/slicingdomain/aai/AAISliceClient.java (renamed from server/src/main/java/org/onap/usecaseui/server/service/slicingdomain/aai/AAISliceService.java)4
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImplIntegrationTest.java6
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImplTest.java14
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImplTest.java40
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceIntegrationTest.java6
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/GeneralConvertImplTest.java16
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceConvertTest.java38
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImplTest.java76
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceConvertTest.java14
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImplTest.java18
-rw-r--r--standalone/pom.xml4
-rw-r--r--version.properties2
23 files changed, 191 insertions, 195 deletions
diff --git a/pom.xml b/pom.xml
index 37afd826..9870c192 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.onap.usecase-ui.server</groupId>
<artifactId>usecase-ui-server-parent</artifactId>
- <version>15.0.1-SNAPSHOT</version>
+ <version>15.0.3-SNAPSHOT</version>
<packaging>pom</packaging>
<name>usecase-ui-server-parent</name>
<description>parent project for usecase-ui server</description>
diff --git a/server/pom.xml b/server/pom.xml
index 3ff2bdd7..7d8207eb 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -19,7 +19,7 @@
<parent>
<groupId>org.onap.usecase-ui.server</groupId>
<artifactId>usecase-ui-server-parent</artifactId>
- <version>15.0.1-SNAPSHOT</version>
+ <version>15.0.3-SNAPSHOT</version>
</parent>
<artifactId>usecase-ui-server</artifactId>
diff --git a/server/src/main/java/org/onap/usecaseui/server/config/AAIClientConfig.java b/server/src/main/java/org/onap/usecaseui/server/config/AAIClientConfig.java
index 7b1c5a4a..545f1582 100644
--- a/server/src/main/java/org/onap/usecaseui/server/config/AAIClientConfig.java
+++ b/server/src/main/java/org/onap/usecaseui/server/config/AAIClientConfig.java
@@ -18,9 +18,9 @@ package org.onap.usecaseui.server.config;
import java.io.IOException;
-import org.onap.usecaseui.server.service.intent.IntentAaiService;
+import org.onap.usecaseui.server.service.intent.IntentAaiClient;
import org.onap.usecaseui.server.service.lcm.domain.aai.AAIClient;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -75,12 +75,12 @@ public class AAIClientConfig {
}
@Bean
- AAISliceService aaiSliceService(Retrofit retrofit) {
- return retrofit.create(AAISliceService.class);
+ AAISliceClient aaiSliceClient(Retrofit retrofit) {
+ return retrofit.create(AAISliceClient.class);
}
@Bean
- IntentAaiService intentAaiService(Retrofit retrofit) {
- return retrofit.create(IntentAaiService.class);
+ IntentAaiClient intentAaiClient(Retrofit retrofit) {
+ return retrofit.create(IntentAaiClient.class);
}
}
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImpl.java
index 2771d7d9..5f2e62c1 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImpl.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImpl.java
@@ -54,7 +54,7 @@ import org.onap.usecaseui.server.constant.nsmf.NsmfParamConstant;
import org.onap.usecaseui.server.service.csmf.SlicingService;
import org.onap.usecaseui.server.service.csmf.config.SlicingProperties;
import org.onap.usecaseui.server.service.lcm.ServiceLcmService;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceInstance;
import org.onap.usecaseui.server.service.slicingdomain.so.SOSliceService;
import org.onap.usecaseui.server.service.slicingdomain.so.bean.SOOperation;
@@ -69,7 +69,7 @@ public class SlicingServiceImpl implements SlicingService {
private static final Gson gson = new Gson();
private final ServiceLcmService serviceLcmService;
- private final AAISliceService aaiSliceService;
+ private final AAISliceClient aaiSliceClient;
private final SOSliceService soSliceService;
private final SlicingProperties slicingProperties;
@@ -193,7 +193,7 @@ public class SlicingServiceImpl implements SlicingService {
try {
// TODO
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.listOrders(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G).execute();
if (response.isSuccessful()) {
log.info("querySlicingOrderList: listService reponse is:{}", response.body());
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/intent/IntentAaiService.java b/server/src/main/java/org/onap/usecaseui/server/service/intent/IntentAaiClient.java
index 29551422..7ef6bfaa 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/intent/IntentAaiService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/intent/IntentAaiClient.java
@@ -26,7 +26,7 @@ import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
-public interface IntentAaiService {
+public interface IntentAaiClient {
@GET("/aai/v24/business/customers/customer/IBNCustomer/service-subscriptions/service-subscription/IBN/service-instances/service-instance/{resource-service-id}?depth=all")
Call<JSONObject> getInstanceNetworkInfo(@Path("resource-service-id") String resourceServiceId);
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImpl.java
index 7b87af9e..f8fc7249 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImpl.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImpl.java
@@ -36,7 +36,7 @@ import org.onap.usecaseui.server.bean.intent.IntentInstance;
import org.onap.usecaseui.server.bean.nsmf.common.ServiceResult;
import org.onap.usecaseui.server.constant.IntentConstant;
import org.onap.usecaseui.server.service.csmf.SlicingService;
-import org.onap.usecaseui.server.service.intent.IntentAaiService;
+import org.onap.usecaseui.server.service.intent.IntentAaiClient;
import org.onap.usecaseui.server.service.intent.IntentInstanceService;
import org.onap.usecaseui.server.service.intent.IntentSoService;
import org.onap.usecaseui.server.service.intent.config.IntentProperties;
@@ -67,15 +67,15 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
private static final int MIN_BANDWIDTH = 100;
private final SlicingService slicingService;
- private final IntentAaiService intentAaiService;
+ private final IntentAaiClient intentAaiClient;
private final IntentSoService intentSoService;
private final SessionFactory sessionFactory;
private final ResourceMgtService resourceMgtService;
private final IntentProperties intentProperties;
- public IntentInstanceServiceImpl(SlicingService slicingService, IntentAaiService intentAaiService, IntentSoService intentSoService, SessionFactory sessionFactory, ResourceMgtService resourceMgtService, IntentProperties intentProperties) {
+ public IntentInstanceServiceImpl(SlicingService slicingService, IntentAaiClient intentAaiClient, IntentSoService intentSoService, SessionFactory sessionFactory, ResourceMgtService resourceMgtService, IntentProperties intentProperties) {
this.slicingService = slicingService;
- this.intentAaiService = intentAaiService;
+ this.intentAaiClient = intentAaiClient;
this.intentSoService = intentSoService;
this.sessionFactory = sessionFactory;
this.resourceMgtService = resourceMgtService;
@@ -329,7 +329,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
if (instance == null || instance.getResourceInstanceId() == null) {
return -1;
}
- Response<JSONObject> response = intentAaiService.getInstanceInfo(instance.getResourceInstanceId()).execute();
+ Response<JSONObject> response = intentAaiClient.getInstanceInfo(instance.getResourceInstanceId()).execute();
logger.debug(response.toString());
if (response.isSuccessful()) {
String status = response.body().getString("orchestration-status");
@@ -383,7 +383,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
List<CCVPNInstance> instanceList = getInstanceByFinishedFlag("1");
for (CCVPNInstance instance : instanceList) {
String serviceInstanceId = instance.getResourceInstanceId();
- Response<JSONObject> response = intentAaiService.getInstanceNetworkInfo(serviceInstanceId).execute();
+ Response<JSONObject> response = intentAaiClient.getInstanceNetworkInfo(serviceInstanceId).execute();
if (!response.isSuccessful()) {
logger.error("get Intent-Instance Bandwidth error:" + response.toString());
continue;
@@ -409,7 +409,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
continue;
}
- Response<JSONObject> networkPolicyInfoResponse = intentAaiService.getInstanceNetworkPolicyInfo(networkPolicyId).execute();
+ Response<JSONObject> networkPolicyInfoResponse = intentAaiClient.getInstanceNetworkPolicyInfo(networkPolicyId).execute();
if (!networkPolicyInfoResponse.isSuccessful()) {
logger.error("get Intent-Instance networkPolicyInfo error:" + networkPolicyInfoResponse.toString());
continue;
@@ -422,7 +422,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
instancePerformance.setJobId(instance.getJobId());
instancePerformance.setDate(new Date());
- Response<JSONObject> metadatumResponse = intentAaiService.getInstanceBandwidth(serviceInstanceId).execute();
+ Response<JSONObject> metadatumResponse = intentAaiClient.getInstanceBandwidth(serviceInstanceId).execute();
if (!metadatumResponse.isSuccessful()) {
logger.error("get Intent-Instance metadatum error:" + metadatumResponse.toString());
continue;
@@ -630,7 +630,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
Map<String, Object> result = new HashMap<>();
List<String> accessNodeList = new ArrayList<>();
List<String> cloudAccessNodeList = new ArrayList<>();
- Response<JSONObject> response = intentAaiService.queryNetworkRoute().execute();
+ Response<JSONObject> response = intentAaiClient.queryNetworkRoute().execute();
if (!response.isSuccessful()) {
logger.error(response.toString());
throw new RuntimeException("Query Access Node Info Error");
@@ -732,7 +732,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
public void addCustomer() throws IOException {
String globalCustomerId = intentProperties.getGlobalCustomerId();
- Response<JSONObject> queryCustomerResponse = intentAaiService.queryCustomer(globalCustomerId).execute();
+ Response<JSONObject> queryCustomerResponse = intentAaiClient.queryCustomer(globalCustomerId).execute();
if (queryCustomerResponse.isSuccessful()) {
return;
}
@@ -743,7 +743,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
params.put("subscriber-name", subscriberName);
params.put("subscriber-type", subscriberType);
okhttp3.RequestBody requestBody = okhttp3.RequestBody.create(okhttp3.MediaType.parse("application/json"), JSON.toJSONString(params));
- intentAaiService.addCustomer(globalCustomerId, requestBody).execute();
+ intentAaiClient.addCustomer(globalCustomerId, requestBody).execute();
}
@Override
@@ -937,14 +937,14 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
public void addSubscription() throws IOException {
String globalCustomerId = intentProperties.getGlobalCustomerId();
String serviceType = intentProperties.getServiceType();
- Response<JSONObject> querySubscription = intentAaiService.querySubscription(globalCustomerId, serviceType).execute();
+ Response<JSONObject> querySubscription = intentAaiClient.querySubscription(globalCustomerId, serviceType).execute();
if (querySubscription.isSuccessful()) {
return;
}
Map<String, Object> params = new HashMap<>();
params.put("service-type", serviceType);
okhttp3.RequestBody requestBody = okhttp3.RequestBody.create(okhttp3.MediaType.parse("application/json"), JSON.toJSONString(params));
- intentAaiService.addSubscription(globalCustomerId, serviceType, requestBody).execute();
+ intentAaiClient.addSubscription(globalCustomerId, serviceType, requestBody).execute();
}
public Properties getProperties() throws IOException {
@@ -963,7 +963,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
String serviceType = intentProperties.getServiceType();
String resourceVersion = null;
if (serviceInstanceId != null) {
- Response<JSONObject> queryServiceInstance = intentAaiService.queryServiceInstance(globalCustomerId, serviceType, serviceInstanceId).execute();
+ Response<JSONObject> queryServiceInstance = intentAaiClient.queryServiceInstance(globalCustomerId, serviceType, serviceInstanceId).execute();
if (queryServiceInstance.isSuccessful()) {
JSONObject body = queryServiceInstance.body();
resourceVersion = body.getString("resource-version");
@@ -986,7 +986,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
params.put("resource-version",resourceVersion);
}
okhttp3.RequestBody requestBody = okhttp3.RequestBody.create(okhttp3.MediaType.parse("application/json"), JSON.toJSONString(params));
- intentAaiService.saveServiceInstance(globalCustomerId,serviceType,serviceInstanceId,requestBody).execute();
+ intentAaiClient.saveServiceInstance(globalCustomerId,serviceType,serviceInstanceId,requestBody).execute();
}
public void deleteIntentInstanceToAAI(String serviceInstanceId) throws IOException {
@@ -997,11 +997,11 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
if (serviceInstanceId == null) {
return;
}
- Response<JSONObject> queryServiceInstance = intentAaiService.queryServiceInstance(globalCustomerId, serviceType, serviceInstanceId).execute();
+ Response<JSONObject> queryServiceInstance = intentAaiClient.queryServiceInstance(globalCustomerId, serviceType, serviceInstanceId).execute();
if (queryServiceInstance.isSuccessful()) {
JSONObject body = queryServiceInstance.body();
String resourceVersion = body.getString("resource-version");
- intentAaiService.deleteServiceInstance(globalCustomerId,serviceType,serviceInstanceId,resourceVersion).execute();
+ intentAaiClient.deleteServiceInstance(globalCustomerId,serviceType,serviceInstanceId,resourceVersion).execute();
}
}
@@ -1028,7 +1028,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
params.put("resource-sharing-level", slicingOrderInfo.getResourceSharingLevel());
params.put("data-owner", IntentConstant.INTENT_INSTANCE_DATA_OWNER);
okhttp3.RequestBody requestBody = okhttp3.RequestBody.create(okhttp3.MediaType.parse("application/json"), JSON.toJSONString(params));
- intentAaiService.saveServiceInstance(globalCustomerId,serviceType,serviceId,requestBody).execute();
+ intentAaiClient.saveServiceInstance(globalCustomerId,serviceType,serviceId,requestBody).execute();
}
@Override
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/GeneralConvertImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/GeneralConvertImpl.java
index 52377d83..49120760 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/GeneralConvertImpl.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/GeneralConvertImpl.java
@@ -24,7 +24,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.onap.usecaseui.server.constant.nsmf.NsmfParamConstant;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceAndInstance;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.Relationship;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.RelationshipData;
@@ -39,7 +39,7 @@ public class GeneralConvertImpl {
private static final Logger logger = LoggerFactory.getLogger(GeneralConvertImpl.class);
- private final AAISliceService aaiSliceService;
+ private final AAISliceClient aaiSliceClient;
public AAIServiceAndInstance queryServiceUtil(JSONObject object) {
if (object.containsKey("relationship-list")) {
@@ -101,7 +101,7 @@ public class GeneralConvertImpl {
AAIServiceAndInstance aaiServiceAndInstance = new AAIServiceAndInstance();
try {
// TODO
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.queryOrderByService(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, serviceId)
.execute();
if (response.isSuccessful()) {
@@ -109,7 +109,7 @@ public class GeneralConvertImpl {
logger.info("getUseInterval: queryOrderByService response is:{}", response.body());
aaiServiceAndInstance = queryServiceUtil(object);
String orderId = getOrderIdFromRelation(aaiServiceAndInstance);
- Response<JSONObject> orderResponse = this.aaiSliceService
+ Response<JSONObject> orderResponse = this.aaiSliceClient
.queryOrderByOrderId(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, orderId)
.execute();
if (orderResponse.isSuccessful()) {
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceConvert.java b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceConvert.java
index fd295bd9..00958148 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceConvert.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceConvert.java
@@ -45,7 +45,7 @@ import org.onap.usecaseui.server.bean.nsmf.resource.SubscriberInfo;
import org.onap.usecaseui.server.bean.nsmf.task.BusinessDemandInfo;
import org.onap.usecaseui.server.bean.nsmf.task.NstInfo;
import org.onap.usecaseui.server.constant.nsmf.NsmfParamConstant;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIService;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceAndInstance;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceNST;
@@ -69,7 +69,7 @@ public class ResourceMgtServiceConvert {
@Resource(name = "GeneralConvertService")
private GeneralConvertImpl generalConvert;
- private final AAISliceService aaiSliceService;
+ private final AAISliceClient aaiSliceClient;
void convertSlicingBusinessList(SlicingBusinessList slicingBusinessList, AAIServiceRsp aAIServiceRsp, int pageNo,
int pageSize)
@@ -109,7 +109,7 @@ public class ResourceMgtServiceConvert {
void getNsiInfoByBusiness(NsiInfo nsiInfo, String nsiId) {
try {
AAIServiceAndInstance aaiServiceAndInstance = new AAIServiceAndInstance();
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId)
.execute();
if (response.isSuccessful()) {
@@ -137,7 +137,7 @@ public class ResourceMgtServiceConvert {
String modelInvariantId;
String modelVersionId;
try {
- Response<JSONObject> response = this.aaiSliceService.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G,
+ Response<JSONObject> response = this.aaiSliceClient.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, nsiId).execute();
if (response.isSuccessful()) {
JSONObject object = response.body();
@@ -158,7 +158,7 @@ public class ResourceMgtServiceConvert {
}
try {
- Response<AAIServiceNST> nstResponse = this.aaiSliceService.queryServiceNST(modelInvariantId, modelVersionId)
+ Response<AAIServiceNST> nstResponse = this.aaiSliceClient.queryServiceNST(modelInvariantId, modelVersionId)
.execute();
if (nstResponse.isSuccessful()) {
AAIServiceNST aaiServiceNST = nstResponse.body();
@@ -180,7 +180,7 @@ public class ResourceMgtServiceConvert {
throws IOException {
List<AAIServiceAndInstance> aaiServiceAndInstanceList = new ArrayList<>();
try {
- Response<JSONObject> response = this.aaiSliceService.queryAllottedResources(NsmfParamConstant.CUSTOM_5G,
+ Response<JSONObject> response = this.aaiSliceClient.queryAllottedResources(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, businessId).execute();
if (response.isSuccessful()) {
logger.info("getNsiIdByBusiness: queryAllottedResources response is: {}", response.body());
@@ -222,7 +222,7 @@ public class ResourceMgtServiceConvert {
AAIServiceProfiles aaiServiceProfiles = new AAIServiceProfiles();
try {
- Response<JSONObject> response = this.aaiSliceService.getServiceProfiles(NsmfParamConstant.CUSTOM_5G,
+ Response<JSONObject> response = this.aaiSliceClient.getServiceProfiles(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, businessId).execute();
if (response.isSuccessful()) {
@@ -318,7 +318,7 @@ public class ResourceMgtServiceConvert {
i++;
try {
AAIServiceAndInstance aaiServiceAndInstance = new AAIServiceAndInstance();
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nssiId)
.execute();
if (response.isSuccessful()) {
@@ -350,7 +350,7 @@ public class ResourceMgtServiceConvert {
try {
// 添加给slicingTaskCreationProgress赋值的代码
AAIServiceAndInstance aaiServiceAndInstance = new AAIServiceAndInstance();
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, businessId)
.execute();
if (response.isSuccessful()) {
@@ -465,7 +465,7 @@ public class ResourceMgtServiceConvert {
List<HostedNsiInfo> hostedNsiInfoList = new ArrayList<>();
for (String nsiId : nsiIdList) {
try {
- Response<JSONObject> response = this.aaiSliceService.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G,
+ Response<JSONObject> response = this.aaiSliceClient.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, nsiId).execute();
if (response.isSuccessful()) {
JSONObject object = response.body();
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImpl.java
index 064c7a65..9f6ebf26 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImpl.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImpl.java
@@ -46,7 +46,7 @@ import org.onap.usecaseui.server.constant.nsmf.NsmfCodeConstant;
import org.onap.usecaseui.server.constant.nsmf.NsmfParamConstant;
import org.onap.usecaseui.server.service.lcm.ServiceLcmService;
import org.onap.usecaseui.server.service.nsmf.ResourceMgtService;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceAndInstance;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceInstance;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceRsp;
@@ -60,10 +60,8 @@ import org.onap.usecaseui.server.service.slicingdomain.so.SOSliceService;
import org.onap.usecaseui.server.service.slicingdomain.so.bean.ActivateService;
import org.onap.usecaseui.server.service.slicingdomain.so.bean.SOOperation;
import org.onap.usecaseui.server.util.DateUtils;
-import org.onap.usecaseui.server.util.RestfulServices;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Service;
import retrofit2.Response;
@@ -82,7 +80,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
private static final Logger logger = LoggerFactory.getLogger(ResourceMgtServiceImpl.class);
private static final Gson gson = new Gson();
- private final AAISliceService aaiSliceService;
+ private final AAISliceClient aaiSliceClient;
private final SOSliceService soSliceService;
@Resource(name = "ServiceLcmService")
@@ -104,7 +102,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
String resultMsg;
try {
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.listService(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G).execute();
if (response.isSuccessful()) {
logger.info("querySlicingBusiness: listService reponse is:{}", response.body());
@@ -145,7 +143,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
}
public void addBusinessProgress(SlicingBusinessList slicingBusinessList) {
- System.out.println(aaiSliceService);
+ System.out.println(aaiSliceClient);
System.out.println(serviceLcmService);
System.out.println(generalConvert);
if (slicingBusinessList.getSlicingBusinessInfoList() == null
@@ -208,7 +206,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
String resultMsg;
AAIServiceRsp aAIServiceRsp = new AAIServiceRsp();
try {
- Response<JSONObject> response = this.aaiSliceService.listServiceByStatus(
+ Response<JSONObject> response = this.aaiSliceClient.listServiceByStatus(
NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, processingStatus).execute();
if (response.isSuccessful()) {
logger.info("querySlicingBusinessByStatus: listServiceByStatus reponse is:{}", response.body());
@@ -260,7 +258,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
String resultMsg;
try {
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, businessId)
.execute();
if (response.isSuccessful()) {
@@ -279,7 +277,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
resultMsg = "5G slicing business details query failed!";
resultHeader.setResult_code(NsmfCodeConstant.ERROR_CODE_UNKNOWN);
}
- Response<NetworkInfo> networkInfoResponse = this.aaiSliceService
+ Response<NetworkInfo> networkInfoResponse = this.aaiSliceClient
.getServiceNetworkInstance(businessId).execute();
if (networkInfoResponse.isSuccessful()) {
NetworkInfo networkInfo = networkInfoResponse.body();
@@ -292,7 +290,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
.filter(e -> e.getRelationshipKey()
.equals("service-instance.service-instance-id")).collect(Collectors.toList());
String networkRouteCnId = serviceInstanceInfo.get(0).getRelationshipValue();
- Response<NetworkInfo> networkInfoResponse1 = this.aaiSliceService
+ Response<NetworkInfo> networkInfoResponse1 = this.aaiSliceClient
.getServiceNetworkInstance(networkRouteCnId).execute();
if (networkInfoResponse1.isSuccessful()) {
NetworkInfo networkInfo1 = networkInfoResponse1.body();
@@ -306,7 +304,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
List<RelationshipData> networkInfoRelationshipDataList = networkRouteCn.get(0)
.getRelationshipDataList();
String networkRouteId = networkInfoRelationshipDataList.get(0).getRelationshipValue();
- Response<EndPointInfoList> networkInfoEndPointInfoList = this.aaiSliceService
+ Response<EndPointInfoList> networkInfoEndPointInfoList = this.aaiSliceClient
.getEndpointByLinkName(networkRouteId).execute();
if (networkInfoEndPointInfoList.isSuccessful()) {
EndPointInfoList endPointInfoList = networkInfoEndPointInfoList.body();
@@ -335,7 +333,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
.filter(e -> e.getRelationshipKey()
.equals("service-instance.service-instance-id")).collect(Collectors.toList());
- Response<SliceProfileList> executeTn = this.aaiSliceService
+ Response<SliceProfileList> executeTn = this.aaiSliceClient
.getSliceProfiles(tnServiceInstanceInfo.get(0).getRelationshipValue()).execute();
if (executeTn.isSuccessful()) {
SliceProfileList body = executeTn.body();
@@ -397,7 +395,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
String resultMsg;
try {
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.listServiceNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G).execute();
if (response.isSuccessful()) {
logger.info("queryNsiInstances: listServiceNSI reponse is:{}", response.body());
@@ -442,7 +440,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
String resultMsg;
try {
- Response<JSONObject> response = this.aaiSliceService.listServiceNSIByStatus(
+ Response<JSONObject> response = this.aaiSliceClient.listServiceNSIByStatus(
NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, instanceStatus).execute();
if (response.isSuccessful()) {
logger.info("queryNsiInstancesByStatus: listServiceNSIByStatus reponse is:{}", response.body());
@@ -489,7 +487,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
String resultMsg;
try {
- Response<JSONObject> response = this.aaiSliceService.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G,
+ Response<JSONObject> response = this.aaiSliceClient.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, serviceInstanceId).execute();
if (response.isSuccessful()) {
JSONObject object = response.body();
@@ -528,7 +526,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
NsiRelatedNssiInfo nsiRelatedNssiInfo = new NsiRelatedNssiInfo();
String resultMsg;
try {
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId)
.execute();
if (response.isSuccessful()) {
@@ -570,7 +568,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
String resultMsg;
AAIServiceRsp aAIServiceRsp = new AAIServiceRsp();
try {
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.listServiceNSSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G).execute();
if (response.isSuccessful()) {
logger.info("queryNssiInstances: listServiceNSSI reponse is:{}", response.body());
@@ -615,7 +613,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
String resultMsg;
AAIServiceRsp aAIServiceRsp = new AAIServiceRsp();
try {
- Response<JSONObject> response = this.aaiSliceService.listServiceNSSIByStatus(
+ Response<JSONObject> response = this.aaiSliceClient.listServiceNSSIByStatus(
NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, instanceStatus).execute();
if (response.isSuccessful()) {
logger.info("queryNssiInstancesByStatus: listServiceNSSIByStatus reponse is:{}", response.body());
@@ -662,7 +660,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
String resultMsg;
AAIServiceRsp aAIServiceRsp = new AAIServiceRsp();
try {
- Response<JSONObject> response = this.aaiSliceService.listServiceNSSIByEnv(NsmfParamConstant.CUSTOM_5G,
+ Response<JSONObject> response = this.aaiSliceClient.listServiceNSSIByEnv(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, environmentContext).execute();
if (response.isSuccessful()) {
logger.info("queryNssiInstancesByEnvironment: listServiceNSSIByEnv reponse is:{}", response.body());
@@ -708,7 +706,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
String resultMsg;
try {
- Response<JSONObject> response = this.aaiSliceService
+ Response<JSONObject> response = this.aaiSliceClient
.queryNSIByNSSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nssiId).execute();
if (response.isSuccessful()) {
logger.info("queryNssiDetails: queryNSIByNSSI reponse is:{}", response.body());
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceConvert.java b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceConvert.java
index 469b3c57..8d1c3e63 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceConvert.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceConvert.java
@@ -32,7 +32,7 @@ import org.onap.usecaseui.server.bean.nsmf.task.SlicingTaskCreationInfo;
import org.onap.usecaseui.server.bean.nsmf.task.SlicingTaskCreationProgress;
import org.onap.usecaseui.server.bean.nsmf.task.SlicingTaskInfo;
import org.onap.usecaseui.server.bean.nsmf.task.SlicingTaskList;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.ConnectionLink;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.ConnectionLinkList;
import org.onap.usecaseui.server.service.slicingdomain.so.bean.AnSliceTaskInfo;
@@ -67,7 +67,7 @@ public class TaskMgtServiceConvert {
@Resource(name = "GeneralConvertService")
private GeneralConvertImpl generalConvert;
- private final AAISliceService aaiSliceService;
+ private final AAISliceClient aaiSliceClient;
void convertSlicingTaskList(SlicingTaskList targetSlicingTaskList, SOTaskRsp sourceSoTaskRsp, int pageNo,
int pageSize)
@@ -363,7 +363,7 @@ public class TaskMgtServiceConvert {
ConnectionLinkList connectionLinkList = new ConnectionLinkList();
EndPointInfo endPointInfo = new EndPointInfo();
try {
- Response<ConnectionLinkList> response = this.aaiSliceService.getConnectionLinks().execute();
+ Response<ConnectionLinkList> response = this.aaiSliceClient.getConnectionLinks().execute();
if(response.isSuccessful()){
connectionLinkList = response.body();
logger.info(connectionLinkList.toString());
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImpl.java
index e8c51eb9..73b376b2 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImpl.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImpl.java
@@ -32,7 +32,7 @@ import org.onap.usecaseui.server.bean.nsmf.task.SlicingTaskCreationProgress;
import org.onap.usecaseui.server.bean.nsmf.task.SlicingTaskList;
import org.onap.usecaseui.server.constant.nsmf.NsmfCodeConstant;
import org.onap.usecaseui.server.service.nsmf.TaskMgtService;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.ConnectionLink;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.ConnectionLinkList;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.EndPointInfoList;
@@ -70,7 +70,7 @@ public class TaskMgtServiceImpl implements TaskMgtService {
private static final Logger logger = LoggerFactory.getLogger(TaskMgtServiceImpl.class);
private final SOSliceService soSliceService;
- private final AAISliceService aaiSliceService;
+ private final AAISliceClient aaiSliceClient;
@Resource(name = "TaskMgtConvertService")
protected TaskMgtServiceConvert taskMgtServiceConvert;
@@ -347,7 +347,7 @@ public class TaskMgtServiceImpl implements TaskMgtService {
ConnectionListVo connectionListVo = new ConnectionListVo();
List<ConnectionListVo> list = new ArrayList<>();
try {
- Response<ConnectionLinkList> response = this.aaiSliceService.getConnectionLinks().execute();
+ Response<ConnectionLinkList> response = this.aaiSliceClient.getConnectionLinks().execute();
if(response.isSuccessful()){
connectionLinkList = response.body();
logger.info(connectionLinkList.toString());
@@ -355,21 +355,21 @@ public class TaskMgtServiceImpl implements TaskMgtService {
List<ConnectionLink> tsciConnectionLink = connectionLinks.stream().filter(e -> e.getLinkType().equals("TsciConnectionLink") && e.getRelationshipList()!=null).collect(Collectors.toList());
if(!ObjectUtils.isEmpty(tsciConnectionLink)){
for (ConnectionLink connectionLink : tsciConnectionLink) {
- Response<EndPointInfoList> anInfo = this.aaiSliceService.getEndpointByLinkName(connectionLink.getLinkName()).execute();
- Response<EndPointInfoList> cnInfo = this.aaiSliceService.getEndpointByLinkName2(connectionLink.getLinkName2()).execute();
+ Response<EndPointInfoList> anInfo = this.aaiSliceClient.getEndpointByLinkName(connectionLink.getLinkName()).execute();
+ Response<EndPointInfoList> cnInfo = this.aaiSliceClient.getEndpointByLinkName2(connectionLink.getLinkName2()).execute();
PropertiesVo propertiesVo = new PropertiesVo();
List<RelationshipData> relationshipDataList = connectionLink.getRelationshipList().getRelationship().get(0).getRelationshipDataList();
List<RelationshipData> allottedResourceId = relationshipDataList.stream().filter(e -> e.getRelationshipKey().equals("allotted-resource.id")).collect(Collectors.toList());
List<RelationshipData> serviceInstanceId = relationshipDataList.stream().filter(e -> e.getRelationshipKey().equals("service-instance.service-instance-id")).collect(Collectors.toList());
- Response<ConnectionLink> AllottedResource=this.aaiSliceService.getAllottedResource(serviceInstanceId.get(0).getRelationshipValue(),allottedResourceId.get(0).getRelationshipValue()).execute();
+ Response<ConnectionLink> AllottedResource=this.aaiSliceClient.getAllottedResource(serviceInstanceId.get(0).getRelationshipValue(),allottedResourceId.get(0).getRelationshipValue()).execute();
List<Relationship> relationships= AllottedResource.body().getRelationshipList().getRelationship().stream().filter(a-> a.getRelatedTo().equals("network-policy")).collect(Collectors.toList());
List<RelationshipData> networkPolicyId=relationships.get(0).getRelationshipDataList().stream().filter(e -> e.getRelationshipKey().equals("network-policy.network-policy-id")).collect(Collectors.toList());
- Response<NetworkPolicy> networkPolicy=this.aaiSliceService.getNetworkPolicy(networkPolicyId.get(0).getRelationshipValue()).execute();
+ Response<NetworkPolicy> networkPolicy=this.aaiSliceClient.getNetworkPolicy(networkPolicyId.get(0).getRelationshipValue()).execute();
propertiesVo.setJitter(networkPolicy.body().getJitter());
propertiesVo.setLatency(networkPolicy.body().getLatency());
propertiesVo.setMaxBandwidth(networkPolicy.body().getMaxBandwidth());
- Response<ConnectionLink> serviceInstance=this.aaiSliceService.getServiceInstance(serviceInstanceId.get(0).getRelationshipValue()).execute();
+ Response<ConnectionLink> serviceInstance=this.aaiSliceClient.getServiceInstance(serviceInstanceId.get(0).getRelationshipValue()).execute();
propertiesVo.setResourceSharingLevel(serviceInstance.body().getServiceFunction());
connectionListVo.setLinkId(connectionLink.getLinkId());
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/slicingdomain/aai/AAISliceService.java b/server/src/main/java/org/onap/usecaseui/server/service/slicingdomain/aai/AAISliceClient.java
index 0f6571ba..ab2019de 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/slicingdomain/aai/AAISliceService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/slicingdomain/aai/AAISliceClient.java
@@ -15,7 +15,6 @@
*/
package org.onap.usecaseui.server.service.slicingdomain.aai;
-import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceInstance;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.NetworkInfo;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceNST;
@@ -28,11 +27,10 @@ import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.Netwo
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.SliceProfileList;
import retrofit2.Call;
import retrofit2.http.GET;
-import retrofit2.http.Headers;
import retrofit2.http.Path;
import retrofit2.http.Query;
-public interface AAISliceService {
+public interface AAISliceClient {
@GET("/api/aai-business/v13/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances?service-role=service-profile")
Call<JSONObject> listService(@Path("global-customer-id") String globalCustomerId,@Path("service-type") String serviceType);
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImplIntegrationTest.java b/server/src/test/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImplIntegrationTest.java
index b6869c7d..80d3c0f6 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImplIntegrationTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImplIntegrationTest.java
@@ -47,7 +47,7 @@ import org.onap.usecaseui.server.service.csmf.config.SlicingProperties;
import org.onap.usecaseui.server.service.lcm.ServiceLcmService;
import org.onap.usecaseui.server.service.lcm.domain.aai.bean.AAICustomer;
import org.onap.usecaseui.server.service.lcm.impl.DefaultServiceLcmService;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.so.SOSliceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -87,7 +87,7 @@ import lombok.SneakyThrows;
public class SlicingServiceImplIntegrationTest {
@MockBean ServiceLcmService serviceLcmService;
- @Autowired AAISliceService aaiSliceService;
+ @Autowired AAISliceClient aaiSliceClient;
@Autowired SOSliceService soSliceService;
@Autowired SlicingProperties slicingProperties;
@@ -107,7 +107,7 @@ public class SlicingServiceImplIntegrationTest {
@BeforeEach
void setup() {
- slicingService = new SlicingServiceImpl(serviceLcmService,aaiSliceService,soSliceService, slicingProperties);
+ slicingService = new SlicingServiceImpl(serviceLcmService,aaiSliceClient,soSliceService, slicingProperties);
}
@Test
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImplTest.java b/server/src/test/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImplTest.java
index 0ed87f15..624e11cf 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImplTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/csmf/impl/SlicingServiceImplTest.java
@@ -47,7 +47,7 @@ import org.onap.usecaseui.server.controller.IntentController;
import org.onap.usecaseui.server.service.csmf.config.SlicingProperties;
import org.onap.usecaseui.server.service.lcm.ServiceLcmService;
import org.onap.usecaseui.server.service.lcm.impl.DefaultServiceLcmService;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.so.SOSliceService;
import org.onap.usecaseui.server.service.slicingdomain.so.bean.SOOperation;
import org.powermock.api.support.membermodification.MemberModifier;
@@ -57,17 +57,17 @@ public class SlicingServiceImplTest {
SlicingServiceImpl slicingService = null;
SOSliceService soSliceService;
- AAISliceService aaiSliceService;
+ AAISliceClient aaiSliceClient;
ServiceLcmService serviceLcmService;
SlicingProperties slicingProperties;
@Before
public void before() throws Exception {
- aaiSliceService = mock(AAISliceService.class);
+ aaiSliceClient = mock(AAISliceClient.class);
soSliceService = mock(SOSliceService.class);
serviceLcmService = mock(DefaultServiceLcmService.class);
slicingProperties = mock(SlicingProperties.class);
- slicingService = new SlicingServiceImpl(serviceLcmService, aaiSliceService, soSliceService, slicingProperties);
+ slicingService = new SlicingServiceImpl(serviceLcmService, aaiSliceClient, soSliceService, slicingProperties);
MemberModifier.field(SlicingServiceImpl.class, "serviceLcmService").set(slicingService , serviceLcmService);
}
@@ -110,7 +110,7 @@ public class SlicingServiceImplTest {
@Test
public void itCanQuerySlicingOrderList() {
JSONObject object = new JSONObject();
- when(aaiSliceService
+ when(aaiSliceClient
.listOrders(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G))
.thenReturn(successfulCall(object));
slicingService.querySlicingOrderList("processing", "1", "100");
@@ -118,7 +118,7 @@ public class SlicingServiceImplTest {
@Test
public void querySlicingOrderListWithThrowsException() {
- when(aaiSliceService
+ when(aaiSliceClient
.listOrders(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G))
.thenReturn(failedCall("aai is not exist!"));
slicingService.querySlicingOrderList("processing", "1", "100");
@@ -127,7 +127,7 @@ public class SlicingServiceImplTest {
@Test
public void emptyResponseWhenQuerySlicingOrderList() {
Call<JSONObject> call = emptyBodyCall();
- when(aaiSliceService
+ when(aaiSliceClient
.listOrders(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G)).thenReturn(call);
slicingService.querySlicingOrderList("processing", "1", "100");
}
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImplTest.java b/server/src/test/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImplTest.java
index a10e73e6..57dca9f0 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImplTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImplTest.java
@@ -46,7 +46,7 @@ import org.onap.usecaseui.server.bean.intent.IntentModel;
import org.onap.usecaseui.server.bean.nsmf.common.ServiceResult;
import org.onap.usecaseui.server.constant.IntentConstant;
import org.onap.usecaseui.server.service.csmf.SlicingService;
-import org.onap.usecaseui.server.service.intent.IntentAaiService;
+import org.onap.usecaseui.server.service.intent.IntentAaiClient;
import org.onap.usecaseui.server.service.intent.IntentSoService;
import org.onap.usecaseui.server.service.intent.config.IntentProperties;
import org.onap.usecaseui.server.service.lcm.domain.so.bean.OperationProgress;
@@ -77,7 +77,7 @@ public class IntentInstanceServiceImplTest {
private IntentInstanceServiceImpl intentInstanceService;
@Mock
- private IntentAaiService intentAaiService;
+ private IntentAaiClient intentAaiClient;
@Mock
private IntentSoService intentSoService;
@@ -104,7 +104,7 @@ public class IntentInstanceServiceImplTest {
MemberModifier.field(IntentInstanceServiceImpl.class, "sessionFactory").set(intentInstanceService , sessionFactory);
MemberModifier.field(IntentInstanceServiceImpl.class, "resourceMgtService").set(intentInstanceService , resourceMgtService);
MemberModifier.field(IntentInstanceServiceImpl.class, "slicingService").set(intentInstanceService , slicingService);
- MemberModifier.field(IntentInstanceServiceImpl.class, "intentAaiService").set(intentInstanceService , intentAaiService);
+ MemberModifier.field(IntentInstanceServiceImpl.class, "intentAaiClient").set(intentInstanceService , intentAaiClient);
MemberModifier.field(IntentInstanceServiceImpl.class, "intentSoService").set(intentInstanceService , intentSoService);
when(sessionFactory.openSession()).thenReturn(session);
@@ -273,7 +273,7 @@ public class IntentInstanceServiceImplTest {
jsonObject.put("orchestration-status", "created");
Call mockCall = PowerMockito.mock(Call.class);
Response<JSONObject> response = Response.success(jsonObject);
- Mockito.when(intentAaiService.getInstanceInfo(anyString())).thenReturn(mockCall);
+ Mockito.when(intentAaiClient.getInstanceInfo(anyString())).thenReturn(mockCall);
Mockito.when(mockCall.execute()).thenReturn(response);
IntentInstanceServiceImpl spy = PowerMockito.spy(intentInstanceService);
@@ -362,7 +362,7 @@ public class IntentInstanceServiceImplTest {
" }\n" +
"}");
Response<JSONObject> response = Response.success(jsonObject);
- Mockito.when(intentAaiService.getInstanceNetworkInfo(any())).thenReturn(mockCall);
+ Mockito.when(intentAaiClient.getInstanceNetworkInfo(any())).thenReturn(mockCall);
Mockito.when(mockCall.execute()).thenReturn(response);
Call mockCall1 = PowerMockito.mock(Call.class);
@@ -412,7 +412,7 @@ public class IntentInstanceServiceImplTest {
" }\n" +
"}");
Response<JSONObject> response1 = Response.success(jsonObject1);
- Mockito.when(intentAaiService.getInstanceNetworkPolicyInfo(any())).thenReturn(mockCall1);
+ Mockito.when(intentAaiClient.getInstanceNetworkPolicyInfo(any())).thenReturn(mockCall1);
Mockito.when(mockCall1.execute()).thenReturn(response1);
Call mockCall2 = PowerMockito.mock(Call.class);
@@ -431,7 +431,7 @@ public class IntentInstanceServiceImplTest {
" ]\n" +
"}");
Response<JSONObject> response2 = Response.success(jsonObject2);
- Mockito.when(intentAaiService.getInstanceBandwidth(any())).thenReturn(mockCall2);
+ Mockito.when(intentAaiClient.getInstanceBandwidth(any())).thenReturn(mockCall2);
Mockito.when(mockCall2.execute()).thenReturn(response2);
Transaction tx = Mockito.mock(Transaction.class);
@@ -602,7 +602,7 @@ public class IntentInstanceServiceImplTest {
" ]\n" +
"}");
Response<JSONObject> response = Response.success(body);
- Mockito.when(intentAaiService.queryNetworkRoute()).thenReturn(mockCall);
+ Mockito.when(intentAaiClient.queryNetworkRoute()).thenReturn(mockCall);
Mockito.when(mockCall.execute()).thenReturn(response);
Map<String, Object> result = (Map<String, Object>) intentInstanceService.queryAccessNodeInfo();
assertEquals(((List)result.get("accessNodeList")).size(), 3);
@@ -675,8 +675,8 @@ public class IntentInstanceServiceImplTest {
}
});
- when(intentAaiService.queryCustomer(anyString())).thenReturn(mockCall);
- when(intentAaiService.addCustomer(anyString(), any())).thenReturn(mockCall);
+ when(intentAaiClient.queryCustomer(anyString())).thenReturn(mockCall);
+ when(intentAaiClient.addCustomer(anyString(), any())).thenReturn(mockCall);
when(mockCall.execute()).thenReturn(response);
Properties properties = new Properties();
@@ -688,7 +688,7 @@ public class IntentInstanceServiceImplTest {
// doReturn(properties).when(spy).getProperties();
spy.addCustomer();
- Mockito.verify(intentAaiService,Mockito.times(1)).addCustomer(anyString(),any());
+ Mockito.verify(intentAaiClient,Mockito.times(1)).addCustomer(anyString(),any());
}
@@ -714,16 +714,16 @@ public class IntentInstanceServiceImplTest {
}
});
when(intentProperties.getServiceType()).thenReturn("someServiceType");
- when(intentAaiService.querySubscription(anyString(),anyString())).thenReturn(mockCall);
+ when(intentAaiClient.querySubscription(anyString(),anyString())).thenReturn(mockCall);
when(mockCall.execute()).thenReturn(response);
IntentInstanceServiceImpl spy = spy(intentInstanceService);
Call mockCall2 = PowerMockito.mock(Call.class);
- when(intentAaiService.addSubscription(anyString(),anyString(),any())).thenReturn(mockCall2);
+ when(intentAaiClient.addSubscription(anyString(),anyString(),any())).thenReturn(mockCall2);
spy.addSubscription();
- Mockito.verify(intentAaiService,Mockito.times(1)).addSubscription(anyString(),anyString(),any());
+ Mockito.verify(intentAaiClient,Mockito.times(1)).addSubscription(anyString(),anyString(),any());
}
@Test
@@ -737,7 +737,7 @@ public class IntentInstanceServiceImplTest {
body.put("resource-version",123);
Call mockCall = PowerMockito.mock(Call.class);
Response<JSONObject> response = Response.success(body);
- when(intentAaiService.queryServiceInstance(anyString(),anyString(),anyString())).thenReturn(mockCall);
+ when(intentAaiClient.queryServiceInstance(anyString(),anyString(),anyString())).thenReturn(mockCall);
when(mockCall.execute()).thenReturn(response);
CCVPNInstance instance = new CCVPNInstance();
@@ -746,11 +746,11 @@ public class IntentInstanceServiceImplTest {
Call mockCall2 = PowerMockito.mock(Call.class);
Response<JSONObject> response2 = Response.success(body);
- when(intentAaiService.saveServiceInstance(anyString(),anyString(),anyString(),any())).thenReturn(mockCall2);
+ when(intentAaiClient.saveServiceInstance(anyString(),anyString(),anyString(),any())).thenReturn(mockCall2);
when(mockCall2.execute()).thenReturn(response2);
spy.saveIntentInstanceToAAI("CCVPN-id",instance);
- Mockito.verify(intentAaiService, Mockito.times(1)).saveServiceInstance(anyString(),anyString(),anyString(),any());
+ Mockito.verify(intentAaiClient, Mockito.times(1)).saveServiceInstance(anyString(),anyString(),anyString(),any());
}
@Test
@@ -764,16 +764,16 @@ public class IntentInstanceServiceImplTest {
body.put("resource-version",123);
Call mockCall = PowerMockito.mock(Call.class);
Response<JSONObject> response = Response.success(body);
- when(intentAaiService.queryServiceInstance(anyString(),anyString(),anyString())).thenReturn(mockCall);
+ when(intentAaiClient.queryServiceInstance(anyString(),anyString(),anyString())).thenReturn(mockCall);
when(mockCall.execute()).thenReturn(response);
Call mockCall2 = PowerMockito.mock(Call.class);
Response<JSONObject> response2 = Response.success(body);
- when(intentAaiService.deleteServiceInstance(anyString(),anyString(),anyString(),anyString())).thenReturn(mockCall2);
+ when(intentAaiClient.deleteServiceInstance(anyString(),anyString(),anyString(),anyString())).thenReturn(mockCall2);
when(mockCall2.execute()).thenReturn(response2);
spy.deleteIntentInstanceToAAI("CCVPN-id");
- Mockito.verify(intentAaiService, Mockito.times(1)).deleteServiceInstance(anyString(),anyString(),anyString(),any());
+ Mockito.verify(intentAaiClient, Mockito.times(1)).deleteServiceInstance(anyString(),anyString(),anyString(),any());
}
@Test
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceIntegrationTest.java b/server/src/test/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceIntegrationTest.java
index 5bbe8749..a1e925a7 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceIntegrationTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceIntegrationTest.java
@@ -42,7 +42,7 @@ import org.onap.usecaseui.server.config.SOClientConfig;
import org.onap.usecaseui.server.service.csmf.SlicingService;
import org.onap.usecaseui.server.service.csmf.config.SlicingProperties;
import org.onap.usecaseui.server.service.csmf.impl.SlicingServiceImpl;
-import org.onap.usecaseui.server.service.intent.IntentAaiService;
+import org.onap.usecaseui.server.service.intent.IntentAaiClient;
import org.onap.usecaseui.server.service.intent.IntentSoService;
import org.onap.usecaseui.server.service.intent.config.IntentProperties;
import org.onap.usecaseui.server.service.lcm.impl.DefaultServiceLcmService;
@@ -105,7 +105,7 @@ public class IntentInstanceServiceIntegrationTest {
SlicingService slicingService;
@Autowired
- IntentAaiService intentAaiService;
+ IntentAaiClient intentAaiClient;
@Autowired
IntentSoService intentSoService;
@@ -122,7 +122,7 @@ public class IntentInstanceServiceIntegrationTest {
Transaction transaction = mock(Transaction.class);
when(sessionFactory.openSession()).thenReturn(session);
when(session.beginTransaction()).thenReturn(transaction);
- this.intentService = new IntentInstanceServiceImpl(slicingService, intentAaiService, intentSoService, sessionFactory, resourceMgtServiceImpl, intentProperties);
+ this.intentService = new IntentInstanceServiceImpl(slicingService, intentAaiClient, intentSoService, sessionFactory, resourceMgtServiceImpl, intentProperties);
}
IntentInstanceServiceImpl intentService;
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/GeneralConvertImplTest.java b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/GeneralConvertImplTest.java
index 271ce7ee..f59d0d74 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/GeneralConvertImplTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/GeneralConvertImplTest.java
@@ -28,7 +28,7 @@ import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.onap.usecaseui.server.constant.nsmf.NsmfParamConstant;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceAndInstance;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.Relationship;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.RelationshipData;
@@ -36,12 +36,12 @@ import org.onap.usecaseui.server.service.slicingdomain.aai.bean.RelationshipData
public class GeneralConvertImplTest {
GeneralConvertImpl generalConvert = null;
- AAISliceService aaiSliceService = null;
+ AAISliceClient aaiSliceClient = null;
@Before
public void before() throws Exception {
- aaiSliceService = mock(AAISliceService.class);
- generalConvert = new GeneralConvertImpl(aaiSliceService);
+ aaiSliceClient = mock(AAISliceClient.class);
+ generalConvert = new GeneralConvertImpl(aaiSliceClient);
}
@Test
@@ -84,11 +84,11 @@ public class GeneralConvertImplTest {
String serviceType = NsmfParamConstant.SERVICE_TYPE_5G;
String serviceInstanceId = "1234-ty23-rt56-oiu9";
- when(aaiSliceService.queryOrderByService(globalCustomerId, serviceType, serviceInstanceId))
+ when(aaiSliceClient.queryOrderByService(globalCustomerId, serviceType, serviceInstanceId))
.thenReturn(successfulCall(object));
String orderId = "order123";
- when(aaiSliceService
+ when(aaiSliceClient
.queryOrderByOrderId(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, orderId))
.thenReturn(successfulCall(object));
generalConvert.getUseInterval(serviceInstanceId);
@@ -100,11 +100,11 @@ public class GeneralConvertImplTest {
String serviceType = NsmfParamConstant.SERVICE_TYPE_5G;
String serviceInstanceId = "1234-ty23-rt56-oiu9";
- when(aaiSliceService.queryOrderByService(globalCustomerId, serviceType, serviceInstanceId))
+ when(aaiSliceClient.queryOrderByService(globalCustomerId, serviceType, serviceInstanceId))
.thenReturn(failedCall("aai is not exist!"));
String orderId = "order123";
- when(aaiSliceService
+ when(aaiSliceClient
.queryOrderByOrderId(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, orderId))
.thenReturn(failedCall("aai is not exist!"));
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceConvertTest.java b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceConvertTest.java
index 4625ac63..47a50fe0 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceConvertTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceConvertTest.java
@@ -43,7 +43,7 @@ import org.onap.usecaseui.server.bean.nsmf.task.BusinessDemandInfo;
import org.onap.usecaseui.server.bean.nsmf.task.NstInfo;
import org.onap.usecaseui.server.constant.nsmf.NsmfParamConstant;
import org.onap.usecaseui.server.controller.IntentController;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIService;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceAndInstance;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.AAIServiceNST;
@@ -58,15 +58,15 @@ public class ResourceMgtServiceConvertTest {
ResourceMgtServiceConvert resourceMgtServiceConvert = null;
SOSliceService soSliceService = null;
- AAISliceService aaiSliceService = null;
+ AAISliceClient aaiSliceClient = null;
GeneralConvertImpl generalConvert;
@Before
public void before() throws Exception {
- aaiSliceService = mock(AAISliceService.class);
+ aaiSliceClient = mock(AAISliceClient.class);
generalConvert = mock(GeneralConvertImpl.class);
- resourceMgtServiceConvert = new ResourceMgtServiceConvert(aaiSliceService);
+ resourceMgtServiceConvert = new ResourceMgtServiceConvert(aaiSliceClient);
MemberModifier.field(ResourceMgtServiceConvert.class, "generalConvert").set(resourceMgtServiceConvert , generalConvert);
}
@@ -116,7 +116,7 @@ public class ResourceMgtServiceConvertTest {
NsiInfo nsiInfo = new NsiInfo();
String nsiId = "1234-ty23-rt56-oiu9";
- when(aaiSliceService.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId))
+ when(aaiSliceClient.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId))
.thenReturn(successfulCall(object));
resourceMgtServiceConvert.getNsiInfoByBusiness(nsiInfo, nsiId);
}
@@ -126,7 +126,7 @@ public class ResourceMgtServiceConvertTest {
NsiInfo nsiInfo = new NsiInfo();
String nsiId = "1234-ty23-rt56-oiu9";
- when(aaiSliceService.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId))
+ when(aaiSliceClient.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtServiceConvert.getNsiInfoByBusiness(nsiInfo, nsiId);
}
@@ -153,7 +153,7 @@ public class ResourceMgtServiceConvertTest {
NstInfo nstInfo = new NstInfo();
String nsiId = "1234-ty23-rt56-oiu9";
- when(aaiSliceService
+ when(aaiSliceClient
.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId))
.thenReturn(successfulCall(object));
@@ -161,7 +161,7 @@ public class ResourceMgtServiceConvertTest {
String modelVersionId = "v00001";
AAIServiceNST aaiServiceNST = new AAIServiceNST();
- when(aaiSliceService.queryServiceNST(modelInvariantId, modelVersionId))
+ when(aaiSliceClient.queryServiceNST(modelInvariantId, modelVersionId))
.thenReturn(successfulCall(aaiServiceNST));
try {
@@ -176,7 +176,7 @@ public class ResourceMgtServiceConvertTest {
NstInfo nstInfo = new NstInfo();
String nsiId = "1234-ty23-rt56-oiu9";
- when(aaiSliceService
+ when(aaiSliceClient
.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId))
.thenReturn(failedCall("aai is not exist!"));
@@ -184,7 +184,7 @@ public class ResourceMgtServiceConvertTest {
String modelVersionId = "v00001";
AAIServiceNST aaiServiceNST = new AAIServiceNST();
- when(aaiSliceService.queryServiceNST(modelInvariantId, modelVersionId))
+ when(aaiSliceClient.queryServiceNST(modelInvariantId, modelVersionId))
.thenReturn(failedCall("aai is not exist!"));
try {
@@ -199,7 +199,7 @@ public class ResourceMgtServiceConvertTest {
JSONObject object = new JSONObject();
String businessId = "1234-ty23-rt56-oiu9";
- when(aaiSliceService.queryAllottedResources(NsmfParamConstant.CUSTOM_5G,
+ when(aaiSliceClient.queryAllottedResources(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, businessId))
.thenReturn(successfulCall(object));
try {
@@ -213,7 +213,7 @@ public class ResourceMgtServiceConvertTest {
public void getNsiIdByBusinessWithThrowsException() {
String businessId = "1234-ty23-rt56-oiu9";
- when(aaiSliceService
+ when(aaiSliceClient
.queryAllottedResources(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, businessId))
.thenReturn(failedCall("aai is not exist!"));
try {
@@ -230,7 +230,7 @@ public class ResourceMgtServiceConvertTest {
SlicingBusinessDetails slicingBusinessDetails = new SlicingBusinessDetails();
AAIServiceAndInstance aaiServiceAndInstance = new AAIServiceAndInstance();
- when(aaiSliceService.getServiceProfiles(NsmfParamConstant.CUSTOM_5G,
+ when(aaiSliceClient.getServiceProfiles(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, businessId))
.thenReturn(successfulCall(object));
when(generalConvert.getUseInterval(eq(businessId))).thenReturn(businessId);
@@ -302,7 +302,7 @@ public class ResourceMgtServiceConvertTest {
nssiIdList.add(nssiId);
JSONObject object = new JSONObject();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nssiId))
.thenReturn(successfulCall(object));
@@ -324,7 +324,7 @@ public class ResourceMgtServiceConvertTest {
String nssiId = "nssiTest01";
nssiIdList.add(nssiId);
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nssiId))
.thenReturn(failedCall("aai is not exist!"));
@@ -347,7 +347,7 @@ public class ResourceMgtServiceConvertTest {
businessIdList.add(businessId);
JSONObject object = new JSONObject();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, businessId))
.thenReturn(successfulCall(object));
try {
@@ -368,7 +368,7 @@ public class ResourceMgtServiceConvertTest {
String businessId = "busiId001";
businessIdList.add(businessId);
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, businessId))
.thenReturn(failedCall("aai is not exist!"));
try {
@@ -480,7 +480,7 @@ public class ResourceMgtServiceConvertTest {
HostedNsiList hostedNsiList = new HostedNsiList();
AAIServiceAndInstance aaiServiceAndInstance = new AAIServiceAndInstance();
- when(aaiSliceService.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G,
+ when(aaiSliceClient.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, nsiId))
.thenReturn(successfulCall(object));
try {
@@ -497,7 +497,7 @@ public class ResourceMgtServiceConvertTest {
HostedNsiList hostedNsiList = new HostedNsiList();
AAIServiceAndInstance aaiServiceAndInstance = new AAIServiceAndInstance();
- when(aaiSliceService
+ when(aaiSliceClient
.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId))
.thenReturn(failedCall("aai is not exist!"));
try {
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImplTest.java b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImplTest.java
index 3a258956..407cdc73 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImplTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImplTest.java
@@ -27,7 +27,7 @@ import okhttp3.RequestBody;
import org.junit.Before;
import org.junit.Test;
import org.onap.usecaseui.server.constant.nsmf.NsmfParamConstant;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.NetworkInfo;
import org.onap.usecaseui.server.service.slicingdomain.so.SOSliceService;
import org.onap.usecaseui.server.service.slicingdomain.so.bean.ActivateService;
@@ -38,20 +38,20 @@ public class ResourceMgtServiceImplTest {
ResourceMgtServiceImpl resourceMgtService = null;
SOSliceService soSliceService;
- AAISliceService aaiSliceService;
+ AAISliceClient aaiSliceClient;
@Before
public void before() throws Exception {
- aaiSliceService = mock(AAISliceService.class);
+ aaiSliceClient = mock(AAISliceClient.class);
soSliceService = mock(SOSliceService.class);
- resourceMgtService = new ResourceMgtServiceImpl(aaiSliceService, soSliceService);
+ resourceMgtService = new ResourceMgtServiceImpl(aaiSliceClient, soSliceService);
}
@Test
public void itCanQuerySlicingBusiness() {
JSONObject object = new JSONObject();
- when(aaiSliceService
+ when(aaiSliceClient
.listService(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G))
.thenReturn(successfulCall(object));
resourceMgtService.querySlicingBusiness(1, 100);
@@ -61,7 +61,7 @@ public class ResourceMgtServiceImplTest {
public void querySlicingBusinessWithThrowsException() {
JSONObject object = new JSONObject();
- when(aaiSliceService
+ when(aaiSliceClient
.listService(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtService.querySlicingBusiness(1, 100);
@@ -70,7 +70,7 @@ public class ResourceMgtServiceImplTest {
@Test
public void emptyResponseWhenQuerySlicingBusiness() {
Call<JSONObject> call = emptyBodyCall();
- when(aaiSliceService
+ when(aaiSliceClient
.listService(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G)).thenReturn(call);
resourceMgtService.querySlicingBusiness(1, 100);
}
@@ -79,7 +79,7 @@ public class ResourceMgtServiceImplTest {
public void itCanQuerySlicingBusinessByStatus() {
JSONObject object = new JSONObject();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceByStatus(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, "activated"))
.thenReturn(successfulCall(object));
resourceMgtService.querySlicingBusinessByStatus("activated", 1, 100);
@@ -88,14 +88,14 @@ public class ResourceMgtServiceImplTest {
@Test
public void emptyResponseWhenQuerySlicingBusinessByStatus() {
Call<JSONObject> call = emptyBodyCall();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceByStatus(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, "activated")).thenReturn(call);
resourceMgtService.querySlicingBusinessByStatus("activated", 1, 100);
}
@Test
public void querySlicingBusinessByStatusWithThrowsException() {
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceByStatus(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, "activated"))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtService.querySlicingBusinessByStatus("activated", 1, 100);
@@ -105,11 +105,11 @@ public class ResourceMgtServiceImplTest {
public void itCanQuerySlicingBusinessDetails() {
JSONObject object = new JSONObject();
String businessId = "23er-56ty-4567-rgdf5";
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, businessId))
.thenReturn(successfulCall(object));
NetworkInfo networkInfo = new NetworkInfo();
- when(aaiSliceService
+ when(aaiSliceClient
.getServiceNetworkInstance(businessId))
.thenReturn(successfulCall(networkInfo));
@@ -120,7 +120,7 @@ public class ResourceMgtServiceImplTest {
public void querySlicingBusinessDetailsWithThrowsException() {
String businessId = "23er-56ty-4567-rgdf5";
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, businessId))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtService.querySlicingBusinessDetails(businessId);
@@ -130,7 +130,7 @@ public class ResourceMgtServiceImplTest {
public void emptyResponseWhenQuerySlicingBusinessDetails() {
String businessId = "23er-56ty-4567-rgdf5";
Call<JSONObject> call = emptyBodyCall();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceById(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, businessId)).thenReturn(call);
resourceMgtService.querySlicingBusinessDetails(businessId);
}
@@ -139,7 +139,7 @@ public class ResourceMgtServiceImplTest {
public void itCanQueryNsiInstances() {
JSONObject object = new JSONObject();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G))
.thenReturn(successfulCall(object));
resourceMgtService.queryNsiInstances(1, 100);
@@ -148,7 +148,7 @@ public class ResourceMgtServiceImplTest {
@Test
public void queryNsiInstancesWithThrowsException() {
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtService.queryNsiInstances(1, 100);
@@ -157,7 +157,7 @@ public class ResourceMgtServiceImplTest {
@Test
public void emptyResponseWhenQueryNsiInstances() {
Call<JSONObject> call = emptyBodyCall();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G)).thenReturn(call);
resourceMgtService.queryNsiInstances(1, 100);
}
@@ -166,7 +166,7 @@ public class ResourceMgtServiceImplTest {
public void itCanQueryNsiInstancesByStatus() {
JSONObject object = new JSONObject();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSIByStatus(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, "activated"))
.thenReturn(successfulCall(object));
resourceMgtService.queryNsiInstancesByStatus("activated", 1, 100);
@@ -175,7 +175,7 @@ public class ResourceMgtServiceImplTest {
@Test
public void queryNsiInstancesByStatusWithThrowsException() {
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSIByStatus(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, "activated"))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtService.queryNsiInstancesByStatus("activated", 1, 100);
@@ -184,7 +184,7 @@ public class ResourceMgtServiceImplTest {
@Test
public void emptyResponseWhenQueryNsiInstancesByStatus() {
Call<JSONObject> call = emptyBodyCall();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSIByStatus(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, "activated")).thenReturn(call);
resourceMgtService.queryNsiInstancesByStatus("activated", 1, 100);
}
@@ -193,7 +193,7 @@ public class ResourceMgtServiceImplTest {
public void itCanQueryNsiDetails() {
JSONObject object = new JSONObject();
String serviceInstanceId = "23er-56ty-4567-rgdf5";
- when(aaiSliceService
+ when(aaiSliceClient
.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, serviceInstanceId))
.thenReturn(successfulCall(object));
resourceMgtService.queryNsiDetails(serviceInstanceId);
@@ -203,7 +203,7 @@ public class ResourceMgtServiceImplTest {
public void queryNsiDetailsWithThrowsException() {
String serviceInstanceId = "23er-56ty-4567-rgdf5";
- when(aaiSliceService
+ when(aaiSliceClient
.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, serviceInstanceId))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtService.queryNsiDetails(serviceInstanceId);
@@ -213,7 +213,7 @@ public class ResourceMgtServiceImplTest {
public void emptyResponseWhenQueryNsiDetails() {
Call<JSONObject> call = emptyBodyCall();
String serviceInstanceId = "23er-56ty-4567-rgdf5";
- when(aaiSliceService
+ when(aaiSliceClient
.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, serviceInstanceId)).thenReturn(call);
resourceMgtService.queryNsiDetails(serviceInstanceId);
}
@@ -222,7 +222,7 @@ public class ResourceMgtServiceImplTest {
public void itCanQueryNsiRelatedNssiInfo() {
JSONObject object = new JSONObject();
String nsiId = "23er-56ty-4567-rgdf5";
- when(aaiSliceService
+ when(aaiSliceClient
.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId))
.thenReturn(successfulCall(object));
resourceMgtService.queryNsiRelatedNssiInfo(nsiId);
@@ -232,7 +232,7 @@ public class ResourceMgtServiceImplTest {
public void queryNsiRelatedNssiInfoWithThrowsException() {
String nsiId = "23er-56ty-4567-rgdf5";
- when(aaiSliceService
+ when(aaiSliceClient
.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtService.queryNsiRelatedNssiInfo(nsiId);
@@ -242,7 +242,7 @@ public class ResourceMgtServiceImplTest {
public void emptyResponseWhenQuueryNsiRelatedNssiInfo() {
Call<JSONObject> call = emptyBodyCall();
String nsiId = "23er-56ty-4567-rgdf5";
- when(aaiSliceService
+ when(aaiSliceClient
.querySerAndSubInsByNSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nsiId)).thenReturn(call);
resourceMgtService.queryNsiRelatedNssiInfo(nsiId);
}
@@ -251,7 +251,7 @@ public class ResourceMgtServiceImplTest {
public void itCanQueryNssiInstances() {
JSONObject object = new JSONObject();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G))
.thenReturn(successfulCall(object));
resourceMgtService.queryNssiInstances(1, 100);
@@ -260,7 +260,7 @@ public class ResourceMgtServiceImplTest {
@Test
public void queryNssiInstancesWithThrowsException() {
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtService.queryNssiInstances(1, 100);
@@ -269,7 +269,7 @@ public class ResourceMgtServiceImplTest {
@Test
public void emptyResponseWhenQueryNssiInstances() {
Call<JSONObject> call = emptyBodyCall();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G)).thenReturn(call);
resourceMgtService.queryNssiInstances(1, 100);
}
@@ -278,7 +278,7 @@ public class ResourceMgtServiceImplTest {
public void itCanQueryNssiInstancesByStatus() {
JSONObject object = new JSONObject();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSSIByStatus(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, "activated"))
.thenReturn(successfulCall(object));
resourceMgtService.queryNssiInstancesByStatus("activated", 1, 100);
@@ -287,7 +287,7 @@ public class ResourceMgtServiceImplTest {
@Test
public void queryNssiInstancesByStatusWithThrowsException() {
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSSIByStatus(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, "activated"))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtService.queryNssiInstancesByStatus("activated", 1, 100);
@@ -296,7 +296,7 @@ public class ResourceMgtServiceImplTest {
@Test
public void emptyResponseWhenQueryNssiInstancesByStatus() {
Call<JSONObject> call = emptyBodyCall();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSSIByStatus(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, "activated")).thenReturn(call);
resourceMgtService.queryNssiInstancesByStatus("activated", 1, 100);
}
@@ -305,7 +305,7 @@ public class ResourceMgtServiceImplTest {
public void itCanQueryNssiInstancesByEnvironment() {
JSONObject object = new JSONObject();
String environmentContext = "cn";
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSSIByEnv(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, environmentContext))
.thenReturn(successfulCall(object));
@@ -315,7 +315,7 @@ public class ResourceMgtServiceImplTest {
@Test
public void queryNssiInstancesByEnvironmentWithThrowsException() {
String environmentContext = "cn";
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSSIByEnv(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, environmentContext))
.thenReturn(failedCall("aai is not exist!"));
@@ -326,7 +326,7 @@ public class ResourceMgtServiceImplTest {
public void emptyResponseWhenQueryNssiInstancesByEnvironment() {
String environmentContext = "cn";
Call<JSONObject> call = emptyBodyCall();
- when(aaiSliceService
+ when(aaiSliceClient
.listServiceNSSIByEnv(NsmfParamConstant.CUSTOM_5G,
NsmfParamConstant.SERVICE_TYPE_5G, environmentContext)).thenReturn(call);
resourceMgtService.queryNssiInstancesByEnvironment(environmentContext, 1, 100);
@@ -336,7 +336,7 @@ public class ResourceMgtServiceImplTest {
public void itCanQueryNssiDetails() {
JSONObject object = new JSONObject();
String nssiId = "23er-56ty-4567-rgdf5";
- when(aaiSliceService
+ when(aaiSliceClient
.queryNSIByNSSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nssiId))
.thenReturn(successfulCall(object));
resourceMgtService.queryNssiDetails(nssiId);
@@ -346,7 +346,7 @@ public class ResourceMgtServiceImplTest {
public void queryNssiDetailsWithThrowsException() {
String nssiId = "23er-56ty-4567-rgdf5";
- when(aaiSliceService
+ when(aaiSliceClient
.queryNSIByNSSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nssiId))
.thenReturn(failedCall("aai is not exist!"));
resourceMgtService.queryNssiDetails(nssiId);
@@ -356,7 +356,7 @@ public class ResourceMgtServiceImplTest {
public void emptyResponseWhenQueryNssiDetails() {
String nssiId = "23er-56ty-4567-rgdf5";
Call<JSONObject> call = emptyBodyCall();
- when(aaiSliceService
+ when(aaiSliceClient
.queryNSIByNSSI(NsmfParamConstant.CUSTOM_5G, NsmfParamConstant.SERVICE_TYPE_5G, nssiId)).thenReturn(call);
resourceMgtService.queryNssiDetails(nssiId);
}
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceConvertTest.java b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceConvertTest.java
index 07e790bc..be2b4647 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceConvertTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceConvertTest.java
@@ -34,7 +34,7 @@ import org.onap.usecaseui.server.bean.nsmf.task.SlicingTaskAuditInfo;
import org.onap.usecaseui.server.bean.nsmf.task.SlicingTaskCreationInfo;
import org.onap.usecaseui.server.bean.nsmf.task.SlicingTaskCreationProgress;
import org.onap.usecaseui.server.bean.nsmf.task.SlicingTaskList;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.ConnectionLink;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.ConnectionLinkList;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.RelationshipList;
@@ -50,14 +50,14 @@ import org.onap.usecaseui.server.service.slicingdomain.so.bean.TnBHSliceTaskInfo
public class TaskMgtServiceConvertTest {
TaskMgtServiceConvert taskMgtServiceConvert = null;
- AAISliceService aaiSliceService;
+ AAISliceClient aaiSliceClient;
GeneralConvertImpl generalConvert;
@Before
public void before() throws Exception {
- aaiSliceService = mock(AAISliceService.class);
+ aaiSliceClient = mock(AAISliceClient.class);
generalConvert = mock(GeneralConvertImpl.class);
- taskMgtServiceConvert = new TaskMgtServiceConvert(aaiSliceService);
+ taskMgtServiceConvert = new TaskMgtServiceConvert(aaiSliceClient);
taskMgtServiceConvert.setGeneralConvert(generalConvert);
}
@@ -95,7 +95,7 @@ public class TaskMgtServiceConvertTest {
@Test
public void convertSlicingTaskListWithThrowsException() {
- when(aaiSliceService.getConnectionLinks()).thenReturn(failedCall("so is not exist!"));
+ when(aaiSliceClient.getConnectionLinks()).thenReturn(failedCall("so is not exist!"));
SlicingTaskList targetSlicingTaskList = new SlicingTaskList();
SOTaskRsp soTaskRsp = new SOTaskRsp();
soTaskRsp.setTask(null);
@@ -277,13 +277,13 @@ public class TaskMgtServiceConvertTest {
logicalLink.add(connectionLink);
connectionLinkList.setLogicalLink(logicalLink);
- when(aaiSliceService.getConnectionLinks()).thenReturn(successfulCall(connectionLinkList));
+ when(aaiSliceClient.getConnectionLinks()).thenReturn(successfulCall(connectionLinkList));
taskMgtServiceConvert.queryEndPointId("123");
}
@Test
public void queryEndPointIdWithThrowsException() {
- when(aaiSliceService.getConnectionLinks()).thenReturn(failedCall("so is not exist!"));
+ when(aaiSliceClient.getConnectionLinks()).thenReturn(failedCall("so is not exist!"));
taskMgtServiceConvert.queryEndPointId("123");
}
}
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImplTest.java b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImplTest.java
index 220e8e97..1a6734c5 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImplTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImplTest.java
@@ -47,21 +47,21 @@ import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.Relat
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.RelationshipList;
import org.onap.usecaseui.server.service.slicingdomain.so.SOSliceService;
import org.onap.usecaseui.server.service.slicingdomain.so.bean.SOTask;
-import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceService;
+import org.onap.usecaseui.server.service.slicingdomain.aai.AAISliceClient;
import org.onap.usecaseui.server.service.slicingdomain.aai.bean.connection.ConnectionLinkList;
public class TaskMgtServiceImplTest {
TaskMgtServiceImpl taskMgtService = null;
SOSliceService soSliceService = null;
- AAISliceService aaiSliceService = null;
+ AAISliceClient aaiSliceClient = null;
TaskMgtServiceConvert taskMgtServiceConvert = null;
@Before
public void before() throws Exception {
soSliceService = mock(SOSliceService.class);
- aaiSliceService = mock(AAISliceService.class);
- taskMgtService = new TaskMgtServiceImpl(soSliceService,aaiSliceService);
+ aaiSliceClient = mock(AAISliceClient.class);
+ taskMgtService = new TaskMgtServiceImpl(soSliceService,aaiSliceClient);
taskMgtServiceConvert = mock(TaskMgtServiceConvert.class);
taskMgtService.taskMgtServiceConvert = taskMgtServiceConvert;
}
@@ -201,7 +201,7 @@ public class TaskMgtServiceImplTest {
@Test
public void queryConnectionLinksWithThrowsException() {
String taskId = "we23-345r-45ty-5687";
- when(aaiSliceService.getConnectionLinks()).thenReturn(failedCall("so is not exist!"));
+ when(aaiSliceClient.getConnectionLinks()).thenReturn(failedCall("so is not exist!"));
taskMgtService.queryConnectionLinks(3,5);
}
@@ -232,10 +232,10 @@ public class TaskMgtServiceImplTest {
String name2 = "name2";
EndPointInfoList endPointInfoList = new EndPointInfoList();
- when(aaiSliceService.getConnectionLinks()).thenReturn(successfulCall(connectionLinkList));
- when(aaiSliceService.getEndpointByLinkName(name1)).thenReturn(successfulCall(endPointInfoList));
- when(aaiSliceService.getEndpointByLinkName2(name2)).thenReturn(successfulCall(endPointInfoList));
- when(aaiSliceService.getAllottedResource(taskId, taskId)).thenReturn(successfulCall(connectionLink));
+ when(aaiSliceClient.getConnectionLinks()).thenReturn(successfulCall(connectionLinkList));
+ when(aaiSliceClient.getEndpointByLinkName(name1)).thenReturn(successfulCall(endPointInfoList));
+ when(aaiSliceClient.getEndpointByLinkName2(name2)).thenReturn(successfulCall(endPointInfoList));
+ when(aaiSliceClient.getAllottedResource(taskId, taskId)).thenReturn(successfulCall(connectionLink));
taskMgtService.queryConnectionLinks(3,5);
}
diff --git a/standalone/pom.xml b/standalone/pom.xml
index ab2457b3..a31bc273 100644
--- a/standalone/pom.xml
+++ b/standalone/pom.xml
@@ -19,7 +19,7 @@
<parent>
<groupId>org.onap.usecase-ui.server</groupId>
<artifactId>usecase-ui-server-parent</artifactId>
- <version>15.0.1-SNAPSHOT</version>
+ <version>15.0.3-SNAPSHOT</version>
</parent>
<artifactId>usecase-ui-server-standalone</artifactId>
@@ -28,7 +28,7 @@
<description>distribute binary files and docker image for usecase-ui server</description>
<properties>
- <usecaseui.version>15.0.1</usecaseui.version>
+ <usecaseui.version>15.0.3</usecaseui.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
diff --git a/version.properties b/version.properties
index 6481e8b9..d78ea91e 100644
--- a/version.properties
+++ b/version.properties
@@ -4,7 +4,7 @@
major=15
minor=0
-patch=1
+patch=3
base_version=${major}.${minor}.${patch}