Ressource resolution using configurable database
authorvinal patel <vinal.narendrabhai.patel@ibm.com>
Wed, 20 Feb 2019 21:02:44 +0000 (16:02 -0500)
committervinal patel <vinal.narendrabhai.patel@ibm.com>
Mon, 18 Mar 2019 21:24:27 +0000 (17:24 -0400)
Change-Id: I40338a221884d6f4df4c8a7dc3dac1f58f142074
Issue-ID: CCSDK-1092
Signed-off-by: vinal patel <vinal.narendrabhai.patel@ibm.com>
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json
components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/node_types.json
components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/resources_definition_types.json
components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vf-module-1-mapping.json
components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vfw-interface-mapping.json
components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/test-dictionary/vf-module-type.json

index 8f6c44f..68a8ae6 100644 (file)
       },
       "derived_from": "tosca.nodes.ResourceSource"
     },
-    "source-primary-db": {
+    "source-processor-db": {
       "description": "This is Database Resource Source Node Type",
       "version": "1.0.0",
       "properties": {
index eaf45b3..6e3d5e9 100644 (file)
@@ -26,8 +26,8 @@
         "type": "source-input",
         "properties": {}
       },
-      "primary-db": {
-        "type": "source-primary-db",
+      "processor-db": {
+        "type": "source-processor-db",
         "properties": {
           "endpoint-selector": "dynamic-db-source",
           "query": "SELECT artifact_name FROM sdnctl.BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
index b058692..f143e56 100644 (file)
       },
       "derived_from" : "tosca.nodes.ResourceSource"
     },
-    "source-primary-db" : {
+    "source-processor-db" : {
       "description" : "This is Database Resource Source Node Type",
       "version" : "1.0.0",
       "properties" : {
index 446a8a6..15f02a1 100644 (file)
     },
     "updated-by" : "adetalhouet",
     "sources" : {
-      "primary-db" : {
-        "type" : "source-primary-db",
+      "processor-db" : {
+        "type" : "source-processor-db",
         "properties" : {
           "type" : "SQL",
           "query" : "select sdnctl.demo.value as value from sdnctl.demo where sdnctl.demo.id=:vfmoduleid",
index eba259e..b7335b5 100644 (file)
@@ -18,7 +18,7 @@
       "type": "string"
     },
     "dictionary-name": "vf-module-type",
-    "dictionary-source": "primary-db",
+    "dictionary-source": "processor-db",
     "dependencies": [
       "vf-module-number"
     ]
index 149d3eb..c1ebe56 100644 (file)
@@ -55,7 +55,7 @@
       "type": "string"
     },
     "dictionary-name": "vf-module-type",
-    "dictionary-source": "primary-db",
+    "dictionary-source": "processor-db",
     "dependencies": [
       "vf-module-number"
     ]
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json b/components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json
new file mode 100644 (file)
index 0000000..702748f
--- /dev/null
@@ -0,0 +1,48 @@
+{
+  "description": "This is Database Resource Source Node Type",
+  "version": "1.0.0",
+  "properties": {
+    "type": {
+      "required": true,
+      "type": "string",
+      "constraints": [
+        {
+          "valid_values": [
+            "SQL",
+            "PLSQL"
+          ]
+        }
+      ]
+    },
+    "endpoint-selector": {
+      "required": false,
+      "type": "string"
+    },
+    "query": {
+      "required": true,
+      "type": "string"
+    },
+    "input-key-mapping": {
+      "required": false,
+      "type": "map",
+      "entry_schema": {
+        "type": "string"
+      }
+    },
+    "output-key-mapping": {
+      "required": false,
+      "type": "map",
+      "entry_schema": {
+        "type": "string"
+      }
+    },
+    "key-dependencies": {
+      "required": true,
+      "type": "list",
+      "entry_schema": {
+        "type": "string"
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.ResourceSource"
+}
\ No newline at end of file
index b06057c..9e8c409 100644 (file)
@@ -7,8 +7,8 @@
   },
   "updated-by": "adetalhouet",
   "sources": {
-    "primary-db": {
-      "type": "source-primary-db",
+    "processor-db": {
+      "type": "source-processor-db",
       "properties": {
         "type": "SQL",
         "query": "select sdnctl.demo.value as value from sdnctl.demo where sdnctl.demo.id=:vfmoduleid",