From d882d5ea5199cca12c246c1a184a8358892c7186 Mon Sep 17 00:00:00 2001 From: vinal patel Date: Wed, 20 Feb 2019 16:02:44 -0500 Subject: Ressource resolution using configurable database Change-Id: I8589e4db45ba3d5bcb906f25bcc76b5136159608 Issue-ID: CCSDK-1092 Signed-off-by: vinal patel --- .../Definitions/activation-blueprint.json | 11 +++++++++++ .../Definitions/resources_definition_types.json | 13 +++++++++++++ .../Environments/source-db.properties | 1 + .../starter-dictionary/service-instance-id.json | 22 ++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-db.properties (limited to 'components') diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json index 138260fed..6025dbd6d 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json +++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json @@ -31,6 +31,17 @@ "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": { diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json index ace1a9425..eaf45b35f 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json +++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json @@ -25,6 +25,19 @@ "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 index 000000000..49a7eb47b --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-db.properties @@ -0,0 +1 @@ +dynamic-db-source.password=sdnctl \ No newline at end of file diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json index 37b98687c..cb9704350 100755 --- a/components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json +++ b/components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json @@ -10,6 +10,28 @@ "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 -- cgit 1.2.3-korg