aboutsummaryrefslogtreecommitdiffstats
path: root/aai-schema-ingest/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'aai-schema-ingest/src/test/resources')
-rw-r--r--aai-schema-ingest/src/test/resources/edgeRules/containsValidationTest.json64
-rw-r--r--aai-schema-ingest/src/test/resources/edgeRules/cousinDefaultValidationTest.json112
-rw-r--r--aai-schema-ingest/src/test/resources/edgeRules/labelValidationTest1.json124
-rw-r--r--aai-schema-ingest/src/test/resources/edgeRules/labelValidationTest2.json52
-rw-r--r--aai-schema-ingest/src/test/resources/edgeRules/test3-butbad.json63
-rw-r--r--aai-schema-ingest/src/test/resources/oxm/badConfigForValidationTest_oxm.xml208
-rw-r--r--aai-schema-ingest/src/test/resources/oxm/goodConfigForValidationTest_oxm.xml296
7 files changed, 919 insertions, 0 deletions
diff --git a/aai-schema-ingest/src/test/resources/edgeRules/containsValidationTest.json b/aai-schema-ingest/src/test/resources/edgeRules/containsValidationTest.json
new file mode 100644
index 00000000..06e599b1
--- /dev/null
+++ b/aai-schema-ingest/src/test/resources/edgeRules/containsValidationTest.json
@@ -0,0 +1,64 @@
+{
+ "rules" : [
+ {
+ "from": "human",
+ "to": "monster",
+ "label": "fights",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "${direction}",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"valid set with one containment"
+ },
+ {
+ "from": "human",
+ "to": "monster",
+ "label": "avoids",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"valid set with one containment"
+ },
+ {
+ "from": "cheese",
+ "to": "bread",
+ "label": "eatenWith",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"valid set with no containment"
+ },
+ {
+ "from": "box",
+ "to": "cat",
+ "label": "contains",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "${direction}",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"invalid set with more than one containment"
+ },
+ {
+ "from": "box",
+ "to": "cat",
+ "label": "encapsulates",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "IN",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"invalid set with more than one containment"
+ }
+ ]
+} \ No newline at end of file
diff --git a/aai-schema-ingest/src/test/resources/edgeRules/cousinDefaultValidationTest.json b/aai-schema-ingest/src/test/resources/edgeRules/cousinDefaultValidationTest.json
new file mode 100644
index 00000000..1a5b8a9b
--- /dev/null
+++ b/aai-schema-ingest/src/test/resources/edgeRules/cousinDefaultValidationTest.json
@@ -0,0 +1,112 @@
+{
+ "rules" : [
+ {
+ "from": "human",
+ "to": "monster",
+ "label": "fights",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"valid set as cousin/contains have separate defaulting"
+ },
+ {
+ "from": "human",
+ "to": "monster",
+ "label": "builds",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "OUT",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"valid set as cousin/contains have separate defaulting"
+ },
+ {
+ "from": "boop",
+ "to": "beep",
+ "label": "isTransformedByRobotsInto",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"valid set with exactly 1 default"
+ },
+ {
+ "from": "boop",
+ "to": "beep",
+ "label": "yields",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "false",
+ "description":"valid set with exactly 1 default"
+ },
+ {
+ "from": "sheep",
+ "to": "wool",
+ "label": "produces",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"invalid set with multiple defaults"
+ },
+ {
+ "from": "wool",
+ "to": "sheep",
+ "label": "isShearedFrom",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"invalid set with multiple defaults"
+ },
+ {
+ "from": "cloth",
+ "to": "thread",
+ "label": "isWovenFrom",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "false",
+ "description":"invalid set with no defaults"
+ },
+ {
+ "from": "cloth",
+ "to": "thread",
+ "label": "unravelsTo",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "false",
+ "description":"invalid set with no defaults"
+ },
+ {
+ "from": "family",
+ "to": "baby",
+ "label": "raises",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "OUT",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"vacuously valid set (ie no cousin so doesn't even matter)"
+ }
+ ]
+} \ No newline at end of file
diff --git a/aai-schema-ingest/src/test/resources/edgeRules/labelValidationTest1.json b/aai-schema-ingest/src/test/resources/edgeRules/labelValidationTest1.json
new file mode 100644
index 00000000..1a5bd487
--- /dev/null
+++ b/aai-schema-ingest/src/test/resources/edgeRules/labelValidationTest1.json
@@ -0,0 +1,124 @@
+{
+ "rules": [
+ {
+ "from": "human",
+ "to": "monster",
+ "label": "fights",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of valid set"
+ },
+ {
+ "from": "monster",
+ "to": "human",
+ "label": "ignores",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of valid set"
+ },
+ {
+ "from": "human",
+ "to": "monster",
+ "label": "tames",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "OUT",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of valid set"
+ },
+ {
+ "from": "sphinx",
+ "to": "monster",
+ "label": "isA",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of invalid set - dup label, cousin and containment, from/to flipped"
+ },
+ {
+ "from": "sphinx",
+ "to": "monster",
+ "label": "isA",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "OUT",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of invalid set - dup label, cousin and containment, from/to flipped"
+ },
+ {
+ "from": "griffin",
+ "to": "hippogriff",
+ "label": "fliesPast",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "false",
+ "description":"will be part of invalid set - dup label, both cousins, from/to flipped"
+ },
+ {
+ "from": "hippogriff",
+ "to": "griffin",
+ "label": "fliesPast",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of invalid set - dup label, both cousins, from/to flipped"
+ },
+ {
+ "from": "human",
+ "to": "toaster",
+ "label": "owns",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "OUT",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of valid set (dup label (human owns) but on different pair so ok)"
+ },
+ {
+ "from": "badger",
+ "to": "mushroom",
+ "label": "onap.whatever.BindsTo",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of invalid set - full copy in file2"
+ },
+ {
+ "from": "lava",
+ "to": "floor",
+ "label": "is",
+ "direction": "IN",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of invalid set - dup in file2, contains and cousin, from/to flipped"
+ }
+ ]
+} \ No newline at end of file
diff --git a/aai-schema-ingest/src/test/resources/edgeRules/labelValidationTest2.json b/aai-schema-ingest/src/test/resources/edgeRules/labelValidationTest2.json
new file mode 100644
index 00000000..5743fbb9
--- /dev/null
+++ b/aai-schema-ingest/src/test/resources/edgeRules/labelValidationTest2.json
@@ -0,0 +1,52 @@
+{
+ "rules": [
+ {
+ "from": "human",
+ "to": "strange-and-interesting-plant",
+ "label": "owns",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "OUT",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of valid set (dup label (human owns) to stuff in file1, but different pair so ok)"
+ },
+ {
+ "from": "badger",
+ "to": "mushroom",
+ "label": "onap.whatever.BindsTo",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of invalid set - full copy in file2"
+ },
+ {
+ "from": "floor",
+ "to": "lava",
+ "label": "is",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of invalid set - dup in file2, contains and cousin, from/to flipped"
+ },
+ {
+ "from": "human",
+ "to": "toaster",
+ "label": "builds",
+ "direction": "OUT",
+ "multiplicity": "ONE2ONE",
+ "contains-other-v": "NONE",
+ "delete-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":"will be part of valid set across both files"
+ }
+ ]
+} \ No newline at end of file
diff --git a/aai-schema-ingest/src/test/resources/edgeRules/test3-butbad.json b/aai-schema-ingest/src/test/resources/edgeRules/test3-butbad.json
new file mode 100644
index 00000000..f20caebb
--- /dev/null
+++ b/aai-schema-ingest/src/test/resources/edgeRules/test3-butbad.json
@@ -0,0 +1,63 @@
+{
+ "rules": [
+ {
+ "from": "l-interface",
+ "to": "logical-link",
+ "label": "tosca.relationships.network.LinksTo",
+ "direction": "OUT",
+ "multiplicity": "MANY2MANY",
+ "contains-other-v": "NONE",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":""
+ },
+ {
+ "from": "logical-link",
+ "to": "l-interface",
+ "label": "org.onap.relationships.inventory.Source",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "!${direction}",
+ "prevent-delete": "NONE",
+ "default": "false",
+ "description":""
+ },
+ {
+ "from": "logical-link",
+ "to": "l-interface",
+ "label": "org.onap.relationships.inventory.Source",
+ "direction": "OUT",
+ "multiplicity": "ONE2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "!${direction}",
+ "prevent-delete": "NONE",
+ "default": "false",
+ "description":""
+ },
+ {
+ "from": "l-interface",
+ "to": "lag-interface",
+ "label": "org.onap.relationships.inventory.BelongsTo",
+ "direction": "OUT",
+ "multiplicity": "MANY2ONE",
+ "contains-other-v": "!${direction}",
+ "delete-other-v": "!${direction}",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":""
+ },
+ {
+ "from": "gooble",
+ "to": "logical-link",
+ "label": "org.onap.relationships.inventory.Uses",
+ "direction": "OUT",
+ "multiplicity": "MANY2MANY",
+ "contains-other-v": "NONE",
+ "delete-other-v": "${direction}",
+ "prevent-delete": "NONE",
+ "default": "true",
+ "description":""
+ }
+ ]
+} \ No newline at end of file
diff --git a/aai-schema-ingest/src/test/resources/oxm/badConfigForValidationTest_oxm.xml b/aai-schema-ingest/src/test/resources/oxm/badConfigForValidationTest_oxm.xml
new file mode 100644
index 00000000..7b13262a
--- /dev/null
+++ b/aai-schema-ingest/src/test/resources/oxm/badConfigForValidationTest_oxm.xml
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ ============LICENSE_START=======================================================
+ org.openecomp.aai
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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=========================================================
+ -->
+
+<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v12" xml-mapping-metadata-complete="true">
+ <xml-schema element-form-default="QUALIFIED">
+ <xml-ns namespace-uri="http://org.onap.aai.inventory/v12" />
+ </xml-schema>
+ <java-types>
+ <java-type name="LogicalLink">
+ <xml-root-element name="logical-link" />
+ <java-attributes>
+ <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true">
+ <xml-properties>
+ <xml-property name="description" value="e.g., evc-name, or vnf-nameA_interface-nameA_vnf-nameZ_interface-nameZ" />
+ </xml-properties>
+ </xml-element>
+ <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean">
+ <xml-properties>
+ <xml-property name="defaultValue" value="false"/>
+ <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="linkType" name="link-type" required="true" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Type of logical link, e.g., evc" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Captures the numeric part of the speed" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Captures the units corresponding to the speed" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="v4, v6, or ds for dual stack (should be att-ip-version)" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="routingProtocol" name="routing-protocol" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="For example, static or BGP" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="the ASDC model id for this resource or service model." />
+ <xml-property name="visibility" value="deployment" />
+ <xml-property name="requires" value="model-version-id" />
+ <xml-property name="dbAlias" value="model-invariant-id-local" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="the ASDC model version for this resource or service model." />
+ <xml-property name="visibility" value="deployment" />
+ <xml-property name="requires" value="model-invariant-id" />
+ <xml-property name="dbAlias" value="model-version-id-local" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="the ASDC model version for this resource or service model." />
+ <xml-property name="visibility" value="internal" />
+ <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&amp;AI widget." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&amp;AI version of the widget." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Indication of operational status of the logical link." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="linkRole" name="link-role" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Indication of the network use of the logical link." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="linkName2" name="link-name2" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Alias or alternate name (CLCI or D1 name)." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="linkId" name="link-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="UUID of the logical-link, SDNC generates this." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="circuitId" name="circuit-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Circuit id" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="purpose" name="purpose" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Reason for this entity, role it is playing" />
+ </xml-properties>
+ </xml-element>
+ </java-attributes>
+ <xml-properties>
+ <xml-property name="description" value="Logical links generally connect l-interfaces but are used to express logical connectivity between two points" />
+ <xml-property name="indexedProps" value="link-name,model-invariant-id,model-version-id,widget-model-id,widget-model-version,link-id,prov-status,circuit-id,purpose" />
+ <xml-property name="uniqueProps" value="link-id" />
+ <xml-property name="container" value="logical-links" />
+ <xml-property name="namespace" value="network" />
+ <xml-property name="searchable" value="link-name" />
+ </xml-properties>
+ </java-type>
+
+ <java-type name="LagInterface">
+ <xml-root-element name="lag-interface" />
+ <java-attributes>
+ <xml-element java-attribute="scooble" name="scooble" required="true" type="java.lang.String" xml-key="true">
+ <xml-properties>
+ <xml-property name="description" value="Name that identifies the link aggregate interface" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="aThing" name="a-thing" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Human friendly text regarding this interface." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Captures the numeric part of the speed" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Captures the units corresponding to the speed" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="imAChange" name="im-a-change" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="ID of interface" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Role assigned to this Interface, should use values as defined in ECOMP Yang models." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." />
+ </xml-properties>
+ </xml-element>
+ <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean">
+ <xml-properties>
+ <xml-property name="defaultValue" value="false"/>
+ <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)" />
+ </xml-properties>
+ </xml-element>
+ </java-attributes>
+ <xml-properties>
+ <xml-property name="description" value="Link aggregate interface" />
+ <xml-property name="indexedProps" value="interface-name,interface-id,interface-role" />
+ <xml-property name="dependentOn" value="generic-vnf,pserver,vpls-pe,pnf" />
+ <xml-property name="container" value="lag-interfaces" />
+ </xml-properties>
+ </java-type>
+ </java-types>
+</xml-bindings> \ No newline at end of file
diff --git a/aai-schema-ingest/src/test/resources/oxm/goodConfigForValidationTest_oxm.xml b/aai-schema-ingest/src/test/resources/oxm/goodConfigForValidationTest_oxm.xml
new file mode 100644
index 00000000..b3da71d8
--- /dev/null
+++ b/aai-schema-ingest/src/test/resources/oxm/goodConfigForValidationTest_oxm.xml
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ ============LICENSE_START=======================================================
+ org.openecomp.aai
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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=========================================================
+ -->
+
+<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v12" xml-mapping-metadata-complete="true">
+ <xml-schema element-form-default="QUALIFIED">
+ <xml-ns namespace-uri="http://org.onap.aai.inventory/v12" />
+ </xml-schema>
+ <java-types>
+ <java-type name="LogicalLink">
+ <xml-root-element name="logical-link" />
+ <java-attributes>
+ <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true">
+ <xml-properties>
+ <xml-property name="description" value="e.g., evc-name, or vnf-nameA_interface-nameA_vnf-nameZ_interface-nameZ" />
+ </xml-properties>
+ </xml-element>
+ <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean">
+ <xml-properties>
+ <xml-property name="defaultValue" value="false"/>
+ <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="linkType" name="link-type" required="true" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Type of logical link, e.g., evc" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Captures the numeric part of the speed" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Captures the units corresponding to the speed" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="v4, v6, or ds for dual stack (should be att-ip-version)" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="routingProtocol" name="routing-protocol" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="For example, static or BGP" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="the ASDC model id for this resource or service model." />
+ <xml-property name="visibility" value="deployment" />
+ <xml-property name="requires" value="model-version-id" />
+ <xml-property name="dbAlias" value="model-invariant-id-local" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="the ASDC model version for this resource or service model." />
+ <xml-property name="visibility" value="deployment" />
+ <xml-property name="requires" value="model-invariant-id" />
+ <xml-property name="dbAlias" value="model-version-id-local" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="the ASDC model version for this resource or service model." />
+ <xml-property name="visibility" value="internal" />
+ <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&amp;AI widget." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&amp;AI version of the widget." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Indication of operational status of the logical link." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="linkRole" name="link-role" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Indication of the network use of the logical link." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="linkName2" name="link-name2" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Alias or alternate name (CLCI or D1 name)." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="linkId" name="link-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="UUID of the logical-link, SDNC generates this." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="circuitId" name="circuit-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Circuit id" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="purpose" name="purpose" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Reason for this entity, role it is playing" />
+ </xml-properties>
+ </xml-element>
+ </java-attributes>
+ <xml-properties>
+ <xml-property name="description" value="Logical links generally connect l-interfaces but are used to express logical connectivity between two points" />
+ <xml-property name="indexedProps" value="link-name,model-invariant-id,model-version-id,widget-model-id,widget-model-version,link-id,prov-status,circuit-id,purpose" />
+ <xml-property name="uniqueProps" value="link-id" />
+ <xml-property name="container" value="logical-links" />
+ <xml-property name="namespace" value="network" />
+ <xml-property name="searchable" value="link-name" />
+ </xml-properties>
+ </java-type>
+ <java-type name="LInterface">
+ <xml-root-element name="l-interface" />
+ <java-attributes>
+ <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true">
+ <xml-properties>
+ <xml-property name="description" value="Name given to the interface" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="E.g., CUSTOMER, UPLINK, etc." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="v6WanLinkIp" name="v6-wan-link-ip" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Questionably placed - v6 ip addr of this interface (is in vr-lan-interface from Mary B." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="selflink" name="selflink" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="URL to endpoint where AAI can get more details" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="interfaceId" name="interface-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="ID of interface" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="macaddr" name="macaddr" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="MAC address for the interface" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="networkName" name="network-name" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Name of the network" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Whether A&amp;AI should be managing this interface of not. Could have value like CUSTOMER" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="interfaceDescription" name="interface-description" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Human friendly text regarding this interface." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="isPortMirrored" name="is-port-mirrored" required="true" type="java.lang.Boolean">
+ <xml-properties>
+ <xml-property name="defaultValue" value="false"/>
+ <xml-property name="description" value="boolean indicatating whether or not port is a mirrored." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." />
+ </xml-properties>
+ </xml-element>
+ <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean">
+ <xml-properties>
+ <xml-property name="defaultValue" value="false"/>
+ <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Prov Status of the logical interface. Valid values [PREPROV/NVTPROV/PROV]." />
+ </xml-properties>
+ </xml-element>
+ <xml-element default-value="false" java-attribute="isIpUnnumbered" name="is-ip-unnumbered" required="true" type="java.lang.Boolean">
+ <xml-properties>
+ <xml-property name="defaultValue" value="false"/>
+ <xml-property name="description" value="Flag indicating the interface uses the IP Unnumbered configuration." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="allowedAddressPairs" name="allowed-address-pairs" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Freeform field for storing an ip address, list of ip addresses or a subnet block." />
+ </xml-properties>
+ </xml-element>
+ </java-attributes>
+ <xml-properties>
+ <xml-property name="description" value="Logical interfaces, e.g., a vnic." />
+ <xml-property name="indexedProps" value="macaddr,interface-id,interface-name,network-name" />
+ <xml-property name="dependentOn" value="generic-vnf,newvce,p-interface,vserver,lag-interface" />
+ <xml-property name="container" value="l-interfaces" />
+ </xml-properties>
+ </java-type>
+ <java-type name="LagInterface">
+ <xml-root-element name="lag-interface" />
+ <java-attributes>
+ <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true">
+ <xml-properties>
+ <xml-property name="description" value="Name that identifies the link aggregate interface" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="interfaceDescription" name="interface-description" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Human friendly text regarding this interface." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Captures the numeric part of the speed" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Captures the units corresponding to the speed" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="interfaceId" name="interface-id" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="ID of interface" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Role assigned to this Interface, should use values as defined in ECOMP Yang models." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." />
+ </xml-properties>
+ </xml-element>
+ <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean">
+ <xml-properties>
+ <xml-property name="defaultValue" value="false"/>
+ <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)" />
+ </xml-properties>
+ </xml-element>
+ </java-attributes>
+ <xml-properties>
+ <xml-property name="description" value="Link aggregate interface" />
+ <xml-property name="indexedProps" value="interface-name,interface-id,interface-role" />
+ <xml-property name="dependentOn" value="generic-vnf,pserver,vpls-pe,pnf" />
+ <xml-property name="container" value="lag-interfaces" />
+ </xml-properties>
+ </java-type>
+ </java-types>
+</xml-bindings> \ No newline at end of file