aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-nssmf-adapter/src
diff options
context:
space:
mode:
authorhetengjiao <hetengjiao@chinamobile.com>2020-09-18 10:08:26 +0800
committerhetengjiao <hetengjiao@chinamobile.com>2020-09-18 16:02:55 +0800
commit177987a9c3bc89a61e211f0fa31781f7abdc3ce8 (patch)
treee45d266b6eda77c403454f08712c4a7b5d3311a5 /adapters/mso-nssmf-adapter/src
parent27d9076c191384779c76151c119c69e763bc6c35 (diff)
Update NSMF workflow to for the E2E Network Slicing requirements
Issue-ID: SO-2963 Signed-off-by: hetengjiao <hetengjiao@chinamobile.com> Change-Id: Ic792896cc3e7b23f02fd7f8b8305402271eb0d78
Diffstat (limited to 'adapters/mso-nssmf-adapter/src')
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java32
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java9
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java1
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));
}