diff options
Diffstat (limited to 'sparkybe-onap-application')
10 files changed, 39 insertions, 18 deletions
diff --git a/sparkybe-onap-application/config/application-oxm-default.properties b/sparkybe-onap-application/config/application-oxm-default.properties new file mode 100644 index 0000000..5c362d8 --- /dev/null +++ b/sparkybe-onap-application/config/application-oxm-default.properties @@ -0,0 +1 @@ +oxm.apiVersion=v14
\ No newline at end of file diff --git a/sparkybe-onap-application/config/application-oxm-override.properties b/sparkybe-onap-application/config/application-oxm-override.properties index 1fa006e..e795b1f 100644 --- a/sparkybe-onap-application/config/application-oxm-override.properties +++ b/sparkybe-onap-application/config/application-oxm-override.properties @@ -1 +1 @@ -oxm.apiVersionOverride=V11
\ No newline at end of file +oxm.apiVersion=v11
\ No newline at end of file diff --git a/sparkybe-onap-application/config/application-oxm-schema-dev.properties b/sparkybe-onap-application/config/application-oxm-schema-dev.properties index 66efe1d..332fe75 100644 --- a/sparkybe-onap-application/config/application-oxm-schema-dev.properties +++ b/sparkybe-onap-application/config/application-oxm-schema-dev.properties @@ -1 +1 @@ -oxm.schemaNodeDir=${APP_HOME}/target/oxm
\ No newline at end of file +oxm.schemaNodeDir=${APP_HOME}/target/oxm/onap/oxm
\ No newline at end of file diff --git a/sparkybe-onap-application/config/application-oxm-schema-prod.properties b/sparkybe-onap-application/config/application-oxm-schema-prod.properties index 111a63f..79cb12a 100644 --- a/sparkybe-onap-application/config/application-oxm-schema-prod.properties +++ b/sparkybe-onap-application/config/application-oxm-schema-prod.properties @@ -1 +1 @@ -oxm.schemaNodeDir=${APP_HOME}/oxm
\ No newline at end of file +oxm.schemaNodeDir=${APP_HOME}/onap/oxm
\ No newline at end of file diff --git a/sparkybe-onap-application/config/schemaIngest.properties b/sparkybe-onap-application/config/schemaIngest.properties index 4d06763..1f5a13a 100644 --- a/sparkybe-onap-application/config/schemaIngest.properties +++ b/sparkybe-onap-application/config/schemaIngest.properties @@ -1,7 +1,21 @@ # Properties for the SchemaLocationsBean -# The AAI Schema jar will be unpacked -schemaConfig=NA # Files named aai_oxm_v*.xml are unpacked here: nodeDir=${oxm.schemaNodeDir} # Dummy folder/directory: -edgeDir=
\ No newline at end of file +edgeDir= + +# New propterties required by the aai-common - aai-schema-ingest lib as of 1.3.0 +schema.configuration.location=N/A +schema.nodes.location=${oxm.schemaNodeDir} +schema.edges.location= +# These versions need to exist if they are included in the list +schema.version.list=v8,v9,v10,v11,v12,v13,v14 +# Decalares the oxm version to load +schema.version.api.default=${oxm.apiVersion} + +# Setting this values to ${oxm.apiVersion} only to ensure the value used exists (we don't use this properties in our application) +schema.version.depth.start=${oxm.apiVersion} +schema.version.related.link.start=${oxm.apiVersion} +schema.version.app.root.start=${oxm.apiVersion} +schema.version.namespace.change.start=${oxm.apiVersion} +schema.version.edge.label.start=${oxm.apiVersion}
\ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-oxm-default.xml b/sparkybe-onap-application/config/spring-beans/sparky-oxm-default.xml index 98ce1ad..b44d626 100644 --- a/sparkybe-onap-application/config/spring-beans/sparky-oxm-default.xml +++ b/sparkybe-onap-application/config/spring-beans/sparky-oxm-default.xml @@ -3,11 +3,12 @@ xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - + <bean id="oxmModelLoader" class="org.onap.aai.sparky.config.oxm.OxmModelLoader" init-method="loadModel"> <constructor-arg ref="oxmModelProcessorSet" /> <constructor-arg ref="nodeIngestor" /> + <constructor-arg ref="schemaVersions" /> </bean> </beans>
\ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-oxm-override.xml b/sparkybe-onap-application/config/spring-beans/sparky-oxm-override.xml index 5c6839b..3c2d76b 100644 --- a/sparkybe-onap-application/config/spring-beans/sparky-oxm-override.xml +++ b/sparkybe-onap-application/config/spring-beans/sparky-oxm-override.xml @@ -6,7 +6,7 @@ <bean id="oxmModelLoader" class="org.onap.aai.sparky.config.oxm.OxmModelLoader" init-method="loadModel"> - <constructor-arg name="apiVersionOverride" value="${oxm.apiVersionOverride}" /> + <constructor-arg name="apiVersionOverride" value="${oxm.apiVersion}" /> <constructor-arg ref="oxmModelProcessorSet" /> <constructor-arg ref="nodeIngestor" /> </bean> diff --git a/sparkybe-onap-application/config/spring-beans/sparky-oxm.xml b/sparkybe-onap-application/config/spring-beans/sparky-oxm.xml index fe1eab0..c392153 100644 --- a/sparkybe-onap-application/config/spring-beans/sparky-oxm.xml +++ b/sparkybe-onap-application/config/spring-beans/sparky-oxm.xml @@ -42,9 +42,13 @@ <property name="edgeDirectory" value="${edgeDir}" /> </bean> - <bean id="oxmConfigTranslator" class="org.onap.aai.sparky.config.oxm.OxmConfigTranslator"> - <constructor-arg ref="schemaLocationsBean" /> + <bean id="schemaVersions" class="org.onap.aai.setup.SchemaVersions"/> + + <bean id="oxmConfigTranslator" class="org.onap.aai.setup.AAIConfigTranslator"> + <constructor-arg ref="schemaLocationsBean" /> + <constructor-arg ref="schemaVersions" /> </bean> + <bean id="nodeIngestor" class="org.onap.aai.nodes.NodeIngestor"> <constructor-arg ref="oxmConfigTranslator" /> </bean> diff --git a/sparkybe-onap-application/pom.xml b/sparkybe-onap-application/pom.xml index 8472544..86de773 100644 --- a/sparkybe-onap-application/pom.xml +++ b/sparkybe-onap-application/pom.xml @@ -26,9 +26,10 @@ <config-home>${basedir}/</config-home> <docker.location>${basedir}/target</docker.location> <docker.image.name>sparky-be</docker.image.name> - <version.aai-schema>1.2.4</version.aai-schema> + <version.aai-schema>1.3.0-SNAPSHOT</version.aai-schema> <sitePath>/content/sites/site/org/onap/aai/sparky-be/${project.artifactId}/${project.version}</sitePath> <nexusproxy>https://nexus.onap.org</nexusproxy> + <shemaUnpackVersion>onap</shemaUnpackVersion> </properties> <dependencyManagement> @@ -612,8 +613,8 @@ <include>src/main/java/**</include> </includes> </configuration> <executions> <execution> <goals> <goal>format</goal> </goals> <phase>process-sources</phase> </execution> </executions> </plugin> --> - - <plugin> + + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> @@ -630,15 +631,15 @@ <artifactId>aai-schema</artifactId> <version>${version.aai-schema}</version> <type>jar</type> - <includes>oxm/</includes> - <outputDirectory>${project.build.directory}/</outputDirectory> + <includes>/${shemaUnpackVersion}/oxm/</includes> + <outputDirectory>${project.build.directory}/oxm</outputDirectory> </artifactItem> </artifactItems> </configuration> </execution> </executions> - </plugin> - + </plugin> + </plugins> </build> diff --git a/sparkybe-onap-application/src/main/docker/Dockerfile b/sparkybe-onap-application/src/main/docker/Dockerfile index eda77fa..53dc9c3 100644 --- a/sparkybe-onap-application/src/main/docker/Dockerfile +++ b/sparkybe-onap-application/src/main/docker/Dockerfile @@ -25,7 +25,7 @@ ADD scripts/* $MICRO_HOME/bin/ COPY static/ $MICRO_HOME/static/ COPY config/ $MICRO_HOME/config/ -COPY oxm $MICRO_HOME/oxm/ +COPY oxm $MICRO_HOME/ RUN chmod 755 $MICRO_HOME/bin/* RUN chmod 755 $MICRO_HOME/lib/* |