X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=tutorials%2FApacheCNF%2Ftemplates%2Fcba%2FDefinitions%2FCNF.json;h=f273bfb8df0bb0e09f9cbeb8cdf7e899d1fd0806;hb=4193053d0fc30b688f991e2356e2c0cd6c446a57;hp=2e30ce01f5f967821053a9e625c922ec7955f998;hpb=0c85ee9fc85870f8ba39befc63b8351301d4842f;p=demo.git diff --git a/tutorials/ApacheCNF/templates/cba/Definitions/CNF.json b/tutorials/ApacheCNF/templates/cba/Definitions/CNF.json index 2e30ce01..f273bfb8 100644 --- a/tutorials/ApacheCNF/templates/cba/Definitions/CNF.json +++ b/tutorials/ApacheCNF/templates/cba/Definitions/CNF.json @@ -56,6 +56,15 @@ "config-deploy", "config-deploy-setup" ] + }, + "status-check-max-count": { + "get_attribute": [ + "config-setup-process", + "", + "assignment-map", + "config-deploy", + "status-check-max-count" + ] } } }, @@ -158,6 +167,46 @@ } } }, + "config-upgrade-assign": { + "steps": { + "config-setup": { + "description": "Gather necessary input for profile upload", + "target": "config-setup-process", + "activities": [ + { + "call_operation": "ResourceResolutionComponent.process" + } + ], + "on_success": [ + "profile-upload" + ] + }, + "profile-upload": { + "description": "Generate and upload K8s Profile before upgrade", + "target": "k8s-profile-upgrade-upload", + "activities": [ + { + "call_operation": "ComponentScriptExecutor.process" + } + ] + } + }, + "inputs": { + "resolution-key": { + "required": true, + "type": "string" + }, + "store-result": { + "required": true, + "type": "boolean" + }, + "config-upgrade-assign-properties": { + "description": "Dynamic PropertyDefinition for workflow(config-upgrade-assign).", + "required": true, + "type": "dt-config-upgrade-assign-properties" + } + } + }, "config-deploy": { "steps": { "config-setup": { @@ -225,6 +274,46 @@ } } }, + "config-upgrade-deploy": { + "steps": { + "config-setup": { + "description": "Gather necessary input for profile upload", + "target": "config-setup-process", + "activities": [ + { + "call_operation": "ResourceResolutionComponent.process" + } + ], + "on_success": [ + "status-verification-script" + ] + }, + "status-verification-script": { + "description": "Simple status verification script", + "target": "simple-status-check", + "activities": [ + { + "call_operation": "ComponentScriptExecutor.process" + } + ] + } + }, + "inputs": { + "resolution-key": { + "required": true, + "type": "string" + }, + "store-result": { + "required": true, + "type": "boolean" + }, + "config-upgrade-deploy-properties": { + "description": "Dynamic PropertyDefinition for workflow(config-upgrade-deploy).", + "required": true, + "type": "dt-config-upgrade-deploy-properties" + } + } + }, "scale-out": { "steps": { "config-setup": { @@ -440,7 +529,7 @@ "status-verification-script" ], "on_failure": [ - "handle_error" + "handle-error" ] }, "status-verification-script": { @@ -453,9 +542,6 @@ ], "on_success": [ "health-check-process" - ], - "on_failure": [ - "handle_error" ] }, "health-check-process": { @@ -468,14 +554,11 @@ ], "on_success": [ "collect-results" - ], - "on_failure": [ - "handle_error" ] }, - "handle_error": { + "handle-error": { "description": "Simple error verification script", - "target": "simple-error-check", + "target": "simple-script", "activities": [ { "call_operation": "ComponentScriptExecutor.process" @@ -570,6 +653,41 @@ } } }, + "k8s-profile-upgrade-upload": { + "type": "component-k8s-profile-upload", + "interfaces": { + "K8sProfileUploadComponent": { + "operations": { + "process": { + "inputs": { + "artifact-prefix-names": [ + "helm_apache" + ], + "resource-assignment-map": { + "get_attribute": [ + "config-setup-process", + "", + "assignment-map", + "config-deploy", + "config-deploy-setup" + ] + } + } + } + } + } + }, + "artifacts": { + "cnf-cds-base-profile": { + "type": "artifact-k8sprofile-content", + "file": "Templates/k8s-profiles/cnf-cds-base-profile.tar.gz" + }, + "node-port-profile": { + "type": "artifact-k8sprofile-content", + "file": "Templates/k8s-profiles/node-port-profile.tar.gz" + } + } + }, "k8s-config-template": { "type": "component-k8s-config-template", "interfaces": { @@ -728,7 +846,7 @@ } } }, - "simple-error-check": { + "simple-script": { "type": "component-script-executor", "interfaces": { "ComponentScriptExecutor": { @@ -736,10 +854,7 @@ "process": { "inputs": { "script-type": "kotlin", - "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.SimpleErrorCheck", - "instance-dependencies": [ - "bluePrintPropertiesService" - ], + "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.SimpleScript", "dynamic-properties": "*simple-status-properties" } }