From d035fe08249fe8b1e5988b79c7355620727e5da0 Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Fri, 11 Jan 2019 13:58:38 -0500 Subject: Resource Resolution Service : 2 Changes for Primary-DB Resource Resolution Processor Service Change-Id: Iaf6ad6277d36787d87881819ae530de1d7038a2e Issue-ID: CCSDK-942 Signed-off-by: Singal, Kapil (ks220y) --- .../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 | 22 -------------- .../resources/mapping/primary-db/dt-location.json | 15 ++++++++++ .../mapping/primary-db/primary-db-array.json | 35 ++++++++++++++++++++++ .../mapping/primary-db/primary-db-complex.json | 27 +++++++++++++++++ .../mapping/primary-db/primary-db-simple.json | 26 ++++++++++++++++ .../primary-db/resource-assignments-simple.json | 22 ++++++++++++++ 10 files changed, 125 insertions(+), 125 deletions(-) delete mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-array.json delete mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-complex.json delete mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-simple.json delete mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/dt-location.json delete mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/resource-assignments-simple.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/dt-location.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-array.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-complex.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-simple.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/resource-assignments-simple.json (limited to 'ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping') diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-array.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-array.json deleted file mode 100644 index 679b92db..00000000 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-array.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "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/functions/resource-resolution/src/test/resources/mapping/db/db-complex.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-complex.json deleted file mode 100644 index 32d04b69..00000000 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-complex.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "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/functions/resource-resolution/src/test/resources/mapping/db/db-simple.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-simple.json deleted file mode 100644 index 841404f2..00000000 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-simple.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "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/functions/resource-resolution/src/test/resources/mapping/db/dt-location.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/dt-location.json deleted file mode 100644 index 52e0a796..00000000 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/dt-location.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "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/functions/resource-resolution/src/test/resources/mapping/db/resource-assignments-simple.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/resource-assignments-simple.json deleted file mode 100644 index ddcf32ee..00000000 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/resource-assignments-simple.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "name": "country", - "input-param": true, - "property": { - "type": "string" - }, - "dictionary-name": "country", - "dictionary-source": "db", - "dependencies": ["state"] - }, - { - "name": "state", - "input-param": true, - "property": { - "type": "string" - }, - "dictionary-name": "state", - "dictionary-source": "input", - "dependencies": [] - } -] diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/dt-location.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/dt-location.json new file mode 100644 index 00000000..52e0a796 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-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/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-array.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-array.json new file mode 100644 index 00000000..7082a434 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-array.json @@ -0,0 +1,35 @@ +{ + "locations": { + "name": "locations", + "data-type": "list", + "entry-schema": "dt-location", + "source": { + "primary-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": { + "primary-db": { + "names": [ + "profile_name" + ] + } + } + }, + "profile_name": { + "name": "profile_name", + "data-type": "string", + "source": { + "input": { + + } + } + } +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-complex.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-complex.json new file mode 100644 index 00000000..53e2a11c --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-complex.json @@ -0,0 +1,27 @@ +{ + "location": { + "name": "location", + "data-type": "dt-location", + "source": { + "primary-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/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-simple.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-simple.json new file mode 100644 index 00000000..fad08887 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/primary-db-simple.json @@ -0,0 +1,26 @@ +{ + "country": { + "name": "country", + "data-type": "string", + "source": { + "primary-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/functions/resource-resolution/src/test/resources/mapping/primary-db/resource-assignments-simple.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/resource-assignments-simple.json new file mode 100644 index 00000000..bb392d7b --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/primary-db/resource-assignments-simple.json @@ -0,0 +1,22 @@ +[ + { + "name": "country", + "input-param": true, + "property": { + "type": "string" + }, + "dictionary-name": "country", + "dictionary-source": "primary-db", + "dependencies": ["state"] + }, + { + "name": "state", + "input-param": true, + "property": { + "type": "string" + }, + "dictionary-name": "state", + "dictionary-source": "input", + "dependencies": [] + } +] -- cgit 1.2.3-korg