Additional missing changed for CNF parameter resolution. 31/100131/6
authorSamuli Silvius <s.silvius@partner.samsung.com>
Thu, 9 Jan 2020 13:24:56 +0000 (15:24 +0200)
committerSamuli Silvius <s.silvius@partner.samsung.com>
Thu, 9 Jan 2020 19:38:58 +0000 (21:38 +0200)
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 <s.silvius@partner.samsung.com>
Change-Id: I0a47027e73284b4b0ae0a1f0ce18e45d6b2d9142

heat/vFW_CNF_CDS/templates/cba/Definitions/resources_definition_types.json
heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/KotlinK8sProfileUpload.kt
heat/vFW_CNF_CDS/templates/cba/Templates/base_template-mapping.json
heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl
heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json
heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl
heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json
heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl
heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json
heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl

index 1fb6e75..f1c3c80 100644 (file)
       }
     }
   },
+  "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 <s.silvius@partner.samsung.com>",
+    "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 <s.silvius@partner.samsung.com>",
+    "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",
index 81b0c3e..5231fb5 100644 (file)
@@ -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
+}
index 615bbae..f458032 100644 (file)
     ],
     "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": {
index d5ee720..06fc18e 100644 (file)
       "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}"
index 9775a80..5d80f0c 100644 (file)
     ],
     "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": {
index 8b8d19a..a321aa4 100644 (file)
       "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}"
     {
       "param-name": "k8s-rb-profile-namespace",
       "param-value": "${k8s-rb-profile-namespace}"
-    },    
+    },
     {
       "param-name": "int_private1_net_id",
       "param-value": "${int_private1_net_id}"
     {
       "param-name": "int_private2_net_id",
       "param-value": "${int_private2_net_id}"
-    }    
+    }
   ],
   "capability-data": [
     {
index 40f60c0..03e9afa 100644 (file)
     ],
     "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": {
index 1de5c82..a36240d 100644 (file)
       "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}"
     {
         "param-name": "dcae_collector_port",
         "param-value": "$(dcae_collector_port)"
-    },    
+    },
     {
       "param-name": "demo_artifacts_version",
       "param-value": "${demo_artifacts_version}}"
     {
       "param-name": "k8s-rb-profile-namespace",
       "param-value": "${k8s-rb-profile-namespace}"
-    },    
+    },
     {
       "param-name": "int_private1_net_id",
       "param-value": "${int_private1_net_id}"
index 533ad9a..63f9770 100644 (file)
     "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": {
index 0d368e2..1336b8e 100644 (file)
       "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}"
     {
       "param-name": "k8s-rb-profile-namespace",
       "param-value": "${k8s-rb-profile-namespace}"
-    },    
+    },
     {
       "param-name": "int_private2_gw_ip",
       "param-value": "${int_private2_gw_ip}"