summaryrefslogtreecommitdiffstats
path: root/src/test/resources/model-validation/instance-reader
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/resources/model-validation/instance-reader')
-rw-r--r--src/test/resources/model-validation/instance-reader/connector-attributes.json399
-rw-r--r--src/test/resources/model-validation/instance-reader/connector-model-name.json84
-rw-r--r--src/test/resources/model-validation/instance-reader/connector-sibling-inventory-items.json118
-rw-r--r--src/test/resources/model-validation/instance-reader/connector.json82
-rw-r--r--src/test/resources/model-validation/instance-reader/expected-generic-vnf.json36
-rw-r--r--src/test/resources/model-validation/instance-reader/expected-logical-link.json51
-rw-r--r--src/test/resources/model-validation/instance-reader/expected-pserver.json28
-rw-r--r--src/test/resources/model-validation/instance-reader/expected-virtual-data-center-model-name.json66
-rw-r--r--src/test/resources/model-validation/instance-reader/expected-virtual-data-center.json65
-rw-r--r--src/test/resources/model-validation/instance-reader/model-instance-mapping-attributes.json_conf12
-rw-r--r--src/test/resources/model-validation/instance-reader/model-instance-mapping-root-missing.json_conf16
-rw-r--r--src/test/resources/model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf17
-rw-r--r--src/test/resources/model-validation/instance-reader/model-instance-mapping.json_conf17
-rw-r--r--src/test/resources/model-validation/instance-reader/test-validation-service-beans.xml35
14 files changed, 1026 insertions, 0 deletions
diff --git a/src/test/resources/model-validation/instance-reader/connector-attributes.json b/src/test/resources/model-validation/instance-reader/connector-attributes.json
new file mode 100644
index 0000000..3a4536f
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/connector-attributes.json
@@ -0,0 +1,399 @@
+{
+ "inventory-response-item": [
+ {
+ "model-name": "WAN Connector v0.1",
+ "connector": {
+ "resource-instance-id": "100559",
+ "resource-version": "1465571381",
+ "persona-model-id": "dc700a83-c507-47d9-b775-1fdfcdd5f9eb",
+ "persona-model-version": "0.1"
+ },
+ "extra-properties": {
+ "metadatum": [
+ {
+ "metaname": "vpn-id",
+ "metaval": "vpn-id value 1",
+ "resource-version": "1466418452"
+ },
+ {
+ "metaname": "unexpected",
+ "metaval": "unexpected value 1",
+ "resource-version": "1466418452"
+ }
+ ]
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "virtual-data-center": {
+ "vdc-id": "15001220",
+ "vdc-name": "SAN_DIEGO_CA01",
+ "resource-version": "1465571382"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "vLAN on a Physical Wire",
+ "logical-link": {
+ "link-name": "sn6ca391ve2-xe-10/2/3.117|sn4ca01pbg",
+ "link-type": "l2bridge",
+ "resource-version": "1465571381",
+ "persona-model-id": "32bee148-2cae-4f3d-a42e-22c9e4f078a2",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "pBgf",
+ "pserver": {
+ "hostname": "sn4ca01pbg",
+ "in-maint": false,
+ "resource-version": "1470978156"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ },
+ {
+ "model-name": "VL ELAN",
+ "logical-link": {
+ "link-name": "sn6ca391ve2-ae6.1322|dbzx0003v",
+ "link-type": "l2bridge",
+ "resource-version": "1465571381",
+ "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "vDbe",
+ "generic-vnf": {
+ "vnf-id": "VAPP-2883",
+ "vnf-name": "dbzx0004v",
+ "vnf-type": "vSRX vDBE-V VNF",
+ "service-id": "12a96a9d-4b4c-4349-a950-fe1159602621",
+ "prov-status": "ACTIVE",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1470978155"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ },
+ {
+ "model-name": "VL ELAN",
+ "logical-link": {
+ "link-name": "sn6ca392ve2-ae6.1322|dbzx0003v",
+ "link-type": "l2bridge",
+ "resource-version": "1465571382",
+ "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "vDbe",
+ "generic-vnf": {
+ "vnf-id": "VAPP-2883",
+ "vnf-name": "dbzx0004v",
+ "vnf-type": "vSRX vDBE-V VNF",
+ "service-id": "12a96a9d-4b4c-4349-a950-fe1159602621",
+ "prov-status": "ACTIVE",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1470978155"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ },
+ {
+ "model-name": "VL ELAN",
+ "logical-link": {
+ "link-name": "sn6ca392ve2-ae6.1927|asbg0003v",
+ "link-type": "l2bridge",
+ "resource-version": "1465571382",
+ "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "vDbe",
+ "generic-vnf": {
+ "vnf-id": "VAPP-9320",
+ "vnf-name": "asbg0003v",
+ "vnf-type": "ASBGv No TLS",
+ "service-id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
+ "prov-status": "PROV",
+ "ipv4-oam-address": "135.193.152.168",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1470978156"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ },
+ {
+ "model-name": "vLAN on a Physical Wire",
+ "logical-link": {
+ "link-name": "sn6ca392ve2-xe-10/2/3.117|sn4ca01pbg",
+ "link-type": "l2bridge",
+ "resource-version": "1465571382",
+ "persona-model-id": "32bee148-2cae-4f3d-a42e-22c9e4f078a2",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "pBgf",
+ "pserver": {
+ "hostname": "sn4ca01pbg",
+ "in-maint": false,
+ "resource-version": "1470978156"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ },
+ {
+ "model-name": "VL ELAN",
+ "logical-link": {
+ "link-name": "sn6ca391ve2-ae6.1927|asbg0003v",
+ "link-type": "l2bridge",
+ "resource-version": "1465571381",
+ "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "vDbe",
+ "generic-vnf": {
+ "vnf-id": "VAPP-9320",
+ "vnf-name": "asbg0003v",
+ "vnf-type": "ASBGv No TLS",
+ "service-id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
+ "prov-status": "PROV",
+ "ipv4-oam-address": "135.193.152.168",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1470978156"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "virtual-data-center": {
+ "vdc-id": "15001219",
+ "vdc-name": "ALPHARETTA_GA01",
+ "resource-version": "1465571380"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "VL ELAN",
+ "logical-link": {
+ "link-name": "alrga392ve2-ae6.1322|dbzx0004v",
+ "link-type": "l2bridge",
+ "resource-version": "1465571380",
+ "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "vDbe",
+ "generic-vnf": {
+ "vnf-id": "VAPP-1883",
+ "vnf-name": "dbzx0003v",
+ "vnf-type": "vSRX vDBE-V VNF",
+ "service-id": "12a96a9d-4b4c-4349-a950-fe1159602621",
+ "prov-status": "ACTIVE",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1470978153"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ },
+ {
+ "model-name": "VL ELAN",
+ "logical-link": {
+ "link-name": "alrga391ve2-ae6.1322|dbzx0004v",
+ "link-type": "l2bridge",
+ "resource-version": "1465571379",
+ "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "vDbe",
+ "generic-vnf": {
+ "vnf-id": "VAPP-1883",
+ "vnf-name": "dbzx0003v",
+ "vnf-type": "vSRX vDBE-V VNF",
+ "service-id": "12a96a9d-4b4c-4349-a950-fe1159602621",
+ "prov-status": "ACTIVE",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1470978153"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ },
+ {
+ "model-name": "VL ELAN",
+ "logical-link": {
+ "link-name": "alrga392ve2-ae6.1927|asbg0004v",
+ "link-type": "l2bridge",
+ "resource-version": "1465571380",
+ "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "vDbe",
+ "generic-vnf": {
+ "vnf-id": "VAPP-5305",
+ "vnf-name": "asbg0004v",
+ "vnf-type": "ASBGv No TLS",
+ "service-id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
+ "prov-status": "PROV",
+ "ipv4-oam-address": "135.190.182.168",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1470978152"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ },
+ {
+ "model-name": "vLAN on a Physical Wire",
+ "logical-link": {
+ "link-name": "alrga391ve2-xe-10/2/3.117|ar4ga01pbg",
+ "link-type": "l2bridge",
+ "resource-version": "1465571379",
+ "persona-model-id": "32bee148-2cae-4f3d-a42e-22c9e4f078a2",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "pBgf",
+ "pserver": {
+ "hostname": "ar4ga01pbg",
+ "in-maint": false,
+ "resource-version": "1470978153"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ },
+ {
+ "model-name": "VL ELAN",
+ "logical-link": {
+ "link-name": "alrga391ve2-ae6.1927|asbg0004v",
+ "link-type": "l2bridge",
+ "resource-version": "1465571380",
+ "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "vDbe",
+ "generic-vnf": {
+ "vnf-id": "VAPP-5305",
+ "vnf-name": "asbg0004v",
+ "vnf-type": "ASBGv No TLS",
+ "service-id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
+ "prov-status": "PROV",
+ "ipv4-oam-address": "135.190.182.168",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1470978152"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ },
+ {
+ "model-name": "vLAN on a Physical Wire",
+ "logical-link": {
+ "link-name": "alrga392ve2-xe-10/2/3.117|ar4ga01pbg",
+ "link-type": "l2bridge",
+ "resource-version": "1465571380",
+ "persona-model-id": "32bee148-2cae-4f3d-a42e-22c9e4f078a2",
+ "persona-model-version": "1"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "pBgf",
+ "pserver": {
+ "hostname": "ar4ga01pbg",
+ "in-maint": false,
+ "resource-version": "1470978153"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {}
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/src/test/resources/model-validation/instance-reader/connector-model-name.json b/src/test/resources/model-validation/instance-reader/connector-model-name.json
new file mode 100644
index 0000000..60e6401
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/connector-model-name.json
@@ -0,0 +1,84 @@
+{
+ "model-name": "Test Connector Model Name",
+ "connector": {
+ "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd",
+ "resource-version": "1467975776",
+ "persona-model-id": "connector-widget-id",
+ "persona-model-version": "v1.0",
+ "widget-model-id": "example-widget-model-id-val-69486",
+ "widget-model-version": "v1.0"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "Test VC Model Name",
+ "virtual-data-center": {
+ "vdc-id": "vdc-01",
+ "vdc-name": "example-vdc-name-val-10107",
+ "resource-version": "1467975781"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "Test LL Model Name",
+ "logical-link": {
+ "link-name": "example-link-name-val-23759",
+ "link-type": "example-link-type-val-23759",
+ "speed-value": "example-speed-value-val-23759",
+ "speed-units": "example-speed-units-val-23759",
+ "ip-version": "example-ip-version-val-23759",
+ "routing-protocol": "example-routing-protocol-val-23759",
+ "resource-version": "1467975786",
+ "persona-model-id": "example-persona-model-id-val-23759",
+ "persona-model-version": "example-persona-model-version-val-23759",
+ "widget-model-id": "example-widget-model-id-val-23759",
+ "widget-model-version": "example-widget-model-version-val-23759"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "pserver": {
+ "hostname": "example-hostname-val-79914",
+ "ptnii-equip-name": "example-ptnii-equip-name-val-79914",
+ "number-of-cpus": 79914,
+ "disk-in-gigabytes": 79914,
+ "ram-in-megabytes": 79914,
+ "equip-type": "example-equip-type-val-79914",
+ "equip-vendor": "example-equip-vendor-val-79914",
+ "equip-model": "example-equip-model-val-79914",
+ "fqdn": "example-fqdn-val-79914",
+ "pserver-selflink": "example-pserver-selflink-val-79914",
+ "ipv4-oam-address": "example-ipv4-oam-address-val-79914",
+ "serial-number": "example-serial-number-val-79914",
+ "pserver-id": "example-pserver-id-val-79914",
+ "internet-topology": "example-internet-topology-val-79914",
+ "in-maint": true,
+ "resource-version": "1467994603",
+ "pserver-name2": "example-pserver-name2-val-79914",
+ "purpose": "example-purpose-val-79914"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
diff --git a/src/test/resources/model-validation/instance-reader/connector-sibling-inventory-items.json b/src/test/resources/model-validation/instance-reader/connector-sibling-inventory-items.json
new file mode 100644
index 0000000..b032966
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/connector-sibling-inventory-items.json
@@ -0,0 +1,118 @@
+{
+ "connector": {
+ "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd",
+ "resource-version": "1467975776",
+ "persona-model-id": "connector-widget-id",
+ "persona-model-version": "v1.0",
+ "widget-model-id": "example-widget-model-id-val-69486",
+ "widget-model-version": "v1.0"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "virtual-data-center": {
+ "vdc-id": "vdc-01",
+ "vdc-name": "example-vdc-name-val-10107",
+ "resource-version": "1467975781"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "Test LL Model Name",
+ "logical-link": {
+ "link-name": "example-link-name-val-23759",
+ "link-type": "example-link-type-val-23759",
+ "speed-value": "example-speed-value-val-23759",
+ "speed-units": "example-speed-units-val-23759",
+ "ip-version": "example-ip-version-val-23759",
+ "routing-protocol": "example-routing-protocol-val-23759",
+ "resource-version": "1467975786",
+ "persona-model-id": "example-persona-model-id-val-23759",
+ "persona-model-version": "example-persona-model-version-val-23759",
+ "widget-model-id": "example-widget-model-id-val-23759",
+ "widget-model-version": "example-widget-model-version-val-23759"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "generic-vnf": {
+ "vnf-id": "generic-vnf-01",
+ "vnf-name": "example-vnf-name-val-3501",
+ "vnf-name2": "example-vnf-name2-val-3501",
+ "vnf-type": "example-vnf-type-val-3501",
+ "regional-resource-zone": "example-regional-resource-zone-val-3501",
+ "prov-status": "example-prov-status-val-3501",
+ "operational-state": "example-operational-state-val-3501",
+ "license-key": "example-license-key-val-3501",
+ "equipment-role": "example-equipment-role-val-3501",
+ "orchestration-status": "example-orchestration-status-val-3501",
+ "heat-stack-id": "example-heat-stack-id-val-3501",
+ "mso-catalog-key": "example-mso-catalog-key-val-3501",
+ "management-option": "example-management-option-val-3501",
+ "ipv4-oam-address": "example-ipv4-oam-address-val-3501",
+ "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-3501",
+ "nm-lan-v6-address": "example-nm-lan-v6-address-val-3501",
+ "management-v6-address": "example-management-v6-address-val-3501",
+ "vcpu": 1817,
+ "vcpu-units": "example-vcpu-units-val-3501",
+ "vmemory": 6020,
+ "vmemory-units": "example-vmemory-units-val-3501",
+ "vdisk": 5281,
+ "vdisk-units": "example-vdisk-units-val-3501",
+ "in-maint": false,
+ "is-closed-loop-disabled": true,
+ "resource-version": "1468321711"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+
+ }
+ },
+ {
+ "pserver": {
+ "hostname": "example-hostname-val-79914",
+ "ptnii-equip-name": "example-ptnii-equip-name-val-79914",
+ "number-of-cpus": 79914,
+ "disk-in-gigabytes": 79914,
+ "ram-in-megabytes": 79914,
+ "equip-type": "example-equip-type-val-79914",
+ "equip-vendor": "example-equip-vendor-val-79914",
+ "equip-model": "example-equip-model-val-79914",
+ "fqdn": "example-fqdn-val-79914",
+ "pserver-selflink": "example-pserver-selflink-val-79914",
+ "ipv4-oam-address": "example-ipv4-oam-address-val-79914",
+ "serial-number": "example-serial-number-val-79914",
+ "pserver-id": "example-pserver-id-val-79914",
+ "internet-topology": "example-internet-topology-val-79914",
+ "in-maint": true,
+ "resource-version": "1467994603",
+ "pserver-name2": "example-pserver-name2-val-79914",
+ "purpose": "example-purpose-val-79914"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
diff --git a/src/test/resources/model-validation/instance-reader/connector.json b/src/test/resources/model-validation/instance-reader/connector.json
new file mode 100644
index 0000000..1870dc8
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/connector.json
@@ -0,0 +1,82 @@
+{
+ "connector": {
+ "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd",
+ "resource-version": "1467975776",
+ "persona-model-id": "connector-widget-id",
+ "persona-model-version": "v1.0",
+ "widget-model-id": "example-widget-model-id-val-69486",
+ "widget-model-version": "v1.0"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "virtual-data-center": {
+ "vdc-id": "vdc-01",
+ "vdc-name": "example-vdc-name-val-10107",
+ "resource-version": "1467975781"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "Test LL Model Name",
+ "logical-link": {
+ "link-name": "example-link-name-val-23759",
+ "link-type": "example-link-type-val-23759",
+ "speed-value": "example-speed-value-val-23759",
+ "speed-units": "example-speed-units-val-23759",
+ "ip-version": "example-ip-version-val-23759",
+ "routing-protocol": "example-routing-protocol-val-23759",
+ "resource-version": "1467975786",
+ "persona-model-id": "example-persona-model-id-val-23759",
+ "persona-model-version": "example-persona-model-version-val-23759",
+ "widget-model-id": "example-widget-model-id-val-23759",
+ "widget-model-version": "example-widget-model-version-val-23759"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "pserver": {
+ "hostname": "example-hostname-val-79914",
+ "ptnii-equip-name": "example-ptnii-equip-name-val-79914",
+ "number-of-cpus": 79914,
+ "disk-in-gigabytes": 79914,
+ "ram-in-megabytes": 79914,
+ "equip-type": "example-equip-type-val-79914",
+ "equip-vendor": "example-equip-vendor-val-79914",
+ "equip-model": "example-equip-model-val-79914",
+ "fqdn": "example-fqdn-val-79914",
+ "pserver-selflink": "example-pserver-selflink-val-79914",
+ "ipv4-oam-address": "example-ipv4-oam-address-val-79914",
+ "serial-number": "example-serial-number-val-79914",
+ "pserver-id": "example-pserver-id-val-79914",
+ "internet-topology": "example-internet-topology-val-79914",
+ "in-maint": true,
+ "resource-version": "1467994603",
+ "pserver-name2": "example-pserver-name2-val-79914",
+ "purpose": "example-purpose-val-79914"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
diff --git a/src/test/resources/model-validation/instance-reader/expected-generic-vnf.json b/src/test/resources/model-validation/instance-reader/expected-generic-vnf.json
new file mode 100644
index 0000000..ab5bb10
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/expected-generic-vnf.json
@@ -0,0 +1,36 @@
+{
+ "generic-vnf": {
+ "vnf-id": "generic-vnf-01",
+ "vnf-name": "example-vnf-name-val-3501",
+ "vnf-name2": "example-vnf-name2-val-3501",
+ "vnf-type": "example-vnf-type-val-3501",
+ "regional-resource-zone": "example-regional-resource-zone-val-3501",
+ "prov-status": "example-prov-status-val-3501",
+ "operational-state": "example-operational-state-val-3501",
+ "license-key": "example-license-key-val-3501",
+ "equipment-role": "example-equipment-role-val-3501",
+ "orchestration-status": "example-orchestration-status-val-3501",
+ "heat-stack-id": "example-heat-stack-id-val-3501",
+ "mso-catalog-key": "example-mso-catalog-key-val-3501",
+ "management-option": "example-management-option-val-3501",
+ "ipv4-oam-address": "example-ipv4-oam-address-val-3501",
+ "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-3501",
+ "nm-lan-v6-address": "example-nm-lan-v6-address-val-3501",
+ "management-v6-address": "example-management-v6-address-val-3501",
+ "vcpu": 1817,
+ "vcpu-units": "example-vcpu-units-val-3501",
+ "vmemory": 6020,
+ "vmemory-units": "example-vmemory-units-val-3501",
+ "vdisk": 5281,
+ "vdisk-units": "example-vdisk-units-val-3501",
+ "in-maint": false,
+ "is-closed-loop-disabled": true,
+ "resource-version": "1468321711"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+
+ }
+}
diff --git a/src/test/resources/model-validation/instance-reader/expected-logical-link.json b/src/test/resources/model-validation/instance-reader/expected-logical-link.json
new file mode 100644
index 0000000..90bb7de
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/expected-logical-link.json
@@ -0,0 +1,51 @@
+{
+ "model-name": "Test LL Model Name",
+ "logical-link": {
+ "link-name": "example-link-name-val-23759",
+ "link-type": "example-link-type-val-23759",
+ "speed-value": "example-speed-value-val-23759",
+ "speed-units": "example-speed-units-val-23759",
+ "ip-version": "example-ip-version-val-23759",
+ "routing-protocol": "example-routing-protocol-val-23759",
+ "resource-version": "1467975786",
+ "persona-model-id": "example-persona-model-id-val-23759",
+ "persona-model-version": "example-persona-model-version-val-23759",
+ "widget-model-id": "example-widget-model-id-val-23759",
+ "widget-model-version": "example-widget-model-version-val-23759"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "pserver": {
+ "hostname": "example-hostname-val-79914",
+ "ptnii-equip-name": "example-ptnii-equip-name-val-79914",
+ "number-of-cpus": 79914,
+ "disk-in-gigabytes": 79914,
+ "ram-in-megabytes": 79914,
+ "equip-type": "example-equip-type-val-79914",
+ "equip-vendor": "example-equip-vendor-val-79914",
+ "equip-model": "example-equip-model-val-79914",
+ "fqdn": "example-fqdn-val-79914",
+ "pserver-selflink": "example-pserver-selflink-val-79914",
+ "ipv4-oam-address": "example-ipv4-oam-address-val-79914",
+ "serial-number": "example-serial-number-val-79914",
+ "pserver-id": "example-pserver-id-val-79914",
+ "internet-topology": "example-internet-topology-val-79914",
+ "in-maint": true,
+ "resource-version": "1467994603",
+ "pserver-name2": "example-pserver-name2-val-79914",
+ "purpose": "example-purpose-val-79914"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/model-validation/instance-reader/expected-pserver.json b/src/test/resources/model-validation/instance-reader/expected-pserver.json
new file mode 100644
index 0000000..8d4b8c5
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/expected-pserver.json
@@ -0,0 +1,28 @@
+{
+ "pserver": {
+ "hostname": "example-hostname-val-79914",
+ "ptnii-equip-name": "example-ptnii-equip-name-val-79914",
+ "number-of-cpus": 79914,
+ "disk-in-gigabytes": 79914,
+ "ram-in-megabytes": 79914,
+ "equip-type": "example-equip-type-val-79914",
+ "equip-vendor": "example-equip-vendor-val-79914",
+ "equip-model": "example-equip-model-val-79914",
+ "fqdn": "example-fqdn-val-79914",
+ "pserver-selflink": "example-pserver-selflink-val-79914",
+ "ipv4-oam-address": "example-ipv4-oam-address-val-79914",
+ "serial-number": "example-serial-number-val-79914",
+ "pserver-id": "example-pserver-id-val-79914",
+ "internet-topology": "example-internet-topology-val-79914",
+ "in-maint": true,
+ "resource-version": "1467994603",
+ "pserver-name2": "example-pserver-name2-val-79914",
+ "purpose": "example-purpose-val-79914"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/model-validation/instance-reader/expected-virtual-data-center-model-name.json b/src/test/resources/model-validation/instance-reader/expected-virtual-data-center-model-name.json
new file mode 100644
index 0000000..e72a52f
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/expected-virtual-data-center-model-name.json
@@ -0,0 +1,66 @@
+{
+ "model-name": "Test VC Model Name",
+ "virtual-data-center": {
+ "vdc-id": "vdc-01",
+ "vdc-name": "example-vdc-name-val-10107",
+ "resource-version": "1467975781"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "Test LL Model Name",
+ "logical-link": {
+ "link-name": "example-link-name-val-23759",
+ "link-type": "example-link-type-val-23759",
+ "speed-value": "example-speed-value-val-23759",
+ "speed-units": "example-speed-units-val-23759",
+ "ip-version": "example-ip-version-val-23759",
+ "routing-protocol": "example-routing-protocol-val-23759",
+ "resource-version": "1467975786",
+ "persona-model-id": "example-persona-model-id-val-23759",
+ "persona-model-version": "example-persona-model-version-val-23759",
+ "widget-model-id": "example-widget-model-id-val-23759",
+ "widget-model-version": "example-widget-model-version-val-23759"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "pserver": {
+ "hostname": "example-hostname-val-79914",
+ "ptnii-equip-name": "example-ptnii-equip-name-val-79914",
+ "number-of-cpus": 79914,
+ "disk-in-gigabytes": 79914,
+ "ram-in-megabytes": 79914,
+ "equip-type": "example-equip-type-val-79914",
+ "equip-vendor": "example-equip-vendor-val-79914",
+ "equip-model": "example-equip-model-val-79914",
+ "fqdn": "example-fqdn-val-79914",
+ "pserver-selflink": "example-pserver-selflink-val-79914",
+ "ipv4-oam-address": "example-ipv4-oam-address-val-79914",
+ "serial-number": "example-serial-number-val-79914",
+ "pserver-id": "example-pserver-id-val-79914",
+ "internet-topology": "example-internet-topology-val-79914",
+ "in-maint": true,
+ "resource-version": "1467994603",
+ "pserver-name2": "example-pserver-name2-val-79914",
+ "purpose": "example-purpose-val-79914"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/model-validation/instance-reader/expected-virtual-data-center.json b/src/test/resources/model-validation/instance-reader/expected-virtual-data-center.json
new file mode 100644
index 0000000..7445823
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/expected-virtual-data-center.json
@@ -0,0 +1,65 @@
+{
+ "virtual-data-center": {
+ "vdc-id": "vdc-01",
+ "vdc-name": "example-vdc-name-val-10107",
+ "resource-version": "1467975781"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "model-name": "Test LL Model Name",
+ "logical-link": {
+ "link-name": "example-link-name-val-23759",
+ "link-type": "example-link-type-val-23759",
+ "speed-value": "example-speed-value-val-23759",
+ "speed-units": "example-speed-units-val-23759",
+ "ip-version": "example-ip-version-val-23759",
+ "routing-protocol": "example-routing-protocol-val-23759",
+ "resource-version": "1467975786",
+ "persona-model-id": "example-persona-model-id-val-23759",
+ "persona-model-version": "example-persona-model-version-val-23759",
+ "widget-model-id": "example-widget-model-id-val-23759",
+ "widget-model-version": "example-widget-model-version-val-23759"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [
+ {
+ "pserver": {
+ "hostname": "example-hostname-val-79914",
+ "ptnii-equip-name": "example-ptnii-equip-name-val-79914",
+ "number-of-cpus": 79914,
+ "disk-in-gigabytes": 79914,
+ "ram-in-megabytes": 79914,
+ "equip-type": "example-equip-type-val-79914",
+ "equip-vendor": "example-equip-vendor-val-79914",
+ "equip-model": "example-equip-model-val-79914",
+ "fqdn": "example-fqdn-val-79914",
+ "pserver-selflink": "example-pserver-selflink-val-79914",
+ "ipv4-oam-address": "example-ipv4-oam-address-val-79914",
+ "serial-number": "example-serial-number-val-79914",
+ "pserver-id": "example-pserver-id-val-79914",
+ "internet-topology": "example-internet-topology-val-79914",
+ "in-maint": true,
+ "resource-version": "1467994603",
+ "pserver-name2": "example-pserver-name2-val-79914",
+ "purpose": "example-purpose-val-79914"
+ },
+ "extra-properties": {
+
+ },
+ "inventory-response-items": {
+
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/model-validation/instance-reader/model-instance-mapping-attributes.json_conf b/src/test/resources/model-validation/instance-reader/model-instance-mapping-attributes.json_conf
new file mode 100644
index 0000000..1abe24f
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/model-instance-mapping-attributes.json_conf
@@ -0,0 +1,12 @@
+[
+ {
+ "mappingType": "ATTRIBUTE",
+ "model": {
+ "value": "metadata/metadatum/metaname"
+ },
+ "instance": {
+ "origin": "$.inventory-response-item[0]",
+ "value": "$..extra-properties.metadatum[*].metaname"
+ }
+ }
+] \ No newline at end of file
diff --git a/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-missing.json_conf b/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-missing.json_conf
new file mode 100644
index 0000000..c8d5591
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-missing.json_conf
@@ -0,0 +1,16 @@
+[
+ {
+ "mappingType" : "RELATIONSHIP",
+ "model": {
+ "root": "model-elements/model-element",
+ "filter": {
+ "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']",
+ "valid": ["widget"]
+ },
+ "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']"
+ },
+ "instance": {
+ "origin": "$.inventory-response-item[0]"
+ }
+ }
+] \ No newline at end of file
diff --git a/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf b/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf
new file mode 100644
index 0000000..990d0c7
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf
@@ -0,0 +1,17 @@
+[
+ {
+ "mappingType" : "RELATIONSHIP",
+ "model": {
+ "root": "model-elements/model-element",
+ "filter": {
+ "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']",
+ "valid": ["widget"]
+ },
+ "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']"
+ },
+ "instance": {
+ "origin": "$.inventory-response-item[0]",
+ "root": "NOT_KNOWN"
+ }
+ }
+] \ No newline at end of file
diff --git a/src/test/resources/model-validation/instance-reader/model-instance-mapping.json_conf b/src/test/resources/model-validation/instance-reader/model-instance-mapping.json_conf
new file mode 100644
index 0000000..917c575
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/model-instance-mapping.json_conf
@@ -0,0 +1,17 @@
+[
+ {
+ "mappingType": "RELATIONSHIP",
+ "model": {
+ "root": "model-elements/model-element",
+ "filter": {
+ "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']",
+ "valid": ["widget"]
+ },
+ "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']"
+ },
+ "instance": {
+ "origin": "$.inventory-response-item[0]",
+ "root": "$.inventory-response-items.inventory-response-item[*]"
+ }
+ }
+] \ No newline at end of file
diff --git a/src/test/resources/model-validation/instance-reader/test-validation-service-beans.xml b/src/test/resources/model-validation/instance-reader/test-validation-service-beans.xml
new file mode 100644
index 0000000..baf07b2
--- /dev/null
+++ b/src/test/resources/model-validation/instance-reader/test-validation-service-beans.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============LICENSE_START===================================================
+Copyright (c) 2018 Amdocs
+============================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END=====================================================
+-->
+<!-- Used by TestInstanceReader.java -->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
+
+ <import resource="../../oxm-reader/oxm-reader-beans.xml" />
+
+ <bean id="jsonReader" class="org.onap.aai.validation.reader.JsonReader" />
+
+ <bean id="instanceReader" class="org.onap.aai.validation.modeldriven.validator.InstanceReader">
+ <constructor-arg ref="jsonReader" />
+ <constructor-arg ref="oxmReader" />
+ </bean>
+
+</beans> \ No newline at end of file