From: Lukasz Rajewski Date: Fri, 19 Mar 2021 16:50:37 +0000 (+0100) Subject: Implementation of config-assign and config-deploy actions X-Git-Url: https://gerrit.onap.org/r/gitweb?p=demo.git;a=commitdiff_plain;h=d2c5f361fa3a246dfa23c2c582ec498322a97282 Implementation of config-assign and config-deploy actions Implementation of config-assign and config-deploy actions Issue-ID: INT-1868 Signed-off-by: Lukasz Rajewski Change-Id: Ibe61ea32bb1d0fbfc5396adf54c7d2fcbc7bbf30 --- diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/bootstrap.sh b/heat/vFW_CNF_CDS/templates/cba-dev/bootstrap.sh new file mode 100755 index 00000000..74ec06a0 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba-dev/bootstrap.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# ============LICENSE_START======================================================= +# Copyright (C) 2020 Orange +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============LICENSE_END========================================================= + +curl --location --request POST 'http://127.0.0.1:8081/api/v1/blueprint-model/bootstrap' \ +--header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \ +--header 'Content-Type: application/json' \ +--data '{"loadModelType": true, "loadResourceDictionary": true, "loadCBA": false}' | jq diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/enrich.sh b/heat/vFW_CNF_CDS/templates/cba-dev/enrich.sh new file mode 100755 index 00000000..1db994b6 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba-dev/enrich.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# ============LICENSE_START======================================================= +# Copyright (C) 2020 Orange +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============LICENSE_END========================================================= + +curl --location --request POST 'http://127.0.0.1:8081/api/v1/blueprint-model/enrich' \ +--header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \ +--form 'file=@../package_native/CBA.zip' | jq diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-base-ra.sh b/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-base-ra.sh index 840bb859..f40760f2 100755 --- a/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-base-ra.sh +++ b/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-base-ra.sh @@ -19,7 +19,7 @@ REQ_ID=`shuf -i 1-1000000 -n 1` SUB_REQ_ID=$REQ_ID"-"`shuf -i 1-1000 -n 1` -TEMPLATE_NAME="base_template" +TEMPLATE_NAME="helm_base_template" curl --location --request POST 'http://localhost:8081/api/v1/execution-service/process' \ --header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \ diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-pkg-ra.sh b/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-pkg-ra.sh index b7835626..09283293 100755 --- a/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-pkg-ra.sh +++ b/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-pkg-ra.sh @@ -19,7 +19,7 @@ REQ_ID=`shuf -i 1-1000000 -n 1` SUB_REQ_ID=$REQ_ID"-"`shuf -i 1-1000 -n 1` -TEMPLATE_NAME="vpkg" +TEMPLATE_NAME="helm_vpkg" curl --location --request POST 'http://localhost:8081/api/v1/execution-service/process' \ --header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \ @@ -53,13 +53,15 @@ curl --location --request POST 'http://localhost:8081/api/v1/execution-service/p "vf-module-label": "'$TEMPLATE_NAME'", "vf-module-type": "vf-module-type", "vf-module-model-customization-uuid": "d3ae2df9-95d4-48cc-a466-9f12dee80458", - "vf-module-model-invariant-uuid": "564e55dc-3b90-4c9c-9e97-42f2c97d8f11", - "vf-module-model-version": "3d55e2a6-7634-4ceb-98e9-2852d621a544", + "vf-module-model-invariant-uuid": "95e56eee-eeef-4a18-a032-8dbd757544b5", + "vf-module-model-version": "de66174a-d401-4b31-9331-3a44ad3ba01b", "vf-module-id": "3e6a0375-4b92-4bf5-9910-b0b893448a9c", "vf-naming-policy" : "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP", - "k8s-rb-profile-name": "vpkg-modified", - "k8s-rb-profile-source": "vfw-cnf-cds-vpkg-profile", - "k8s-rb-profile-namespace": "test", + "k8s-rb-profile-name": "vfw-cnf-cds-base-profile", + "k8s-rb-profile-source": "vfw-cnf-cds-base-profile", + "k8s-rb-profile-namespace": "vfirewall", + "k8s-rb-config-template-name": "ssh-service-config", + "k8s-rb-config-template-source": "ssh-service-config", "management-prefix-id" : 3 } } diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-config.sh b/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-config.sh new file mode 100755 index 00000000..1461475e --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-config.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +# ============LICENSE_START======================================================= +# Copyright (C) 2021 Orange +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============LICENSE_END========================================================= + +REQ_ID=`shuf -i 1-1000000 -n 1` +SUB_REQ_ID=$REQ_ID"-"`shuf -i 1-1000 -n 1` +ACTION=$1 + +curl --location --request POST 'http://localhost:8081/api/v1/execution-service/process' \ +--header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "commonHeader": { + "originatorId": "onap-me-cm-adapter", + "requestId": "'$REQ_ID'", + "subRequestId": "'$SUB_REQ_ID'" + }, + "actionIdentifiers": { + "blueprintName": "vFW_CNF_CDS", + "blueprintVersion": "7.0.0", + "actionName": "'config-$ACTION'", + "mode": "sync" + }, + "payload": { + "'config-$ACTION-request'": { + "resolution-key": "VF_vfw_k8s_demo_CNF_KUD-6", + "'config-$ACTION-properties'": { + "service-instance-id": "889670f7-ed49-41b0-a251-b43e9a035811", + "service-model-uuid": "bea61c93-1a90-426b-9fbe-6024bde48419", + "vnf-id": "317f28f3-37b4-40c8-8062-e93fda15db99", + "vnf-name": "VF_vfw_k8s_demo_CNF_KUD", + "vnf-customization-uuid": "2793ba6f-332d-4694-8f8e-0b1f2ec3a732" + } + } + } +}' | jq '.payload | .["'config-$ACTION-response'"]' + diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-ra.sh b/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-ra.sh index 8261ace3..1e24a7a2 100755 --- a/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-ra.sh +++ b/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-ra.sh @@ -46,7 +46,7 @@ curl --location --request POST 'http://localhost:8081/api/v1/execution-service/p "aic-cloud-region": "RegionOne", "vnf-model-customization-uuid": "d73864db-1f6e-4e54-a533-a96773c926a4", "service-instance-id": "2afee7c4-8b16-4f2f-a567-48fb7948abcf", - "vnf-id": "21dcbbd2-3ec2-4a9c-bb0d-599cafc16a1f", + "vnf-id": "51274ece-55ca-4cbc-b7c4-0da0dcc65d38", "vnf_name": "sample-vnf-name", "k8s-rb-profile-namespace": "vfw-namespace", "int_private1_net_cidr" : "192.168.10.0/24", diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json index b5697555..5fb59cf5 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json +++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json @@ -7,14 +7,18 @@ "service-instance-id": { "description": "", "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } + "type": "string" + }, + "vnf-id": { + "description": "", + "required": false, + "type": "string" + }, + "vf-modules-list": { + "type": "json" + }, + "config-deploy-setup": { + "type": "json" } }, "derived_from": "tosca.datatypes.Dynamic" @@ -26,14 +30,18 @@ "service-instance-id": { "description": "", "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } + "type": "string" + }, + "vnf-id": { + "description": "", + "required": false, + "type": "string" + }, + "vf-modules-list": { + "type": "json" + }, + "config-deploy-setup": { + "type": "json" } }, "derived_from": "tosca.datatypes.Dynamic" @@ -60,6 +68,14 @@ "description": "The source folder or file relative to 'Templates/k8s-profiles' folder", "type": "string" }, + "k8s-rb-config-template-name": { + "description": "The name of configuration template for config-assign operation", + "type": "string" + }, + "k8s-rb-config-template-source": { + "description": "The source of configuration template for config-assign operation", + "type": "string" + }, "private1-prefix-id": { "description": "", "required": false, diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json index 9ee224b5..95db7aec 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json +++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json @@ -139,6 +139,14 @@ "required": true, "type": "string" }, + "instance-dependencies": { + "description": "Instance names to inject to Jython or Kotlin Script.", + "required": true, + "type": "list", + "entry_schema": { + "type": "string" + } + }, "dynamic-properties": { "description": "Dynamic Json Content or DSL Json reference.", "required": false, @@ -233,6 +241,150 @@ }, "derived_from": "tosca.nodes.Component" }, + "component-k8s-config-template": { + "description": "This component is rendering and sending the k8s template to the multicloud plugin.", + "version": "1.0.0", + "attributes": { + "statuses": { + "required": true, + "type": "json" + } + }, + "capabilities": { + "component-node": { + "type": "tosca.capabilities.Node" + } + }, + "interfaces": { + "K8sConfigTemplateComponent": { + "operations": { + "process": { + "inputs": { + "k8s-rb-config-template-name": { + "description": "K8s template name", + "required": false, + "type": "string" + }, + "k8s-rb-definition-name": { + "description": "K8s definition name", + "required": false, + "type": "string" + }, + "k8s-rb-definition-version": { + "description": "Version of the definition", + "required": false, + "type": "string" + }, + "k8s-rb-config-template-source": { + "description": "Source (tgz/folder) for the template in CBA", + "required": false, + "type": "string" + }, + "artifact-prefix-names": { + "description": "Resource Assignment Artifact Prefix names", + "required": false, + "type": "list", + "entry_schema": { + "type": "string" + } + }, + "resource-assignment-map": { + "description": "Holds resolved values for each artifact prefix eg. { vdns: { vnf-id: 123 } }", + "required": false, + "type": "json" + } + }, + "outputs": { + "statuses": { + "required": true, + "type": "string" + } + } + } + } + } + }, + "derived_from": "tosca.nodes.Component" + }, + "component-k8s-config-value": { + "description": "This component is sending the k8s config value to the multicloud plugin.", + "version": "1.0.0", + "attributes": { + "statuses": { + "required": true, + "type": "json" + } + }, + "capabilities": { + "component-node": { + "type": "tosca.capabilities.Node" + } + }, + "interfaces": { + "K8sConfigValueComponent": { + "operations": { + "process": { + "inputs": { + "k8s-template-name": { + "description": "K8s template name", + "required": false, + "type": "string" + }, + "k8s-config-name": { + "description": "K8s config name", + "required": false, + "type": "string" + }, + "k8s-instance-id": { + "description": "K8s instance id", + "required": false, + "type": "string" + }, + "k8s-rb-template-value-source": { + "description": "Location of value source in CBA", + "required": false, + "type": "string" + }, + "k8s-operation-type": { + "required": false, + "type": "string", + "constraints": [ + { + "valid_values": [ + "create", + "update", + "rollback" + ] + } + ], + "default": "create" + }, + "artifact-prefix-names": { + "description": "Resource Assignment Artifact Prefix names", + "required": false, + "type": "list", + "entry_schema": { + "type": "string" + } + }, + "resource-assignment-map": { + "description": "Holds resolved values for each artifact prefix eg. { vdns: { vnf-id: 123 } }", + "required": false, + "type": "json" + } + }, + "outputs": { + "statuses": { + "required": true, + "type": "string" + } + } + } + } + } + }, + "derived_from": "tosca.nodes.Component" + }, "source-capability": { "description": "This is Component Resource Source Node Type", "version": "1.0.0", @@ -437,6 +589,83 @@ "description": "TOSCA base type for Resource Sources", "version": "1.0.0", "derived_from": "tosca.nodes.Root" + }, + "tosca.nodes.Vnf": { + "description": "This is VNF Node Type", + "version": "1.0.0", + "derived_from": "tosca.nodes.Root" + }, + "tosca.nodes.Workflow": { + "description": "This is Directed Graph Node Type", + "version": "1.0.0", + "derived_from": "tosca.nodes.Root" + }, + "vnf-netconf-device": { + "description": "This is VNF Device with Netconf Capability", + "version": "1.0.0", + "capabilities": { + "netconf": { + "type": "tosca.capabilities.Netconf", + "properties": { + "login-key": { + "required": true, + "type": "string", + "default": "sdnc" + }, + "login-account": { + "required": true, + "type": "string", + "default": "sdnc-tacacs" + }, + "source": { + "required": false, + "type": "string", + "default": "npm" + }, + "target-ip-address": { + "required": true, + "type": "string" + }, + "port-number": { + "required": true, + "type": "integer", + "default": 830 + }, + "connection-time-out": { + "required": false, + "type": "integer", + "default": 30 + } + } + }, + "restconf": { + "type": "tosca.capabilities.Restconf", + "properties": { + "login-key": { + "required": true, + "type": "string" + }, + "login-account": { + "required": true, + "type": "string" + }, + "target-ip-address": { + "required": true, + "type": "string" + }, + "port-number": { + "required": true, + "type": "integer" + }, + "connection-time-out": { + "required": false, + "type": "integer", + "default": 30 + } + } + } + }, + "derived_from": "tosca.nodes.Vnf" } } } 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 63d83e44..6277e01b 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 @@ -328,6 +328,44 @@ } } }, + "k8s-rb-config-template-name": { + "tags": "k8s, cnf, config, k8s-rb-config-template-name", + "name": "k8s-rb-config-template-name", + "property": { + "description": "The name of configuration template for config-assign operation", + "type": "string" + }, + "group": "default", + "updated-by": "Rajewski, Lukasz ", + "sources": { + "input": { + "type": "source-input" + }, + "default": { + "type": "source-default", + "properties": {} + } + } + }, + "k8s-rb-config-template-source": { + "tags": "k8s, cnf, config, k8s-rb-config-template-source", + "name": "k8s-rb-config-template-source", + "property": { + "description": "The source of configuration template for config-assign operation", + "type": "string" + }, + "group": "default", + "updated-by": "Rajewski, Lukasz ", + "sources": { + "input": { + "type": "source-input" + }, + "default": { + "type": "source-default", + "properties": {} + } + } + }, "management-prefix-id": { "tags": "management-prefix-id", "name": "management-prefix-id", @@ -978,5 +1016,82 @@ } } } + }, + "vf-modules-list": { + "tags": "vf-modules-list", + "name": "vf-modules-list", + "property": { + "description": "List of vf-modules associated with vnf", + "type": "json" + }, + "group": "default", + "updated-by": "Lukasz Rajewski ", + "sources": { + "input": { + "type": "source-input" + }, + "default": { + "type": "source-default", + "properties": {} + }, + "aai-data": { + "type": "source-rest", + "properties": { + "verb": "GET", + "type": "JSON", + "url-path": "/aai/v19/network/generic-vnfs/generic-vnf/${vnf-id}?depth=1", + "path": "/vf-modules", + "input-key-mapping": { + "vnf-id": "vnf-id" + }, + "output-key-mapping": { + "vf-modules": "vf-module" + }, + "key-dependencies": [ + "vnf-id" + ] + } + }, + "sdnc": { + "type": "source-rest", + "properties": { + "verb": "GET", + "type": "JSON", + "url-path": "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vf-modules", + "path": "/vf-modules", + "input-key-mapping": { + "service-instance-id": "service-instance-id", + "vnf-id": "vnf-id" + }, + "output-key-mapping": { + "vf-modules": "vf-module" + }, + "key-dependencies": [ + "service-instance-id", + "vnf-id" + ] + } + } + } + }, + "config-deploy-setup": { + "tags": "config-deploy-setup", + "name": "config-deploy-setup", + "property": { + "description": "Configuration Input setup for config-deploy operation", + "type": "json" + }, + "group": "default", + "updated-by": "Lukasz Rajewski ", + "sources": { + "capability": { + "type": "source-capability", + "properties": { + "script-type": "kotlin", + "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.ConfigDeploySetup", + "instance-dependencies": [] + } + } + } } } 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 9053c9b2..6c71ca22 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 @@ -37,6 +37,20 @@ "resolution-key": { "get_input": "resolution-key" } + }, + "simple-status-properties": { + "resolution-key": { + "get_input": "resolution-key" + }, + "config-deploy-setup": { + "get_attribute": [ + "config-setup-process", + "", + "assignment-map", + "config-deploy", + "config-deploy-setup" + ] + } } }, "topology_template": { @@ -100,12 +114,24 @@ }, "config-assign": { "steps": { - "config-assign": { - "description": "Create a message", - "target": "config-assign-process", + "config-setup": { + "description": "Gather necessary input for config template upload", + "target": "config-setup-process", "activities": [ { - "call_operation": "" + "call_operation": "ResourceResolutionComponent.process" + } + ], + "on_success": [ + "config-template" + ] + }, + "config-template": { + "description": "Generate and upload K8s config template", + "target": "k8s-config-template", + "activities": [ + { + "call_operation": "K8sConfigTemplateComponent.process" } ] } @@ -128,9 +154,38 @@ }, "config-deploy": { "steps": { - "config-deploy": { - "description": "Run kotlin script", - "target": "config-deploy-process" + "config-setup": { + "description": "Gather necessary input for config init and status verification", + "target": "config-setup-process", + "activities": [ + { + "call_operation": "ResourceResolutionComponent.process" + } + ], + "on_success": [ + "config-apply" + ] + }, + "config-apply": { + "description": "Activate K8s config template", + "target": "k8s-config-apply", + "activities": [ + { + "call_operation": "K8sConfigTemplateComponent.process" + } + ], + "on_success": [ + "status-verification-script" + ] + }, + "status-verification-script": { + "description": "Simple status verification script", + "target": "simple-status-check", + "activities": [ + { + "call_operation": "ComponentScriptExecutor.process" + } + ] } }, "inputs": { @@ -241,7 +296,90 @@ } } }, - "config-assign-process": { + "k8s-config-template": { + "type": "component-k8s-config-template", + "interfaces": { + "K8sConfigTemplateComponent": { + "operations": { + "process": { + "inputs": { + "artifact-prefix-names": [ + "helm_vpkg" + ], + "resource-assignment-map": { + "get_attribute": [ + "config-setup-process", + "", + "assignment-map", + "config-deploy", + "config-deploy-setup" + ] + } + } + } + } + } + }, + "artifacts": { + "ssh-service-config": { + "type": "artifact-k8sprofile-content", + "file": "Templates/k8s-configs/ssh-service.tar.gz" + }, + "ssh-service-config-customizable": { + "type": "artifact-k8sprofile-content", + "file": "Templates/k8s-configs/ssh-service-config" + }, + "ssh-service-config-customizable-mapping": { + "type": "artifact-mapping-resource", + "file": "Templates/k8s-configs/ssh-service-config/ssh-service-mapping.json" + } + } + }, + "k8s-config-apply": { + "type": "component-k8s-config-value", + "interfaces": { + "K8sConfigValueComponent": { + "operations": { + "process": { + "inputs": { + "artifact-prefix-names": [ + "helm_vpkg" + ], + "resource-assignment-map": { + "get_attribute": [ + "config-setup-process", + "", + "assignment-map", + "config-deploy", + "config-deploy-setup" + ] + } + } + } + } + } + } + }, + "simple-status-check": { + "type": "component-script-executor", + "interfaces": { + "ComponentScriptExecutor": { + "operations": { + "process": { + "inputs": { + "script-type": "kotlin", + "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.SimpleStatusCheck", + "instance-dependencies": [ + "blueprintPropertiesService" + ], + "dynamic-properties": "*simple-status-properties" + } + } + } + } + } + }, + "config-setup-process": { "type": "component-resource-resolution", "interfaces": { "ResourceResolutionComponent": { @@ -251,9 +389,9 @@ "resolution-key": { "get_input": "resolution-key" }, - "store-result": true, + "store-result": false, "artifact-prefix-names": [ - "cnf" + "config-deploy" ] }, "outputs": { @@ -270,13 +408,13 @@ } }, "artifacts": { - "cnf-template": { + "config-deploy-template": { "type": "artifact-template-velocity", - "file": "Templates/cnf-template.vtl" + "file": "Templates/config-setup-template.vtl" }, - "cnf-mapping": { + "config-deploy-mapping": { "type": "artifact-mapping-resource", - "file": "Templates/cnf-mapping.json" + "file": "Templates/config-setup-mapping.json" } } }, diff --git a/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/ConfigDeploy.kt b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/ConfigDeploy.kt index c4849601..861cdf66 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/ConfigDeploy.kt +++ b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/ConfigDeploy.kt @@ -1,5 +1,5 @@ /* - * Copyright © 2020 Aarna Networks, Inc. + * Copyright © 2021 Orange * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,44 +16,33 @@ package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts -import com.fasterxml.jackson.databind.node.ObjectNode 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 -import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction -import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils import org.slf4j.LoggerFactory -import org.springframework.http.HttpMethod -import org.springframework.web.client.RestTemplate open class ConfigDeploy : AbstractScriptComponentFunction() { private val log = LoggerFactory.getLogger(ConfigDeploy::class.java)!! - override suspend fun processNB(executionRequest: ExecutionServiceInput) { - - /* - * Resolution key will come as part of config-deploy request payload. - */ + override fun getName(): String { + return "ConfigDeploy" + } + override suspend fun processNB(executionRequest: ExecutionServiceInput) { val resolution_key = getDynamicProperties("resolution-key").asText() - log.info("Got the resolution_key: $resolution_key from config-deploy going to retrive the data from DB") + log.info("Got the resolution_key: $resolution_key from config-deploy going to retrieve the data from DB") + val prefix = "config-deploy" // used in the config-assign resolution - // Read the config-assing data using the resolution key + prefix name for the template - // We can select the given configuration using the resolution_key - val prefix = "cnf" val payload = storedContentFromResolvedArtifactNB(resolution_key, prefix) log.info("cnf configuration data from DB : \n$payload\n") println("Run config-deploy") println("$payload") - } override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { log.info("Executing Recovery") + this.addError("${runtimeException.message}") } } diff --git a/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt new file mode 100644 index 00000000..2e6ec816 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt @@ -0,0 +1,93 @@ +/* + * Copyright © 2021 Orange + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts + +import com.fasterxml.jackson.databind.JsonNode +import com.fasterxml.jackson.databind.node.ObjectNode +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor +import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils +import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException +import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment +import org.slf4j.LoggerFactory + +open class ConfigDeploySetup() : ResourceAssignmentProcessor() { + + private val log = LoggerFactory.getLogger(ConfigDeploySetup::class.java)!! + + override fun getName(): String { + return "ConfigDeploySetup" + } + + override suspend fun processNB(resourceAssignment: ResourceAssignment) { + + var retValue: ObjectNode? = null + + try { + if (resourceAssignment.name == "config-deploy-setup") { + val modulesSdnc = raRuntimeService.getResolutionStore("vf-modules-list-sdnc")["vf-modules"] + val modulesAai = raRuntimeService.getResolutionStore("vf-modules-list-aai")["vf-modules"] + val objectMapper = jacksonObjectMapper() + val result: ObjectNode = objectMapper.createObjectNode() + for (module in modulesSdnc) { + val modelTopology = module.at("/vf-module-data/vf-module-topology") + val moduleParameters = modelTopology.at("/vf-module-parameters/param") + val label: String? = getParamValueByName(moduleParameters,"vf_module_label") + if (label != null) { + val modelInfo = modelTopology["onap-model-information"] + val moduleData: ObjectNode = objectMapper.createObjectNode() + result.put(label, moduleData) + moduleData.put("k8s-rb-definition-name", modelInfo["model-invariant-uuid"].asText()) + moduleData.put("k8s-rb-definition-version", modelInfo["model-uuid"].asText()) + val templateName: String? = getParamValueByName(moduleParameters,"k8s-rb-config-template-name") + val templateSource: String? = getParamValueByName(moduleParameters,"k8s-rb-config-template-source") + if (templateName != null) + moduleData.put("k8s-rb-config-template-name", templateName) + if (templateSource != null) + moduleData.put("k8s-rb-config-template-source", templateSource) + for (aaiModule in modulesAai) { + if (aaiModule["vf-module-id"].asText() == module["vf-module-id"].asText()) { + moduleData.put("k8s-instance-id", aaiModule["heat-stack-id"].asText()) + break + } + } + } + } + retValue = result + } + ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, retValue) + } catch (e: Exception) { + log.error(e.message, e) + ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, "ERROR") + + throw BlueprintProcessorException("Failed in template key ($resourceAssignment) assignments, cause: ${e.message}", e) + } + } + + private fun getParamValueByName(params: JsonNode, paramName: String): String? { + for (param in params) { + if (param["name"].asText() == paramName) { + return param["value"].asText() + } + } + return null + } + + override suspend fun recoverNB(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) { + this.addError("${runtimeException.message}") + } +} diff --git a/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/SimpleStatusCheck.kt b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/SimpleStatusCheck.kt new file mode 100644 index 00000000..c775bb19 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/SimpleStatusCheck.kt @@ -0,0 +1,89 @@ +/* + * Copyright © 2021 Orange + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts + +import com.fasterxml.jackson.databind.node.ObjectNode +import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService +import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput +import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration +import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sPluginInstanceApi +import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sRbInstanceStatus +import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction +import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException +import org.slf4j.LoggerFactory + +open class SimpleStatusCheck : AbstractScriptComponentFunction() { + + private val log = LoggerFactory.getLogger(SimpleStatusCheck::class.java)!! + + override fun getName(): String { + return "SimpleStatusCheck" + } + + override suspend fun processNB(executionRequest: ExecutionServiceInput) { + log.info("SIMPLE STATUS CHECK - START") + + val configValueSetup: ObjectNode = getDynamicProperties("config-deploy-setup") as ObjectNode + + val bluePrintPropertiesService: BlueprintPropertiesService = + this.functionDependencyInstanceAsType("blueprintPropertiesService") + + val k8sConfiguration = K8sConnectionPluginConfiguration(bluePrintPropertiesService) + + var instanceApi = K8sPluginInstanceApi(k8sConfiguration) + + var checkCount: Int = 30 // in the future to be read in from the input + while(checkCount > 0) { + var continueCheck = false + configValueSetup.fields().forEach { it -> + val vfModuleName = it.key + val instanceName = it.value.get("k8s-instance-id").asText() + + var instanceStatus: K8sRbInstanceStatus? = instanceApi.getInstanceStatus(instanceName) + instanceStatus?.resourcesStatus?.forEach { + if (it.gvk?.kind == "Pod") { + var version = it.gvk?.version!! + if (it.gvk?.group!! != "") + version = "${it.gvk?.group}/$version" + // val podStatus = instanceApi.queryInstanceStatus(instanceName, it.gvk?.kind!!, version, it.name, null) + // log.info(podStatus.toString()) + var podState = it.status?.get("status") as Map + + if ((podState?.get("phase") as String) != "Running") { + continueCheck = true + log.info("Pod ${it?.name} [$vfModuleName] has invalid state ${(podState?.get("phase"))}") + } + } + } + } + if (continueCheck) { + checkCount-- + if (checkCount == 0) + throw BlueprintException("Pods State verification failed") + Thread.sleep(10000L) + } else + checkCount = 0 + } + + log.info("SIMPLE STATUS CHECK - END") + } + + override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { + log.info("Executing Recovery") + this.addError("${runtimeException.message}") + } +} 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 53cd0f71..d25f7417 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 @@ -200,11 +200,35 @@ "property": { "description": "The source folder or file relative to 'Templates/k8s-profiles' folder", "type": "string", - "required": true + "required": false }, "input-param": false, "dictionary-name": "k8s-rb-profile-source", "dictionary-source": "default", "dependencies": [] + }, + { + "name": "k8s-rb-config-template-name", + "property": { + "description": "The source of configuration template for config-assign operation", + "type": "string", + "required": false + }, + "input-param": false, + "dictionary-name": "k8s-rb-config-template-name", + "dictionary-source": "default", + "dependencies": [] + }, + { + "name": "k8s-rb-config-template-source", + "property": { + "description": "The source of configuration template for config-assign operation", + "type": "string", + "required": false + }, + "input-param": false, + "dictionary-name": "k8s-rb-config-template-source", + "dictionary-source": "default", + "dependencies": [] } ] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/cnf-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/cnf-mapping.json deleted file mode 100644 index 4e012f95..00000000 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/cnf-mapping.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "name": "service-instance-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "service-instance-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - } -] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/cnf-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/cnf-template.vtl deleted file mode 100644 index 459d3c3a..00000000 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/cnf-template.vtl +++ /dev/null @@ -1,3 +0,0 @@ -{ - "config deploy results for cnf service instance" : "${service-instance-id}" -} diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/config-setup-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/config-setup-mapping.json new file mode 100644 index 00000000..d96fd08a --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/config-setup-mapping.json @@ -0,0 +1,77 @@ +[ + { + "name": "service-instance-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "service-instance-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vnf-id", + "property": { + "description": "", + "required": false, + "type": "string" + }, + "input-param": false, + "dictionary-name": "vnf-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vf-modules-list-sdnc", + "property": { + "description": "list of modules associated with vnf from MDSAL", + "type": "json" + }, + "input-param": false, + "dictionary-name": "vf-modules-list", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id" + ] + }, + { + "name": "vf-modules-list-aai", + "property": { + "description": "list of modules associated with vnf from AAI", + "type": "json" + }, + "input-param": false, + "dictionary-name": "vf-modules-list", + "dictionary-source": "aai-data", + "dependencies": [ + "service-instance-id", + "vnf-id" + ] + }, + { + "name": "config-deploy-setup", + "property": { + "description": "configuration for config value setup", + "type": "json" + }, + "input-param": false, + "dictionary-name": "config-deploy-setup", + "dictionary-source": "capability", + "dependencies": [ + "vf-modules-list-aai", + "vf-modules-list-sdnc" + ] + } +] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/config-setup-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/config-setup-template.vtl new file mode 100644 index 00000000..88771d61 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/config-setup-template.vtl @@ -0,0 +1 @@ +${config-deploy-setup} diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/Chart.yaml b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/Chart.yaml new file mode 100755 index 00000000..e334320f --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart to deploy ssh service for vPGN +name: ssh_service +version: 0.1.0 diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/ssh-service-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/ssh-service-mapping.json new file mode 100644 index 00000000..47db31da --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/ssh-service-mapping.json @@ -0,0 +1,14 @@ +[ + { + "name": "vpg-management-port", + "property": { + "description": "The number of node port for ssh service of vpg", + "type": "integer", + "default": "0" + }, + "input-param": false, + "dictionary-name": "vpg-management-port", + "dictionary-source": "default", + "dependencies": [] + } +] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/templates/ssh-service-template.yaml.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/templates/ssh-service-template.yaml.vtl new file mode 100644 index 00000000..3dc2eb5f --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/templates/ssh-service-template.yaml.vtl @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.vpg_name_0 }}-ssh + labels: + vnf-name: {{ .Values.vnf_name }} + vf-module-name: {{ .Values.vpg_name_0 }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +spec: + type: NodePort + ports: + - port: 22 + nodePort: ${vpg-management-port} + selector: + vf-module-name: {{ .Values.vpg_name_0 }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/values.yaml b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/values.yaml new file mode 100755 index 00000000..5b46bd96 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service-config/values.yaml @@ -0,0 +1,3 @@ +vnf_name: test-vnf +vpg_name_0: test-vnf-vpg +vpg_management_port: 31922 diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service.tar.gz b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service.tar.gz new file mode 100644 index 00000000..a8d643bb Binary files /dev/null and b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-configs/ssh-service.tar.gz differ diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/nf-params-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/nf-params-mapping.json deleted file mode 100644 index 32f7860c..00000000 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/nf-params-mapping.json +++ /dev/null @@ -1,108 +0,0 @@ -[ - { - "name": "service-instance-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "service-instance-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vnf-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vnf-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "active-streams", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "active-streams", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "put-active-streams", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "put-active-streams", - "dictionary-source": "sdnc", - "dependencies": [ - "vpg_onap_private_ip_0", - "active-streams" - ], - "version": 0 - }, - { - "name": "vpg_onap_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vpg_onap_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ], - "version": 0 - } -] diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/nf-params-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/nf-params-template.vtl deleted file mode 100644 index 90aaecd1..00000000 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/nf-params-template.vtl +++ /dev/null @@ -1,5 +0,0 @@ -{ - "vpg_onap_private_ip_0": "${vpg_onap_private_ip_0}", - "active-streams": "${active-streams}", - "status": "${put-active-streams}" -} \ No newline at end of file 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 ff3dfd8e..ac083882 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-mapping.json @@ -206,5 +206,29 @@ "dictionary-name": "k8s-rb-profile-source", "dictionary-source": "default", "dependencies": [] + }, + { + "name": "k8s-rb-config-template-name", + "property": { + "description": "The source of configuration template for config-assign operation", + "type": "string", + "required": false + }, + "input-param": false, + "dictionary-name": "k8s-rb-config-template-name", + "dictionary-source": "default", + "dependencies": [] + }, + { + "name": "k8s-rb-config-template-source", + "property": { + "description": "The source of configuration template for config-assign operation", + "type": "string", + "required": false + }, + "input-param": false, + "dictionary-name": "k8s-rb-config-template-source", + "dictionary-source": "default", + "dependencies": [] } ] 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 86217c16..5156be32 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-mapping.json @@ -206,5 +206,29 @@ "dictionary-name": "k8s-rb-profile-source", "dictionary-source": "default", "dependencies": [] + }, + { + "name": "k8s-rb-config-template-name", + "property": { + "description": "The source of configuration template for config-assign operation", + "type": "string", + "required": false + }, + "input-param": false, + "dictionary-name": "k8s-rb-config-template-name", + "dictionary-source": "default", + "dependencies": [] + }, + { + "name": "k8s-rb-config-template-source", + "property": { + "description": "The source of configuration template for config-assign operation", + "type": "string", + "required": false + }, + "input-param": false, + "dictionary-name": "k8s-rb-config-template-source", + "dictionary-source": "default", + "dependencies": [] } ] 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 edd834c5..d8bb571d 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json +++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-mapping.json @@ -206,5 +206,29 @@ "dictionary-name": "k8s-rb-profile-source", "dictionary-source": "default", "dependencies": [] + }, + { + "name": "k8s-rb-config-template-name", + "property": { + "description": "The source of configuration template for config-assign operation", + "type": "string", + "required": false + }, + "input-param": false, + "dictionary-name": "k8s-rb-config-template-name", + "dictionary-source": "default", + "dependencies": [] + }, + { + "name": "k8s-rb-config-template-source", + "property": { + "description": "The source of configuration template for config-assign operation", + "type": "string", + "required": false + }, + "input-param": false, + "dictionary-name": "k8s-rb-config-template-source", + "dictionary-source": "default", + "dependencies": [] } ]