summaryrefslogtreecommitdiffstats
path: root/adapters/mso-nssmf-adapter/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-nssmf-adapter/src/main')
-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));
}