From 08c029aa4bc814599cf75b5db692ae3266b830b3 Mon Sep 17 00:00:00 2001 From: Samuli Silvius Date: Thu, 9 Jan 2020 15:24:56 +0200 Subject: Additional missing changed for CNF parameter resolution. Accidentally missed adding "vf-module-model-invariant-uuid" and "vf-module-model-version" to vf-modules mappings for resolution in previous commit. Issue-ID: INT-1260 Signed-off-by: Samuli Silvius Change-Id: I0a47027e73284b4b0ae0a1f0ce18e45d6b2d9142 --- .../Definitions/resources_definition_types.json | 58 ++++++++++++++++++++++ .../cba/Scripts/kotlin/KotlinK8sProfileUpload.kt | 8 +-- .../cba/Templates/base_template-mapping.json | 24 +++++++++ .../cba/Templates/base_template-template.vtl | 8 +++ .../templates/cba/Templates/vfw-mapping.json | 24 +++++++++ .../templates/cba/Templates/vfw-template.vtl | 12 ++++- .../templates/cba/Templates/vpkg-mapping.json | 24 +++++++++ .../templates/cba/Templates/vpkg-template.vtl | 12 ++++- .../templates/cba/Templates/vsn-mapping.json | 24 +++++++++ .../templates/cba/Templates/vsn-template.vtl | 10 +++- 10 files changed, 195 insertions(+), 9 deletions(-) (limited to 'heat/vFW_CNF_CDS/templates') diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json index 1fb6e75f..f1c3c803 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json +++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json @@ -1296,6 +1296,64 @@ } } }, + "vf-module-model-invariant-uuid" : { + "tags" : "vnf, vf-module", + "name" : "vf-module-model-invariant-uuid", + "property" : { + "description" : "vf module model invariant uuid", + "type" : "string" + }, + "updated-by" : "Samuli, Silvius ", + "sources" : { + "input" : { + "type" : "source-input" + }, + "processor-db" : { + "type" : "source-db", + "properties" : { + "type" : "SQL", + "query" : "select sdnctl.VF_MODULE_MODEL.invariant_uuid as vf_module_model_invariant_uuid from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid", + "input-key-mapping" : { + "customizationid" : "vf-module-model-customization-uuid" + }, + "output-key-mapping" : { + "vf-module-model-invariant-uuid" : "vf_module_model_invariant_uuid" + }, + "key-dependencies" : [ "vf-module-model-customization-uuid" ], + "endpoint-selector" : "dynamic-db-source" + } + } + } + }, + "vf-module-model-version" : { + "tags" : "vnf, vf-module", + "name" : "vf-module-model-version", + "property" : { + "description" : "vf module model version", + "type" : "string" + }, + "updated-by" : "Samuli, Silvius ", + "sources" : { + "input" : { + "type" : "source-input" + }, + "processor-db" : { + "type" : "source-db", + "properties" : { + "type" : "SQL", + "query" : "select sdnctl.VF_MODULE_MODEL.uuid as vf_module_model_version from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid", + "input-key-mapping" : { + "customizationid" : "vf-module-model-customization-uuid" + }, + "output-key-mapping" : { + "vf-module-model-version" : "vf_module_model_version" + }, + "key-dependencies" : [ "vf-module-model-customization-uuid" ], + "endpoint-selector" : "dynamic-db-source" + } + } + } + }, "vf-module-name" : { "tags" : "vf-module-name", "name" : "vf-module-name", 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 81b0c3e5..5231fb5c 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/KotlinK8sProfileUpload.kt +++ b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/KotlinK8sProfileUpload.kt @@ -85,8 +85,8 @@ open class K8sProfileUpload : AbstractScriptComponentFunction() { val payloadObject = JacksonUtils.jsonNode(payload) as ObjectNode - val vfModuleModelInvariantUuid: String = getResolvedParameter(payloadObject, "vf_module_model_invariant_uuid") - val vfModuleModelUuid: String = getResolvedParameter(payloadObject, "vf_module_model_version") + val vfModuleModelInvariantUuid: String = getResolvedParameter(payloadObject, "vf-module-model-invariant-uuid") + val vfModuleModelUuid: String = getResolvedParameter(payloadObject, "vf-module-model-version") val k8sRbProfileName: String = getResolvedParameter(payloadObject, "k8s-rb-profile-name") val k8sRbProfileNamespace: String = getResolvedParameter(payloadObject, "k8s-rb-profile-namespace") @@ -103,7 +103,7 @@ open class K8sProfileUpload : AbstractScriptComponentFunction() { if (api.hasProfile(k8sRbProfileName)) { log.info("Profile Already Existing - skipping upload") } else { - profileFilePath = prepareProfileFile(k8sRbProfileName) + val profileFilePath = prepareProfileFile(k8sRbProfileName) var profile = K8sProfile() profile.profileName = k8sRbProfileName @@ -323,4 +323,4 @@ class K8sProfile { override fun hashCode(): Int { return javaClass.hashCode() } -} \ No newline at end of file +} diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-mapping.json index 615bbaef..f4580325 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-mapping.json @@ -299,6 +299,30 @@ ], "version": 0 }, + { + "name": "vf-module-model-invariant-uuid", + "property": { + "type": "string" + }, + "input-param": false, + "dictionary-name": "vf-module-model-invariant-uuid", + "dictionary-source": "processor-db", + "dependencies": [ + "vf-module-model-customization-uuid" + ] + }, + { + "name": "vf-module-model-version", + "property": { + "type": "string" + }, + "input-param": false, + "dictionary-name": "vf-module-model-version", + "dictionary-source": "processor-db", + "dependencies": [ + "vf-module-model-customization-uuid" + ] + }, { "name": "k8s-rb-profile-name", "property": { diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl index d5ee7202..06fc18eb 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl @@ -13,6 +13,14 @@ "param-name": "vnf_model_customization_uuid", "param-value": "${vnf-model-customization-uuid}" }, + { + "param-name": "vf-module-model-invariant-uuid", + "param-value": "${vf-module-model-invariant-uuid}" + }, + { + "param-name": "vf-module-model-version", + "param-value": "${vf-module-model-version}" + }, { "param-name": "vf_module_id", "param-value": "${vf-module-id}" diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json index 9775a800..5d80f0c8 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json @@ -863,6 +863,30 @@ ], "version": 0 }, + { + "name": "vf-module-model-invariant-uuid", + "property": { + "type": "string" + }, + "input-param": false, + "dictionary-name": "vf-module-model-invariant-uuid", + "dictionary-source": "processor-db", + "dependencies": [ + "vf-module-model-customization-uuid" + ] + }, + { + "name": "vf-module-model-version", + "property": { + "type": "string" + }, + "input-param": false, + "dictionary-name": "vf-module-model-version", + "dictionary-source": "processor-db", + "dependencies": [ + "vf-module-model-customization-uuid" + ] + }, { "name": "k8s-rb-profile-name", "property": { diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl index 8b8d19af..a321aa44 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl @@ -13,6 +13,14 @@ "param-name": "vnf_model_customization_uuid", "param-value": "${vnf-model-customization-uuid}" }, + { + "param-name": "vf-module-model-invariant-uuid", + "param-value": "${vf-module-model-invariant-uuid}" + }, + { + "param-name": "vf-module-model-version", + "param-value": "${vf-module-model-version}" + }, { "param-name": "vf_module_id", "param-value": "${vf-module-id}" @@ -140,7 +148,7 @@ { "param-name": "k8s-rb-profile-namespace", "param-value": "${k8s-rb-profile-namespace}" - }, + }, { "param-name": "int_private1_net_id", "param-value": "${int_private1_net_id}" @@ -148,7 +156,7 @@ { "param-name": "int_private2_net_id", "param-value": "${int_private2_net_id}" - } + } ], "capability-data": [ { diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json index 40f60c02..03e9afa3 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json @@ -818,6 +818,30 @@ ], "version": 0 }, + { + "name": "vf-module-model-invariant-uuid", + "property": { + "type": "string" + }, + "input-param": false, + "dictionary-name": "vf-module-model-invariant-uuid", + "dictionary-source": "processor-db", + "dependencies": [ + "vf-module-model-customization-uuid" + ] + }, + { + "name": "vf-module-model-version", + "property": { + "type": "string" + }, + "input-param": false, + "dictionary-name": "vf-module-model-version", + "dictionary-source": "processor-db", + "dependencies": [ + "vf-module-model-customization-uuid" + ] + }, { "name": "k8s-rb-profile-name", "property": { diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl index 1de5c827..a36240dd 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl @@ -13,6 +13,14 @@ "param-name": "vnf_model_customization_uuid", "param-value": "${vnf-model-customization-uuid}" }, + { + "param-name": "vf-module-model-invariant-uuid", + "param-value": "${vf-module-model-invariant-uuid}" + }, + { + "param-name": "vf-module-model-version", + "param-value": "${vf-module-model-version}" + }, { "param-name": "vf_module_id", "param-value": "${vf-module-id}" @@ -105,7 +113,7 @@ { "param-name": "dcae_collector_port", "param-value": "$(dcae_collector_port)" - }, + }, { "param-name": "demo_artifacts_version", "param-value": "${demo_artifacts_version}}" @@ -141,7 +149,7 @@ { "param-name": "k8s-rb-profile-namespace", "param-value": "${k8s-rb-profile-namespace}" - }, + }, { "param-name": "int_private1_net_id", "param-value": "${int_private1_net_id}" diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json index 533ad9a6..63f9770f 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json @@ -749,6 +749,30 @@ "dependencies": [], "version": 0 }, + { + "name": "vf-module-model-invariant-uuid", + "property": { + "type": "string" + }, + "input-param": false, + "dictionary-name": "vf-module-model-invariant-uuid", + "dictionary-source": "processor-db", + "dependencies": [ + "vf-module-model-customization-uuid" + ] + }, + { + "name": "vf-module-model-version", + "property": { + "type": "string" + }, + "input-param": false, + "dictionary-name": "vf-module-model-version", + "dictionary-source": "processor-db", + "dependencies": [ + "vf-module-model-customization-uuid" + ] + }, { "name": "k8s-rb-profile-name", "property": { diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl index 0d368e29..1336b8e5 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl @@ -13,6 +13,14 @@ "param-name": "vnf_model_customization_uuid", "param-value": "${vnf-model-customization-uuid}" }, + { + "param-name": "vf-module-model-invariant-uuid", + "param-value": "${vf-module-model-invariant-uuid}" + }, + { + "param-name": "vf-module-model-version", + "param-value": "${vf-module-model-version}" + }, { "param-name": "vf_module_id", "param-value": "${vf-module-id}" @@ -121,7 +129,7 @@ { "param-name": "k8s-rb-profile-namespace", "param-value": "${k8s-rb-profile-namespace}" - }, + }, { "param-name": "int_private2_gw_ip", "param-value": "${int_private2_gw_ip}" -- cgit 1.2.3-korg