diff options
author | hetengjiao <hetengjiao@chinamobile.com> | 2020-11-26 11:02:42 +0800 |
---|---|---|
committer | hetengjiao <hetengjiao@chinamobile.com> | 2020-11-26 19:30:42 +0800 |
commit | 88f7235a08466ca2700a0255fcb25fa875ccb982 (patch) | |
tree | 1fc18e8053ec39e547254d8133a327cd501007cc /adapters/mso-nssmf-adapter | |
parent | a3761511f6343eba0a478116f958881b6925c4cf (diff) |
New attributes are added according to the standard and fixed TN allocate response
Issue-ID: SO-2963
Signed-off-by: hetengjiao <hetengjiao@chinamobile.com>
Change-Id: I4a2dfccbfa9dcdbe93d50a03b307061dca45c81a
Diffstat (limited to 'adapters/mso-nssmf-adapter')
6 files changed, 18 insertions, 24 deletions
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 fb880a91e3..0456c90fae 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 @@ -173,8 +173,6 @@ public abstract class BaseNssmfManager implements NssmfManager { logger.info("Query operations: nsiId = [{}], jobId = [{}], serviceUuid = [{}]", nsiId, jobId, serviceUuid); - ResourceOperationStatus status = new ResourceOperationStatus(nsiId, jobId, serviceUuid); - List<ResourceOperationStatus> resourceOperationStatuses = repository.findByServiceIdAndOperationId(nsiId, jobId); 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 4b0e98e8ec..7ec6c0f9e1 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 @@ -235,6 +235,8 @@ public abstract class ExternalNssmfManager extends BaseNssmfManager { status.setOperType(actionType.toString()); status.setProgress("0"); + response.setStatus(STARTED.toString()); + restResponse.setResponseContent(marshal(response)); updateDbStatus(status, restResponse.getStatus(), STARTED, NssmfAdapterUtil.getStatusDesc(actionType)); } } 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 e89160c4ae..64ab199bc1 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 @@ -66,19 +66,20 @@ public abstract class InternalNssmfManager extends BaseNssmfManager { } private RestResponse responseDBStatus(ResourceOperationStatus status) throws ApplicationException { + JobStatusResponse statusResponse = new JobStatusResponse(); ResponseDescriptor descriptor = new ResponseDescriptor(); if (status == null) { descriptor.setProgress(0); descriptor.setStatus(PROCESSING.name()); descriptor.setStatusDescription("Initiating Nssi Instance"); - return restUtil.createResponse(200, marshal(descriptor)); + } else { + descriptor.setStatus(status.getStatus()); + descriptor.setStatusDescription(status.getStatusDescription()); + descriptor.setProgress(Integer.parseInt(status.getProgress())); + descriptor.setNssiId(status.getResourceInstanceID()); } - descriptor.setStatus(status.getStatus()); - descriptor.setStatusDescription(status.getStatusDescription()); - descriptor.setProgress(Integer.parseInt(status.getProgress())); - descriptor.setNssiId(status.getResourceInstanceID()); - // descriptor.setResponseId(status.getOperationId()); - return restUtil.createResponse(200, marshal(descriptor)); + statusResponse.setResponseDescriptor(descriptor); + return restUtil.createResponse(200, marshal(statusResponse)); } @Override diff --git a/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json b/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json index 8db52168ae..8753e85ea2 100644 --- a/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json +++ b/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json @@ -1,19 +1,10 @@ { "AN": { - "latency": "5", + "latency": 5, "maxNumberofUEs": "100" }, "CN": { - "latency": "10", + "latency": 5, "maxNumberofConns": "100" - }, - "TN_FH": { - "latency": "10" - }, - "TN_MH": { - "latency": "5" - }, - "TN_BH": { - "latency": "10" } } 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..f78bfd297a 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 @@ -78,6 +78,7 @@ public class NssmfAdapterRestTest { + " \"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" + + " \"maxNumberofPDUSession\" : 10,\n" + " \"sliceProfileId\" : \"ab9af40f13f721b5f13539d87484098\",\n" + " \"plmnIdList\" : [ \"460-00\", \"460-01\" ],\n" + " \"perfReq\" : {\n" + " \"perfReqEmbbList\" : [ {\n" + " \"activityFactor\" : 50\n" + " } ]\n" @@ -315,12 +316,13 @@ public class NssmfAdapterRestTest { taList.add("3"); sP.setSnssaiList(sns); sP.setSliceProfileId("ab9af40f13f721b5f13539d87484098"); - sP.setPlmnIdList(plmn); + sP.setPLMNIdList(plmn); sP.setPerfReq(perfReq); - sP.setMaxNumberofUEs(200); + sP.setMaxNumberOfUEs(200); sP.setCoverageAreaTAList(taList); sP.setLatency(6); sP.setResourceSharingLevel(NON_SHARED); + sP.setMaxNumberOfPDUSession(10); NsiInfo nsiInfo = new NsiInfo(); nsiInfo.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX"); nsiInfo.setNsiName("eMBB-001"); diff --git a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java index 68adf8073b..d7b3b03333 100644 --- a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java +++ b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java @@ -204,9 +204,9 @@ public class NssmfManagerServiceImplTest { taList.add("3"); sP.setSnssaiList(sns); sP.setSliceProfileId("ab9af40f13f721b5f13539d87484098"); - sP.setPlmnIdList(plmn); + sP.setPLMNIdList(plmn); sP.setPerfReq(perfReq); - sP.setMaxNumberofUEs(200); + sP.setMaxNumberOfUEs(200); sP.setCoverageAreaTAList(taList); sP.setLatency(6); sP.setResourceSharingLevel(NON_SHARED); |