aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/templates
diff options
context:
space:
mode:
Diffstat (limited to 'heat/vFW_CNF_CDS/templates')
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json8
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/KotlinK8sProfileUpload.kt9
2 files changed, 5 insertions, 12 deletions
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
index c4b6516d..f4c38ba7 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
@@ -39,8 +39,8 @@
"url" : "http://multicloud-k8s:9015"
},
"profile-upload-properties" : {
- "resolution-key" : {
- "get_input" : "resolution-key"
+ "assignment-params": {
+ "get_attribute" : [ "resource-assignment", "assignment-params" ]
},
"api-access": "*multicloud-k8s-api"
},
@@ -147,10 +147,6 @@
"artifact-prefix-names" : {
"get_input" : "template-prefix"
}
- },
- "store-result": true,
- "resolution-key": {
- "get_input" : "resolution-key"
}
}
}
diff --git a/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/KotlinK8sProfileUpload.kt b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/KotlinK8sProfileUpload.kt
index 5231fb5c..02c04415 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/KotlinK8sProfileUpload.kt
+++ b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/KotlinK8sProfileUpload.kt
@@ -19,7 +19,6 @@ package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts
import com.fasterxml.jackson.databind.node.ObjectNode
import com.fasterxml.jackson.databind.ObjectMapper
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.storedContentFromResolvedArtifactNB
import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BasicAuthRestClientService
@@ -67,8 +66,6 @@ open class K8sProfileUpload : AbstractScriptComponentFunction() {
override suspend fun processNB(executionRequest: ExecutionServiceInput) {
log.info("executing K8s Profile Upload script")
- val resolution_key = getDynamicProperties("resolution-key").asText()
- log.info("resolution_key: $resolution_key")
val baseK8sApiUrl = getDynamicProperties("api-access").get("url").asText()
val k8sApiUsername = getDynamicProperties("api-access").get("username").asText()
@@ -80,10 +77,10 @@ open class K8sProfileUpload : AbstractScriptComponentFunction() {
if (prefix.toLowerCase().equals("vnf"))
continue
- val payload = storedContentFromResolvedArtifactNB(resolution_key, prefix)
- log.info("Uploading K8S profile for template prefix $prefix")
+ val assignmentParams = getDynamicProperties("assignment-params")
+ val payloadObject = JacksonUtils.jsonNode(assignmentParams.get(prefix).asText()) as ObjectNode
- val payloadObject = JacksonUtils.jsonNode(payload) as ObjectNode
+ log.info("Uploading K8S profile for template prefix $prefix")
val vfModuleModelInvariantUuid: String = getResolvedParameter(payloadObject, "vf-module-model-invariant-uuid")
val vfModuleModelUuid: String = getResolvedParameter(payloadObject, "vf-module-model-version")