summaryrefslogtreecommitdiffstats
path: root/src/test/resources
diff options
context:
space:
mode:
authormark.j.leonard <mark.j.leonard@gmail.com>2019-01-15 10:34:53 +0000
committermark.j.leonard <mark.j.leonard@gmail.com>2019-01-16 13:38:29 +0000
commit715e009fa1b0b148fc64f8cf1bc2f536e4e2cb23 (patch)
treed0e126ba6052557a49f7e9a11f820b7946a5266a /src/test/resources
parentc7e9ff11f28009c4fbc13f7ed1a3ffbb765d358b (diff)
Update to aai-schema-ingest version 1.4.1
Using SNAPSHOT version (as 1.4.1 is not released) Change-Id: I3b5959cb2d43840556a628db8fe17701d36aa6f9 Issue-ID: AAI-2077 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
Diffstat (limited to 'src/test/resources')
-rw-r--r--src/test/resources/model-validation/instance-validator/schemaIngest.properties36
-rw-r--r--src/test/resources/oxm-reader/multiple/test_business_v10.xml47
-rw-r--r--src/test/resources/oxm-reader/multiple/test_business_v13.xml42
-rw-r--r--src/test/resources/oxm-reader/multiple/test_network_v10.xml48
-rw-r--r--src/test/resources/oxm-reader/multiple/test_network_v13.xml73
-rw-r--r--src/test/resources/oxm-reader/oxm-reader-beans.xml35
-rw-r--r--src/test/resources/oxm-reader/schemaIngest.properties50
-rw-r--r--src/test/resources/oxm-reader/single/aai_oxm_v0.xml23
-rw-r--r--src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml23
-rw-r--r--src/test/resources/oxm-reader/single/dbedgerules/v10/DbEdgeRules_test_v10_edges.json (renamed from src/test/resources/oxm-reader/single/test_v10_edges.json)0
-rw-r--r--src/test/resources/oxm-reader/single/oxm/v10/aai_oxm_v10.xml (renamed from src/test/resources/oxm-reader/single/aai_oxm_v10.xml)0
-rw-r--r--src/test/resources/oxm-reader/single/oxm/v8/aai_oxm_v8.xml (renamed from src/test/resources/oxm-reader/single/aai_oxm_v8.xml)0
-rw-r--r--src/test/resources/oxm-reader/single/oxm/v9/aai_oxm_v9.xml (renamed from src/test/resources/oxm-reader/single/aai_oxm_v9.xml)0
13 files changed, 73 insertions, 304 deletions
diff --git a/src/test/resources/model-validation/instance-validator/schemaIngest.properties b/src/test/resources/model-validation/instance-validator/schemaIngest.properties
index 3e295d0..8df810a 100644
--- a/src/test/resources/model-validation/instance-validator/schemaIngest.properties
+++ b/src/test/resources/model-validation/instance-validator/schemaIngest.properties
@@ -14,7 +14,35 @@
# limitations under the License.
# ============LICENSE_END=====================================================
-# Test properties for the org.onap.aai.setup.SchemaLocationsBean
-schemaConfig=NA
-nodeDir=src/test/resources/oxm-reader/single/
-edgeDir=src/test/resources/oxm-reader/single/ \ No newline at end of file
+# Properties for the org.onap.aai.setup.SchemaLocationsBean
+# Schema related attributes for the oxm and edges
+# Any additional schema related attributes should start with prefix schema
+schema.configuration.location=N/A
+schema.nodes.location=src/test/resources/oxm-reader/single/oxm
+schema.edges.location=src/test/resources/oxm-reader/single/dbedgerules
+
+# Schema Version Related Attributes
+
+# Lists all of the versions in the schema
+schema.version.list=v8,v9,v10
+# Specifies from which version should the depth parameter to default to zero
+schema.version.depth.start=v9
+# Specifies from which version should the related link be displayed in response payload
+schema.version.related.link.start=v10
+# Specifies from which version should the client see only the uri excluding host info
+# Before this version server base will also be included
+schema.version.app.root.start=v10
+# Specifies from which version should the namespace be changed
+schema.version.namespace.change.start=v10
+# Specifies from which version should the client start seeing the edge label in payload
+schema.version.edge.label.start=v10
+# Specifies the version that the application should default to
+schema.version.api.default=v9
+
+schema.service.base.url=https://localhost:8452/aai/schema-service/v1/
+schema.service.nodes.endpoint=nodes?version=
+schema.service.edges.endpoint=edgerules?version=
+schema.service.versions.endpoint=versions
+
+schema.service.ssl.key-store=src/integration-test/resources/authentication/aai-client-cert.p12
+schema.service.ssl.trust-store=src/integration-test/resources/authentication/tomcat_keystore
diff --git a/src/test/resources/oxm-reader/multiple/test_business_v10.xml b/src/test/resources/oxm-reader/multiple/test_business_v10.xml
deleted file mode 100644
index f0dc93f..0000000
--- a/src/test/resources/oxm-reader/multiple/test_business_v10.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============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=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.business.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="Bar">
- <xml-root-element name="bar" />
- <java-attributes>
- <xml-element java-attribute="barId" name="bar-id" required="true" type="java.lang.String" xml-key="true">
- <xml-properties>
- <xml-property name="description" value="Unique id of Bar This is unique across the graph." />
- </xml-properties>
- </xml-element>
- <xml-element java-attribute="quantity" name="quantity" required="false" type="java.lang.Integer">
- <xml-properties>
- <xml-property name="description" value="How many." />
- </xml-properties>
- </xml-element>
-
- </java-attributes>
- <xml-properties>
- <xml-property name="description" value="General purpose metasyntactic variable" />
- <xml-property name="uniqueProps" value="bar-id" />
- </xml-properties>
- </java-type>
-
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/multiple/test_business_v13.xml b/src/test/resources/oxm-reader/multiple/test_business_v13.xml
deleted file mode 100644
index 2529c6d..0000000
--- a/src/test/resources/oxm-reader/multiple/test_business_v13.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============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=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.business.v13" xml-mapping-metadata-complete="true">
- <xml-schema element-form-default="QUALIFIED">
- <xml-ns namespace-uri="http://org.onap.aai.inventory/v13" />
- </xml-schema>
- <java-types>
-
- <java-type name="Bar">
- <xml-root-element name="bar" />
- <java-attributes>
- <xml-element java-attribute="barId" name="bar-id" required="true" type="java.lang.String" xml-key="true">
- <xml-properties>
- <xml-property name="description" value="Unique id of Bar This is unique across the graph." />
- </xml-properties>
- </xml-element>
-
- </java-attributes>
- <xml-properties>
- <xml-property name="description" value="General purpose metasyntactic variable" />
- <xml-property name="uniqueProps" value="bar-id" />
- </xml-properties>
- </java-type>
-
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/multiple/test_network_v10.xml b/src/test/resources/oxm-reader/multiple/test_network_v10.xml
deleted file mode 100644
index 9767de6..0000000
--- a/src/test/resources/oxm-reader/multiple/test_network_v10.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============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=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.network.v10" 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="Foo">
- <xml-root-element name="foo" />
- <java-attributes>
- <xml-element java-attribute="fooId" name="foo-id" required="true" type="java.lang.String" xml-key="true">
- <xml-properties>
- <xml-property name="description" value="Unique id of Foo. This is unique across the graph." />
- </xml-properties>
- </xml-element>
- <xml-element java-attribute="fooName" name="foo-name" required="true" type="java.lang.String">
- <xml-properties>
- <xml-property name="description" value="Name of Foo." />
- </xml-properties>
- </xml-element>
-
- </java-attributes>
- <xml-properties>
- <xml-property name="description" value="General purpose metasyntactic variable" />
- <xml-property name="nameProps" value="foo-name" />
- <xml-property name="uniqueProps" value="foo-id" />
- </xml-properties>
- </java-type>
-
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/multiple/test_network_v13.xml b/src/test/resources/oxm-reader/multiple/test_network_v13.xml
deleted file mode 100644
index 892f626..0000000
--- a/src/test/resources/oxm-reader/multiple/test_network_v13.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============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=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.network.v13" xml-mapping-metadata-complete="true">
- <xml-schema element-form-default="QUALIFIED">
- <xml-ns namespace-uri="http://org.onap.aai.inventory/v13" />
- </xml-schema>
- <java-types>
-
- <java-type name="Foo">
- <xml-root-element name="foo" />
- <java-attributes>
- <xml-element java-attribute="fooId" name="foo-id" required="true" type="java.lang.String" xml-key="true">
- <xml-properties>
- <xml-property name="description" value="Unique id of Foo. This is unique across the graph." />
- </xml-properties>
- </xml-element>
- <xml-element java-attribute="fooName" name="foo-name" required="true" type="java.lang.String">
- <xml-properties>
- <xml-property name="description" value="Name of Foo." />
- </xml-properties>
- </xml-element>
- <xml-element java-attribute="quantity" name="quantity" required="false" type="java.lang.String">
- <xml-properties>
- <xml-property name="description" value="How many." />
- </xml-properties>
- </xml-element>
-
- </java-attributes>
- <xml-properties>
- <xml-property name="description" value="General purpose metasyntactic variable" />
- <xml-property name="nameProps" value="foo-name" />
- <xml-property name="uniqueProps" value="foo-id" />
- </xml-properties>
- </java-type>
-
- <java-type name="Quux">
- <xml-root-element name="quux" />
- <java-attributes>
- <xml-element java-attribute="qManagerName" name="q-manager-name" required="true" type="java.lang.String" xml-key="true">
- <xml-properties>
- <xml-property name="description" value="Unique id of Quux owner. This is unique across the graph." />
- </xml-properties>
- </xml-element>
- <xml-element java-attribute="color" name="color" required="false" type="java.lang.String">
- <xml-properties>
- <xml-property name="description" value="color" />
- </xml-properties>
- </xml-element>
-
- </java-attributes>
- <xml-properties>
- <xml-property name="description" value="General purpose metasyntactic variable" />
- </xml-properties>
- </java-type>
-
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/oxm-reader-beans.xml b/src/test/resources/oxm-reader/oxm-reader-beans.xml
index c9f064a..93a2ff7 100644
--- a/src/test/resources/oxm-reader/oxm-reader-beans.xml
+++ b/src/test/resources/oxm-reader/oxm-reader-beans.xml
@@ -1,40 +1,25 @@
<?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=====================================================
--->
<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">
- <bean id="schemaLocationsBean" class="org.onap.aai.setup.SchemaLocationsBean" />
+ <bean id="schemaLocationsBean" class="org.onap.aai.setup.SchemaLocationsBean" />
- <bean id="configTranslator" class="org.onap.aai.validation.reader.OxmConfigTranslator">
- <constructor-arg ref="schemaLocationsBean" />
- </bean>
+ <bean id="schemaVersionsBean" class="org.onap.aai.setup.SchemaVersions" />
- <bean id="nodeIngestor" class="org.onap.aai.nodes.NodeIngestor">
- <constructor-arg ref="configTranslator" />
- </bean>
+ <bean id="configTranslator" class="org.onap.aai.setup.AAIConfigTranslator" />
+
+ <bean id="nodeIngestor" class="org.onap.aai.nodes.NodeIngestor" />
+ <bean id="schemaVersionBean" class="org.onap.aai.setup.SchemaVersion">
+ <constructor-arg value="${schema.version.api.default}" />
+ </bean>
+
<bean id="oxmReader" class="org.onap.aai.validation.reader.OxmReader" init-method="init">
<constructor-arg ref="nodeIngestor" />
- <constructor-arg value="V9" />
+ <constructor-arg ref="schemaVersionBean" />
</bean>
</beans>
diff --git a/src/test/resources/oxm-reader/schemaIngest.properties b/src/test/resources/oxm-reader/schemaIngest.properties
index bb1027e..43e755b 100644
--- a/src/test/resources/oxm-reader/schemaIngest.properties
+++ b/src/test/resources/oxm-reader/schemaIngest.properties
@@ -1,20 +1,32 @@
-# ============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=====================================================
+# Properties for the org.onap.aai.setup.SchemaLocationsBean
+# Schema related attributes for the oxm and edges
+# Any additional schema related attributes should start with prefix schema
+schema.configuration.location=N/A
+schema.nodes.location=src/test/resources/oxm-reader/single/oxm
+schema.edges.location=src/test/resources/oxm-reader/single/dbedgerules
-# Test properties for the org.onap.aai.setup.SchemaLocationsBean
-schemaConfig=NA
-nodeDir=src/test/resources/oxm-reader/single/
-edgeDir=src/test/resources/oxm-reader/single/ \ No newline at end of file
+# Schema Version Related Attributes
+
+# Lists all of the versions in the schema
+schema.version.list=v8,v9,v10
+# Specifies from which version should the depth parameter to default to zero
+schema.version.depth.start=v9
+# Specifies from which version should the related link be displayed in response payload
+schema.version.related.link.start=v10
+# Specifies from which version should the client see only the uri excluding host info
+# Before this version server base will also be included
+schema.version.app.root.start=v10
+# Specifies from which version should the namespace be changed
+schema.version.namespace.change.start=v10
+# Specifies from which version should the client start seeing the edge label in payload
+schema.version.edge.label.start=v10
+# Specifies the version that the application should default to
+schema.version.api.default=v9
+
+schema.service.base.url=https://localhost:8452/aai/schema-service/v1/
+schema.service.nodes.endpoint=nodes?version=
+schema.service.edges.endpoint=edgerules?version=
+schema.service.versions.endpoint=versions
+
+schema.service.ssl.key-store=appconfig-local/auth/aai-client-cert.p12
+schema.service.ssl.trust-store=appconfig-local/auth/tomcat_keystore \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v0.xml b/src/test/resources/oxm-reader/single/aai_oxm_v0.xml
deleted file mode 100644
index ffab598..0000000
--- a/src/test/resources/oxm-reader/single/aai_oxm_v0.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============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=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v9" xml-mapping-metadata-complete="true">
- <xml-schema element-form-default="QUALIFIED">
- <xml-ns namespace-uri="http://org.openecomp.aai.inventory/v9" />
- </xml-schema>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml b/src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml
deleted file mode 100644
index ffab598..0000000
--- a/src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============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=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v9" xml-mapping-metadata-complete="true">
- <xml-schema element-form-default="QUALIFIED">
- <xml-ns namespace-uri="http://org.openecomp.aai.inventory/v9" />
- </xml-schema>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/single/test_v10_edges.json b/src/test/resources/oxm-reader/single/dbedgerules/v10/DbEdgeRules_test_v10_edges.json
index e69de29..e69de29 100644
--- a/src/test/resources/oxm-reader/single/test_v10_edges.json
+++ b/src/test/resources/oxm-reader/single/dbedgerules/v10/DbEdgeRules_test_v10_edges.json
diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v10.xml b/src/test/resources/oxm-reader/single/oxm/v10/aai_oxm_v10.xml
index b4c880a..b4c880a 100644
--- a/src/test/resources/oxm-reader/single/aai_oxm_v10.xml
+++ b/src/test/resources/oxm-reader/single/oxm/v10/aai_oxm_v10.xml
diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v8.xml b/src/test/resources/oxm-reader/single/oxm/v8/aai_oxm_v8.xml
index 40939a4..40939a4 100644
--- a/src/test/resources/oxm-reader/single/aai_oxm_v8.xml
+++ b/src/test/resources/oxm-reader/single/oxm/v8/aai_oxm_v8.xml
diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v9.xml b/src/test/resources/oxm-reader/single/oxm/v9/aai_oxm_v9.xml
index 6fe7379..6fe7379 100644
--- a/src/test/resources/oxm-reader/single/aai_oxm_v9.xml
+++ b/src/test/resources/oxm-reader/single/oxm/v9/aai_oxm_v9.xml