aboutsummaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions
diff options
context:
space:
mode:
Diffstat (limited to 'components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions')
-rw-r--r--components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/artifact_types.json10
-rw-r--r--components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/data_types.json15
-rw-r--r--components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/node_types.json185
-rw-r--r--components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/policy_types.json3
-rw-r--r--components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/relationship_types.json3
-rw-r--r--components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/resources_definition_types.json18
-rw-r--r--components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/uat-imperative-workflow.json246
7 files changed, 480 insertions, 0 deletions
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/artifact_types.json
new file mode 100644
index 000000000..a730e4893
--- /dev/null
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/artifact_types.json
@@ -0,0 +1,10 @@
+{
+ "artifact_types" : {
+ "artifact-mapping-resource" : {
+ "description" : "Resource Mapping File used along with Configuration template",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "json" ]
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/data_types.json b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/data_types.json
new file mode 100644
index 000000000..1b8f2b31b
--- /dev/null
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/data_types.json
@@ -0,0 +1,15 @@
+{
+ "data_types" : {
+ "dt-uat-wf-properties" : {
+ "description" : "Dynamic DataType definition for workflow(uat-wf).",
+ "version" : "1.0.0",
+ "properties" : {
+ "service-instance-id" : {
+ "required" : true,
+ "type" : "string"
+ }
+ },
+ "derived_from" : "tosca.datatypes.Dynamic"
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/node_types.json b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/node_types.json
new file mode 100644
index 000000000..e86405cee
--- /dev/null
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/node_types.json
@@ -0,0 +1,185 @@
+{
+ "node_types" : {
+ "component-resource-resolution" : {
+ "description" : "This is Resource Assignment Component API",
+ "version" : "1.0.0",
+ "attributes" : {
+ "assignment-params" : {
+ "description" : "Holds resolved template, resolution-summary or key-value",
+ "required" : true,
+ "type" : "string"
+ },
+ "assignment-map" : {
+ "description" : "Holds resolved values for each artifact prefix eg. { vdns: { vnf-id: 123 } }",
+ "required" : true,
+ "type" : "map"
+ }
+ },
+ "capabilities" : {
+ "component-node" : {
+ "type" : "tosca.capabilities.Node"
+ }
+ },
+ "interfaces" : {
+ "ResourceResolutionComponent" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "resolution-key" : {
+ "description" : "Key for service instance related correlation.",
+ "required" : false,
+ "type" : "string"
+ },
+ "occurrence" : {
+ "description" : "Number of time to perform the resolution.",
+ "required" : false,
+ "type" : "integer",
+ "default" : 1
+ },
+ "store-result" : {
+ "description" : "Whether or not to store the output.",
+ "required" : false,
+ "type" : "boolean"
+ },
+ "resource-type" : {
+ "description" : "Request type.",
+ "required" : false,
+ "type" : "string"
+ },
+ "resolution-summary" : {
+ "description" : "Enable resolution-summary output",
+ "required" : false,
+ "type" : "boolean"
+ },
+ "artifact-prefix-names" : {
+ "description" : "Template , Resource Assignment Artifact Prefix names",
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "request-id" : {
+ "description" : "Request Id, Unique Id for the request.",
+ "required" : true,
+ "type" : "string"
+ },
+ "resource-id" : {
+ "description" : "Resource Id.",
+ "required" : false,
+ "type" : "string"
+ },
+ "action-name" : {
+ "description" : "Action Name of the process",
+ "required" : false,
+ "type" : "string"
+ },
+ "dynamic-properties" : {
+ "description" : "Dynamic Json Content or DSL Json reference.",
+ "required" : false,
+ "type" : "json"
+ }
+ },
+ "outputs" : {
+ "resource-assignment-params" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "resource-assignment-map" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "status" : {
+ "required" : true,
+ "type" : "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.Component"
+ },
+ "component-script-executor" : {
+ "description" : "This is CLI Transaction Configuration Component API",
+ "version" : "1.0.0",
+ "attributes" : {
+ "response-data" : {
+ "required" : false,
+ "type" : "json"
+ }
+ },
+ "capabilities" : {
+ "component-node" : {
+ "type" : "tosca.capabilities.Node"
+ }
+ },
+ "interfaces" : {
+ "ComponentScriptExecutor" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "script-type" : {
+ "description" : "Script type, kotlin type is supported",
+ "required" : true,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "kotlin", "jython", "internal" ]
+ } ],
+ "default" : "internal"
+ },
+ "script-class-reference" : {
+ "description" : "Kotlin Script class name or jython script name.",
+ "required" : true,
+ "type" : "string"
+ },
+ "instance-dependencies" : {
+ "description" : "Instance names to inject to Jython or Kotlin Script.",
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "dynamic-properties" : {
+ "description" : "Dynamic Json Content or DSL Json reference.",
+ "required" : false,
+ "type" : "json"
+ }
+ },
+ "outputs" : {
+ "response-data" : {
+ "description" : "Execution Response Data.",
+ "required" : false,
+ "type" : "string"
+ },
+ "status" : {
+ "description" : "Status of the Component Execution ( success or failure )",
+ "required" : true,
+ "type" : "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.Component"
+ },
+ "source-input" : {
+ "description" : "This is Input Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : { },
+ "derived_from" : "tosca.nodes.ResourceSource"
+ },
+ "tosca.nodes.Component" : {
+ "description" : "This is default Component Node",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
+ "tosca.nodes.ResourceSource" : {
+ "description" : "TOSCA base type for Resource Sources",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/policy_types.json b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/policy_types.json
new file mode 100644
index 000000000..1e44cc70a
--- /dev/null
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/policy_types.json
@@ -0,0 +1,3 @@
+{
+ "policy_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/relationship_types.json
new file mode 100644
index 000000000..4ddd7a57c
--- /dev/null
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/relationship_types.json
@@ -0,0 +1,3 @@
+{
+ "relationship_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/resources_definition_types.json
new file mode 100644
index 000000000..c7277c027
--- /dev/null
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/resources_definition_types.json
@@ -0,0 +1,18 @@
+{
+ "input-source" : {
+ "tags" : "input-source",
+ "name" : "input-source",
+ "property" : {
+ "description" : "name of the ",
+ "type" : "string"
+ },
+ "group" : "default",
+ "updated-by" : "brindasanth@onap.com",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/uat-imperative-workflow.json b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/uat-imperative-workflow.json
new file mode 100644
index 000000000..508d8b2e2
--- /dev/null
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/uat-imperative-workflow.json
@@ -0,0 +1,246 @@
+{
+ "tosca_definitions_version" : "controller_blueprint_1_0_0",
+ "metadata" : {
+ "template_author" : "cds-dev",
+ "author-email" : "test@bell.ca",
+ "template_name" : "uat-imperative-workflow",
+ "template_version" : "1.0.0",
+ "template_tags" : "UAT, CBA, test",
+ "template_type" : "DEFAULT"
+ },
+ "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"
+ } ],
+ "dsl_definitions" : { },
+ "topology_template" : {
+ "workflows" : {
+ "uat-wf" : {
+ "steps" : {
+ "assign" : {
+ "target" : "resource-resolution",
+ "on_success" : [ "deploy" ],
+ "on_failure" : [ "assign-recover" ]
+ },
+ "assign-recover" : {
+ "target" : "execute-script-1",
+ "on_success" : [ "deploy" ],
+ "on_failure" : [ "collect" ]
+ },
+ "deploy" : {
+ "target" : "execute-script-2",
+ "on_success" : [ "collect" ],
+ "on_failure" : [ "deploy-recover" ]
+ },
+ "deploy-recover" : {
+ "target" : "execute-script-3",
+ "on_success" : [ "collect" ],
+ "on_failure" : [ "collect" ]
+ },
+ "collect" : {
+ "target" : "collect-results"
+ }
+ },
+ "inputs" : {
+ "service-instance-id" : {
+ "type" : "string"
+ },
+ "failing-steps" : {
+ "type" : "json"
+ },
+ "uat-wf-properties" : {
+ "description" : "Dynamic PropertyDefinition for workflow(uat-wf).",
+ "required" : true,
+ "type" : "dt-uat-wf-properties"
+ }
+ },
+ "outputs" : {
+ "results" : {
+ "type" : "string",
+ "value" : {
+ "get_attribute" : [ "collect-results", "response-data" ]
+ }
+ }
+ }
+ },
+ "uat-wf-parallel" : {
+ "steps" : {
+ "execute-A" : {
+ "target" : "execute-script-1",
+ "on_success" : [ "finalize" ],
+ "on_failure" : [ "clean-up" ]
+ },
+ "execute-B" : {
+ "target" : "execute-script-2",
+ "on_success" : [ "finalize" ],
+ "on_failure" : [ "clean-up" ]
+ },
+ "finalize" : {
+ "target" : "execute-script-3",
+ "on_success" : [ "clean-up" ],
+ "on_failure" : [ "clean-up" ]
+ },
+ "clean-up" : {
+ "target" : "execute-script-4",
+ "on_success" : [ "collect" ],
+ "on_failure" : [ "collect" ]
+ },
+ "collect" : {
+ "target" : "collect-results"
+ }
+ },
+ "inputs" : {
+ "service-instance-id" : {
+ "type" : "string"
+ },
+ "failing-steps" : {
+ "type" : "json"
+ }
+ },
+ "outputs" : {
+ "results" : {
+ "type" : "string",
+ "value" : {
+ "get_attribute" : [ "collect-results", "response-data" ]
+ }
+ }
+ }
+ }
+ },
+ "node_templates" : {
+ "resource-resolution" : {
+ "type" : "component-resource-resolution",
+ "interfaces" : {
+ "ResourceResolutionComponent" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "artifact-prefix-names" : [ "assign" ],
+ "store-result" : false
+ }
+ }
+ }
+ }
+ },
+ "artifacts" : {
+ "assign-mapping" : {
+ "type" : "artifact-mapping-resource",
+ "file" : "Templates/assign-mapping.json"
+ }
+ }
+ },
+ "execute-script-1" : {
+ "type" : "component-script-executor",
+ "interfaces" : {
+ "ComponentScriptExecutor" : {
+ "operations" : {
+ "process" : {
+ "implementation" : {
+ "primary" : "component-script",
+ "timeout" : 180,
+ "operation_host" : "SELF"
+ },
+ "inputs" : {
+ "script-type" : "kotlin",
+ "script-class-reference" : "cba.cds.uat.TestScript"
+ },
+ "outputs" : { }
+ }
+ }
+ }
+ }
+ },
+ "execute-script-2" : {
+ "type" : "component-script-executor",
+ "interfaces" : {
+ "ComponentScriptExecutor" : {
+ "operations" : {
+ "process" : {
+ "implementation" : {
+ "primary" : "component-script",
+ "timeout" : 180,
+ "operation_host" : "SELF"
+ },
+ "inputs" : {
+ "script-type" : "kotlin",
+ "script-class-reference" : "cba.cds.uat.TestScript"
+ },
+ "outputs" : { }
+ }
+ }
+ }
+ }
+ },
+ "execute-script-3" : {
+ "type" : "component-script-executor",
+ "interfaces" : {
+ "ComponentScriptExecutor" : {
+ "operations" : {
+ "process" : {
+ "implementation" : {
+ "primary" : "component-script",
+ "timeout" : 180,
+ "operation_host" : "SELF"
+ },
+ "inputs" : {
+ "script-type" : "kotlin",
+ "script-class-reference" : "cba.cds.uat.TestScript"
+ },
+ "outputs" : { }
+ }
+ }
+ }
+ }
+ },
+ "execute-script-4" : {
+ "type" : "component-script-executor",
+ "interfaces" : {
+ "ComponentScriptExecutor" : {
+ "operations" : {
+ "process" : {
+ "implementation" : {
+ "primary" : "component-script",
+ "timeout" : 180,
+ "operation_host" : "SELF"
+ },
+ "inputs" : {
+ "script-type" : "kotlin",
+ "script-class-reference" : "cba.cds.uat.TestScript"
+ },
+ "outputs" : { }
+ }
+ }
+ }
+ }
+ },
+ "collect-results" : {
+ "type" : "component-script-executor",
+ "interfaces" : {
+ "ComponentScriptExecutor" : {
+ "operations" : {
+ "process" : {
+ "implementation" : {
+ "primary" : "component-script",
+ "timeout" : 180,
+ "operation_host" : "SELF"
+ },
+ "inputs" : {
+ "script-type" : "kotlin",
+ "script-class-reference" : "cba.cds.uat.CollectorScript"
+ },
+ "outputs" : { }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file