diff options
author | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2022-06-20 22:27:19 +0200 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2022-07-22 07:17:11 +0000 |
commit | 9c1cb6a1db4a290ceccb09c003ad2c131aa91bc9 (patch) | |
tree | d8e21cf93c4b8e4c183be483ff90ff7b7adb9c40 /ms/blueprintsprocessor/modules/services/execution-service | |
parent | 8c37e60d8c2666a0ad9e821b94255af12193e3e4 (diff) |
Aligned attributes of CDS components
Issue-ID: CCSDK-3698
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Change-Id: Ie5c78a9a347373b5faf588627e42138806d69c0c
(cherry picked from commit ea1c8b477e615f4dd45204b221fe7eacfe5474af)
Diffstat (limited to 'ms/blueprintsprocessor/modules/services/execution-service')
2 files changed, 12 insertions, 1 deletions
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt index 2581e5628..be9ddb8c2 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt +++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt @@ -54,6 +54,7 @@ open class ComponentRemoteScriptExecutor( const val ATTRIBUTE_RESPONSE_DATA = "response-data" const val ATTRIBUTE_STATUS = "status" + const val OUTPUT_RESPONSE_DATA = "response-data" const val OUTPUT_STATUS = "status" } diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt index 7bb071501..6f3cc3ac5 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt +++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt @@ -84,6 +84,10 @@ fun BluePrintTypes.nodeTypeComponentRemoteScriptExecutor(): NodeType { } outputs { property( + ComponentRemoteScriptExecutor.OUTPUT_RESPONSE_DATA, BluePrintConstants.DATA_TYPE_JSON, + false, "Output Response" + ) + property( ComponentRemoteScriptExecutor.OUTPUT_STATUS, BluePrintConstants.DATA_TYPE_STRING, true, "Status of the Component Execution ( success or failure )" ) @@ -161,7 +165,13 @@ class ComponentRemoteScriptExecutorNodeTemplateBuilder(id: String, description: fun status(status: String) = status(status.asJsonPrimitive()) fun status(status: JsonNode) { - property(ComponentRemoteScriptExecutor.OUTPUT_STATUS, status) + property(ComponentScriptExecutor.OUTPUT_STATUS, status) + } + + fun responseData(responseData: String) = responseData(responseData.asJsonType()) + + fun responseData(responseData: JsonNode) { + property(ComponentScriptExecutor.OUTPUT_RESPONSE_DATA, responseData) } } } |