diff options
author | Chuanyu Chen <chenchuanyu@huawei.com> | 2020-09-18 09:38:48 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-09-18 09:38:48 +0000 |
commit | 150548c32b0d38d5465f81b8b45923d20bb18f1b (patch) | |
tree | 0dad1e5ec8fa49be0ad52241bd4cfbcc77a4d6f9 /adapters | |
parent | a65d2595848132a3241889ca3843b2308f9d0862 (diff) | |
parent | 177987a9c3bc89a61e211f0fa31781f7abdc3ce8 (diff) |
Merge "Update NSMF workflow to for the E2E Network Slicing requirements"
Diffstat (limited to 'adapters')
3 files changed, 29 insertions, 13 deletions
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java index ed327fd981..9df20bac1c 100644 --- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java +++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java @@ -20,26 +20,36 @@ package org.onap.so.adapters.nssmf.enums; +import lombok.Getter; + +@Getter public enum ActionType { - ALLOCATE, + ALLOCATE("allocate"), + + DEALLOCATE("deallocate"), + + CREATE("create"), + + TERMINATE("terminate"), - DEALLOCATE, + ACTIVATE("activate"), - CREATE, + DEACTIVATE("deactivate"), - TERMINATE, + QUERY_JOB_STATUS("query_job_status"), - ACTIVATE, + MODIFY_BY_ID("modify_by_id"), - DEACTIVATE, + MODIFY("modify"), - QUERY_JOB_STATUS, + QUERY_NSSI_SELECTION_CAPABILITY("query_nssi_selection_capability"), - MODIFY_BY_ID, + QUERY_SUB_NET_CAPABILITY("query_sub_net_capability"),; - MODIFY, + private String type; - QUERY_NSSI_SELECTION_CAPABILITY, - QUERY_SUB_NET_CAPABILITY + ActionType(String type) { + this.type = type; + } } 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 16a5b2ada0..d8a9088a42 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 @@ -92,8 +92,13 @@ public abstract class ExternalNssmfManager extends BaseNssmfManager { private RestResponse doResponseStatus(ResourceOperationStatus status) throws ApplicationException { RestResponse restResponse = sendRequest(null); - ResponseDescriptor rspDesc = - unMarshal(restResponse.getResponseContent(), JobStatusResponse.class).getResponseDescriptor(); + JobStatusResponse jobStatusResponse = unMarshal(restResponse.getResponseContent(), JobStatusResponse.class); + + ResponseDescriptor rspDesc = jobStatusResponse.getResponseDescriptor(); + rspDesc.setNssiId(status.getResourceInstanceID()); + + jobStatusResponse.setResponseDescriptor(rspDesc); + restResponse.setResponseContent(marshal(jobStatusResponse)); updateRequestDbJobStatus(rspDesc, status, restResponse); return 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 f439b400d9..348bf12bcb 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 @@ -76,6 +76,7 @@ public abstract class InternalNssmfManager extends BaseNssmfManager { 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)); } |