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/src/main | |
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/src/main')
4 files changed, 12 insertions, 20 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" } } |