diff options
author | j.blixt <j.blixt@partner.samsung.com> | 2021-03-31 11:48:49 +0200 |
---|---|---|
committer | Grzegorz Wielgosinski <g.wielgosins@samsung.com> | 2021-05-24 16:18:31 +0200 |
commit | 532cfff8eaad73781cbb410064cd3b4bda5e3095 (patch) | |
tree | 51a99d1ffdec3c322537c5bd79da4e5eef8bc3bf /heat/vFW_CNF_CDS/templates/cba/Definitions | |
parent | 21757af846776cf5005e06d8c4a9c9dfd4eb6b6e (diff) |
[vFW_CNF_CDS] Add workflow health-check and K8sHealthCheck.kt script
Issue-ID: INT-1899
Signed-off-by: j.blixt <j.blixt@partner.samsung.com>
Signed-off-by: Grzegorz Wielgosinski <g.wielgosins@samsung.com>
Signed-off-by: Konrad Bańka <k.banka@samsung.com>
Change-Id: I7d52c49bd0e40d30a560b2012362d38488392be6
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/cba/Definitions')
4 files changed, 173 insertions, 81 deletions
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/artifact_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/artifact_types.json index 778394d7..70935b3b 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Definitions/artifact_types.json +++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/artifact_types.json @@ -23,8 +23,7 @@ "description": " Velocity Template used for Configuration", "file_ext": [ "vtl" - ], - "version": "1.0.0" + ] } } } 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 f4d9266d..e797e79b 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json +++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json @@ -5,16 +5,32 @@ "description": "Dynamic DataType definition for workflow(config-assign).", "properties": { "config-deploy-setup": { + "description": "configuration for config value setup", "type": "json" }, "service-instance-id": { + "constraints": [ + {} + ], "description": "", + "entry_schema": { + "type": "" + }, "required": false, + "status": "", "type": "string" }, "vf-modules-list": { "type": "json" }, + "vf-modules-list-aai": { + "description": "list of modules associated with vnf from AAI", + "type": "json" + }, + "vf-modules-list-sdnc": { + "description": "list of modules associated with vnf from MDSAL", + "type": "json" + }, "vnf-id": { "description": "", "required": false, @@ -28,14 +44,61 @@ "description": "Dynamic DataType definition for workflow(config-deploy).", "properties": { "config-deploy-setup": { + "description": "configuration for config value setup", "type": "json" }, "service-instance-id": { + "constraints": [ + {} + ], "description": "", + "entry_schema": { + "type": "" + }, "required": false, + "status": "", "type": "string" }, - "vf-modules-list": { + "vf-modules-list-aai": { + "description": "list of modules associated with vnf from AAI", + "type": "json" + }, + "vf-modules-list-sdnc": { + "description": "list of modules associated with vnf from MDSAL", + "type": "json" + }, + "vnf-id": { + "description": "", + "required": false, + "type": "string" + } + } + }, + "dt-health-check-properties": { + "description": "Dynamic DataType definition for workflow(health-check).", + "properties": { + "config-deploy-setup": { + "description": "configuration for config value setup", + "type": "json" + }, + "service-instance-id": { + "constraints": [ + {} + ], + "description": "", + "entry_schema": { + "type": "" + }, + "required": false, + "status": "", + "type": "string" + }, + "vf-modules-list-aai": { + "description": "list of modules associated with vnf from AAI", + "type": "json" + }, + "vf-modules-list-sdnc": { + "description": "list of modules associated with vnf from MDSAL", "type": "json" }, "vnf-id": { 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 98ed5d2a..5ad44764 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json +++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/node_types.json @@ -260,7 +260,7 @@ "dynamic-properties": { "description": "Dynamic Json Content or DSL Json reference.", "required": false, - "type": "json" + "type": "boolean" }, "occurrence": { "default": 1, @@ -594,83 +594,6 @@ "derived_from": "tosca.nodes.Root", "description": "TOSCA base type for Resource Sources", "version": "1.0.0" - }, - "tosca.nodes.Vnf": { - "derived_from": "tosca.nodes.Root", - "description": "This is VNF Node Type", - "version": "1.0.0" - }, - "tosca.nodes.Workflow": { - "derived_from": "tosca.nodes.Root", - "description": "This is Directed Graph Node Type", - "version": "1.0.0" - }, - "vnf-netconf-device": { - "capabilities": { - "netconf": { - "properties": { - "connection-time-out": { - "default": 30, - "required": false, - "type": "integer" - }, - "login-account": { - "default": "sdnc-tacacs", - "required": true, - "type": "string" - }, - "login-key": { - "default": "sdnc", - "required": true, - "type": "string" - }, - "port-number": { - "default": 830, - "required": true, - "type": "integer" - }, - "source": { - "default": "npm", - "required": false, - "type": "string" - }, - "target-ip-address": { - "required": true, - "type": "string" - } - }, - "type": "tosca.capabilities.Netconf" - }, - "restconf": { - "properties": { - "connection-time-out": { - "default": 30, - "required": false, - "type": "integer" - }, - "login-account": { - "required": true, - "type": "string" - }, - "login-key": { - "required": true, - "type": "string" - }, - "port-number": { - "required": true, - "type": "integer" - }, - "target-ip-address": { - "required": true, - "type": "string" - } - }, - "type": "tosca.capabilities.Restconf" - } - }, - "derived_from": "tosca.nodes.Vnf", - "description": "This is VNF Device with Netconf Capability", - "version": "1.0.0" } } } 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 c17caca2..22f5749b 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 @@ -224,6 +224,94 @@ "type": "dt-config-deploy-properties" } } + }, + "health-check": { + "steps": { + "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" + ], + "on_failure": [ + "handle_error" + ] + }, + "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" + } + ], + "on_success": [ + "health-check-process" + ], + "on_failure": [ + "handle_error" + ] + }, + "health-check-process": { + "description": "Start health check script", + "target": "health-check-script", + "activities": [ + { + "call_operation": "ComponentScriptExecutor.process" + } + ], + "on_success": [ + "collect-results" + ], + "on_failure": [ + "handle_error" + ] + }, + "handle_error": { + "description": "Simple error verification script", + "target": "simple-error-check", + "activities": [ + { + "call_operation": "ComponentScriptExecutor.process" + } + ], + "on_success": [ + "collect-results" + ] + }, + "collect-results": { + "description": "Final collection of results", + "target": "collect-results" + } + }, + "inputs": { + "resolution-key": { + "required": true, + "type": "string" + }, + "config-deploy-properties": { + "description": "Dynamic PropertyDefinition for workflow(config-deploy).", + "required": true, + "type": "dt-config-deploy-properties" + } + } } }, "node_templates": { @@ -438,6 +526,25 @@ } } }, + "health-check-script": { + "type": "component-script-executor", + "interfaces": { + "ComponentScriptExecutor": { + "operations": { + "process": { + "inputs": { + "script-type": "kotlin", + "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.K8sHealthCheck", + "instance-dependencies": [ + "blueprintPropertiesService" + ], + "dynamic-properties": "*simple-status-properties" + } + } + } + } + } + }, "config-setup-process": { "type": "component-resource-resolution", "interfaces": { |