Add workflow node template enrichment
authorMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Fri, 15 Mar 2019 21:07:19 +0000 (17:07 -0400)
committerMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Fri, 15 Mar 2019 21:07:19 +0000 (17:07 -0400)
Change-Id: I15c2db6ab81bae2176d1606157f13416c1fac660
Issue-ID: CCSDK-1168
Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/component-netconf-executor.json
components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json [new file with mode: 0644]

diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json
new file mode 100644 (file)
index 0000000..eadc848
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "artifact_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json
new file mode 100644 (file)
index 0000000..eeb9815
--- /dev/null
@@ -0,0 +1,88 @@
+{
+  "tosca_definitions_version": "controller_blueprint_1_0_0",
+  "metadata": {
+    "template_author": "Brinda Santh <brindasanth@in.ibm.com>",
+    "template_name": "component_invoke",
+    "template_version": "1.0.0",
+    "template_tags": "brinda, component_invoke"
+  },
+  "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": {
+      "component-invoke": {
+        "steps": {
+          "activate-process": {
+            "description": "Sample Component Invocation flow",
+            "target": "sample-component",
+            "activities": [
+              {
+                "call_operation": "sample-component"
+              }
+            ]
+          }
+        },
+        "inputs": {
+          "request-id": {
+            "required": true,
+            "type": "string"
+          },
+          "action-name": {
+            "required": true,
+            "type": "string"
+          },
+          "scope-type": {
+            "required": true,
+            "type": "string"
+          },
+          "hostname": {
+            "required": true,
+            "type": "string"
+          }
+        }
+      }
+    },
+    "node_templates": {
+      "sample-component": {
+        "type": "component-sample-executor",
+        "interfaces": {
+          "ComponentSampleExecutor": {
+            "operations": {
+              "process": {
+                "inputs": {
+                  "sample-property": "sample-value",
+                  "sample-list-property": [
+                    "json-parser-service"
+                  ],
+                  "dynamic-properties": {
+                    "prop1": "prop1-value",
+                    "prop2": "prop2-value"
+                  }
+                },
+                "outputs": {
+                  "response-data": "",
+                  "status": ""
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json
new file mode 100644 (file)
index 0000000..8c304c4
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "data_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json
new file mode 100644 (file)
index 0000000..1e02cef
--- /dev/null
@@ -0,0 +1,54 @@
+{
+  "node_types": {
+    "component-sample-executor": {
+      "description": "This is Sample Component API",
+      "version": "1.0.0",
+      "interfaces": {
+        "ComponentSampleExecutor": {
+          "operations": {
+            "process": {
+              "inputs": {
+                "sample-property": {
+                  "description": "Sample Property.",
+                  "required": true,
+                  "type": "string"
+                },
+                "sample-list-property": {
+                  "description": "Dependent Step Components NodeTemplate name.",
+                  "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 in JSON format.",
+                  "required": false,
+                  "type": "string"
+                },
+                "status": {
+                  "description": "Status of the Component Execution ( success or failure )",
+                  "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/component_invoke/Definitions/policy_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json
new file mode 100644 (file)
index 0000000..1e44cc7
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "policy_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json
new file mode 100644 (file)
index 0000000..4ddd7a5
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "relationship_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json
new file mode 100644 (file)
index 0000000..6f31cf5
--- /dev/null
@@ -0,0 +1 @@
+{ }
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..a7c130a
--- /dev/null
@@ -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/component_invoke.json
+Template-Tags: Brinda Santh, component_invoke
\ No newline at end of file
index 7e429c0..3233d21 100644 (file)
                 }\r
               ]\r
             },\r
-            "dynamic-properties": {
-              "description": "Resolvable dynamic property.",
-              "required": false,
-              "type": "string"
-            },
             "script-class-reference": {\r
               "description": "Kotlin Script class name or jython script name.",\r
               "required": true,\r
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json
new file mode 100644 (file)
index 0000000..68b3ebd
--- /dev/null
@@ -0,0 +1,45 @@
+{
+  "description": "This is Sample Component API",
+  "version": "1.0.0",
+  "interfaces": {
+    "ComponentSampleExecutor": {
+      "operations": {
+        "process": {
+          "inputs": {
+            "sample-property": {
+              "description": "Sample Property.",
+              "required": true,
+              "type": "string"
+            },
+            "sample-list-property": {
+              "required": true,
+              "description": "Dependent Step Components NodeTemplate name.",
+              "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 in JSON format.",
+              "required": false,
+              "type": "string"
+            },
+            "status": {
+              "description": "Status of the Component Execution ( success or failure )",
+              "required": true,
+              "type": "string"
+            }
+          }
+        }
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.Component"
+}
\ No newline at end of file