From c4d74940c9bf8d381fe066d5232a426e573dda98 Mon Sep 17 00:00:00 2001 From: Jozsef Csongvai Date: Mon, 16 May 2022 11:15:06 -0400 Subject: Add component for deleting resources and tempates Users can now add component-resource-deletion as a nodetemplate in their CBA. This will delete resources and templates created by the cba, using resolution key or resource-id and resource-type. Issue-ID: CCSDK-3735 Signed-off-by: Jozsef Csongvai Signed-off-by: kuldipr Change-Id: I22b7f2fe3369a3e5bac3b72a2114a81622d878dc --- .../node_type/component-resource-deletion.json | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 components/model-catalog/definition-type/starter-type/node_type/component-resource-deletion.json (limited to 'components') diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-resource-deletion.json b/components/model-catalog/definition-type/starter-type/node_type/component-resource-deletion.json new file mode 100644 index 000000000..7026d09f6 --- /dev/null +++ b/components/model-catalog/definition-type/starter-type/node_type/component-resource-deletion.json @@ -0,0 +1,67 @@ +{ + "description": "This is Resource Deletion Component API", + "version": "1.0.0", + "attributes": { + "result": { + "description": "A map of [artifact-prefix]: { nDeletedTemplates, nDeletedResources }", + "required": true, + "type": "map" + }, + "success": { + "required": true, + "type": "boolean" + } + }, + "capabilities": { + "component-node": { + "type": "tosca.capabilities.Node" + } + }, + "interfaces": { + "ResourceDeletionComponent": { + "operations": { + "process": { + "inputs": { + "resolution-key": { + "description": "Resolution key associated with stored assignments and templates. Required if resource-type + resource-id are empty", + "required": false, + "type": "string" + }, + "resource-type": { + "description": "Resource-type associated with stored assignments and templates. Required if resolution-key is empty. Must be used together with resource-id", + "required": false, + "type": "string" + }, + "resource-id": { + "description": "Resource-id associated with stored assignments and templates. Required if resolution-key is empty. Must be used together with resource-type", + "required": false, + "type": "string" + }, + "artifact-prefix-names": { + "required": true, + "description": "Template , Resource Assignment Artifact Prefix names", + "type": "list", + "entry_schema": { + "type": "string" + } + }, + "last-n-occurrences": { + "description": "Only delete last N occurrences", + "required": false, + "default": null, + "type": "integer" + }, + "fail-on-empty": { + "description": "Determines if the component should fail when nothing was deleted", + "required": false, + "default": false, + "type": "boolean" + } + }, + "outputs": {} + } + } + } + }, + "derived_from": "tosca.nodes.Component" +} -- cgit 1.2.3-korg