diff options
author | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-01-15 14:44:58 -0500 |
---|---|---|
committer | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-01-18 13:56:01 -0500 |
commit | c2cbc1a708ce82678e8177ca4985d5324f7d027f (patch) | |
tree | eccd01bba58d8c1d6bf87d4315698446ce14bd59 /ms/blueprintsprocessor/modules/services | |
parent | 631c45b3426df8ed93bdf45fa1f11a68c991abb4 (diff) |
Implement CBA upload through REST
Change-Id: I417254c5107f8b0031932e6a7cf0599561ee9a3c
Issue-ID: CCSDK-910
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/services')
-rw-r--r-- | ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/AbstractComponentFunction.kt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/AbstractComponentFunction.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/AbstractComponentFunction.kt index c9e147ba..f7c901df 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/AbstractComponentFunction.kt +++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/AbstractComponentFunction.kt @@ -53,17 +53,17 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic return stepName
}
- override fun prepareRequest(executionServiceInput: ExecutionServiceInput): ExecutionServiceInput {
+ override fun prepareRequest(executionRequest: ExecutionServiceInput): ExecutionServiceInput { checkNotNull(bluePrintRuntimeService) { "failed to prepare blueprint runtime" }
check(stepName.isNotEmpty()) { "failed to assign step name" }
- this.executionServiceInput = executionServiceInput
+ this.executionServiceInput = executionRequest - processId = executionServiceInput.commonHeader.requestId
+ processId = executionRequest.commonHeader.requestId check(processId.isNotEmpty()) { "couldn't get process id for step($stepName)" }
- workflowName = executionServiceInput.actionIdentifiers.actionName
+ workflowName = executionRequest.actionIdentifiers.actionName check(workflowName.isNotEmpty()) { "couldn't get action name for step($stepName)" }
log.info("preparing request id($processId) for workflow($workflowName) step($stepName)")
@@ -88,12 +88,14 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic this.operationInputs.putAll(operationResolvedProperties)
- return executionServiceInput
+ return executionRequest }
override fun prepareResponse(): ExecutionServiceOutput {
log.info("Preparing Response...")
executionServiceOutput.commonHeader = executionServiceInput.commonHeader
+ executionServiceOutput.actionIdentifiers = executionServiceInput.actionIdentifiers + executionServiceOutput.payload = executionServiceInput.payload // Resolve the Output Expression
val stepOutputs = bluePrintRuntimeService
|