aboutsummaryrefslogtreecommitdiffstats
path: root/champ-service/src
diff options
context:
space:
mode:
authorMichael Arrastia <MArrasti@amdocs.com>2018-05-01 14:55:56 +0100
committerMichael Arrastia <MArrasti@amdocs.com>2018-05-01 14:55:56 +0100
commitc5331e6fe565e7d0a22d1752e8f793d55dbe7c2e (patch)
treee0ceba06087abacc484350c46027c74e0f8f6e86 /champ-service/src
parente0549f46142bcc54cc3d3c04a465e5e6c54ba90c (diff)
Replace AJSC with Spring Boot 1.5.12.RELEASE
Updates include: Remove AJSC references Use PropertiesLoader (loader.path) to allow loading external janus or titan deps Fix dependency conflicts between janus/titan deps and Spring Boot deps Use Jetty container Use Jersey registration of Champ REST interface Change-Id: Ic33b886b0b039cce0366c0f0910cc5a3fe5bfd9b Issue-ID: AAI-1041 Signed-off-by: Michael Arrastia <MArrasti@amdocs.com>
Diffstat (limited to 'champ-service/src')
-rw-r--r--champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/conf/jaxrsBeans.groovy11
-rw-r--r--champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/docs/README.txt1
-rw-r--r--champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/lib/README.txt1
-rw-r--r--champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/routes/champ.route4
-rw-r--r--champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/routes/jaxrsExample.route5
-rw-r--r--champ-service/src/main/bin/start.sh81
-rw-r--r--champ-service/src/main/java/org/onap/champ/ChampApplication.java46
-rw-r--r--champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java7
-rw-r--r--champ-service/src/main/java/org/onap/champ/JerseyConfig.java35
-rw-r--r--champ-service/src/main/resources/application.properties11
-rw-r--r--champ-service/src/main/resources/logback.xml238
-rw-r--r--champ-service/src/test/java/org/onap/champ/event/GraphEventEnvelopeTest.java20
-rw-r--r--champ-service/src/test/java/org/onap/champ/util/TestUtil.java58
13 files changed, 416 insertions, 102 deletions
diff --git a/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/conf/jaxrsBeans.groovy b/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/conf/jaxrsBeans.groovy
deleted file mode 100644
index 17d80a4..0000000
--- a/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/conf/jaxrsBeans.groovy
+++ /dev/null
@@ -1,11 +0,0 @@
-beans{
- xmlns cxf: "http://camel.apache.org/schema/cxf"
- xmlns jaxrs: "http://cxf.apache.org/jaxrs"
- xmlns util: "http://www.springframework.org/schema/util"
-
- echoService(org.onap.champ.service.EchoService)
-
- util.list(id: 'echoServices') {
- ref(bean:'echoService')
- }
-} \ No newline at end of file
diff --git a/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/docs/README.txt b/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/docs/README.txt
deleted file mode 100644
index 3707179..0000000
--- a/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/docs/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-Place any docs here that you want to access within the ajsc upon deployment of your service.
diff --git a/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/lib/README.txt b/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/lib/README.txt
deleted file mode 100644
index 639e21b..0000000
--- a/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/lib/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-3rd party JAR's needed by your jars (if any) for a ajsc deployment package go here... \ No newline at end of file
diff --git a/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/routes/champ.route b/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/routes/champ.route
deleted file mode 100644
index cf8d115..0000000
--- a/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/routes/champ.route
+++ /dev/null
@@ -1,4 +0,0 @@
-<route xmlns="http://camel.apache.org/schema/spring" trace="true">
- <from uri="att-dme2-servlet:///champ-service/v1/?matchOnUriPrefix=true" />
- <to uri="cxfbean:champRestService" />
-</route> \ No newline at end of file
diff --git a/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/routes/jaxrsExample.route b/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/routes/jaxrsExample.route
deleted file mode 100644
index a132030..0000000
--- a/champ-service/src/main/ajsc/champ-service_v1/champ-service/v1/routes/jaxrsExample.route
+++ /dev/null
@@ -1,5 +0,0 @@
-<route xmlns="http://camel.apache.org/schema/spring" trace="true">
- <from uri="att-dme2-servlet:///echo-service/?matchOnUriPrefix=true" />
- <to uri="cxfbean:echoServices" />
-</route>
-
diff --git a/champ-service/src/main/bin/start.sh b/champ-service/src/main/bin/start.sh
index de8a4fb..d82d438 100644
--- a/champ-service/src/main/bin/start.sh
+++ b/champ-service/src/main/bin/start.sh
@@ -21,74 +21,43 @@
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
-
-BASEDIR="/opt/app/champ-service/"
-AJSC_HOME="$BASEDIR"
-AJSC_CONF_HOME="$AJSC_HOME/bundleconfig/"
+APP_HOME="/opt/app/champ-service"
+GRAPH_DEPS_HOME="${APP_HOME}/graph-deps"
if [ -z "$CONFIG_HOME" ]; then
- echo "CONFIG_HOME must be set in order to start up process"
- exit 1
+ echo "CONFIG_HOME must be set in order to start up process"
+ exit 1
fi
if [ -z "$KEY_STORE_PASSWORD" ]; then
- echo "KEY_STORE_PASSWORD must be set in order to start up process"
- exit 1
-else
- echo "KEY_STORE_PASSWORD=$KEY_STORE_PASSWORD\n" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
-fi
-
-if [ -z "$KEY_MANAGER_PASSWORD" ]; then
- echo "KEY_MANAGER_PASSWORD must be set in order to start up process"
- exit 1
-else
- echo "KEY_MANAGER_PASSWORD=$KEY_MANAGER_PASSWORD\n" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
+ echo "KEY_STORE_PASSWORD must be set in order to start up process"
+ exit 1
fi
-# Add any spring bean configuration files to the Gizmo deployment
-if [ -n "$SERVICE_BEANS" ]; then
- echo "Adding the following dynamic service beans to the deployment: "
- mkdir -p /tmp/champ-service/v1/conf
- for f in `ls $SERVICE_BEANS`
- do
- cp $SERVICE_BEANS/$f /tmp/champ-service/v1/conf
- echo "Adding dynamic service bean $SERVICE_BEANS/$f"
- done
- jar uf /opt/app/champ-service/services/champ-service_v1.zip* -C /tmp/ champ-service
- rm -rf /tmp/champ-service
+if [ -z "$SERVICE_BEANS" ]; then
+ echo "SERVICE_BEANS must be set in order to start up process"
+ exit 1
fi
-CLASSPATH="$AJSC_HOME/lib/*"
-CLASSPATH="$CLASSPATH:$AJSC_HOME/extJars/"
-CLASSPATH="$CLASSPATH:$AJSC_HOME/etc/"
-
-# Check to see if the provided implementation exists in the image and add it to the classpath
-for file in $( find ${BASEDIR}graph-deps/* -maxdepth 0 -type d ); do
- CURRIMPL=$(echo $file | cut -d"/" -f6)
- if [ "x$GRAPHIMPL" = "x$CURRIMPL" ]; then
- CLASSPATH_GRAPHIMPL=$file
- echo "Setting up graph implementation of $GRAPHIMPL"
- else
- SUPPORTED_GRAPHIMPL="$SUPPORTED_GRAPHIMPL $CURRIMPL"
- fi
+for dir in $( find ${GRAPH_DEPS_HOME}/* -maxdepth 0 -type d ); do
+ CURRIMPL=$(basename $dir)
+ if [ "x$GRAPHIMPL" = "x$CURRIMPL" ]; then
+ GRAPHIMPL_DEPS="${GRAPH_DEPS_HOME}/${GRAPHIMPL}"
+ echo "Setting up graph implementation to $GRAPHIMPL"
+ else
+ SUPPORTED_GRAPHIMPL="$SUPPORTED_GRAPHIMPL $CURRIMPL"
+ fi
done
-if [ -n "$CLASSPATH_GRAPHIMPL" ]; then
- cp $CLASSPATH_GRAPHIMPL/* $AJSC_HOME/extJars/
-else
- echo "Configured graph implementation '$GRAPHIMPL' is not supported. Acceptable implementations are one of: $SUPPORTED_GRAPHIMPL"
- exit 1
+
+if [ -z "$GRAPHIMPL_DEPS" ]; then
+ echo "Configured graph implementation '$GRAPHIMPL' is not supported. Acceptable implementations are one of: $SUPPORTED_GRAPHIMPL"
+ exit 1
fi
-PROPS="-DAJSC_HOME=$AJSC_HOME"
-PROPS="$PROPS -DAJSC_CONF_HOME=$BASEDIR/bundleconfig/"
-PROPS="$PROPS -Dlogback.configurationFile=$BASEDIR/bundleconfig/etc/logback.xml"
-PROPS="$PROPS -DAJSC_SHARED_CONFIG=$AJSC_CONF_HOME"
-PROPS="$PROPS -DAJSC_SERVICE_NAMESPACE=champ-service"
-PROPS="$PROPS -DAJSC_SERVICE_VERSION=v1"
-PROPS="$PROPS -Dserver.port=9522"
+PROPS="-DAPP_HOME=$APP_HOME"
PROPS="$PROPS -DCONFIG_HOME=$CONFIG_HOME"
+PROPS="$PROPS -DKEY_STORE_PASSWORD=$KEY_STORE_PASSWORD"
JVM_MAX_HEAP=${MAX_HEAP:-1024}
-echo $CLASSPATH
-
-exec java -Xmx${JVM_MAX_HEAP}m $PROPS -classpath $CLASSPATH com.att.ajsc.runner.Runner context=// sslport=9522
+set -x
+exec java -Xmx${JVM_MAX_HEAP}m $PROPS -Dloader.path="${GRAPHIMPL_DEPS}" -jar "${APP_HOME}/champ-service.jar"
diff --git a/champ-service/src/main/java/org/onap/champ/ChampApplication.java b/champ-service/src/main/java/org/onap/champ/ChampApplication.java
new file mode 100644
index 0000000..bc74469
--- /dev/null
+++ b/champ-service/src/main/java/org/onap/champ/ChampApplication.java
@@ -0,0 +1,46 @@
+/**
+ * ============LICENSE_START==========================================
+ * org.onap.aai
+ * ===================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-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============================================
+ */
+package org.onap.champ;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.jetty.util.security.Password;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.support.SpringBootServletInitializer;
+import org.springframework.context.annotation.ImportResource;
+
+@SpringBootApplication
+@ImportResource({"file:${SERVICE_BEANS}/*.xml"})
+public class ChampApplication extends SpringBootServletInitializer {
+
+ public static void main(String[] args) {
+ String keyStorePassword = System.getProperty("KEY_STORE_PASSWORD");
+ if (keyStorePassword == null || keyStorePassword.isEmpty()) {
+ throw new RuntimeException("Environment property KEY_STORE_PASSWORD not set");
+ }
+
+ Map<String, Object> props = new HashMap<>();
+ props.put("server.ssl.key-store-password", Password.deobfuscate(keyStorePassword));
+ new ChampApplication().configure(new SpringApplicationBuilder(ChampApplication.class).properties(props))
+ .run(args);
+ }
+}
diff --git a/champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java b/champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java
index b75ba53..1a68027 100644
--- a/champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java
+++ b/champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java
@@ -27,7 +27,6 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Timer;
-
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@@ -44,7 +43,6 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.UriInfo;
-
import org.json.JSONException;
import org.json.JSONObject;
import org.onap.aai.champcore.ChampTransaction;
@@ -67,12 +65,11 @@ import org.onap.champ.service.logging.ChampMsgs;
import org.onap.champ.service.logging.LoggingUtil;
import org.onap.champ.util.ChampProperties;
import org.onap.champ.util.ChampServiceConstants;
-
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
-@Path(value = "/")
+@Path(value = "/services/champ-service/v1/")
public class ChampRESTAPI {
private ObjectMapper mapper;
@@ -88,7 +85,7 @@ public class ChampRESTAPI {
public ChampRESTAPI(ChampDataService champDataService, ChampAsyncRequestProcessor champAsyncRequestProcessor) {
this.champDataService = champDataService;
- // Async request handling is optional.
+ // Async request handling is optional.
if (champAsyncRequestProcessor != null) {
timer = new Timer("ChampAsyncRequestProcessor-1");
timer.schedule(champAsyncRequestProcessor, champAsyncRequestProcessor.getRequestPollingTimeSeconds(),
diff --git a/champ-service/src/main/java/org/onap/champ/JerseyConfig.java b/champ-service/src/main/java/org/onap/champ/JerseyConfig.java
new file mode 100644
index 0000000..f72a2e4
--- /dev/null
+++ b/champ-service/src/main/java/org/onap/champ/JerseyConfig.java
@@ -0,0 +1,35 @@
+/**
+ * ============LICENSE_START==========================================
+ * org.onap.aai
+ * ===================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-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============================================
+ */
+package org.onap.champ;
+
+import org.glassfish.jersey.server.ResourceConfig;
+import org.springframework.stereotype.Component;
+
+/**
+ * Registers Crud Rest interface as JAX-RS endpoints.
+ */
+@Component
+public class JerseyConfig extends ResourceConfig {
+
+ public JerseyConfig(ChampRESTAPI champRestApi) {
+ register(champRestApi);
+ }
+}
diff --git a/champ-service/src/main/resources/application.properties b/champ-service/src/main/resources/application.properties
new file mode 100644
index 0000000..07d7e08
--- /dev/null
+++ b/champ-service/src/main/resources/application.properties
@@ -0,0 +1,11 @@
+server.port=9522
+
+SERVICE_BEANS=dynamic/conf
+
+server.ssl.key-store=${CONFIG_HOME}/auth/tomcat_keystore
+server.ssl.key-store-type=JKS
+server.ssl.enabled=true
+server.ssl.client-auth=need
+server.ssl.key-store-password=${KEY_STORE_PASSWORD}
+
+logging.config=classpath:logback.xml
diff --git a/champ-service/src/main/resources/logback.xml b/champ-service/src/main/resources/logback.xml
new file mode 100644
index 0000000..497adb6
--- /dev/null
+++ b/champ-service/src/main/resources/logback.xml
@@ -0,0 +1,238 @@
+<!--
+
+ ============LICENSE_START==========================================
+ org.onap.aai
+ ===================================================================
+ Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ Copyright © 2017 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============================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+
+-->
+<configuration scan="true" scanPeriod="3 seconds" debug="false">
+ <!--<jmxConfigurator /> -->
+ <!-- directory path for all other type logs -->
+
+ <property name="logDir" value="${APP_HOME}/logs" />
+
+
+ <!-- specify the component name
+ <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <property name="componentName" value="AAI-CHAMP" />
+
+ <!-- default eelf log file names -->
+ <property name="generalLogName" value="error" />
+ <property name="metricsLogName" value="metrics" />
+ <property name="auditLogName" value="audit" />
+ <property name="debugLogName" value="debug" />
+
+ <property name="errorLogPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{RequestId}|%thread|champ-service|%mdc{PartnerName}|%logger||%.-5level|%msg%n" />
+ <property name="auditMetricPattern" value="%m%n" />
+
+ <property name="logDirectory" value="${logDir}/${componentName}" />
+
+ <!-- Example evaluator filter applied against console appender -->
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>${errorLogPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <!-- ============================================================================ -->
+ <!-- EELF Appenders -->
+ <!-- ============================================================================ -->
+
+ <!-- The EELFAppender is used to record events to the general application
+ log -->
+
+ <appender name="EELF"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${generalLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip
+ </fileNamePattern>
+ <maxHistory>60</maxHistory>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${errorLogPattern}</pattern>
+ </encoder>
+ </appender>
+ <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
+ <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>INFO</level>
+ </filter>
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELF" />
+ </appender>
+
+
+ <!-- EELF Audit Appender. This appender is used to record audit engine
+ related logging events. The audit logger and appender are specializations
+ of the EELF application root logger and appender. This can be used to segregate
+ Policy engine events from other components, or it can be eliminated to record
+ these events as part of the application root log. -->
+
+ <appender name="EELFAudit"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${auditLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip
+ </fileNamePattern>
+ <maxHistory>60</maxHistory>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${auditMetricPattern}</pattern>
+ </encoder>
+ </appender>
+ <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFAudit" />
+ </appender>
+
+ <appender name="EELFMetrics"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${metricsLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip
+ </fileNamePattern>
+ <maxHistory>60</maxHistory>
+ </rollingPolicy>
+ <encoder>
+ <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} -
+ %msg%n"</pattern> -->
+ <pattern>${auditMetricPattern}</pattern>
+ </encoder>
+ </appender>
+
+
+ <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFMetrics"/>
+ </appender>
+
+ <appender name="EELFDebug"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${debugLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip
+ </fileNamePattern>
+ <maxHistory>60</maxHistory>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${errorLogPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFDebug" />
+ <includeCallerData>false</includeCallerData>
+ </appender>
+
+
+ <!-- ============================================================================ -->
+ <!-- EELF loggers -->
+ <!-- ============================================================================ -->
+ <logger name="com.att.eelf" level="info" additivity="false">
+ <appender-ref ref="asyncEELF" />
+ <appender-ref ref="asyncEELFDebug" />
+ </logger>
+
+<!--
+ <logger name="com.att.eelf.security" level="info" additivity="false">
+ <appender-ref ref="asyncEELFSecurity" />
+ </logger>
+ <logger name="com.att.eelf.perf" level="info" additivity="false">
+ <appender-ref ref="asyncEELFPerformance" />
+ </logger>
+ <logger name="com.att.eelf.server" level="info" additivity="false">
+ <appender-ref ref="asyncEELFServer" />
+ </logger>
+ <logger name="com.att.eelf.policy" level="info" additivity="false">
+ <appender-ref ref="asyncEELFPolicy" />
+ </logger>
+-->
+
+ <logger name="com.att.eelf.audit" level="info" additivity="false">
+ <appender-ref ref="asyncEELFAudit" />
+ </logger>
+ <logger name="com.att.eelf.metrics" level="info" additivity="false">
+ <appender-ref ref="asyncEELFMetrics" />
+ </logger>
+
+ <!-- Spring related loggers -->
+ <logger name="org.springframework" level="WARN" />
+ <logger name="org.springframework.beans" level="WARN" />
+ <logger name="org.springframework.web" level="WARN" />
+ <logger name="com.blog.spring.jms" level="WARN" />
+
+ <!-- AJSC Services (bootstrap services) -->
+ <logger name="ajsc" level="WARN" />
+ <logger name="ajsc.RouteMgmtService" level="WARN" />
+ <logger name="ajsc.ComputeService" level="WARN" />
+ <logger name="ajsc.VandelayService" level="WARN" />
+ <logger name="ajsc.FilePersistenceService" level="WARN" />
+ <logger name="ajsc.UserDefinedJarService" level="WARN" />
+ <logger name="ajsc.UserDefinedBeansDefService" level="WARN" />
+ <logger name="ajsc.LoggingConfigurationService" level="WARN" />
+
+ <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet
+ logging) -->
+ <logger name="ajsc.utils" level="WARN" />
+ <logger name="ajsc.utils.DME2Helper" level="WARN" />
+ <logger name="ajsc.filters" level="WARN" />
+ <logger name="ajsc.beans.interceptors" level="WARN" />
+ <logger name="ajsc.restlet" level="WARN" />
+ <logger name="ajsc.servlet" level="WARN" />
+ <logger name="com.att" level="INFO" />
+ <logger name="com.att.ajsc.csi.logging" level="WARN" />
+ <logger name="com.att.ajsc.filemonitor" level="WARN" />
+
+ <!-- champ-service loggers -->
+ <logger name="org.onap.champ" level="INFO" />
+
+ <!-- Other Loggers that may help troubleshoot -->
+ <logger name="net.sf" level="WARN" />
+ <logger name="org.apache" level="WARN" />
+ <logger name="org.apache.commons.httpclient" level="WARN" />
+ <logger name="org.apache.commons" level="WARN" />
+ <logger name="org.apache.coyote" level="WARN" />
+ <logger name="org.apache.jasper" level="WARN" />
+
+ <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging.
+ May aid in troubleshooting) -->
+ <logger name="org.apache.camel" level="WARN" />
+ <logger name="org.apache.cxf" level="WARN" />
+ <logger name="org.apache.camel.processor.interceptor" level="WARN" />
+ <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" />
+ <logger name="org.apache.cxf.service" level="WARN" />
+ <logger name="org.restlet" level="WARN" />
+ <logger name="org.apache.camel.component.restlet" level="WARN" />
+
+ <!-- logback internals logging -->
+ <logger name="ch.qos.logback.classic" level="WARN" />
+ <logger name="ch.qos.logback.core" level="WARN" />
+
+ <root>
+ <appender-ref ref="asyncEELF" />
+ <!-- <appender-ref ref="asyncEELFDebug" /> -->
+ </root>
+
+</configuration>
diff --git a/champ-service/src/test/java/org/onap/champ/event/GraphEventEnvelopeTest.java b/champ-service/src/test/java/org/onap/champ/event/GraphEventEnvelopeTest.java
index 5c39f99..4d30901 100644
--- a/champ-service/src/test/java/org/onap/champ/event/GraphEventEnvelopeTest.java
+++ b/champ-service/src/test/java/org/onap/champ/event/GraphEventEnvelopeTest.java
@@ -1,3 +1,23 @@
+/**
+ * ============LICENSE_START==========================================
+ * org.onap.aai
+ * ===================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-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============================================
+ */
package org.onap.champ.event;
import static org.hamcrest.Matchers.is;
diff --git a/champ-service/src/test/java/org/onap/champ/util/TestUtil.java b/champ-service/src/test/java/org/onap/champ/util/TestUtil.java
index b9924e4..65597fe 100644
--- a/champ-service/src/test/java/org/onap/champ/util/TestUtil.java
+++ b/champ-service/src/test/java/org/onap/champ/util/TestUtil.java
@@ -1,3 +1,23 @@
+/**
+ * ============LICENSE_START==========================================
+ * org.onap.aai
+ * ===================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-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============================================
+ */
package org.onap.champ.util;
import java.io.File;
@@ -10,25 +30,25 @@ import java.nio.file.Paths;
public class TestUtil {
- public static Path getPath(String resourceFilename) throws URISyntaxException {
- URL resource = ClassLoader.getSystemResource(resourceFilename);
- if (resource != null) {
- return Paths.get(resource.toURI());
- }
+ public static Path getPath(String resourceFilename) throws URISyntaxException {
+ URL resource = ClassLoader.getSystemResource(resourceFilename);
+ if (resource != null) {
+ return Paths.get(resource.toURI());
+ }
- // If the resource is not found relative to the classpath, try to get it from the file system directly.
- File file = new File(resourceFilename);
- if (!file.exists()) {
- throw new RuntimeException("Resource does not exist: " + resourceFilename);
- }
- return file.toPath();
- }
+ // If the resource is not found relative to the classpath, try to get it from the file system directly.
+ File file = new File(resourceFilename);
+ if (!file.exists()) {
+ throw new RuntimeException("Resource does not exist: " + resourceFilename);
+ }
+ return file.toPath();
+ }
- public static String getContentUtf8(Path filePath) throws IOException {
- return new String(Files.readAllBytes(filePath));
- }
+ public static String getContentUtf8(Path filePath) throws IOException {
+ return new String(Files.readAllBytes(filePath));
+ }
- public static String getFileAsString(String resourceFilename) throws IOException, URISyntaxException {
- return getContentUtf8(getPath(resourceFilename));
- }
-} \ No newline at end of file
+ public static String getFileAsString(String resourceFilename) throws IOException, URISyntaxException {
+ return getContentUtf8(getPath(resourceFilename));
+ }
+}