From 46961c4794a17f72643bd491af6c159ea7e53380 Mon Sep 17 00:00:00 2001 From: Harish Venkata Kajur Date: Tue, 18 Aug 2020 14:16:10 -0400 Subject: Update schema service to support v20 Issue-ID: AAI-3017 Change-Id: If46a1bfafbd2edb73cd7d3832468c06fac855911 Signed-off-by: Harish Venkata Kajur --- .../resources/config/schemaIngest.properties | 130 ++++----- components/aai-data-router/values.yaml | 2 + .../config/application.properties | 5 +- components/aai-schema-service/config/logback.xml | 296 ++++++++++++--------- components/aai-schema-service/values.yaml | 2 +- values.yaml | 4 +- 6 files changed, 250 insertions(+), 189 deletions(-) diff --git a/components/aai-data-router/resources/config/schemaIngest.properties b/components/aai-data-router/resources/config/schemaIngest.properties index f98ddce..b94ce51 100644 --- a/components/aai-data-router/resources/config/schemaIngest.properties +++ b/components/aai-data-router/resources/config/schemaIngest.properties @@ -1,65 +1,65 @@ -# -# ============LICENSE_START======================================================= -# org.onap.aai -# ================================================================================ -# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. -# Copyright © 2017-2018 Amdocs -# Modifications Copyright © 2018 Bell Canada -# ================================================================================ -# 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 SchemaLocationsBean -# Files named aai_oxm_v*.xml are unpacked here: -nodeDir=/opt/app/data-router/onap/oxm -# Dummy folder/directory: -edgeDir= - -# Properties required by the aai-common - aai-schema-ingest lib as of 1.3.0 -schema.configuration.location=N/A -schema.nodes.location=/opt/app/data-router/onap/oxm/ -schema.edges.location= -# These versions need to exist if they are included in the list -schema.version.list={{.Values.global.config.schema.version.list}} -# Decalares the oxm version to load -schema.version.api.default={{.Values.global.config.schema.version.api.default}} - -# Don't use these properties in our application, need to be set to prevent an exception on startup (see SchemaVersions bean) -schema.version.depth.start={{.Values.global.config.schema.version.depth}} -schema.version.related.link.start={{.Values.global.config.schema.version.related.link}} -schema.version.app.root.start={{.Values.global.config.schema.version.app.root}} -schema.version.namespace.change.start={{.Values.global.config.schema.version.namespace.change}} -schema.version.edge.label.start={{.Values.global.config.schema.version.edge.label}} - -#This property is used to enable or disable schema service, possible values are: schema-service or config -schema.translator.list={{.Values.config.schemaTranslatorList}} - -#These properties are needed when schema service is enabled -schema.service.base.url=https://aai-schema-service:8452/aai/schema-service/v1/ -schema.service.nodes.endpoint=nodes?version= -schema.service.edges.endpoint=edgerules?version= -schema.service.versions.endpoint=versions -schema.local=true -schema.filename=mockrequests -#Default rest client is the two-way-ssl -#schema.service.client=two-way-ssl -#Replace the below with the A&AI client key store -schema.service.ssl.key-store=${CONFIG_HOME}/auth/{{.Values.global.config.keystore.filename}} -#Replace the below with the A&AI tomcat trust store -schema.service.ssl.trust-store=${CONFIG_HOME}/auth/{{.Values.global.config.truststore.filename}} -schema.service.ssl.key-store-password={{.Values.global.config.keystore.passwd}} -schema.service.ssl.trust-store-password={{.Values.global.config.truststore.passwd}} - -spring.application.name=datarouter +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. +# Copyright © 2017-2018 Amdocs +# Modifications Copyright © 2018 Bell Canada +# ================================================================================ +# 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 SchemaLocationsBean +# Files named aai_oxm_v*.xml are unpacked here: +nodeDir=/opt/app/data-router/onap/oxm +# Dummy folder/directory: +edgeDir= + +# Properties required by the aai-common - aai-schema-ingest lib as of 1.3.0 +schema.configuration.location=N/A +schema.nodes.location=/opt/app/data-router/onap/oxm/ +schema.edges.location= +# These versions need to exist if they are included in the list +schema.version.list={{ .Values.config.schemaVersionList }} +# Decalares the oxm version to load +schema.version.api.default={{ .Values.config.schemaApiDefault }} + +# Don't use these properties in our application, need to be set to prevent an exception on startup (see SchemaVersions bean) +schema.version.depth.start={{.Values.global.config.schema.version.depth}} +schema.version.related.link.start={{.Values.global.config.schema.version.related.link}} +schema.version.app.root.start={{.Values.global.config.schema.version.app.root}} +schema.version.namespace.change.start={{.Values.global.config.schema.version.namespace.change}} +schema.version.edge.label.start={{.Values.global.config.schema.version.edge.label}} + +#This property is used to enable or disable schema service, possible values are: schema-service or config +schema.translator.list={{.Values.config.schemaTranslatorList}} + +#These properties are needed when schema service is enabled +schema.service.base.url=https://aai-schema-service:8452/aai/schema-service/v1/ +schema.service.nodes.endpoint=nodes?version= +schema.service.edges.endpoint=edgerules?version= +schema.service.versions.endpoint=versions +schema.local=true +schema.filename=mockrequests +#Default rest client is the two-way-ssl +#schema.service.client=two-way-ssl +#Replace the below with the A&AI client key store +schema.service.ssl.key-store=${CONFIG_HOME}/auth/{{.Values.global.config.keystore.filename}} +#Replace the below with the A&AI tomcat trust store +schema.service.ssl.trust-store=${CONFIG_HOME}/auth/{{.Values.global.config.truststore.filename}} +schema.service.ssl.key-store-password={{.Values.global.config.keystore.passwd}} +schema.service.ssl.trust-store-password={{.Values.global.config.truststore.passwd}} + +spring.application.name=datarouter diff --git a/components/aai-data-router/values.yaml b/components/aai-data-router/values.yaml index 245735d..53f25e7 100644 --- a/components/aai-data-router/values.yaml +++ b/components/aai-data-router/values.yaml @@ -33,6 +33,8 @@ config: keyStorePassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 keyManagerPassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 schemaTranslatorList: config + schemaVersionList: "v11,v12,v13,v14,v15,v16,v17,v18,v19" + schemaApiDefault: "v19" # default number of instances diff --git a/components/aai-schema-service/config/application.properties b/components/aai-schema-service/config/application.properties index 7b9312f..a639c41 100644 --- a/components/aai-schema-service/config/application.properties +++ b/components/aai-schema-service/config/application.properties @@ -21,10 +21,11 @@ info.build.version=1.1.0 spring.application.name=aai-schema-service spring.jersey.type=filter -server.contextPath=/ +spring.main.allow-bean-definition-overriding=true +server.servlet.context-path=/ + spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration -spring.profiles.active={{ .Values.global.config.profiles.active }} spring.jersey.application-path=${schema.uri.base.path} server.tomcat.max-threads=200 server.tomcat.min-Spare-Threads=25 diff --git a/components/aai-schema-service/config/logback.xml b/components/aai-schema-service/config/logback.xml index f10546a..9cfffe9 100644 --- a/components/aai-schema-service/config/logback.xml +++ b/components/aai-schema-service/config/logback.xml @@ -1,18 +1,63 @@ + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -20,6 +65,7 @@ + ${logDirectory}/rest/sane.log @@ -30,34 +76,30 @@ + 1000 true - + - - - INFO - ACCEPT - DENY - + + ${logDirectory}/rest/metrics.log - ${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} - + ${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} - - ${eelfMetricLogPattern} + + ${metricPattern} 1000 true - + + + class="ch.qos.logback.core.rolling.RollingFileAppender"> DEBUG ACCEPT @@ -68,52 +110,57 @@ ${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} - - ${eelfLogPattern} + + ${debugPattern} + 1000 + true - + - - WARN - + class="ch.qos.logback.core.rolling.RollingFileAppender"> ${logDirectory}/rest/error.log ${logDirectory}/rest/error.log.%d{yyyy-MM-dd} - - ${eelfErrorLogPattern} + + WARN + + + ${errorPattern} + 1000 - true - + + + class="ch.qos.logback.core.rolling.RollingFileAppender"> ${logDirectory}/rest/audit.log ${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} - - ${eelfAuditLogPattern} + + ${auditPattern} + 1000 true - + + + class="ch.qos.logback.core.rolling.RollingFileAppender"> DEBUG ACCEPT @@ -124,114 +171,125 @@ ${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} - - ${eelfTransLogPattern} + + ${transLogPattern} + 1000 true - + - + + WARN - ${logDirectory}/dmaapAAIEventConsumer/error.log + ${logDirectory}/external/external.log - ${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + ${logDirectory}/external/external.log.%d{yyyy-MM-dd} - - ${eelfLogPattern} + + ${debugPattern} - - + + + DEBUG - ACCEPT - DENY - - ${logDirectory}/dmaapAAIEventConsumer/debug.log - - ${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} - - - - ${eelfLogPattern} - - - - - INFO - ACCEPT - DENY - ${logDirectory}/dmaapAAIEventConsumer/metrics.log + ${logDirectory}/auth/auth.log - ${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + ${logDirectory}/auth/auth.log.%d{yyyy-MM-dd} - - ${eelfMetricLogPattern} + + %d{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}[%thread] %-5level %logger{1024} - %msg%n - - - WARN - - ${logDirectory}/external/external.log - - ${logDirectory}/external/external.log.%d{yyyy-MM-dd} - - - - ${eelfLogPattern} - + + 1000 + true + - - - - - - + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - + + + + - + - + + - - - - - - - + + + + + + + + + + + + + - - {{ if .Values.global.config.logback.console.enabled }} - {{ end }} + diff --git a/components/aai-schema-service/values.yaml b/components/aai-schema-service/values.yaml index 01f4ae4..8218a1b 100644 --- a/components/aai-schema-service/values.yaml +++ b/components/aai-schema-service/values.yaml @@ -22,7 +22,7 @@ global: # global defaults # application image repository: nexus3.onap.org:10001 -image: onap/aai-schema-service:1.6.9 +image: onap/aai-schema-service:1.7.5 pullPolicy: Always restartPolicy: Always flavor: small diff --git a/values.yaml b/values.yaml index 4b17500..eb735c0 100644 --- a/values.yaml +++ b/values.yaml @@ -249,11 +249,11 @@ global: # global defaults version: # Current version of the REST API api: - default: v19 + default: v20 # Specifies which version the depth parameter is configurable depth: v11 # List of all the supported versions of the API - list: v11,v12,v13,v14,v15,v16,v17,v18,v19 + list: v11,v12,v13,v14,v15,v16,v17,v18,v19,v20 # Specifies from which version related link should appear related: link: v11 -- cgit 1.2.3-korg