Real vFW CNF config-assign and config-deploy
[demo.git] / heat / vFW_CNF_CDS / templates / cba / Definitions / vFW_CNF_CDS.json
index 6c71ca2..c17caca 100644 (file)
@@ -5,7 +5,7 @@
         "author-email": "lukasz.rajewski@orange.com",
         "user-groups": "ADMIN, OPERATION",
         "template_name": "vFW_CNF_CDS",
-        "template_version": "7.0.0",
+        "template_version": "8.0.0",
         "template_tags": "Samuli Silvius, Lukasz Rajewski, vFW_CNF_CDS",
         "template_type": "DEFAULT"
     },
                         ],
                         "on_success": [
                             "config-apply"
+                        ],
+                        "on_failure": [
+                            "handle_error"
                         ]
                     },
                     "config-apply": {
                             {
                                 "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": {
                 },
                 "artifacts": {
                     "ssh-service-config": {
-                        "type": "artifact-k8sprofile-content",
+                        "type": "artifact-k8sconfig-content",
                         "file": "Templates/k8s-configs/ssh-service.tar.gz"
                     },
                     "ssh-service-config-customizable": {
-                        "type": "artifact-k8sprofile-content",
+                        "type": "artifact-k8sconfig-content",
                         "file": "Templates/k8s-configs/ssh-service-config"
                     },
                     "ssh-service-config-customizable-mapping": {
                                     "artifact-prefix-names": [
                                         "helm_vpkg"
                                     ],
+                                    "k8s-config-operation-type": "create",
                                     "resource-assignment-map": {
                                         "get_attribute": [
                                             "config-setup-process",
                             }
                         }
                     }
+                },
+                "artifacts": {
+                    "ssh-service-default": {
+                        "type": "artifact-k8sconfig-content",
+                        "file": "Templates/k8s-configs/ssh-service-config/values.yaml"
+                    },
+                    "ssh-service-config": {
+                        "type": "artifact-k8sconfig-content",
+                        "file": "Templates/k8s-configs/ssh-service-values/values.yaml.vtl"
+                    },
+                    "ssh-service-config-mapping": {
+                        "type": "artifact-mapping-resource",
+                        "file": "Templates/k8s-configs/ssh-service-values/ssh-service-mapping.json"
+                    }
                 }
             },
             "simple-status-check": {
                     }
                 }
             },
+            "simple-error-check": {
+                "type": "component-script-executor",
+                "interfaces": {
+                    "ComponentScriptExecutor": {
+                        "operations": {
+                            "process": {
+                                "inputs": {
+                                    "script-type": "kotlin",
+                                    "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.SimpleErrorCheck",
+                                    "instance-dependencies": [
+                                        "blueprintPropertiesService"
+                                    ],
+                                    "dynamic-properties": "*simple-status-properties"
+                                }
+                            }
+                        }
+                    }
+                }
+            },
             "config-setup-process": {
                 "type": "component-resource-resolution",
                 "interfaces": {
                         }
                     }
                 }
+            },
+            "collect-results": {
+                "type": "component-script-executor",
+                "interfaces": {
+                    "ComponentScriptExecutor": {
+                        "operations": {
+                            "process": {
+                                "implementation": {
+                                    "primary": "component-script",
+                                    "timeout": 180,
+                                    "operation_host": "SELF"
+                                },
+                                "inputs": {
+                                    "script-type": "kotlin",
+                                    "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.CollectorScript"
+                                },
+                                "outputs": {}
+                            }
+                        }
+                    }
+                }
             }
         }
     }