diff options
author | Chuanyu Chen <chenchuanyu@huawei.com> | 2020-11-17 08:13:30 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-11-17 08:13:30 +0000 |
commit | aa3265046ac4de992884032613eeed5f7e16e2ef (patch) | |
tree | 4a7277c7e29713f8151a7464afc40534e2a830e5 /adapters/mso-nssmf-adapter | |
parent | 203ac2c0061e98463c65914b58edd652bf550df3 (diff) | |
parent | 75a86282d2ec71f53ca4e078762f0fae25dac8cd (diff) |
Merge "fixed cs profile trans to ss profile"
Diffstat (limited to 'adapters/mso-nssmf-adapter')
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" |