diff options
Diffstat (limited to 'components/model-catalog/blueprint-model')
10 files changed, 257 insertions, 1 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json index d926aa3fc..b771d25f9 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json +++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json @@ -68,8 +68,9 @@ "primary-config-data": { "type": "source-rest", "properties": { + "verb": "GET", "type": "JSON", - "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name", + "url-path": "/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name", "path": "/param/0/value", "input-key-mapping": { "service-instance-id": "service-instance-id", @@ -85,5 +86,92 @@ } } } + }, + "aai-get-resource": { + "tags": "aai-get", + "name": "aai-get-resource", + "property": { + "description": "primary aai data to get resource", + "type": "string" + }, + "updated-by": "Steve, Siani <steve.djissitchi@bell.ca>", + "sources": { + "primary-aai-data": { + "type": "source-rest", + "properties": { + "type": "JSON", + "verb": "GET", + "url-path": "/aai/v14/network/generic-vnfs/generic-vnf/$vnf-id", + "path": "", + "input-key-mapping": { + "vnf-id": "vnf-id" + }, + "output-key-mapping": { + }, + "key-dependencies": [ + "vnf-id" + ] + } + } + } + }, + "aai-put-resource": { + "tags": "aai-put", + "name": "aai-put-resource", + "property": { + "description": "primary aai data to update resource", + "type": "string" + }, + "updated-by": "Steve, Siani <steve.djissitchi@bell.ca>", + "sources": { + "primary-aai-data": { + "type": "source-rest", + "properties": { + "type": "JSON", + "verb": "PUT", + "url-path": "/query?format=resource", + "path": "", + "payload": "{\r\n\"start\": \"\\/nodes\\/vf-modules?vf-module-name=vf-module-name\",\r\n\"query\": \"\\/query\\/related-to?startingNodeType=vf-module&relatedToNodeType=generic-vnf\"\r\n}", + + "input-key-mapping": { + "vnf-id": "vnf-id" + }, + "output-key-mapping": { + }, + "key-dependencies": [ + "vnf-id" + ] + } + } + } + }, + "aai-post-resource": { + "tags": "aai-port", + "name": "aai-port-resource", + "property": { + "description": "primary aai data to create new resource", + "type": "string" + }, + "updated-by": "Steve, Siani <steve.djissitchi@bell.ca>", + "sources": { + "primary-aai-data": { + "type": "source-rest", + "properties": { + "type": "JSON", + "verb": "POST", + "url-path": "/aai/add/uri/here", + "path": "", + "payload": "", + "input-key-mapping": { + "vnf-id": "vnf-id" + }, + "output-key-mapping": { + }, + "key-dependencies": [ + "vnf-id" + ] + } + } + } } }
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/artifact_types.json new file mode 100644 index 000000000..445236354 --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/artifact_types.json @@ -0,0 +1,12 @@ +{ + "artifact_types": { + "artifact-script-python": { + "description": "Python Script file", + "version": "1.0.0", + "derived_from": "tosca.artifacts.Implementation", + "file_ext": [ + "py" + ] + } + } +}
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/data_types.json new file mode 100644 index 000000000..b22e30d00 --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/data_types.json @@ -0,0 +1,3 @@ +{ + "data_types": {} +}
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json new file mode 100644 index 000000000..cd63f0091 --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json @@ -0,0 +1,51 @@ +{ + "node_types": { + "component-remote-python-executor": { + "description": "This is Remote Python Execution Component.", + "version": "1.0.0", + "attributes": { + "execution-logs": { + "required": true, + "type": "string" + } + }, + "capabilities": { + "component-node": { + "type": "tosca.capabilities.Node" + } + }, + "interfaces": { + "ComponentRemotePythonExecutor": { + "operations": { + "process": { + "inputs": { + "endpoint-selector": { + "description": "Remote Container or Server selector name.", + "required": false, + "type": "string", + "default": "remote-python" + }, + "dynamic-properties": { + "description": "Dynamic Json Content or DSL Json reference.", + "required": false, + "type": "json" + }, + "command": { + "description": "Command to execute.", + "required": true, + "type": "string" + } + } + } + } + } + }, + "derived_from": "tosca.nodes.Component" + }, + "tosca.nodes.Component": { + "description": "This is default Component Node", + "version": "1.0.0", + "derived_from": "tosca.nodes.Root" + } + } +}
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/policy_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/policy_types.json new file mode 100644 index 000000000..2442ce877 --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/policy_types.json @@ -0,0 +1,3 @@ +{ + "policy_types": {} +}
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/relationship_types.json new file mode 100644 index 000000000..097a30afd --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/relationship_types.json @@ -0,0 +1,3 @@ +{ + "relationship_types": {} +}
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json new file mode 100644 index 000000000..464911478 --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json @@ -0,0 +1,85 @@ +{ + "tosca_definitions_version": "controller_blueprint_1_0_0", + "metadata": { + "template_author": "Brinda Santh Muthuramalingam", + "author-email": "brindasanth@in.ibm.com", + "user-groups": "ADMIN, OPERATION", + "template_name": "remote_scripts", + "template_version": "1.0.0", + "template_tags": "brinda, tosca" + }, + "imports": [ + { + "file": "Definitions/data_types.json" + }, + { + "file": "Definitions/relationship_types.json" + }, + { + "file": "Definitions/artifact_types.json" + }, + { + "file": "Definitions/node_types.json" + }, + { + "file": "Definitions/policy_types.json" + } + ], + "topology_template": { + "workflows": { + "execute-remote-python": { + "steps": { + "execute-script": { + "description": "Execute Remote Python Script", + "target": "execute-remote-python", + "activities": [ + { + "call_operation": "" + } + ] + } + }, + "inputs": {}, + "outputs": { + "logs": { + "type": "json", + "value": { + "get_attribute": [ + "execute-remote-python", + "execution-logs" + ] + } + } + } + } + }, + "node_templates": { + "execute-remote-python": { + "type": "component-remote-python-executor", + "interfaces": { + "ComponentRemotePythonExecutor": { + "operations": { + "process": { + "implementation": { + "primary": "component-script", + "dependencies": [ + "pyaml" + ] + }, + "inputs": { + "command": "python SamplePython.py blah" + } + } + } + } + }, + "artifacts": { + "component-script": { + "type": "artifact-script-python", + "file": "Scripts/python/SamplePython.py" + } + } + } + } + } +}
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/resources_definition_types.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/resources_definition_types.json @@ -0,0 +1 @@ +{}
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py new file mode 100644 index 000000000..5e20e2291 --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py @@ -0,0 +1,5 @@ +#!/usr/bin/python + +import sys + +print(sys.argv[1])
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/TOSCA-Metadata/TOSCA.meta new file mode 100644 index 000000000..5ca8aa031 --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/TOSCA-Metadata/TOSCA.meta @@ -0,0 +1,5 @@ +TOSCA-Meta-File-Version: 1.0.0 +CSAR-Version: 1.0 +Created-By: Brinda Santh <brindasanth@in.ibm.com> +Entry-Definitions: Definitions/remote_scripts.json +Template-Tags: Brinda Santh, remote_scripts
\ No newline at end of file |