aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2020-01-24 11:06:14 +0100
committerLukasz Rajewski <lukasz.rajewski@orange.com>2020-01-24 13:46:12 +0100
commit7e52797291d42161a2e43e18040616fe1f7b31bd (patch)
tree9cff09bcaaa7981a6bf1d10562667134df5ad76c /heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin
parent0e9bf965dd84e82625fd7e4c7d523200e2784ae9 (diff)
Removed resolution-key from K8S profile upload
Removed resolution-key from K8S profile upload Change-Id: If7c9106da4ca514d142c8bb898ac50630e41b577 Issue-ID: INT-1406 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin')
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/KotlinK8sProfileUpload.kt9
1 files changed, 3 insertions, 6 deletions
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")