summaryrefslogtreecommitdiffstats
path: root/so-nssmf-adapter-application/src
diff options
context:
space:
mode:
authorzm330 <zhangminyj@chinamobile.com>2021-03-19 14:39:17 +0800
committerzm330 <zhangminyj@chinamobile.com>2021-03-19 14:39:32 +0800
commitd02c207fe4c11502a186f053a3bf87a7d0a023f9 (patch)
treed186501b4d02ee2c53ea510a41311220c31934ca /so-nssmf-adapter-application/src
parentb1f4a73ad987b48a2b002844fb6a1091ade63173 (diff)
Support AN simulator modify process
Issue-ID: SO-3381 Signed-off-by: zm330 <zhangminyj@chinamobile.com> Change-Id: Ibc8efc85413358b2fe1e47c85e0f191c4cebcd2d
Diffstat (limited to 'so-nssmf-adapter-application/src')
-rw-r--r--so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java21
-rw-r--r--so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java2
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);
}
}