Controller Blueprints Microservice
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Mon, 12 Nov 2018 20:08:40 +0000 (15:08 -0500)
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Mon, 12 Nov 2018 20:08:40 +0000 (15:08 -0500)
Add blueprint multiple import file capability.

Change-Id: If57aecb08447252b0e84a7e55b081e682d6a0bbd
Issue-ID: CCSDK-681
Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintImportService.kt [new file with mode: 0644]
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorService.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ServiceTemplateUtils.kt
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/activation-blueprint.json
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/types.json [new file with mode: 0644]

diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintImportService.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintImportService.kt
new file mode 100644 (file)
index 0000000..fce06f3
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.apps.controllerblueprints.core.service
+
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.apps.controllerblueprints.core.data.ImportDefinition
+import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.ServiceTemplateUtils
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+import java.io.File
+import java.net.URL
+import java.net.URLDecoder
+import java.nio.charset.Charset
+
+class BluePrintImportService(private val parentServiceTemplate: ServiceTemplate, private val blueprintBasePath: String) {
+
+    private val log: Logger = LoggerFactory.getLogger(this::class.toString())
+    val PARENT_SERVICE_TEMPLATE: String = "parent"
+
+    var importServiceTemplateMap: MutableMap<String, ServiceTemplate> = hashMapOf()
+
+
+    fun getImportResolvedServiceTemplate(): ServiceTemplate {
+        // Populate Imported Service Templates
+        traverseSchema(PARENT_SERVICE_TEMPLATE, parentServiceTemplate)
+
+        importServiceTemplateMap.forEach { key, serviceTemplate ->
+            ServiceTemplateUtils.merge(parentServiceTemplate, serviceTemplate)
+            log.debug("merged service template $key")
+        }
+        return parentServiceTemplate
+    }
+
+    private fun traverseSchema(key: String, serviceTemplate: ServiceTemplate) {
+        if (key != PARENT_SERVICE_TEMPLATE) {
+            importServiceTemplateMap[key] = serviceTemplate
+        }
+        val imports: List<ImportDefinition>? = serviceTemplate.imports
+
+        imports?.let {
+            serviceTemplate.imports?.forEach { importDefinition ->
+                val childServiceTemplate = resolveImportDefinition(importDefinition)
+                val keyName: String = importDefinition.file
+                traverseSchema(keyName, childServiceTemplate)
+            }
+        }
+    }
+
+    private fun resolveImportDefinition(importDefinition: ImportDefinition): ServiceTemplate {
+        var serviceTemplate: ServiceTemplate? = null
+        val file: String = importDefinition.file
+        val decodedSystemId: String = URLDecoder.decode(file, Charset.defaultCharset().toString())
+        log.trace("file ({}), decodedSystemId ({}) ", file, decodedSystemId)
+        try {
+            if (decodedSystemId.startsWith("http", true)
+                    || decodedSystemId.startsWith("https", true)) {
+                val givenUrl: String = URL(decodedSystemId).toString()
+                val systemUrl: String = File(".").toURI().toURL().toString()
+                log.trace("givenUrl ({}), systemUrl ({}) ", givenUrl, systemUrl)
+                if (givenUrl.startsWith(systemUrl)) {
+
+                }
+            } else {
+                if (!decodedSystemId.startsWith("/")) {
+                    importDefinition.file = StringBuilder().append(blueprintBasePath).append(File.separator).append(file).toString()
+                }
+                serviceTemplate = ServiceTemplateUtils.getServiceTemplate(importDefinition.file)
+            }
+        } catch (e: Exception) {
+            throw BluePrintException("failed to populate service template for ${importDefinition.file}", e)
+        }
+        if (serviceTemplate == null) {
+            throw BluePrintException("failed to populate service template for :  ${importDefinition.file}")
+        }
+        return serviceTemplate
+    }
+
+
+}
\ No newline at end of file
index 7ad3833..1783737 100644 (file)
 \r
 package org.onap.ccsdk.apps.controllerblueprints.core.service\r
 \r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import com.fasterxml.jackson.databind.JsonNode\r
 import com.google.common.base.Preconditions\r
 import org.apache.commons.lang3.StringUtils\r
 import org.onap.ccsdk.apps.controllerblueprints.core.*\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.*\r
