diff options
Diffstat (limited to 'blueprints-processor/plugin/assignment-provider/src/test/resources')
6 files changed, 528 insertions, 0 deletions
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/assignments/alltype-empty-value-mapping.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/assignments/alltype-empty-value-mapping.json new file mode 100644 index 000000000..a3d65927b --- /dev/null +++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/assignments/alltype-empty-value-mapping.json @@ -0,0 +1,86 @@ +[
+ {
+ "name": "vnf-id-string",
+ "property": {
+ "required": true,
+ "type": "string"
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-id-string",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ },
+ {
+ "name": "vnf-id-integer",
+ "property": {
+ "required": true,
+ "type": "integer"
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-id-integer",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ },
+ {
+ "name": "vnf-boolean",
+ "property": {
+ "required": true,
+ "type": "boolean"
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-boolean",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ },
+ {
+ "name": "vnf-complex",
+ "property": {
+ "required": true,
+ "type": "dt-complex"
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-complex",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ },
+ {
+ "name": "vnf-id-array",
+ "property": {
+ "required": true,
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ }
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-id-array",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ },
+ {
+ "name": "vnf-array-complex",
+ "property": {
+ "required": true,
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-complex"
+ }
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-array-complex",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/assignments/alltype-mapping.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/assignments/alltype-mapping.json new file mode 100644 index 000000000..36909da99 --- /dev/null +++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/assignments/alltype-mapping.json @@ -0,0 +1,110 @@ +[
+ {
+ "name": "vnf-id-string",
+ "property": {
+ "required": true,
+ "type": "string",
+ "value": "123456"
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-id-string",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ },
+ {
+ "name": "vnf-id-integer",
+ "property": {
+ "required": true,
+ "type": "integer",
+ "value": 123456
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-id-integer",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ },
+ {
+ "name": "vnf-boolean",
+ "property": {
+ "required": true,
+ "type": "boolean",
+ "value": true
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-boolean",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ },
+ {
+ "name": "vnf-complex",
+ "property": {
+ "required": true,
+ "type": "dt-complex",
+ "value": {
+ "name": "Brinda",
+ "location": "Madurai",
+ "count": 2
+ }
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-complex",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ },
+ {
+ "name": "vnf-id-array",
+ "property": {
+ "required": true,
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ },
+ "value": [
+ "A",
+ "B",
+ "C"
+ ]
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-id-array",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ },
+ {
+ "name": "vnf-array-complex",
+ "property": {
+ "required": true,
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-complex"
+ },
+ "value": [
+ {
+ "name": "A"
+ },
+ {
+ "name": "B"
+ },
+ {
+ "name": "C"
+ }
+ ]
+ },
+ "input-param": true,
+ "dictionary-name": "vnf-array-complex",
+ "dictionary-source": "input",
+ "version": 0,
+ "status": "success",
+ "updated-by": "System"
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/assignments/empty-dictionary.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/assignments/empty-dictionary.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/assignments/empty-dictionary.json @@ -0,0 +1 @@ +[]
\ No newline at end of file diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/validation/cyclic.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/validation/cyclic.json new file mode 100644 index 000000000..fc6357f2d --- /dev/null +++ b/blueprints-processor/plugin/assignment-provider/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": "mdsal",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-ip",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-ip",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-mac",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "bundle-mac",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "vnf-id",
+ "bundle-id"
+ ]
+ },
+ {
+ "name": "managed-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "managed-ip",
+ "dictionary-source": "mdsal",
+ "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": "mdsal",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "loopback-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "loopback-ip",
+ "dictionary-source": "db",
+ "dependencies": [
+ "bundle-mac",
+ "managed-ip1"
+ ]
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/validation/duplicate.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/validation/duplicate.json new file mode 100644 index 000000000..86909a6a4 --- /dev/null +++ b/blueprints-processor/plugin/assignment-provider/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": "mdsal",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-ip",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-ip",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-mac",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "bundle-mac",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "vnf-id",
+ "bundle-id"
+ ]
+ },
+ {
+ "name": "bundle-mac",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "bundle-mac",
+ "dictionary-source": "mdsal",
+ "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": "mdsal",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "loopback-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "loopback-ip",
+ "dictionary-source": "db",
+ "dependencies": [
+ "bundle-mac"
+ ]
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/validation/success.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/validation/success.json new file mode 100644 index 000000000..e08539c0d --- /dev/null +++ b/blueprints-processor/plugin/assignment-provider/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": "mdsal",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-ip",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-ip",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-mac",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "bundle-mac",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "vnf-id",
+ "bundle-id"
+ ]
+ },
+ {
+ "name": "managed-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "managed-ip",
+ "dictionary-source": "mdsal",
+ "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": "mdsal",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "loopback-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "loopback-ip",
+ "dictionary-source": "db",
+ "dependencies": [
+ "bundle-mac"
+ ]
+ }
+]
|