aboutsummaryrefslogtreecommitdiffstats
path: root/tutorials/ApacheCNF/templates/cba/Definitions
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2022-11-14 14:48:24 +0100
committerLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2022-11-14 18:02:32 +0000
commit5e393641f0320a69f5fc699e38993b6d017accf8 (patch)
tree055282cd6c49447a7e56a0c7504728cb0dae4adb /tutorials/ApacheCNF/templates/cba/Definitions
parenta08df0177e60b85c7dd437433d716889a8d5d214 (diff)
[APACHECNF] CDS workflows for upgrade scenariokohn
Issue-ID: INT-2164 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: Icfa9dd7d90abb3da2b0cf388cfb1e3a27e8edd6d (cherry picked from commit 4193053d0fc30b688f991e2356e2c0cd6c446a57)
Diffstat (limited to 'tutorials/ApacheCNF/templates/cba/Definitions')
-rw-r--r--tutorials/ApacheCNF/templates/cba/Definitions/CNF.json128
-rw-r--r--tutorials/ApacheCNF/templates/cba/Definitions/data_types.json64
2 files changed, 184 insertions, 8 deletions
diff --git a/tutorials/ApacheCNF/templates/cba/Definitions/CNF.json b/tutorials/ApacheCNF/templates/cba/Definitions/CNF.json
index 4f44e8a1..f273bfb8 100644
--- a/tutorials/ApacheCNF/templates/cba/Definitions/CNF.json
+++ b/tutorials/ApacheCNF/templates/cba/Definitions/CNF.json
@@ -167,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": {
@@ -234,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": {
@@ -449,7 +529,7 @@
"status-verification-script"
],
"on_failure": [
- "handle_error"
+ "handle-error"
]
},
"status-verification-script": {
@@ -476,9 +556,9 @@
"collect-results"
]
},
- "handle_error": {
+ "handle-error": {
"description": "Simple error verification script",
- "target": "simple-error-check",
+ "target": "simple-script",
"activities": [
{
"call_operation": "ComponentScriptExecutor.process"
@@ -573,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": {
@@ -731,7 +846,7 @@
}
}
},
- "simple-error-check": {
+ "simple-script": {
"type": "component-script-executor",
"interfaces": {
"ComponentScriptExecutor": {
@@ -739,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"
}
}
diff --git a/tutorials/ApacheCNF/templates/cba/Definitions/data_types.json b/tutorials/ApacheCNF/templates/cba/Definitions/data_types.json
index 1573c81c..5a3b9d2d 100644
--- a/tutorials/ApacheCNF/templates/cba/Definitions/data_types.json
+++ b/tutorials/ApacheCNF/templates/cba/Definitions/data_types.json
@@ -17,6 +17,38 @@
},
"derived_from": "tosca.datatypes.Dynamic"
},
+ "dt-config-upgrade-assign-properties": {
+ "description": "Dynamic DataType definition for workflow(config-upgrade-assign).",
+ "version": "1.0.0",
+ "properties": {
+ "service-instance-id": {
+ "description": "",
+ "required": false,
+ "type": "string"
+ },
+ "service-model-uuid": {
+ "description": "",
+ "required": false,
+ "type": "string"
+ },
+ "vnf-id": {
+ "description": "",
+ "required": false,
+ "type": "string"
+ },
+ "vnf-name": {
+ "description": "",
+ "required": false,
+ "type": "string"
+ },
+ "vnf-customization-uuid": {
+ "description": "",
+ "required": false,
+ "type": "string"
+ }
+ },
+ "derived_from": "tosca.datatypes.Dynamic"
+ },
"dt-config-deploy-properties": {
"description": "Dynamic DataType definition for workflow(config-deploy).",
"version": "1.0.0",
@@ -45,6 +77,38 @@
},
"derived_from": "tosca.datatypes.Dynamic"
},
+ "dt-config-upgrade-deploy-properties": {
+ "description": "Dynamic DataType definition for workflow(config-upgrade-deploy).",
+ "version": "1.0.0",
+ "properties": {
+ "service-instance-id": {
+ "description": "",
+ "required": false,
+ "type": "string"
+ },
+ "service-model-uuid": {
+ "description": "",
+ "required": false,
+ "type": "string"
+ },
+ "vnf-id": {
+ "description": "",
+ "required": false,
+ "type": "string"
+ },
+ "vnf-name": {
+ "description": "",
+ "required": false,
+ "type": "string"
+ },
+ "vnf-customization-uuid": {
+ "description": "",
+ "required": false,
+ "type": "string"
+ }
+ },
+ "derived_from": "tosca.datatypes.Dynamic"
+ },
"dt-health-check-properties": {
"description": "Dynamic DataType definition for workflow(health-check).",
"version": "1.0.0",