-import com.att.eelf.configuration.EELFLogger\r
-import com.att.eelf.configuration.EELFManager\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils\r
 import java.io.Serializable\r
 \r
@@ -530,7 +530,7 @@ open class BluePrintValidatorDefaultService : BluePrintValidatorService {
     open fun checkValidArtifactType(artifactDefinitionName: String, artifactTypeName: String) {\r
 \r
         val artifactType = serviceTemplate.artifactTypes?.get(artifactTypeName)\r
-                ?: throw BluePrintException(format("Failed to ArtifactType for ArtifactDefinition : {}", artifactDefinitionName))\r
+                ?: throw BluePrintException("failed to artifactType($artifactTypeName) for ArtifactDefinition($artifactDefinitionName)")\r
 \r
         checkValidArtifactTypeDerivedFrom(artifactTypeName, artifactType.derivedFrom)\r
     }\r
@@ -538,14 +538,14 @@ open class BluePrintValidatorDefaultService : BluePrintValidatorService {
     @Throws(BluePrintException::class)\r
     open fun checkValidArtifactTypeDerivedFrom(artifactTypeName: String, derivedFrom: String) {\r
         check(BluePrintTypes.validArtifactTypeDerivedFroms.contains(derivedFrom)) {\r
-            throw BluePrintException(format("Failed to get ArtifactType ({})'s  derivedFrom({}) definition ", artifactTypeName, derivedFrom))\r
+            throw BluePrintException("failed to get artifactType($artifactTypeName)'s derivedFrom($derivedFrom) definition")\r
         }\r
     }\r
 \r
     @Throws(BluePrintException::class)\r
     open fun checkValidDataTypeDerivedFrom(dataTypeName: String, derivedFrom: String) {\r
         check(BluePrintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {\r
-            throw BluePrintException(format("Failed to get DataType ({})'s  derivedFrom({}) definition ", dataTypeName, derivedFrom))\r
+            throw BluePrintException(format("Failed to get DataType({})'s  derivedFrom({}) definition ", dataTypeName, derivedFrom))\r
         }\r
     }\r
 \r
index 43d55fe..320c306 100644 (file)
@@ -25,6 +25,7 @@ import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.ToscaMetaData\r
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext\r
+import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintImportService\r
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService\r
 import org.onap.ccsdk.apps.controllerblueprints.core.service.DefaultBluePrintRuntimeService\r
 import java.io.File\r
@@ -99,9 +100,9 @@ object BluePrintMetadataUtils {
     fun readBlueprintFile(entityDefinitions: String, basePath: String): BluePrintContext {\r
         val rootFilePath: String = basePath.plus(File.separator).plus(entityDefinitions)\r
         val rootServiceTemplate = ServiceTemplateUtils.getServiceTemplate(rootFilePath)\r
-        // TODO ("Fix for Multiple Service Template file definitions")\r
-//        val schemaImportResolverUtils = BluePrintResolverService(rootServiceTemplate, basePath)\r
-//        val completeServiceTemplate = schemaImportResolverUtils.getImportResolvedServiceTemplate()\r
-        return BluePrintContext(rootServiceTemplate)\r
+        // Recursively Import Template files\r
+        val schemaImportResolverUtils = BluePrintImportService(rootServiceTemplate, basePath)\r
+        val completeServiceTemplate = schemaImportResolverUtils.getImportResolvedServiceTemplate()\r
+        return BluePrintContext(completeServiceTemplate)\r
     }\r
 }
\ No newline at end of file
index 0d73935..0249e20 100644 (file)
@@ -18,6 +18,7 @@ package org.onap.ccsdk.apps.controllerblueprints.core.utils
 \r
 import org.apache.commons.io.FileUtils\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate\r
+import org.onap.ccsdk.apps.controllerblueprints.core.data.TopologyTemplate\r
 import java.io.File\r
 import java.nio.charset.Charset\r
 \r
@@ -40,5 +41,70 @@ object ServiceTemplateUtils {
         return JacksonUtils.readValue(content)\r
     }\r
 \r
+    fun merge(parentServiceTemplate: ServiceTemplate, toMerge: ServiceTemplate, removeImports: Boolean? = true): ServiceTemplate {\r
+        if (removeImports!!) {\r
+            parentServiceTemplate.imports = null\r
+            toMerge.imports = null\r
+        }\r
+\r
+        toMerge.metadata?.let {\r
+            parentServiceTemplate.metadata = parentServiceTemplate.metadata ?: hashMapOf()\r
+            parentServiceTemplate.metadata?.putAll(toMerge.metadata as MutableMap)\r
+        }\r
+\r
+        toMerge.dslDefinitions?.let {\r
+            parentServiceTemplate.dslDefinitions = parentServiceTemplate.dslDefinitions ?: hashMapOf()\r
+            parentServiceTemplate.dslDefinitions?.putAll(toMerge.dslDefinitions as MutableMap)\r
+        }\r
+\r
+        toMerge.dataTypes?.let {\r
+            parentServiceTemplate.dataTypes = parentServiceTemplate.dataTypes ?: hashMapOf()\r
+            parentServiceTemplate.dataTypes?.putAll(toMerge.dataTypes as MutableMap)\r
+        }\r
+\r
+        toMerge.nodeTypes?.let {\r
+            parentServiceTemplate.nodeTypes = parentServiceTemplate.nodeTypes ?: hashMapOf()\r
+            parentServiceTemplate.nodeTypes?.putAll(toMerge.nodeTypes as MutableMap)\r
+        }\r
+\r
+        toMerge.artifactTypes?.let {\r
+            parentServiceTemplate.artifactTypes = parentServiceTemplate.artifactTypes ?: hashMapOf()\r
+            parentServiceTemplate.artifactTypes?.putAll(toMerge.artifactTypes as MutableMap)\r
+        }\r
+\r
+        toMerge.repositories?.let {\r
+            parentServiceTemplate.repositories = parentServiceTemplate.repositories ?: hashMapOf()\r
+            parentServiceTemplate.repositories?.putAll(toMerge.repositories as MutableMap)\r
+        }\r
+\r
+        parentServiceTemplate.topologyTemplate = parentServiceTemplate.topologyTemplate ?: TopologyTemplate()\r
+\r
+        toMerge.topologyTemplate?.inputs?.let {\r
+            parentServiceTemplate.topologyTemplate?.inputs = parentServiceTemplate.topologyTemplate?.inputs ?: hashMapOf()\r
+            parentServiceTemplate.topologyTemplate?.inputs?.putAll(parentServiceTemplate.topologyTemplate?.inputs as MutableMap)\r
+        }\r
+\r
+        toMerge.topologyTemplate?.nodeTemplates?.let {\r
+            parentServiceTemplate.topologyTemplate?.nodeTemplates = parentServiceTemplate.topologyTemplate?.nodeTemplates ?: hashMapOf()\r
+            parentServiceTemplate.topologyTemplate?.nodeTemplates?.putAll(parentServiceTemplate.topologyTemplate?.nodeTemplates as MutableMap)\r
+        }\r
+\r
+        toMerge.topologyTemplate?.relationshipTemplates?.let {\r
+            parentServiceTemplate.topologyTemplate?.relationshipTemplates = parentServiceTemplate.topologyTemplate?.relationshipTemplates ?: hashMapOf()\r
+            parentServiceTemplate.topologyTemplate?.relationshipTemplates?.putAll(parentServiceTemplate.topologyTemplate?.relationshipTemplates as MutableMap)\r
+        }\r
+\r
+        toMerge.topologyTemplate?.policies?.let {\r
+            parentServiceTemplate.topologyTemplate?.policies = parentServiceTemplate.topologyTemplate?.policies ?: hashMapOf()\r
+            parentServiceTemplate.topologyTemplate?.policies?.putAll(parentServiceTemplate.topologyTemplate?.policies as MutableMap)\r
+        }\r
+\r
+        toMerge.topologyTemplate?.workflows?.let {\r
+            parentServiceTemplate.topologyTemplate?.workflows = parentServiceTemplate.topologyTemplate?.workflows ?: hashMapOf()\r
+            parentServiceTemplate.topologyTemplate?.workflows?.putAll(parentServiceTemplate.topologyTemplate?.workflows as MutableMap)\r
+        }\r
+        return parentServiceTemplate\r
+    }\r
+\r
 \r
 }
\ No newline at end of file
index 0137cd2..ee02b3a 100644 (file)
@@ -1,12 +1,17 @@
 {
   "metadata": {
     "template_author": "Brinda Santh Muthuramalingam",
-    "author-email": "brindasanth@gmail.com",
+    "author-email": "brindasanth@in.ibm.com",
     "user-groups": "ADMIN, OPERATION",
     "template_name": "baseconfiguration",
     "template_version": "1.0.0",
     "template_tags": "brinda, tosca"
   },
+  "imports": [
+    {
+      "file": "Definitions/types.json"
+    }
+  ],
   "topology_template": {
     "inputs": {
       "request-id": {
@@ -28,7 +33,7 @@
     },
     "node_templates": {
       "activate-process": {
-        "type": "bpmn-activate",
+        "type": "dg-activate",
         "properties": {
           "process-name": {
             "get_input": "action-name"
           "content": {
             "get_artifact": [
               "SELF",
-              "activate-process"
+              "dg-activate-process"
             ]
           }
         },
         "artifacts": {
-          "activate-process": {
-            "type": "artifact-bpmn-camunda",
+          "dg-activate-process": {
+            "type": "artifact-directed-graph",
             "file": "Plans/ActivateProcess.bpmn"
           }
         }
       }
     },
     "workflows": {
-      "activate-process": {
+      "resource-assignment": {
+        "inputs": {
+          "request-id": {
+            "required": true,
+            "type": "string"
+          },
+          "action-name": {
+            "required": true,
+            "type": "string"
+          },
+          "scope-type": {
+            "required": true,
+            "type": "string"
+          },
+          "hostname": {
+            "required": true,
+            "type": "string"
+          }
+        },
         "steps": {
           "call-resource-assignment": {
-            "description": "Invoke Resource Assignment Component",
+            "description": "Resource Assignment Workflow",
             "target": "resource-assignment",
             "activities": [
               {
                 "call_operation": "ResourceAssignmentNode.process"
               }
-            ],
-            "on_success": [
-              "download-baseconfig"
-            ]
-          },
-          "download-baseconfig": {
-            "description": "Call Download Base Config Component",
-            "target": "activate-netconf",
-            "activities": [
-              {
-                "call_operation": "NetconfTransactionNode.process"
-              }
-            ],
-            "on_success": [
-              "download-licence"
             ]
-          },
-          "download-licence": {
-            "description": "Call Download Licence Component",
-            "target": "activate-netconf",
+          }
+        }
+      },
+      "activate": {
+        "steps": {
+          "call-resource-assignment": {
+            "description": "Netconf Activation Workflow",
+            "target": "resource-assignment",
             "activities": [
               {
-                "call_operation": "NetconfTransactionNode.process"
+                "call_operation": "ResourceAssignmentNode.process"
               }
             ]
           }
         }
       }
     }
-  },
-  "artifact_types": {
-    "artifact-template-velocity": {
-      "description": " Velocity Template used for Configuration",
-      "version": "1.0.0",
-      "file_ext": [
-        "vtl"
-      ],
-      "derived_from": "tosca.artifacts.Implementation"
-    },
-    "artifact-mapping-resource": {
-      "description": " Velocity Template Resource Mapping File used along with Configuration template",
-      "version": "1.0.0",
-      "file_ext": [
-        "json"
-      ],
-      "derived_from": "tosca.artifacts.Implementation"
-    },
-    "artifact-script-kotlin": {
-      "description": " Kotlin Script Template used for Configuration",
-      "version": "1.0.0",
-      "file_ext": [
-        "kt"
-      ],
-      "derived_from": "tosca.artifacts.Implementation"
-    },
-    "artifact-script-python": {
-      "description": " Kotlin Script Template used for Configuration",
-      "version": "1.0.0",
-      "file_ext": [
-        "py"
-      ],
-      "derived_from": "tosca.artifacts.Implementation"
-    },
-    "artifact-bpmn-camunda": {
-      "description": " Camunda BPM File",
-      "version": "1.0.0",
-      "file_ext": [
-        "bpmn"
-      ],
-      "derived_from": "tosca.artifacts.Implementation"
-    },
-    "artifact-component-jar": {
-      "description": "Component Jar",
-      "version": "1.0.0",
-      "file_ext": [
-        "jar"
-      ],
-      "derived_from": "tosca.artifacts.Implementation"
-    }
-  },
-  "node_types": {
-    "bpmn-activate": {
-      "description": "This is BPMN Activate node type",
-      "version": "1.0.0",
-      "properties": {
-        "content": {
-          "required": false,
-          "type": "string"
-        },
-        "process-name": {
-          "required": false,
-          "type": "string"
-        },
-        "version": {
-          "required": false,
-          "type": "string",
-          "default": "LATEST"
-        }
-      },
-      "derived_from": "tosca.nodes.DG"
-    },
-    "tosca.nodes.Component": {
-      "description": "This is Resource Assignment Component API",
-      "version": "1.0.0",
-      "derived_from": "tosca.nodes.Root"
-    },
-    "tosca.nodes.DG": {
-      "description": "This is Directed Graph Node Type",
-      "version": "1.0.0",
-      "derived_from": "tosca.nodes.Root"
-    },
-    "tosca.nodes.component.Python": {
-      "description": "This is Resource Assignment Python Component API",
-      "version": "1.0.0",
-      "derived_from": "tosca.nodes.Root"
-    },
-    "component-resource-assignment": {
-      "description": "This is Resource Assignment Component API",
-      "version": "1.0.0",
-      "properties": {
-        "request-id": {
-          "description": "Request Id used to store the generated configuration, in the database along with the template-name",
-          "required": true,
-          "type": "string"
-        }
-      },
-      "interfaces": {
-        "DefaultComponentNode": {
-          "operations": {
-            "process": {
-              "inputs": {
-                "action-name": {
-                  "description": "Recipe Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
-                  "required": false,
-                  "type": "string"
-                },
-                "resource-type": {
-                  "required": false,
-                  "type": "string"
-                },
-                "request-id": {
-                  "description": "Request Id used to store the generated configuration, in the database along with the template-name",
-                  "required": true,
-                  "type": "string"
-                },
-                "resource-id": {
-                  "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
-                  "required": true,
-                  "type": "string"
-                },
-                "template-content": {
-                  "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
-                  "required": true,
-                  "type": "string"
-                },
-                "mapping-content": {
-                  "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
-                  "required": true,
-                  "type": "string"
-                }
-              },
-              "outputs": {
-                "resource-assignment-params": {
-                  "required": true,
-                  "type": "string"
-                },
-                "status": {
-                  "required": true,
-                  "type": "string"
-                }
-              }
-            }
-          }
-        }
-      },
-      "derived_from": "tosca.nodes.Component"
-    },
-    "component-resource-assignment-python": {
-      "description": "This is Resource Assignment Component API",
-      "version": "1.0.0",
-      "properties": {
-        "request-id": {
-          "description": "Request Id used to store the generated configuration, in the database along with the template-name",
-          "required": true,
-          "type": "string"
-        }
-      },
-      "interfaces": {
-        "DefaultComponentNode": {
-          "operations": {
-            "process": {
-              "inputs": {
-                "action-name": {
-                  "description": "Recipe Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
-                  "required": false,
-                  "type": "string"
-                }
-              },
-              "outputs": {
-                "resource-assignment-params": {
-                  "required": true,
-                  "type": "string"
-                },
-                "status": {
-                  "required": true,
-                  "type": "string"
-                }
-              }
-            }
-          }
-        }
-      },
-      "derived_from": "tosca.nodes.component.Python"
-    }
-  },
-  "data_types": {
-    "sample-property": {
-      "description": "This is sample data type",
-      "version": "1.0.0",
-      "properties": {
-        "content": {
-          "required": false,
-          "type": "string"
-        },
-        "process-name": {
-          "required": false,
-          "type": "string"
-        },
-        "version": {
-          "required": false,
-          "type": "string",
-          "default": "LATEST"
-        }
-      },
-      "derived_from": "tosca.datatypes.Root"
-    }
   }
 }
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/types.json b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/types.json
new file mode 100644 (file)
index 0000000..056d5f1
--- /dev/null
@@ -0,0 +1,210 @@
+{
+  "artifact_types": {
+    "artifact-template-velocity": {
+      "description": " Velocity Template used for Configuration",
+      "version": "1.0.0",
+      "file_ext": [
+        "vtl"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    },
+    "artifact-mapping-resource": {
+      "description": " Velocity Template Resource Mapping File used along with Configuration template",
+      "version": "1.0.0",
+      "file_ext": [
+        "json"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    },
+    "artifact-script-kotlin": {
+      "description": " Kotlin Script Template used for Configuration",
+      "version": "1.0.0",
+      "file_ext": [
+        "kt"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    },
+    "artifact-script-python": {
+      "description": " Kotlin Script Template used for Configuration",
+      "version": "1.0.0",
+      "file_ext": [
+        "py"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    },
+    "artifact-directed-graph": {
+      "description": "Directed Graph File",
+      "version": "1.0.0",
+      "file_ext": [
+        "json",
+        "xml"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    },
+    "artifact-component-jar": {
+      "description": "Component Jar",
+      "version": "1.0.0",
+      "file_ext": [
+        "jar"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    }
+  },
+  "node_types": {
+    "dg-activate": {
+      "description": "This is BPMN Activate node type",
+      "version": "1.0.0",
+      "properties": {
+        "content": {
+          "required": false,
+          "type": "string"
+        },
+        "process-name": {
+          "required": false,
+          "type": "string"
+        },
+        "version": {
+          "required": false,
+          "type": "string",
+          "default": "LATEST"
+        }
+      },
+      "derived_from": "tosca.nodes.DG"
+    },
+    "tosca.nodes.Component": {
+      "description": "This is Resource Assignment Component API",
+      "version": "1.0.0",
+      "derived_from": "tosca.nodes.Root"
+    },
+    "tosca.nodes.DG": {
+      "description": "This is Directed Graph Node Type",
+      "version": "1.0.0",
+      "derived_from": "tosca.nodes.Root"
+    },
+    "tosca.nodes.component.Python": {
+      "description": "This is Resource Assignment Python Component API",
+      "version": "1.0.0",
+      "derived_from": "tosca.nodes.Root"
+    },
+    "component-resource-assignment": {
+      "description": "This is Resource Assignment Component API",
+      "version": "1.0.0",
+      "properties": {
+        "request-id": {
+          "description": "Request Id used to store the generated configuration, in the database along with the template-name",
+          "required": true,
+          "type": "string"
+        }
+      },
+      "interfaces": {
+        "DefaultComponentNode": {
+          "operations": {
+            "process": {
+              "inputs": {
+                "action-name": {
+                  "description": "Recipe Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
+                  "required": false,
+                  "type": "string"
+                },
+                "resource-type": {
+                  "required": false,
+                  "type": "string"
+                },
+                "request-id": {
+                  "description": "Request Id used to store the generated configuration, in the database along with the template-name",
+                  "required": true,
+                  "type": "string"
+                },
+                "resource-id": {
+                  "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
+                  "required": true,
+                  "type": "string"
+                },
+                "template-content": {
+                  "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
+                  "required": true,
+                  "type": "string"
+                },
+                "mapping-content": {
+                  "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
+                  "required": true,
+                  "type": "string"
+                }
+              },
+              "outputs": {
+                "resource-assignment-params": {
+                  "required": true,
+                  "type": "string"
+                },
+                "status": {
+                  "required": true,
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.Component"
+    },
+    "component-resource-assignment-python": {
+      "description": "This is Resource Assignment Component API",
+      "version": "1.0.0",
+      "properties": {
+        "request-id": {
+          "description": "Request Id used to store the generated configuration, in the database along with the template-name",
+          "required": true,
+          "type": "string"
+        }
+      },
+      "interfaces": {
+        "DefaultComponentNode": {
+          "operations": {
+            "process": {
+              "inputs": {
+                "action-name": {
+                  "description": "Recipe Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
+                  "required": false,
+                  "type": "string"
+                }
+              },
+              "outputs": {
+                "resource-assignment-params": {
+                  "required": true,
+                  "type": "string"
+                },
+                "status": {
+                  "required": true,
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.component.Python"
+    }
+  },
+  "data_types": {
+    "sample-property": {
+      "description": "This is sample data type",
+      "version": "1.0.0",
+      "properties": {
+        "content": {
+          "required": false,
+          "type": "string"
+        },
+        "process-name": {
+          "required": false,
+          "type": "string"
+        },
+        "version": {
+          "required": false,
+          "type": "string",
+          "default": "LATEST"
+        }
+      },
+      "derived_from": "tosca.datatypes.Root"
+    }
+  }
+}
\ No newline at end of file