aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/resource-dict/src/test/resources
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-02-07 14:51:50 -0500
committerMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-02-07 14:51:50 -0500
commit4937f56d90371c7a7b5b6c52314c28df716f41ae (patch)
treeeb1064d9679bcfe9ada8156c83f563beff093ec3 /ms/controllerblueprints/modules/resource-dict/src/test/resources
parent9a4387cf89f95ecdce9d135677a4b4c4c94a8b94 (diff)
Refactor components core and resource dict modules
Change-Id: I04e9e723d68a38ecefe48206e67fddbe43c55854 Issue-ID: CCSDK-1047 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/resource-dict/src/test/resources')
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/test/resources/data/resource-assignment-input.json10
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/cyclic.json111
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/duplicate.json110
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/success.json110
4 files changed, 341 insertions, 0 deletions
diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/resources/data/resource-assignment-input.json b/ms/controllerblueprints/modules/resource-dict/src/test/resources/data/resource-assignment-input.json
new file mode 100644
index 00000000..d79c9068
--- /dev/null
+++ b/ms/controllerblueprints/modules/resource-dict/src/test/resources/data/resource-assignment-input.json
@@ -0,0 +1,10 @@
+{
+ "intValue" : 1,
+ "floatValue" : 1.34,
+ "booleanValue" : true,
+ "stringValue" : "sample-String",
+ "timeValue" : "2018-09-29",
+ "arrayStringValue" : ["one", "two"],
+ "mapValue" : {"profile_name1":"profile_name1",
+ "profile_name2":"profile_name2"}
+} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/cyclic.json b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/cyclic.json
new file mode 100644
index 00000000..3bfa4167
--- /dev/null
+++ b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/cyclic.json
@@ -0,0 +1,111 @@
+[
+ {
+ "name": "vnf-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "service-instance-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "service-instance-id",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "bundle-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-id",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-ip",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-ip",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-mac",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "bundle-mac",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "vnf-id",
+ "bundle-id"
+ ]
+ },
+ {
+ "name": "managed-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "managed-ip",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "vnf-name",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "vnf-name",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "managed-ip1",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "managed-ip1",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "loopback-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "loopback-ip",
+ "dictionary-source": "primary-db",
+ "dependencies": [
+ "bundle-mac",
+ "managed-ip1"
+ ]
+ }
+]
diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/duplicate.json b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/duplicate.json
new file mode 100644
index 00000000..473920d6
--- /dev/null
+++ b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/duplicate.json
@@ -0,0 +1,110 @@
+[
+ {
+ "name": "vnf-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "service-instance-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "service-instance-id",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "bundle-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-id",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-ip",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-ip",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-mac",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "bundle-mac",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "vnf-id",
+ "bundle-id"
+ ]
+ },
+ {
+ "name": "bundle-mac",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "bundle-mac",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "vnf-name",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "vnf-name",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "managed-ip1",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "managed-ip1",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "loopback-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "loopback-ip",
+ "dictionary-source": "primary-db",
+ "dependencies": [
+ "bundle-mac"
+ ]
+ }
+]
diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/success.json b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/success.json
new file mode 100644
index 00000000..f8fe623f
--- /dev/null
+++ b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/success.json
@@ -0,0 +1,110 @@
+[
+ {
+ "name": "vnf-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "service-instance-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "service-instance-id",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "bundle-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-id",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-ip",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-ip",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-mac",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "bundle-mac",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "vnf-id",
+ "bundle-id"
+ ]
+ },
+ {
+ "name": "managed-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "managed-ip",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "vnf-name",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "vnf-name",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "managed-ip1",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "managed-ip1",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "loopback-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "loopback-ip",
+ "dictionary-source": "primary-db",
+ "dependencies": [
+ "bundle-mac"
+ ]
+ }
+]