diff options
author | Enbo Wang <wangenbo@huawei.com> | 2020-03-05 02:11:13 +0800 |
---|---|---|
committer | Enbo Wang <wangenbo@huawei.com> | 2020-03-05 20:52:53 +0800 |
commit | 2aacf632e9d21e140b6a35a8096cca8d2b2329dd (patch) | |
tree | 575e9f41cf4ac982dab374c6f3044d9c126f8260 /bpmn/so-bpmn-infrastructure-common | |
parent | e0f2aae2a783beac292e51fb9ef13272ae050b67 (diff) |
Support PNF software upgrade workflow using SDNC LCM API
Issue-ID: SO-2589
Signed-off-by: Enbo Wang <wangenbo@huawei.com>
Change-Id: I4b6940c21b70eeeaf96e8781762cb7029572e7ae
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
2 files changed, 8 insertions, 3 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/ExecutionVariableNames.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/ExecutionVariableNames.java index fab3496559..3ea8b190ad 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/ExecutionVariableNames.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/ExecutionVariableNames.java @@ -35,8 +35,10 @@ public class ExecutionVariableNames { public final static String TIMEOUT_FOR_NOTIFICATION = "timeoutForPnfEntryNotification"; public final static String PNF_UUID = "pnfUuid"; public final static String SERVICE_INSTANCE_ID = "serviceInstanceId"; + public final static String REQUEST_ID = "requestId"; public final static String MSO_REQUEST_ID = "msoRequestId"; public final static String MODEL_UUID = "modelUuid"; + public final static String REQUEST_PAYLOAD = "requestPayload"; public final static String SERVICE_MODEL_INFO = "serviceModelInfo"; diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/NfSoftwareUpgradeDispatcher.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/NfSoftwareUpgradeDispatcher.java index 4482d2a327..6c140061c0 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/NfSoftwareUpgradeDispatcher.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/NfSoftwareUpgradeDispatcher.java @@ -69,7 +69,7 @@ public class NfSoftwareUpgradeDispatcher implements JavaDelegate { @Override public void execute(DelegateExecution delegateExecution) throws Exception { - logger.debug("Running execute block for activity id:{}, name:{}", delegateExecution.getCurrentActivityId(), + logger.debug("Running execute block for activity id: {}, name: {}", delegateExecution.getCurrentActivityId(), delegateExecution.getCurrentActivityName()); RequestDetails bpmnRequestDetails = requestVerification(delegateExecution); @@ -82,9 +82,10 @@ public class NfSoftwareUpgradeDispatcher implements JavaDelegate { final List<PnfResourceCustomization> pnfCustomizations = getPnfResourceCustomizations(delegateExecution, serviceModelUuid); final PnfResourceCustomization pnfResourceCustomization = pnfCustomizations.get(0); + final String payload = bpmnRequestDetails.getRequestParameters().getPayload(); populateExecution(delegateExecution, bpmnRequestDetails, pnfResourceCustomization, pnf, serviceInstanceName, - pnfName, serviceModelUuid, userParams); + pnfName, serviceModelUuid, userParams, payload); logger.trace("Completed preProcessRequest PnfSoftwareUpgradeServiceRequest Request "); } @@ -104,7 +105,7 @@ public class NfSoftwareUpgradeDispatcher implements JavaDelegate { private void populateExecution(DelegateExecution delegateExecution, RequestDetails bpmnRequestDetails, PnfResourceCustomization pnfResourceCustomization, Pnf pnf, String serviceInstanceName, String pnfName, - String serviceModelUuid, List<Map<String, Object>> userParams) { + String serviceModelUuid, List<Map<String, Object>> userParams, String payload) { delegateExecution.setVariable(SERVICE_MODEL_INFO, bpmnRequestDetails.getModelInfo()); delegateExecution.setVariable(SERVICE_INSTANCE_NAME, serviceInstanceName); @@ -124,6 +125,8 @@ public class NfSoftwareUpgradeDispatcher implements JavaDelegate { delegateExecution.setVariable(param.get("name").toString(), param.get("value").toString()); } } + + delegateExecution.setVariable(REQUEST_PAYLOAD, payload); } private Pnf getPnfByPnfName(DelegateExecution delegateExecution, String pnfName) { |