aboutsummaryrefslogtreecommitdiffstats
path: root/blueprints-processor/plugin/assignment-provider/src/test/resources
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2018-09-04 21:57:47 -0400
committerSingal, Kapil (ks220y) <ks220y@att.com>2018-09-04 21:57:47 -0400
commitcadd88348aa9934a63849e149ddb4b60f7fbef5a (patch)
treec110b8ecead0b88841b0383ef2ce4a9ae65b4e12 /blueprints-processor/plugin/assignment-provider/src/test/resources
parent021d63c68b4d5fbb8cf5e34549d5b17bce488df3 (diff)
Blueprints Processor MDSAL Resource Assignment
Creating SDN Blueprints Processor MDSAL Resource Assignment Processor Change-Id: I111c9682a5601f32536e93180d4357fc7ac8a961 Issue-ID: CCSDK-498 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Diffstat (limited to 'blueprints-processor/plugin/assignment-provider/src/test/resources')
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/array-complex-response.json12
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/array-complex-v4-assigned-response.json13
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/complex-response.json6
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/default-pointer.json166
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/dt-location.json15
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/dt-v4-assigned-ip-list.json27
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-array-v4iplist.json76
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-array.json42
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-complex.json38
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-simple.json37
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-array.json15
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-complex-simple.json12
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-complex.json12
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-simple.json12
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/simple-response.json3
15 files changed, 486 insertions, 0 deletions
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/array-complex-response.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/array-complex-response.json
new file mode 100644
index 000000000..2dfe89e29
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/array-complex-response.json
@@ -0,0 +1,12 @@
+{
+ "locations": [
+ {
+ "mdsal-country": "US",
+ "mdsal-state": "NJ"
+ },
+ {
+ "mdsal-country": "INDIA",
+ "mdsal-state": "TN"
+ }
+ ]
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/array-complex-v4-assigned-response.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/array-complex-v4-assigned-response.json
new file mode 100644
index 000000000..d7c5546c1
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/array-complex-v4-assigned-response.json
@@ -0,0 +1,13 @@
+{
+ "v4-assigned-ip-list": [
+ {
+ "v4-ip-type": "NMLAN",
+ "ipv4-gateway-prefix": "10.66.1.129",
+ "v4-ip-prefix": "10.66.1.152",
+ "v4-ip-prefix-length": 32,
+ "ip-count": 1,
+ "v4-ip-source": "EIPAM",
+ "client-key": "ADIG_19_vnf_name061rej01"
+ }
+ ]
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/complex-response.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/complex-response.json
new file mode 100644
index 000000000..1a36100fd
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/complex-response.json
@@ -0,0 +1,6 @@
+{
+ "locations": {
+ "mdsal-country": "US",
+ "mdsal-state": "NJ"
+ }
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/default-pointer.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/default-pointer.json
new file mode 100644
index 000000000..47edb1881
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/default-pointer.json
@@ -0,0 +1,166 @@
+{
+ "vnf-topology-information": {
+ "vnf-assignments": {
+ "availability-zones": [
+ {
+ "availability-zone": "frkde-esx-az01"
+ }
+ ],
+ "vnf-vms": [
+ {
+ "vm-type": "vre",
+ "vm-count": 1,
+ "vm-networks": [
+ {
+ "network-role": "ADIGOam.OAM",
+ "network-name": "ADIGOAM.OAM",
+ "v4-assigned-ip-list": [
+ {
+ "v4-ip-type": "NMLAN",
+ "ipv4-gateway-prefix": "10.66.1.129",
+ "v4-ip-prefix": "10.66.1.152",
+ "v4-ip-prefix-length": 32,
+ "ip-count": 1,
+ "v4-ip-source": "EIPAM",
+ "client-key": "ADIG_19_vnf_name061rej01"
+ }
+ ],
+ "network-id": "VPEADIG1d77c-1086-41ec-b7f3-94bb30936807"
+ },
+ {
+ "network-role": "Internal-Network",
+ "network-name": "VMX-INTTERNAL056",
+ "v4-assigned-ip-list": [
+ {
+ "v4-ip-type": "INTERNAL",
+ "v4-ip-prefix": "128.0.0.1",
+ "ipv4-prefix-block": "128.0.0.0",
+ "v4-ip-prefix-length": 24,
+ "v4-ip-source": "OTHER"
+ }
+ ],
+ "network-forwarding": "l2",
+ "network-id": "VMX-INT1"
+ }
+ ],
+ "vm-names": [
+ {
+ "vm-name": "ADIG_19_vnf_name061rej",
+ "vm-uuid": "50d2032d-fe15-4e82-94f3-8b73c566a345"
+ }
+ ]
+ },
+ {
+ "vm-type": "vpfe",
+ "vm-count": 1,
+ "vm-networks": [
+ {
+ "network-role": "ADIG_SRIOV_3",
+ "network-name": "ADIG_SRIOV_3",
+ "multicast-allow": true,
+ "broadcast-allow": true,
+ "network-id": "VPEADIG1d77c-1086-41ec-b7f3-94bb30936810",
+ "vlan-filter": "[4013,4014]",
+ "network-macs": [
+ {
+ "mac-address": "dc:38:e1:69:bf:5f"
+ }
+ ],
+ "vlan-strip": false,
+ "unicast-allow": true
+ },
+ {
+ "network-role": "ADIG_SRIOV_4",
+ "network-name": "ADIG_SRIOV_4",
+ "multicast-allow": true,
+ "broadcast-allow": true,
+ "network-id": "VPEADIG1d77c-1086-41ec-b7f3-94bb30936811",
+ "vlan-filter": "[4013,4014]",
+ "network-macs": [
+ {
+ "mac-address": "dc:38:e1:69:bf:5f"
+ }
+ ],
+ "vlan-strip": false,
+ "unicast-allow": true
+ },
+ {
+ "network-role": "ADIG_SRIOV_1",
+ "network-name": "ADIG_SRIOV_1",
+ "multicast-allow": true,
+ "broadcast-allow": true,
+ "network-id": "VPEADIG1d77c-1086-41ec-b7f3-94bb30936808",
+ "vlan-filter": "[4013,4014]",
+ "network-macs": [
+ {
+ "mac-address": "dc:38:e1:69:bf:5f"
+ }
+ ],
+ "vlan-strip": false,
+ "unicast-allow": true
+ },
+ {
+ "network-role": "ADIG_SRIOV_2",
+ "network-name": "ADIG_SRIOV_2",
+ "multicast-allow": true,
+ "broadcast-allow": true,
+ "network-id": "VPEADIG1d77c-1086-41ec-b7f3-94bb30936809",
+ "vlan-filter": "[4013,4014]",
+ "network-macs": [
+ {
+ "mac-address": "dc:38:e1:69:bf:5f"
+ }
+ ],
+ "vlan-strip": false,
+ "unicast-allow": true
+ },
+ {
+ "network-role": "Internal-Network",
+ "network-name": "VMX-INTTERNAL056",
+ "v4-assigned-ip-list": [
+ {
+ "v4-ip-type": "INTERNAL",
+ "v4-ip-prefix": "128.0.0.16",
+ "ipv4-prefix-block": "128.0.0.0",
+ "v4-ip-prefix-length": 24,
+ "v4-ip-source": "OTHER"
+ }
+ ],
+ "network-forwarding": "l2",
+ "network-id": "VMX-INT1"
+ }
+ ],
+ "vm-names": [
+ {
+ "vm-name": "ADIG_19_vnf_name056fej",
+ "vm-uuid": "d2ce6023-a3ab-412e-bc63-360307aac165"
+ }
+ ]
+ }
+ ],
+ "vnf-status": "Deactivated",
+ "vnf-networks": [
+ {
+ "network-role": "ADIGOam.OAM",
+ "network-id": "VPEADIG1d77c-1086-41ec-b7f3-94bb30936807"
+ },
+ {
+ "network-role": "ADIG_SRIOV_3",
+ "network-id": "VPEADIG1d77c-1086-41ec-b7f3-94bb30936810"
+ },
+ {
+ "network-role": "ADIG_SRIOV_2",
+ "network-id": "VPEADIG1d77c-1086-41ec-b7f3-94bb30936809"
+ },
+ {
+ "network-role": "ADIG_SRIOV_4",
+ "network-id": "VPEADIG1d77c-1086-41ec-b7f3-94bb30936811"
+ },
+ {
+ "network-role": "ADIG_SRIOV_1",
+ "network-id": "VPEADIG1d77c-1086-41ec-b7f3-94bb30936808"
+ }
+ ]
+ }
+ }
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/dt-location.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/dt-location.json
new file mode 100644
index 000000000..52e0a7967
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/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/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/dt-v4-assigned-ip-list.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/dt-v4-assigned-ip-list.json
new file mode 100644
index 000000000..bc8f1d2c2
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/dt-v4-assigned-ip-list.json
@@ -0,0 +1,27 @@
+{
+ "version": "1.0.0",
+ "description": "This is dt-v4-assigned-ip-list Data Type",
+ "properties": {
+ "v4-ip-type": {
+ "required": true,
+ "type": "string"
+ },
+ "ipv4-gateway-prefix": {
+ "required": true,
+ "type": "string"
+ },
+ "v4-ip-prefix": {
+ "required": true,
+ "type": "string"
+ },
+ "v4-ip-prefix-length": {
+ "required": true,
+ "type": "string"
+ },
+ "v4-ip-source": {
+ "required": true,
+ "type": "string"
+ }
+ },
+ "derived_from": "tosca.datatypes.Root"
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-array-v4iplist.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-array-v4iplist.json
new file mode 100644
index 000000000..387a5ad2d
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-array-v4iplist.json
@@ -0,0 +1,76 @@
+{
+ "v4-ip-prefix": {
+ "name": "v4-ip-prefix",
+ "property": {
+ "type": "string"
+ },
+ "sources": {
+ "mdsal": {
+ "type": "source-mdsal",
+ "properties": {
+ "url-path": "/restconf/config/L3VNF-API:services/service-list/$service-instance-id/service-data/vnf-topology-information/vnf-assignments/vnf-vms/$oam-ipv4-ip-type/vm-networks/$oam-network-role/v4-assigned-ip-list/$oam-vm-type",
+ "path": "/v4-assigned-ip-list/0/v4-ip-prefix",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "oam-network-role": "oam-network-role",
+ "oam-ipv4-ip-type": "oam-ipv4-ip-type",
+ "oam-vm-type": "oam-vm-type"
+ },
+ "output-key-mapping": {
+ "v4-ip-prefix": "v4-ip-prefix"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "oam-network-role",
+ "oam-ipv4-ip-type",
+ "oam-vm-type"
+ ]
+ }
+ }
+ }
+ },
+ "service-instance-id": {
+ "name": "service-instance-id",
+ "property": {
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "type": "source-input"
+ }
+ }
+ },
+ "oam-network-role": {
+ "name": "oam-network-role",
+ "property": {
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "type": "source-input"
+ }
+ }
+ },
+ "oam-ipv4-ip-type": {
+ "name": "oam-ipv4-ip-type",
+ "property": {
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "type": "source-input"
+ }
+ }
+ },
+ "oam-vm-type": {
+ "name": "oam-vm-type",
+ "property": {
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "type": "source-input"
+ }
+ }
+ }
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-array.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-array.json
new file mode 100644
index 000000000..290a15752
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-array.json
@@ -0,0 +1,42 @@
+{
+ "locations": {
+ "name": "locations",
+ "property": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-location"
+ }
+ },
+ "sources": {
+ "mdsal": {
+ "type": "source-mdsal",
+ "properties": {
+ "url-path": "/restconf/config/L3VNF-API/services/service-list/$profile_name/12345",
+ "path": "/locations",
+ "input-key-mapping": {
+ "profile_name": "profile_name"
+ },
+ "output-key-mapping": {
+ "mdsal-country": "country",
+ "mdsal-state": "state"
+ },
+ "key-dependencies": [
+ "profile_name"
+ ]
+ }
+ }
+ }
+ },
+ "profile_name": {
+ "name": "profile_name",
+ "property": {
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "type": "source-input"
+ }
+ }
+ }
+}
+
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-complex.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-complex.json
new file mode 100644
index 000000000..f5a7d7ef6
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-complex.json
@@ -0,0 +1,38 @@
+{
+ "location": {
+ "name": "location",
+ "property": {
+ "type": "dt-location"
+ },
+ "sources": {
+ "mdsal": {
+ "type": "source-mdsal",
+ "properties": {
+ "url-path": "/restconf/config/L3VNF-API/services/service-list/$profile_name/12345",
+ "path": "/locations",
+ "input-key-mapping": {
+ "profile_name": "profile_name"
+ },
+ "output-key-mapping": {
+ "mdsal-country": "country",
+ "mdsal-state": "state"
+ },
+ "key-dependencies": [
+ "profile_name"
+ ]
+ }
+ }
+ }
+ },
+ "profile_name": {
+ "name": "profile_name",
+ "property": {
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "type": "source-input"
+ }
+ }
+ }
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-simple.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-simple.json
new file mode 100644
index 000000000..db7ee7eed
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/mdsal-simple.json
@@ -0,0 +1,37 @@
+{
+ "country": {
+ "name": "country",
+ "property": {
+ "type": "string"
+ },
+ "sources": {
+ "mdsal": {
+ "type": "source-mdsal",
+ "properties": {
+ "url-path": "/restconf/config/L3VNF-API/services/service-list/$profile_name/12345",
+ "path": "/locations",
+ "input-key-mapping": {
+ "profile_name": "profile_name"
+ },
+ "output-key-mapping": {
+ "country": "country"
+ },
+ "key-dependencies": [
+ "profile_name"
+ ]
+ }
+ }
+ }
+ },
+ "profile_name": {
+ "name": "profile_name",
+ "property": {
+ "type": "string"
+ },
+ "sources": {
+ "input": {
+ "type": "source-input"
+ }
+ }
+ }
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-array.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-array.json
new file mode 100644
index 000000000..2b5865326
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-array.json
@@ -0,0 +1,15 @@
+[
+ {
+ "name": "locations",
+ "input-param": true,
+ "property": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-location"
+ }
+ },
+ "dictionary-name": "locations",
+ "dictionary-source": "mdsal",
+ "dependencies": []
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-complex-simple.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-complex-simple.json
new file mode 100644
index 000000000..15881cfd0
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-complex-simple.json
@@ -0,0 +1,12 @@
+[
+ {
+ "name": "v4-ip-prefix",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "v4-ip-prefix",
+ "dictionary-source": "mdsal",
+ "dependencies": []
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-complex.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-complex.json
new file mode 100644
index 000000000..e42bd9431
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-complex.json
@@ -0,0 +1,12 @@
+[
+ {
+ "name": "location",
+ "input-param": true,
+ "property": {
+ "type": "dt-location"
+ },
+ "dictionary-name": "location",
+ "dictionary-source": "mdsal",
+ "dependencies": []
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-simple.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-simple.json
new file mode 100644
index 000000000..6385e6a8b
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/resource-assignments-simple.json
@@ -0,0 +1,12 @@
+[
+ {
+ "name": "country",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "country",
+ "dictionary-source": "mdsal",
+ "dependencies": []
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/simple-response.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/simple-response.json
new file mode 100644
index 000000000..8c2bb898f
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/Mdsal/simple-response.json
@@ -0,0 +1,3 @@
+{
+ "locations": "US"
+}