From d02c207fe4c11502a186f053a3bf87a7d0a023f9 Mon Sep 17 00:00:00 2001 From: zm330 Date: Fri, 19 Mar 2021 14:39:17 +0800 Subject: Support AN simulator modify process Issue-ID: SO-3381 Signed-off-by: zm330 Change-Id: Ibc8efc85413358b2fe1e47c85e0f191c4cebcd2d --- .../impl/external/ExternalAnNssmfManager.java | 21 +++++++++++++++++++-- .../impl/internal/InternalTnNssmfManager.java | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java index cd4d637..e9eb14c 100644 --- a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java +++ b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java @@ -118,8 +118,25 @@ public class ExternalAnNssmfManager extends ExternalNssmfManager { @Override public RestResponse modifyNssi(NssmfAdapterNBIRequest modifyRequest) throws ApplicationException { - // TODO - return null; + + NssiResponse resp = new NssiResponse(); + String nssiId = modifyRequest.getActDeActNssi().getNssiId(); + resp.setJobId(UUID.randomUUID().toString()); + resp.setNssiId(nssiId); + + RestResponse returnRsp = new RestResponse(); + + returnRsp.setStatus(202); + returnRsp.setResponseContent(marshal(resp)); + + ResourceOperationStatus status = + new ResourceOperationStatus(serviceInfo.getNsiId(), resp.getJobId(), serviceInfo.getServiceUuid()); + status.setResourceInstanceID(nssiId); + status.setOperType(actionType.toString()); + + updateDbStatus(status, returnRsp.getStatus(), JobStatus.FINISHED, NssmfAdapterUtil.getStatusDesc(actionType)); + return returnRsp; + } @Override diff --git a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java index c915684..7240ac1 100644 --- a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java +++ b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java @@ -36,7 +36,7 @@ public class InternalTnNssmfManager extends InternalNssmfManager { @Override protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException { - // TODO + // same with allocate except send nssiId return doWrapAllocateReqBody(nbiRequest); } } -- cgit 1.2.3-korg