From 734b3d2134b4e1dd3cd946b8badd2baf83f97110 Mon Sep 17 00:00:00 2001 From: Michal Chabiera Date: Mon, 18 Oct 2021 16:42:46 +0200 Subject: [vFW CNF CDS] vf_module and vnf name generation improvment in CBA During service deletion generation of vf_module and vnf name causes SDNC error. Issue-ID: INT-1960 Signed-off-by: Michal Chabiera Change-Id: I88f92e32982dca2054dde7055f40785159d8ec39 --- .../cba/Templates/base_template-mapping.json | 25 +++++++++++ .../cba/Templates/base_template-template.vtl | 51 ++-------------------- .../templates/cba/Templates/vfw-mapping.json | 25 +++++++++++ .../templates/cba/Templates/vfw-template.vtl | 51 ++-------------------- .../templates/cba/Templates/vnf-mapping.json | 24 ++++++++++ .../templates/cba/Templates/vnf-template.vtl | 43 ++---------------- .../templates/cba/Templates/vpkg-mapping.json | 25 +++++++++++ .../templates/cba/Templates/vpkg-template.vtl | 51 ++-------------------- .../templates/cba/Templates/vsn-mapping.json | 25 +++++++++++ .../templates/cba/Templates/vsn-template.vtl | 51 ++-------------------- 10 files changed, 144 insertions(+), 227 deletions(-) (limited to 'heat/vFW_CNF_CDS/templates/cba/Templates') 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 8de1697a..d1104fd2 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 @@ -23,6 +23,31 @@ "vf-module-model-customization-uuid" ] }, + { + "name": "vf-module-name", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vf-module-name", + "dictionary-source": "rest", + "dependencies": [ + "vnf_name", + "vf-module-label", + "vf-naming-policy", + "vf-module-id" + ], + "version": 0 + }, { "name": "management-prefix-id", "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 4d1b46a0..8cdaaf39 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 @@ -31,53 +31,6 @@ } ] }, - { - "capability-name": "generate-name", - "key-mapping": [ - { - "output-key-mapping": [ - { - "resource-name": "vf_module_name", - "resource-value": "${vf-module-name}" - } - ], - "payload": [ - { - "param-name": "resource-name", - "param-value": "vf_module_name" - }, - { - "param-name": "resource-value", - "param-value": "${vf-module-name}" - }, - { - "param-name": "external-key", - "param-value": "${vf-module-id}_vf-module-name" - }, - { - "param-name": "policy-instance-name", - "param-value": "${vf-naming-policy}" - }, - { - "param-name": "naming-type", - "param-value": "VF-MODULE" - }, - { - "param-name": "VNF_NAME", - "param-value": "${vnf_name}" - }, - { - "param-name": "VF_MODULE_TYPE", - "param-value": "vfmt" - }, - { - "param-name": "VF_MODULE_LABEL", - "param-value": "${vf-module-label}" - } - ] - } - ] - }, { "capability-name": "aai-vf-module-put", "key-mapping": [ @@ -97,6 +50,10 @@ "param-name": "vnf_name", "param-value": "${vnf_name}" }, + { + "param-name": "vf-module-name", + "param-value": "${vf-module-name}" + }, ##RB name { "param-name": "vf-module-model-invariant-uuid", 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 ec3ae0be..a534bccb 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json @@ -23,6 +23,31 @@ "vf-module-model-customization-uuid" ] }, + { + "name": "vf-module-name", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vf-module-name", + "dictionary-source": "rest", + "dependencies": [ + "vnf_name", + "vf-module-label", + "vf-naming-policy", + "vf-module-id" + ], + "version": 0 + }, { "name": "management-prefix-id", "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 4702f15c..491e9f84 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl @@ -1,52 +1,5 @@ { "capability-data": [ - { - "capability-name": "generate-name", - "key-mapping": [ - { - "output-key-mapping": [ - { - "resource-name": "vf_module_name", - "resource-value": "${vf-module-name}" - } - ], - "payload": [ - { - "param-name": "VF_MODULE_TYPE", - "param-value": "vfmt" - }, - { - "param-name": "resource-name", - "param-value": "vf_module_name" - }, - { - "param-name": "resource-value", - "param-value": "${vf-module-name}" - }, - { - "param-name": "external-key", - "param-value": "${vf-module-id}_vf-module-name" - }, - { - "param-name": "policy-instance-name", - "param-value": "${vf-naming-policy}" - }, - { - "param-name": "naming-type", - "param-value": "VF-MODULE" - }, - { - "param-name": "VNF_NAME", - "param-value": "${vnf_name}" - }, - { - "param-name": "VF_MODULE_LABEL", - "param-value": "${vf-module-label}" - } - ] - } - ] - }, { "capability-name": "netbox-ip-assign", "key-mapping": [ @@ -110,6 +63,10 @@ "param-name": "vnf_name", "param-value": "${vnf_name}" }, + { + "param-name": "vf-module-name", + "param-value": "${vf-module-name}" + }, ##RB name { "param-name": "vf-module-model-invariant-uuid", diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json index b764a136..db0503dc 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json @@ -93,6 +93,30 @@ "dependencies": [], "version": 0 }, + { + "name": "vnf_name", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vnf_name", + "dictionary-source": "rest", + "dependencies": [ + "aic-cloud-region", + "vf-naming-policy", + "vnf-id" + ], + "version": 0 + }, { "name": "vf-naming-policy", "property": { diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-template.vtl index 9f6e96ae..5a963205 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-template.vtl @@ -1,44 +1,5 @@ { "capability-data": [ - { - "capability-name": "generate-name", - "key-mapping": [ - { - "output-key-mapping": [ - { - "resource-name": "vnf_name", - "resource-value": "${vnf_name}" - } - ], - "payload": [ - { - "param-name": "resource-name", - "param-value": "vnf_name" - }, - { - "param-name": "resource-value", - "param-value": "${vnf_name}" - }, - { - "param-name": "external-key", - "param-value": "${vnf-id}_vnf_name" - }, - { - "param-name": "policy-instance-name", - "param-value": "${vf-naming-policy}" - }, - { - "param-name": "naming-type", - "param-value": "VNF" - }, - { - "param-name": "AIC_CLOUD_REGION", - "param-value": "${aic-cloud-region}" - } - ] - } - ] - }, { "capability-name": "netbox-ip-assign", "key-mapping": [ @@ -227,6 +188,10 @@ } ], "resource-accumulator-resolved-data": [ + { + "param-name": "vnf_name", + "param-value": "${vnf_name}" + }, { "param-name": "vf-naming-policy", "param-value": "${vf-naming-policy}" 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 fa06d641..461f82e3 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json @@ -23,6 +23,31 @@ "vf-module-model-customization-uuid" ] }, + { + "name": "vf-module-name", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vf-module-name", + "dictionary-source": "rest", + "dependencies": [ + "vnf_name", + "vf-module-label", + "vf-naming-policy", + "vf-module-id" + ], + "version": 0 + }, { "name": "management-prefix-id", "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 da7b2718..d270f098 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl @@ -31,53 +31,6 @@ } ] }, - { - "capability-name": "generate-name", - "key-mapping": [ - { - "output-key-mapping": [ - { - "resource-name": "vf_module_name", - "resource-value": "${vf-module-name}" - } - ], - "payload": [ - { - "param-name": "VF_MODULE_TYPE", - "param-value": "vfmt" - }, - { - "param-name": "resource-name", - "param-value": "vf_module_name" - }, - { - "param-name": "resource-value", - "param-value": "${vf-module-name}" - }, - { - "param-name": "external-key", - "param-value": "${vf-module-id}_vf-module-name" - }, - { - "param-name": "policy-instance-name", - "param-value": "${vf-naming-policy}" - }, - { - "param-name": "naming-type", - "param-value": "VF-MODULE" - }, - { - "param-name": "VNF_NAME", - "param-value": "${vnf_name}" - }, - { - "param-name": "VF_MODULE_LABEL", - "param-value": "${vf-module-label}" - } - ] - } - ] - }, { "capability-name": "aai-vf-module-put", "key-mapping": [ @@ -110,6 +63,10 @@ "param-name": "vnf_name", "param-value": "${vnf_name}" }, + { + "param-name": "vf-module-name", + "param-value": "${vf-module-name}" + }, ##RB name { "param-name": "vf-module-model-invariant-uuid", 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 4d2f191f..0178ab44 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json @@ -23,6 +23,31 @@ "vf-module-model-customization-uuid" ] }, + { + "name": "vf-module-name", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vf-module-name", + "dictionary-source": "rest", + "dependencies": [ + "vnf_name", + "vf-module-label", + "vf-naming-policy", + "vf-module-id" + ], + "version": 0 + }, { "name": "vnf_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 61ba0935..edbfa6c5 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl @@ -1,52 +1,5 @@ { "capability-data": [ - { - "capability-name": "generate-name", - "key-mapping": [ - { - "output-key-mapping": [ - { - "resource-name": "vf_module_name", - "resource-value": "${vf-module-name}" - } - ], - "payload": [ - { - "param-name": "VF_MODULE_TYPE", - "param-value": "vfmt" - }, - { - "param-name": "resource-name", - "param-value": "vf_module_name" - }, - { - "param-name": "resource-value", - "param-value": "${vf-module-name}" - }, - { - "param-name": "external-key", - "param-value": "${vf-module-id}_vf-module-name" - }, - { - "param-name": "policy-instance-name", - "param-value": "${vf-naming-policy}" - }, - { - "param-name": "naming-type", - "param-value": "VF-MODULE" - }, - { - "param-name": "VNF_NAME", - "param-value": "${vnf_name}" - }, - { - "param-name": "VF_MODULE_LABEL", - "param-value": "${vf-module-label}" - } - ] - } - ] - }, { "capability-name": "netbox-ip-assign", "key-mapping": [ @@ -110,6 +63,10 @@ "param-name": "vnf_name", "param-value": "${vnf_name}" }, + { + "param-name": "vf-module-name", + "param-value": "${vf-module-name}" + }, ##RB name { "param-name": "vf-module-model-invariant-uuid", -- cgit 1.2.3-korg