summaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorhetengjiao <hetengjiao@chinamobile.com>2020-11-13 15:18:59 +0800
committerhetengjiao <hetengjiao@chinamobile.com>2020-11-17 11:53:27 +0800
commit75a86282d2ec71f53ca4e078762f0fae25dac8cd (patch)
tree3ba6c3ee7292b4ba10864cd1134a77be581c9832 /adapters
parentd9c2a8645009b7080302f01b7e13e1480060eebd (diff)
fixed cs profile trans to ss profile
Issue-ID: SO-2963 Signed-off-by: hetengjiao <hetengjiao@chinamobile.com> Change-Id: Ia5a40ac9126641479047a0a76c7d2fefc1d6f07d
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java6
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java2
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java6
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java2
-rw-r--r--adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java4
5 files changed, 13 insertions, 7 deletions
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java
index 0b332af607..e397201e4b 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java
@@ -77,6 +77,12 @@ public class NssmfManagerBuilder {
return;
}
+ if (ExecutorType.EXTERNAL.equals(executorType) && NetworkType.TRANSPORT.equals(networkType)) {
+ this.nssmfManger = new ExternalAnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType)
+ .setInitStatus("activated");
+ return;
+ }
+
if (ExecutorType.EXTERNAL.equals(executorType) && NetworkType.ACCESS.equals(networkType)) {
this.nssmfManger = new ExternalAnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType)
.setInitStatus("activated");
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
index acaa3945bd..2de6e01693 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
@@ -193,7 +193,7 @@ public abstract class BaseNssmfManager implements NssmfManager {
return doQuerySubnetCapability(nbiRequest.getSubnetCapabilityQuery());
}
- protected abstract <T> RestResponse doQuerySubnetCapability(QuerySubnetCapability req) throws ApplicationException;
+ protected abstract RestResponse doQuerySubnetCapability(QuerySubnetCapability req) throws ApplicationException;
/**
* send request to nssmf
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
index 9dcd2d4cfb..3c5be7eb39 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
@@ -180,11 +180,11 @@ public abstract class ExternalNssmfManager extends BaseNssmfManager {
}
@Override
- protected <T> RestResponse doQuerySubnetCapability(QuerySubnetCapability req) throws ApplicationException {
+ protected RestResponse doQuerySubnetCapability(QuerySubnetCapability req) throws ApplicationException {
ObjectMapper oMapper = new ObjectMapper();
InputStream inputStream = TypeReference.class.getResourceAsStream("/subnetCapability.json");
- Map<String, Object> subnetCapability = new HashMap<>();
+ Map subnetCapability = new HashMap<>();
try {
subnetCapability = oMapper.readValue(inputStream, Map.class);
} catch (Exception e) {
@@ -201,7 +201,7 @@ public abstract class ExternalNssmfManager extends BaseNssmfManager {
try {
response = oMapper.writeValueAsString(responseMap);
} catch (JsonProcessingException e) {
- logger.debug("Exception while converting subnet capability object to String {}", e);
+ logger.debug("Exception while converting subnet capability object to String {}", e.getMessage());
}
RestResponse rsp = new RestResponse();
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
index 296c30c1d8..e89160c4ae 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
@@ -122,7 +122,7 @@ public abstract class InternalNssmfManager extends BaseNssmfManager {
protected abstract String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
@Override
- protected <T> RestResponse doQuerySubnetCapability(QuerySubnetCapability req) throws ApplicationException {
+ protected RestResponse doQuerySubnetCapability(QuerySubnetCapability req) throws ApplicationException {
// handler
return sendRequest(marshal(req));
}
diff --git a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
index f150f47f4f..2d79544383 100644
--- a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
+++ b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
@@ -77,9 +77,9 @@ public class NssmfAdapterRestTest {
private final static String ALLOCATE = "{\n" + " \"esrInfo\" : {\n" + " \"vendor\" : \"huawei\",\n"
+ " \"networkType\" : \"cn\"\n" + " },\n" + " \"allocateCnNssi\" : {\n"
+ " \"nssiId\" : \"NSST-C-001-HDBNJ-NSSMF-01-A-ZX\",\n" + " \"nssiName\" : \"eMBB-001\",\n"
- + " \"sliceProfile\" : {\n" + " \"snssaiList\" : [ \"001-100001\" ],\n"
+ + " \"sliceProfile\" : {\n" + " \"sNSSAIList\" : [ \"001-100001\" ],\n"
+ " \"sliceProfileId\" : \"ab9af40f13f721b5f13539d87484098\",\n"
- + " \"plmnIdList\" : [ \"460-00\", \"460-01\" ],\n" + " \"perfReq\" : {\n"
+ + " \"pLMNIdList\" : [ \"460-00\", \"460-01\" ],\n" + " \"perfReq\" : {\n"
+ " \"perfReqEmbbList\" : [ {\n" + " \"activityFactor\" : 50\n" + " } ]\n"
+ " },\n" + " \"maxNumberofUEs\" : 200,\n"
+ " \"coverageAreaTAList\" : [ \"1\", \"2\", \"3\" ],\n" + " \"latency\" : 6,\n"