summaryrefslogtreecommitdiffstats
path: root/ECOMP-PAP-REST/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'ECOMP-PAP-REST/src/main/resources')
-rw-r--r--ECOMP-PAP-REST/src/main/resources/META-INF/drop.ddl7
-rw-r--r--ECOMP-PAP-REST/src/main/resources/META-INF/persistence.xml201
-rw-r--r--ECOMP-PAP-REST/src/main/resources/log4j.properties71
-rw-r--r--ECOMP-PAP-REST/src/main/resources/logback.xml253
-rw-r--r--ECOMP-PAP-REST/src/main/resources/spring.xml46
5 files changed, 578 insertions, 0 deletions
diff --git a/ECOMP-PAP-REST/src/main/resources/META-INF/drop.ddl b/ECOMP-PAP-REST/src/main/resources/META-INF/drop.ddl
new file mode 100644
index 000000000..f7138ad52
--- /dev/null
+++ b/ECOMP-PAP-REST/src/main/resources/META-INF/drop.ddl
@@ -0,0 +1,7 @@
+DROP TABLE IF EXISTS ConfigurationDataEntity
+DROP TABLE IF EXISTS PolicyEntity
+DROP TABLE IF EXISTS PolicyDBDaoEntity
+DROP TABLE IF EXISTS ActionBodyEntity
+DROP SEQUENCE IF EXISTS seqPolicy
+DROP SEQUENCE IF EXISTS seqConfig
+DROP SEQUENCE IF EXISTS seqActBody
diff --git a/ECOMP-PAP-REST/src/main/resources/META-INF/persistence.xml b/ECOMP-PAP-REST/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 000000000..1d7692a3d
--- /dev/null
+++ b/ECOMP-PAP-REST/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP-PAP-REST
+ ================================================================================
+ 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=========================================================
+ -->
+<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
+ <persistence-unit name="XACML-PAP-REST">
+ <class>org.openecomp.policy.rest.jpa.PolicyEntity</class>
+ <class>org.openecomp.policy.rest.jpa.ConfigurationDataEntity</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyDBDaoEntity</class>
+ <class>org.openecomp.policy.rest.jpa.GroupEntity</class>
+ <class>org.openecomp.policy.rest.jpa.PdpEntity</class>
+ <class>org.openecomp.policy.rest.jpa.ActionBodyEntity</class>
+ <class>org.openecomp.policy.rest.jpa.DatabaseLockEntity</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyVersion</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyScore</class>
+ <class>org.openecomp.policy.rest.jpa.FunctionDefinition</class>
+ <class>org.openecomp.policy.rest.jpa.Attribute</class>
+ <class>org.openecomp.policy.rest.jpa.Category</class>
+ <class>org.openecomp.policy.rest.jpa.ConstraintType</class>
+ <class>org.openecomp.policy.rest.jpa.ConstraintValue</class>
+ <class>org.openecomp.policy.rest.jpa.Datatype</class>
+ <class>org.openecomp.policy.rest.jpa.FunctionArgument</class>
+ <class>org.openecomp.policy.rest.jpa.UserInfo</class>
+ <class>org.openecomp.policy.rest.jpa.ActionPolicyDict</class>
+ <class>org.openecomp.policy.rest.jpa.DecisionSettings</class>
+ <class>org.openecomp.policy.rest.jpa.MicroServiceModels</class>
+ <class>org.openecomp.policy.rest.jpa.BRMSParamTemplate</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyEditorScopes</class>
+ <!-- unique to PolicyEngineUtils - will be audited from PAP -->
+ <class>org.openecomp.policy.jpa.BackUpMonitorEntity</class>
+ <!-- unique to integrity-monitor - will be audited from PAP -->
+ <class>org.openecomp.policy.common.im.jpa.StateManagementEntity</class>
+ <class>org.openecomp.policy.common.im.jpa.ForwardProgressEntity</class>
+ <class>org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity</class>
+ <!-- unique to integrity-audit - will be audited from PAP -->
+ <class>org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity</class>
+ <exclude-unlisted-classes>false</exclude-unlisted-classes>
+ <shared-cache-mode>NONE</shared-cache-mode>
+ <properties>
+ <!-- The properties defined below are the default settings to be used when someone initially
+ wants to start working with the XACML-PAP-ADMIN web gui. They are not intended for production
+ use.
+
+ They are setup to drop and create the tables and then load an initial set of data into the database
+ every time the application is deployed. So if you add anything to the dictionaries or PIP
+ configuration, they will get lost upon each deployment. It uses an H2 database engine configured
+ for a local file so you don't have to setup you're own SQL database environment to start.
+
+ Instead of modifying this file directly, please refer to the xacml.admin.properties file for
+ customizing the application settings.
+
+ -->
+ <!-- <property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
+ <property name="javax.persistence.schema-generation.create-source" value="metadata-then-script"/>
+ <property name="javax.persistence.schema-generation.create-script-source" value="META-INF/views.sql" />
+ <property name="javax.persistence.schema-generation.drop-source" value="script"/>
+ <property name="javax.persistence.schema-generation.drop-script-source" value="META-INF/drop.sql" />
+ <property name="javax.persistence.sql-load-script-source" value="META-INF/data.sql" />-->
+
+
+
+ <!-- These properties should be set in the xacml.admin.properties file, so they can be re-used by non-JPA
+ database functionality. -->
+ <!--
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:file:sql/xacml"/>
+ <property name="javax.persistence.jdbc.user" value="sa"/>
+ <property name="javax.persistence.jdbc.password" value=""/>
+ -->
+ </properties>
+ </persistence-unit>
+
+<persistence-unit name="auditPapPU">
+ <!-- This is the persistence unit used by IntegrityAudit to determine
+ which classes to audit. All the PAP classes are also included in
+ XACML-PAP-ADMIN, so they will be audited there rather than having a
+ duplicate audit run from the XACL-PAP-REST node -->
+ <!-- unique to PolicyEngineUtils - will be audited from PAP -->
+ <class>org.openecomp.policy.jpa.BackUpMonitorEntity</class>
+ <!-- unique to integrity-monitor - will be audited from PAP -->
+ <class>org.openecomp.policy.common.im.jpa.StateManagementEntity</class>
+ <class>org.openecomp.policy.common.im.jpa.ForwardProgressEntity</class>
+ <class>org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity</class>
+ <!-- unique to integrity-audit - will be audited from PAP -->
+ <class>org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity</class>
+ <exclude-unlisted-classes>true</exclude-unlisted-classes>
+ <shared-cache-mode>NONE</shared-cache-mode>
+ </persistence-unit>
+
+ <persistence-unit name="testPapPU" transaction-type="RESOURCE_LOCAL">
+ <!-- This tests all the classes that will be audited in the XACML-PAP-REST and the XACML-PAP_ADMIN -->
+ <!-- XACML-PAP-REST -->
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <class>org.openecomp.policy.rest.jpa.PolicyEntity</class>
+ <class>org.openecomp.policy.rest.jpa.ConfigurationDataEntity</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyDBDaoEntity</class>
+ <class>org.openecomp.policy.rest.jpa.GroupEntity</class>
+ <class>org.openecomp.policy.rest.jpa.PdpEntity</class>
+ <class>org.openecomp.policy.rest.jpa.ActionBodyEntity</class>
+ <class>org.openecomp.policy.rest.jpa.DatabaseLockEntity</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyVersion</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyScore</class>
+ <class>org.openecomp.policy.rest.jpa.FunctionDefinition</class>
+ <class>org.openecomp.policy.rest.jpa.Attribute</class>
+ <class>org.openecomp.policy.rest.jpa.Category</class>
+ <class>org.openecomp.policy.rest.jpa.ConstraintType</class>
+ <class>org.openecomp.policy.rest.jpa.ConstraintValue</class>
+ <class>org.openecomp.policy.rest.jpa.Datatype</class>
+ <class>org.openecomp.policy.rest.jpa.FunctionArgument</class>
+ <class>org.openecomp.policy.rest.jpa.UserInfo</class>
+ <class>org.openecomp.policy.rest.jpa.ActionPolicyDict</class>
+ <class>org.openecomp.policy.rest.jpa.DecisionSettings</class>
+ <class>org.openecomp.policy.rest.jpa.MicroServiceModels</class>
+ <!-- unique to XACML-PAP-ADMIN -->
+ <class>org.openecomp.policy.rest.jpa.ActionList</class>
+ <class>org.openecomp.policy.rest.jpa.AddressGroup</class>
+ <class>org.openecomp.policy.rest.jpa.AttributeAssignment</class>
+ <class>org.openecomp.policy.rest.jpa.BRMSParamTemplate</class>
+ <class>org.openecomp.policy.rest.jpa.ClosedLoopD2Services</class>
+ <class>org.openecomp.policy.rest.jpa.ClosedLoopSite</class>
+ <class>org.openecomp.policy.rest.jpa.DCAEUsers</class>
+ <class>org.openecomp.policy.rest.jpa.DCAEuuid</class>
+ <class>org.openecomp.policy.rest.jpa.DescriptiveScope</class>
+ <class>org.openecomp.policy.rest.jpa.EcompName</class>
+ <class>org.openecomp.policy.rest.jpa.EnforcingType</class>
+ <class>org.openecomp.policy.rest.jpa.GlobalRoleSettings</class>
+ <class>org.openecomp.policy.rest.jpa.GroupPolicyScopeList</class>
+ <class>org.openecomp.policy.rest.jpa.GroupServiceList</class>
+ <class>org.openecomp.policy.rest.jpa.MicroServiceConfigName</class>
+ <class>org.openecomp.policy.rest.jpa.MicroServiceLocation</class>
+ <class>org.openecomp.policy.rest.jpa.Obadvice</class>
+ <class>org.openecomp.policy.rest.jpa.ObadviceExpression</class>
+ <class>org.openecomp.policy.rest.jpa.PEPOptions</class>
+ <class>org.openecomp.policy.rest.jpa.PIPConfigParam</class>
+ <class>org.openecomp.policy.rest.jpa.PIPConfiguration</class>
+ <class>org.openecomp.policy.rest.jpa.PIPResolver</class>
+ <class>org.openecomp.policy.rest.jpa.PIPResolverParam</class>
+ <class>org.openecomp.policy.rest.jpa.PIPType</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyAlgorithms</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyManagement</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyScopeService</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyScopeType</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyScopeResource</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyScopeClosedLoop</class>
+ <class>org.openecomp.policy.rest.jpa.PortList</class>
+ <class>org.openecomp.policy.rest.jpa.PREFIXLIST</class>
+ <class>org.openecomp.policy.rest.jpa.ProtocolList</class>
+ <class>org.openecomp.policy.rest.jpa.RemoteCatalogValues</class>
+ <class>org.openecomp.policy.rest.jpa.PolicyRoles</class>
+ <class>org.openecomp.policy.rest.jpa.RuleAlgorithms</class>
+ <class>org.openecomp.policy.rest.jpa.SecurityZone</class>
+ <class>org.openecomp.policy.rest.jpa.ServiceList</class>
+ <class>org.openecomp.policy.rest.jpa.SystemLogDB</class>
+ <class>org.openecomp.policy.rest.jpa.TermList</class>
+ <class>org.openecomp.policy.rest.jpa.VarbindDictionary</class>
+ <class>org.openecomp.policy.rest.jpa.VMType</class>
+ <class>org.openecomp.policy.rest.jpa.VNFType</class>
+ <class>org.openecomp.policy.rest.jpa.VSCLAction</class>
+ <class>org.openecomp.policy.rest.jpa.Zone</class>
+ <!-- unique to PolicyEngineUtils -->
+ <class>org.openecomp.policy.jpa.BackUpMonitorEntity</class>
+ <!-- unique to integrity-monitor -->
+ <class>org.openecomp.policy.common.im.jpa.StateManagementEntity</class>
+ <class>org.openecomp.policy.common.im.jpa.ForwardProgressEntity</class>
+ <class>org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity</class>
+ <!-- unique to integrity-audit -->
+ <class>org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity</class>
+
+ <exclude-unlisted-classes>false</exclude-unlisted-classes>
+ <shared-cache-mode>NONE</shared-cache-mode>
+ <properties>
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:file:./sql/xacmlTest"/> <!-- ;MODE=MySQL"/> -->
+ <property name="javax.persistence.jdbc.user" value="sa"/>
+ <property name="javax.persistence.jdbc.password" value=""/>
+ <property name="javax.persistence.schema-generation.scripts.action" value="drop-and-create"/>
+ <property name="javax.persistence.schema-generation.scripts.create-target" value="./src/main/resources/META-INF/generatedCreate.ddl"/>
+ <property name="javax.persistence.schema-generation.scripts.drop-target" value="./src/main/resources/META-INF/generatedDrop.ddl"/>
+ <property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
+ <property name="javax.persistence.schema-generation.create-source" value="metadata-then-script"/>
+ <property name="javax.persistence.schema-generation.drop-source" value="script"/>
+ <property name="javax.persistence.schema-generation.drop-script-source" value="META-INF/drop.ddl" />
+ </properties>
+ </persistence-unit>
+</persistence>
diff --git a/ECOMP-PAP-REST/src/main/resources/log4j.properties b/ECOMP-PAP-REST/src/main/resources/log4j.properties
new file mode 100644
index 000000000..80f85e945
--- /dev/null
+++ b/ECOMP-PAP-REST/src/main/resources/log4j.properties
@@ -0,0 +1,71 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP-PAP-REST
+# ================================================================================
+# 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=========================================================
+###
+
+#
+# Use this properties for deployments.
+#
+#
+# Set root logger level to DEBUG and its only appender to FILE.
+#log4j.rootLogger=DEBUG, FILE, CONSOLE
+log4j.rootLogger=INFO, FILE
+
+# FILE appender
+log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.FILE.File=${catalina.base}/logs/pap-rest.log
+log4j.appender.FILE.ImmediateFlush=true
+log4j.appender.FILE.Threshold=debug
+log4j.appender.FILE.append=true
+log4j.appender.FILE.DatePattern='.'yyyy-MM-dd
+log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00:00|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{clientIpAddress}|%l||%m%n
+
+# for Developments and Debugging
+#log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+#log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy_MM_dd_HH_mm_ss_SSS} [%t] %-5p %l- %m%n
+
+#
+# This is specifically for Xacml request/response logging
+#
+log4j.logger.xacml.request=INFO, REQUEST_LOG
+
+log4j.appender.REQUEST_LOG=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.REQUEST_LOG.File=${catalina.base}/logs/pap-rest-reqres.log
+log4j.appender.REQUEST_LOG.ImmediateFlush=true
+log4j.appender.REQUEST_LOG.Threshold=debug
+log4j.appender.REQUEST_LOG.append=true
+log4j.appender.REQUEST_LOG.DatePattern='.'yyyy-MM-dd
+
+log4j.appender.REQUEST_LOG.layout=org.apache.log4j.PatternLayout
+log4j.appender.REQUEST_LOG.layout.ConversionPattern=%d{yyyy_MM_dd_HH_mm_ss_SSS} %m%n
+
+#
+# audit (transaction) logging
+#
+log4j.logger.auditLogger=INFO,AUDIT_LOG
+log4j.additivity.auditLogger=false
+
+log4j.appender.AUDIT_LOG=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.AUDIT_LOG.File=${catalina.base}/logs/audit.log
+log4j.appender.AUDIT_LOG.Append=true
+log4j.appender.AUDIT_LOG.DatePattern='.'yyyy-MM-dd
+log4j.appender.AUDIT_LOG.threshold=INFO
+log4j.appender.AUDIT_LOG.layout=org.apache.log4j.EnhancedPatternLayout
+log4j.appender.AUDIT_LOG.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00:00|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{clientIpAddress}|%X{className}|%X{timer}|%m%n
diff --git a/ECOMP-PAP-REST/src/main/resources/logback.xml b/ECOMP-PAP-REST/src/main/resources/logback.xml
new file mode 100644
index 000000000..7c328c573
--- /dev/null
+++ b/ECOMP-PAP-REST/src/main/resources/logback.xml
@@ -0,0 +1,253 @@
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP-PAP-REST
+ ================================================================================
+ 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=========================================================
+ -->
+
+<configuration scan="true" scanPeriod="3 seconds" debug="true">
+ <!--<jmxConfigurator /> -->
+ <!-- directory path for all other type logs -->
+ <property name="logDir" value="logs" />
+
+ <!-- directory path for debugging type logs -->
+ <property name="debugDir" value="logs" />
+
+ <!-- specify the component name
+ <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <property name="componentName" value="Policy"></property>
+ <property name="subComponentName" value="XACML-PAP-REST"></property>
+
+ <!-- log file names -->
+ <property name="errorLogName" value="error" />
+ <property name="metricsLogName" value="metrics" />
+ <property name="auditLogName" value="audit" />
+ <property name="debugLogName" value="debug" />
+
+
+ <!-- modified time stamp format -->
+
+ <!-- A U D I T
+ <property name="defaultAuditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ <property name="defaultAuditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{ElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ -->
+ <property name="defaultAuditPattern" value="%X{TransactionBeginTimestamp}|%X{TransactionEndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{TransactionElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+
+
+
+ <!-- M E T R I C
+ <property name="defaultMetricPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ -->
+ <property name="defaultMetricPattern" value="%X{MetricBeginTimestamp}|%X{MetricEndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%p|%X{severity}|%X{serverIpAddress}|%X{MetricElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+
+
+
+ <!-- E R R O R
+ <property name="defaultErrorPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDesciption}|%msg%n" />
+ -->
+ <property name="defaultErrorPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{requestId}|%t|%X{serviceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDesciption}|%msg%n" />
+
+
+
+ <!-- D E B U G
+ <property name="debugLoggerPatternOld" value="%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|[%caller{3}]|%msg%n" />
+ <property name="debugLoggerPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" /> -->
+ -->
+ <property name="debugLoggerPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestId}|%msg%n" />
+
+
+
+ <!-- D E F A U L T
+ <property name="defaultPatternOld" value="%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}|%msg%n" />
+ <property name="defaultPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ -->
+ <property name="defaultPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{clientIpAddress}|%c||%msg%n" />
+
+
+
+ <!-- P A T H
+ <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
+ <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
+
+ -->
+ <property name="logDirectory" value="${catalina.base}/${logDir}/${componentName}/${subComponentName}" />
+ <property name="debugLogDirectory" value="${catalina.base}/${debugDir}/${componentName}/${subComponentName}" />
+
+
+
+
+ <!-- Example evaluator filter applied against console appender -->
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>${defaultPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <!-- ============================================================================ -->
+ <!-- EELF Appenders -->
+ <!-- ============================================================================ -->
+
+ <!-- The EELFAppender is used to record events to the general application
+ log -->
+
+ <!-- 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.FixedWindowRollingPolicy">
+ <fileNamePattern>${logDirectory}/${auditLogName}.%i.log.zip
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>9</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>5MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>${defaultAuditPattern}</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.FixedWindowRollingPolicy">
+ <fileNamePattern>${logDirectory}/${metricsLogName}.%i.log.zip
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>9</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>5MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} -
+ %msg%n"</pattern> -->
+ <pattern>${defaultMetricPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFMetrics"/>
+ </appender>
+
+
+
+
+ <appender name="EELFError"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${errorLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>9</maxIndex>
+ </rollingPolicy>
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>ERROR</level>
+ </filter>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>5MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>${defaultErrorPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFError"/>
+ </appender>
+
+
+
+ <appender name="EELFDebug"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${debugLogDirectory}/${debugLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${debugLogDirectory}/${debugLogName}.%i.log.zip
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>9</maxIndex>
+ </rollingPolicy>
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>INFO</level>
+ </filter>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>5MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>${debugLoggerPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFDebug" />
+ <includeCallerData>true</includeCallerData>
+ </appender>
+
+
+ <!-- ============================================================================ -->
+ <!-- EELF loggers -->
+ <!-- ============================================================================ -->
+
+ <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>
+
+ <logger name="com.att.eelf.error" level="error" additivity="false">
+ <appender-ref ref="asyncEELFError" />
+ </logger>
+
+ <logger name="com.att.eelf.debug" level="info" additivity="false">
+ <appender-ref ref="asyncEELFDebug" />
+ </logger>
+
+
+
+ <root level="INFO">
+ <appender-ref ref="asyncEELFDebug" />
+ <appender-ref ref="asyncEELFError" />
+ </root>
+
+</configuration>
diff --git a/ECOMP-PAP-REST/src/main/resources/spring.xml b/ECOMP-PAP-REST/src/main/resources/spring.xml
new file mode 100644
index 000000000..20414fabe
--- /dev/null
+++ b/ECOMP-PAP-REST/src/main/resources/spring.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP-PAP-REST
+ ================================================================================
+ 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=========================================================
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
+
+ <context:annotation-config />
+ <context:component-scan base-package="org.openecomp" />
+ <!-- Hibernate 4 SessionFactory Bean definition -->
+ <bean id="hibernate4AnnotatedSessionFactory"
+ class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
+ <property name="configLocation">
+ <value>classpath:hibernate.cfg.xml</value>
+ </property>
+ <property name="hibernateProperties">
+ <props>
+ <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
+ <prop key="hibernate.current_session_context_class">thread</prop>
+ <prop key="hibernate.show_sql">false</prop>
+ </props>
+ </property>
+ </bean>
+</beans>