summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources')
-rw-r--r--ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json35
-rw-r--r--ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json27
-rw-r--r--ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json26
-rw-r--r--ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json15
-rw-r--r--ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json12
-rw-r--r--ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json18
-rw-r--r--ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json22
7 files changed, 155 insertions, 0 deletions
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": []
+ }
+]
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json
new file mode 100644
index 000000000..cd6fac128
--- /dev/null
+++ b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json
@@ -0,0 +1,18 @@
+{
+ "api-ver": "2.00",
+ "originator-id": "MSO",
+ "request-id": "123456",
+ "service-instance-id": "ibcx0001vm001",
+ "service-type": "AVPN",
+ "vnf-type": "vUSP - vDBE-IPX HUB",
+ "vnf-id": 123456,
+ "service-template-name": "VRR-baseconfiguration",
+ "service-template-version": "1.0.0",
+ "action-name": "resource-assignment-action",
+ "group-name": "sample group name",
+ "bundle-id": "sample bundle id",
+ "bundle-mac": [
+ "Sample bundle mac",
+ "Sample bundle mac"
+ ]
+}
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json
new file mode 100644
index 000000000..e8830a8a2
--- /dev/null
+++ b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json
@@ -0,0 +1,22 @@
+{
+ "actionIdentifiers": {
+ "actionName": "sample-action",
+ "blueprintName": "sample-blurprint",
+ "blueprintVersion": "1.0.0",
+ "mode": "sync"
+ },
+ "commonHeader": {
+ "flags": {
+ "force": true,
+ "ttl": 3600
+ },
+ "originatorId": "sdnc",
+ "requestId": "123456-1000",
+ "subRequestId": "sub-123456-1000",
+ "timestamp": "2012-04-23T18:25:43.511Z"
+ },
+ "payload": {
+ },
+ "resourceAssignments": [
+ ]
+}