summaryrefslogtreecommitdiffstats
path: root/pnfsimulator/src/main/resources
diff options
context:
space:
mode:
authorBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-04-08 09:31:13 +0200
committerBogumil Zebek <bogumil.zebek@nokia.com>2020-04-08 09:43:31 +0000
commit3c494af52c476a86ae1389991b464914517774b8 (patch)
treee6d9b4f261eac5f7b3fd0f42e740840a106842e6 /pnfsimulator/src/main/resources
parent75496bfc5b2f7e03e49ab4929d1f20962b39c992 (diff)
Move PNF simulator from /test/mocks to new project
This code is a copy of pnfsimulator located in integration repository (/test/mocks/pnfsimulator) with added profile "docker" in pom.xml located in pnfsimulator and netconfsimulator subprojects Issue-ID: INT-1517 Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> Change-Id: I725fa0530c41b13cb12705979dee8b8b354dc1a1
Diffstat (limited to 'pnfsimulator/src/main/resources')
-rw-r--r--pnfsimulator/src/main/resources/application.properties18
-rw-r--r--pnfsimulator/src/main/resources/logback.xml70
2 files changed, 88 insertions, 0 deletions
diff --git a/pnfsimulator/src/main/resources/application.properties b/pnfsimulator/src/main/resources/application.properties
new file mode 100644
index 0000000..e2c7639
--- /dev/null
+++ b/pnfsimulator/src/main/resources/application.properties
@@ -0,0 +1,18 @@
+server.port=5000
+templates.dir=/app/templates
+spring.data.mongodb.host=mongo
+spring.data.mongodb.port=27017
+spring.data.mongodb.username=pnf_simulator_user
+spring.data.mongodb.password=zXcVbN123!
+spring.data.mongodb.database=pnf_simulator
+management.endpoints.enabled-by-default=true
+management.endpoint.configprops.enabled=true
+management.endpoints.web.base-path=/
+management.server.port=5001
+management.endpoints.web.exposure.include=refresh
+
+ssl.clientCertificateEnabled=true
+ssl.clientCertificateDir=/app/store/client.p12
+ssl.clientCertificatePassword=collector
+ssl.trustStoreDir=/app/store/trustStore
+ssl.trustStorePassword=collector
diff --git a/pnfsimulator/src/main/resources/logback.xml b/pnfsimulator/src/main/resources/logback.xml
new file mode 100644
index 0000000..8569b56
--- /dev/null
+++ b/pnfsimulator/src/main/resources/logback.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Simulator
+ ================================================================================
+ Copyright (C) 2019 Nokia. 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 complete="true" compact="true">
+
+ <Property name="outputFilename" value="pnfsimulator_output"/>
+ <Property name="log-path" value="/var/log/ONAP/pnfsimulator"/>
+ <Property name="archive" value="/var/log/ONAP/pnfsimulator/archive"/>
+ <property name="maxFileSize" value="50MB"/>
+ <property name="maxHistory" value="30"/>
+ <property name="totalSizeCap" value="10GB"/>
+
+ <appender name="Console" target="SYSTEM_OUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <Pattern>%nopexception%logger
+ |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}
+ |%level
+ |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'}
+ |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'}
+ |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'}
+ |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'}
+ |%thread
+ |%n</Pattern>
+ </encoder>
+ </appender>
+
+ <appender name="ROLLING-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <encoder>
+ <pattern>%nopexception%logger
+ |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}
+ |%level
+ |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'}
+ |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'}
+ |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'}
+ |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'}
+ |%thread
+ |%n</pattern>
+ </encoder>
+ <File>${log-path}/${outputFilename}.log</File>
+ <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <FileNamePattern>${archive}/${outputFilename}.%d{yyyy-MM-dd}.%i.log.zip</FileNamePattern>
+ <MaxFileSize>${maxFileSize}</MaxFileSize>
+ <MaxHistory>${maxHistory}</MaxHistory>
+ <TotalSizeCap>${totalSizeCap}</TotalSizeCap>
+ </rollingPolicy>
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="Console" />
+ <appender-ref ref="ROLLING-FILE" />
+ </root>
+</Configuration>