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>
Wed, 6 Mar 2019 19:22:36 +0000 (14:22 -0500)
Change-Id: I8589e4db45ba3d5bcb906f25bcc76b5136159608
Issue-ID: CCSDK-1092
Signed-off-by: vinal patel <vinal.narendrabhai.patel@ibm.com>
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-db.properties [new file with mode: 0644]
components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json

index 138260f..6025dbd 100644 (file)
       "userId" : {
         "get_input": "rest-user-name"
       }
+    },
+    "dynamic-db-source": {
+      "type" : "maria-db",
+      "url" : "jdbc:mysql://localhost:3306/sdnctl",
+      "username" : "sdnctl",
+      "password" : {
+        "get_attribute": [
+          "BPP",
+          "dynamic-db-source.password"
+        ]
+      }
     }
   },
   "topology_template": {
index ace1a94..eaf45b3 100644 (file)
       "input": {
         "type": "source-input",
         "properties": {}
+      },
+      "primary-db": {
+        "type": "source-primary-db",
+        "properties": {
+          "endpoint-selector": "dynamic-db-source",
+          "query": "SELECT artifact_name FROM sdnctl.BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
+          "input-key-mapping": {
+          },
+          "output-key-mapping": {
+            "service-instance-id": "artifact_name"
+          },
+          "key-dependencies" : []
+        }
       }
     }
   },
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-db.properties b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-db.properties
new file mode 100644 (file)
index 0000000..49a7eb4
--- /dev/null
@@ -0,0 +1 @@
+dynamic-db-source.password=sdnctl
\ No newline at end of file
index 37b9868..cb97043 100755 (executable)
     "input" : {
       "type" : "source-input",
       "properties" : { }
+    },
+    "any-db": {
+      "type": "source-primary-db",
+      "properties": {
+        "query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
+        "input-key-mapping": {
+        },
+        "output-key-mapping": {
+          "service-instance-id": "artifact_name"
+        }
+      }
+    },
+    "primary-db": {
+      "type": "source-primary-db",
+      "properties": {
+        "query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
+        "input-key-mapping": {
+        },
+        "output-key-mapping": {
+          "service-instance-id": "artifact_name"
+        }
+      }
     }
   }
 }
\ No newline at end of file