From 4b3c8a0bb11d71c1be8ac5a966818dafec1124fe Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh(bs2796)" Date: Wed, 15 Aug 2018 21:31:10 +0000 Subject: Blueprints Processor Service Blueprints Processor API definitions Change-Id: Id44c74938f75e847a43b8e6d0733c36d4dc99e97 Issue-ID: CCSDK-411 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) --- .../src/test/resources/mapping/db/db-array.json | 35 ++++++++++++++++++++++ .../src/test/resources/mapping/db/db-complex.json | 27 +++++++++++++++++ .../src/test/resources/mapping/db/db-simple.json | 26 ++++++++++++++++ .../src/test/resources/mapping/db/dt-location.json | 15 ++++++++++ .../mapping/db/resource-assignments-simple.json | 12 ++++++++ 5 files changed, 115 insertions(+) create mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json create mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json create mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json create mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json create mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json (limited to 'ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db') diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json new file mode 100644 index 000000000..679b92db4 --- /dev/null +++ b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json @@ -0,0 +1,35 @@ +{ + "locations": { + "name": "locations", + "data-type": "list", + "entry-schema": "dt-location", + "source": { + "db": { + "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name", + "input-key-mapping": { + "profile_name": "profile_name" + }, + "output-key-mapping": { + "db-country": "country", + "db-state": "state" + } + } + }, + "candidate-dependency": { + "db": { + "names": [ + "profile_name" + ] + } + } + }, + "profile_name": { + "name": "profile_name", + "data-type": "string", + "source": { + "input": { + + } + } + } +} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json new file mode 100644 index 000000000..32d04b690 --- /dev/null +++ b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json @@ -0,0 +1,27 @@ +{ + "location": { + "name": "location", + "data-type": "dt-location", + "source": { + "db": { + "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name", + "input-key-mapping": { + "profile_name": "profile_name" + }, + "output-key-mapping": { + "db-country": "country", + "db-state": "state" + } + } + } + }, + "profile_name": { + "name": "profile_name", + "data-type": "string", + "source": { + "input": { + + } + } + } +} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json new file mode 100644 index 000000000..841404f22 --- /dev/null +++ b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json @@ -0,0 +1,26 @@ +{ + "country": { + "name": "country", + "data-type": "string", + "source": { + "db": { + "query": "SELECT country FROM DEVICE_PROFILE WHERE profile_name = :profile_name", + "input-key-mapping": { + "profile_name": "profile_name" + }, + "output-key-mapping": { + "country": "country" + } + } + } + }, + "profile_name": { + "name": "profile_name", + "data-type": "string", + "source": { + "input": { + + } + } + } +} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json new file mode 100644 index 000000000..52e0a7967 --- /dev/null +++ b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json @@ -0,0 +1,15 @@ +{ + "version": "1.0.0", + "description": "test Data Type", + "properties": { + "country": { + "required": true, + "type": "string" + }, + "state": { + "required": false, + "type": "string" + } + }, + "derived_from": "tosca.datatypes.Root" +} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json new file mode 100644 index 000000000..02ce68be4 --- /dev/null +++ b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json @@ -0,0 +1,12 @@ +[ + { + "name": "country", + "input-param": true, + "property": { + "type": "string" + }, + "dictionary-name": "country", + "dictionary-source": "db", + "dependencies": [] + } +] -- cgit 1.2.3-korg