diff options
Diffstat (limited to 'docs/microservices')
-rw-r--r-- | docs/microservices/expression.rst | 45 | ||||
-rw-r--r-- | docs/microservices/flexibleplugin.rst | 17 | ||||
-rw-r--r-- | docs/microservices/workflow.rst | 73 |
3 files changed, 135 insertions, 0 deletions
diff --git a/docs/microservices/expression.rst b/docs/microservices/expression.rst new file mode 100644 index 000000000..38a7d624c --- /dev/null +++ b/docs/microservices/expression.rst @@ -0,0 +1,45 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 +.. International License. http://creativecommons.org/licenses/by/4.0 +.. Copyright (C) 2019 IBM. + +Expression +========== + +TOSCA provides for a set of functions to reference elements within the template or to retrieve runtime values. + +Below is a list of supported expressions + +get_input +--------- + +The get_input function is used to retrieve the values of properties declared within the inputs section of a TOSCA Service Template. + +http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454178 + +get_property +------------ + +The get_property function is used to retrieve property values between modelable entities defined in the same service template. + +http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454178 + +get_attribute +------------- + +The get_attribute function is used to retrieve the values of named attributes declared by the referenced node or relationship template name. + +http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454179 + +get_operation_output +-------------------- + +The get_operation_output function is used to retrieve the values of variables exposed / exported from an interface operation. + +http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454180 + +get_artifact +------------ + +The get_artifact function is used to retrieve artifact location between modelable entities defined in the same service template. + +http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454182 diff --git a/docs/microservices/flexibleplugin.rst b/docs/microservices/flexibleplugin.rst new file mode 100644 index 000000000..5c83ac9b7 --- /dev/null +++ b/docs/microservices/flexibleplugin.rst @@ -0,0 +1,17 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright (C) 2019 IBM. + +Flexible Plug-in +---------------- + +Interaction with external systems is made plug-able, removing development cycle to support new endpoint. + +Currently, REST or SQL external systems are supported. + +An external system might be used by multiple resources, or by multiple scripts. + +In order to share the external system information, TOSCA provides a way to create macros using dsl_definitions: + +http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454160 +http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454173 diff --git a/docs/microservices/workflow.rst b/docs/microservices/workflow.rst new file mode 100644 index 000000000..b74a49d2b --- /dev/null +++ b/docs/microservices/workflow.rst @@ -0,0 +1,73 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 +.. International License. http://creativecommons.org/licenses/by/4.0 +.. Copyright (C) 2019 IBM. + +Workflow +======== + +A workflow defines an overall action to be taken on the service, hence is an entry-point for the run-time execution of the CBA package. + +A workflow also defines inputs and outputs that will defined the payload contract of the request and response (see Dynamic API) + +A workflow can be composed of one or multiple sub-actions to execute. + +A CBA package can have as many workflows as needed. + +Single action +------------- + +The workflow is directly backed by a node_template of type tosca.nodes.Component + +Multiple sub-actions +-------------------- +The workflow is backed by Directed Graph engine, node_template of type dg-generic, and are imperative workflows. + +A DG used as workflow for CDS is composed of multiple execute nodes; each individual execute node refers to a plugin, that is a node_template of type tosca.nodes.Component. + +Below the properties of a workflow: + + + +Workflow Example +---------------- + +.. code:: json + +print(" +{ + "workflow": { + "resource-assignment": { <- workflow-name + "inputs": { + "vnf-id": { <- static inputs + "required": true, + "type": "string" + }, + "resource-assignment-properties": { <- dynamic inputs + "required": true, + "type": "dt-resource-assignment-properties" + } + }, + "steps": { + "call-resource-assignment": { <- step-name + "description": "Resource Assignment Workflow", + "target": "resource-assignment-process" <- node_template targeted by the step + } + }, + "outputs": { + "template-properties": { <- output + "type": "json", <- complex type + "value": { + "get_attribute": [ <- uses expression to retrieve attribute from context + "resource-assignment", + "assignment-params" + ] + } + } + } + } + } +} +") + + +TOSCA definition: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454203
\ No newline at end of file |