diff options
Diffstat (limited to 'UniversalVesAdapter/src/main/resources')
7 files changed, 139 insertions, 187 deletions
diff --git a/UniversalVesAdapter/src/main/resources/DMaapMR.properties b/UniversalVesAdapter/src/main/resources/DMaapMR.properties new file mode 100644 index 0000000..ae96248 --- /dev/null +++ b/UniversalVesAdapter/src/main/resources/DMaapMR.properties @@ -0,0 +1,45 @@ + # DMaaP Config Constants + # + #default hostname + + mr.hostname=10.53.172.156 + # default port number + mr.DEFAULT_PORT_NUMBER=3904 + # default to no username + mr.DEFAULT_USER_NAME=null + # defaults to no userPassword + mr.DEFAULT_USER_PASSWORD=null + #defaults to using https protocol + mr.DEFAULT_PROTOCOL=http + #defaults to json content type + mr.DEFAULT_CONTENT_TYPE=application/json + + mr.DMAAP_URI_PATH_PREFIX=/events/ + mr.DMAAP_DEFAULT_CONSUMER_ID=con2 + mr.DMAAP_GROUP_PREFIX=grp2 + + # // ================== DMaaP MR Constants ============================== // + + # ///////////////// Publisher Constants + #Dmaap Publisher Topic + mr.publisher.topic=unauthenticated.SEC_FAULT_OUTPUT + #mr.publisher.topic=TEST-TOPIC1 + #mr.publisher.topic=unauthenticated.SEC_MEASUREMENT_OUTPUT + #disable batching by default + mr.publisher.DEFAULT_PUBLISHER_MAX_BATCH_SIZE=1 + # default recovery messages size + mr.publisher.DEFAULT_PUBLISHER_MAX_RECOVERY_QUEUE_SIZE=100000 + #number of retries when flushing messages + mr.publisher.PUBLISHER_MAX_FLUSH_RETRIES_ON_CLOSE=5 + #delay in retrying for flushing messages + mr.publisher.PUBLISHER_DELAY_MS_ON_RETRIES_ON_CLOSE=5000 + #////////////////// Subscriber Constants + #Dmaap Subcriber Topic + #mr.subscriber.topic=ONAP-COLLECTOR-SNMPTRAP + mr.subscriber.topic=ONAP-COLLECTOR-SNMPTRAP + #mr.subscriber.topic=TEST-TOPIC2 + mr.subcriber.DEFAULT_SUBSCRIBER_TIMEOUT_MS=-1 + mr.subcriber.DEFAULT_SUBSCRIBER_MESSAGE_LIMIT=-1 + mr.subcriber.DEFAULT_SUBSCRIBER_GROUP_PREFIX=grp2 + mr.subcriber.SUBSCRIBER_TIMEOUT_QUERY_PARAM_NAME=timeout + mr.subcriber.SUBSCRIBER_MSG_LIMIT_QUERY_PARAM_NAME=limit
\ No newline at end of file diff --git a/UniversalVesAdapter/src/main/resources/application.properties b/UniversalVesAdapter/src/main/resources/application.properties index 4841f4a..c2dec51 100644 --- a/UniversalVesAdapter/src/main/resources/application.properties +++ b/UniversalVesAdapter/src/main/resources/application.properties @@ -1,11 +1,18 @@ +server.port=8085 + logging.level.org.springframework.web=ERROR -logging.level.org.onap.universalvesadapter=DEBUG -dmaap.url=http://localhost:8080/greeting12 -snmpTrap.configFile=snmpTrapToVes.xml +defaultMappingFileName=defaultSnmpMappingFile universal.configFiles=snmp:snmpTrapToVes.xml,default:defaultConfig.xml -fileService.url=http://localhost:8888/fileAsString/ -messagesInBatch=1000 -messagesInTimeInterval=5000 + mapperConfig.file=../UniversalVesAdapter/src/main/resources/MapperConfig.json -dmaap.consumer_props=../UniversalVesAdapter/src/main/resources/dme2/consumer.properties -dmaap.publisher_props=../UniversalVesAdapter/src/main/resources/dme2/publisher.properties
\ No newline at end of file +dmaap.mr_props=DMaapMR.properties + +#DEV Machine DB Details +spring.datasource.url=jdbc:postgresql://10.49.16.19:5432/dummy +spring.datasource.username=postgres +spring.datasource.password=root + +#Lab Details +#spring.datasource.url=jdbc:postgresql://10.53.172.129:5432/dummy +#spring.datasource.username=ngpuser +#spring.datasource.password=root
\ No newline at end of file diff --git a/UniversalVesAdapter/src/main/resources/dme2/consumer.properties b/UniversalVesAdapter/src/main/resources/dme2/consumer.properties deleted file mode 100644 index 6ba59d1..0000000 --- a/UniversalVesAdapter/src/main/resources/dme2/consumer.properties +++ /dev/null @@ -1,61 +0,0 @@ -<!DOCTYPE HTML> -<!DOCTYPE html PUBLIC "" ""><HTML><HEAD> -<META http-equiv="Content-Type" content="text/html; charset=utf-8"></HEAD> -<BODY> -<PRE>############################################################################### -# ============LICENSE_START======================================================= -# org.onap.dmaap -# ================================================================================ -# Copyright � 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========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# -############################################################################### -TransportType=DME2 -Latitude =47.778998 -Longitude =-122.182883 -Version =1.0 -ServiceName =dmaap-v1.dev.dmaap.dt.saat.acsi.att.com/events -Environment =TEST -Partner=BOT_R -routeOffer=MR1 -SubContextPath =/ -Protocol =http -MethodType =GET -username =<att uid> -password =<password> -contenttype =application/json -authKey=<auth key> -authDate=2016-02-18T13:57:37-0800 -#host=uebsb91bodc.it.att.com:3904 -host=<host>:<port> -topic=com.att.ecomp_test.crm.preDemo1 -group=con -id=5 -timeout=15000 -limit=1000 -filter= -AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler -AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler -AFT_DME2_REQ_TRACE_ON=true -AFT_ENVIRONMENT=AFTUAT -AFT_DME2_EP_CONN_TIMEOUT=15000 -AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000 -AFT_DME2_EP_READ_TIMEOUT_MS=50000 -sessionstickinessrequired=NO -DME2preferredRouterFilePath=/src/main/resources/dme2/preferredRoute.txt - - -</PRE></BODY></HTML> diff --git a/UniversalVesAdapter/src/main/resources/dme2/preferredRoute.properties b/UniversalVesAdapter/src/main/resources/dme2/preferredRoute.properties deleted file mode 100644 index 506df76..0000000 --- a/UniversalVesAdapter/src/main/resources/dme2/preferredRoute.properties +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE HTML> -<!DOCTYPE html PUBLIC "" ""><HTML><HEAD> -<META http-equiv="Content-Type" content="text/html; charset=utf-8"></HEAD> -<BODY> -<PRE>preferredRouteKey=MR1</PRE></BODY></HTML> diff --git a/UniversalVesAdapter/src/main/resources/dme2/producer.properties b/UniversalVesAdapter/src/main/resources/dme2/producer.properties deleted file mode 100644 index fb9e639..0000000 --- a/UniversalVesAdapter/src/main/resources/dme2/producer.properties +++ /dev/null @@ -1,59 +0,0 @@ -<!DOCTYPE HTML> -<!DOCTYPE html PUBLIC "" ""><HTML><HEAD> -<META http-equiv="Content-Type" content="text/html; charset=utf-8"></HEAD> -<BODY> -<PRE>############################################################################### -# ============LICENSE_START======================================================= -# org.onap.dmaap -# ================================================================================ -# Copyright � 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========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# -############################################################################### -TransportType=DME2 -Latitude =47.778998 -Longitude =-122.182883 -Version =1.0 -ServiceName =dmaap-v1.dev.dmaap.dt.saat.acsi.att.com/events -#com.att.acsi.saat.dt.dmaap.dev.mrclientnew1 -Environment =TEST -Partner=BOT_R -routeOffer=MR1 -SubContextPath =/ -Protocol =http -MethodType =POST -username =<att uid> -password =<global logon password> -contenttype = application/json -authKey=<auth key> -authDate=2016-07-20T11:30:56-0700 -host=<host>:<port> -topic=com.att.ecomp_test.crm.preDemo1 -#host=uebsb91bodc.it.att.com:3904 -partition=1 -maxBatchSize=100 -maxAgeMs=250 -AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler -AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler -AFT_DME2_REQ_TRACE_ON=true -AFT_ENVIRONMENT=AFTUAT -AFT_DME2_EP_CONN_TIMEOUT=15000 -AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000 -AFT_DME2_EP_READ_TIMEOUT_MS=50000 -sessionstickinessrequired=NO -DME2preferredRouterFilePath=/src/main/resources/dme2/preferredRoute.txt -MessageSentThreadOccurance=50 -</PRE></BODY></HTML> diff --git a/UniversalVesAdapter/src/main/resources/logback.xml b/UniversalVesAdapter/src/main/resources/logback.xml new file mode 100644 index 0000000..c08cd77 --- /dev/null +++ b/UniversalVesAdapter/src/main/resources/logback.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration> + + <property name="DEV_HOME" value="logs" /> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <layout class="ch.qos.logback.classic.PatternLayout"> + <Pattern> + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + </Pattern> + </layout> + </appender> + + <appender name="FILE-AUDIT" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${DEV_HOME}/debug.log</file> + <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> + <Pattern> + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + </Pattern> + </encoder> + + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <!-- rollover daily --> + <fileNamePattern>${DEV_HOME}/archived/debug.%d{yyyy-MM-dd}.%i.log + </fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>10MB</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + </rollingPolicy> + + </appender> + + <appender name="FILE-ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>ERROR</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${DEV_HOME}/DroppedEvents.log</file> + <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> + <Pattern> + %d{yyyy-MM-dd HH:mm:ss} %logger{36} - %msg%n + </Pattern> + </encoder> + + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <!-- rollover daily --> + <fileNamePattern>${DEV_HOME}/archived/DroppedEvents.%d{yyyy-MM-dd}.%i.log + </fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy + class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>10MB</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + </rollingPolicy> + + </appender> + + <!-- Send logs to both console and file audit --> + <logger name="org.onap.universalvesadapter" level="debug" additivity="false"> + <appender-ref ref="FILE-AUDIT" /> + <appender-ref ref="STDOUT" /> + </logger> + <logger name="org.onap.universalvesadapter.adapter" level="debug" additivity="false"> + <appender-ref ref="FILE-AUDIT" /> + <appender-ref ref="FILE-ERROR" /> + <appender-ref ref="STDOUT" /> + </logger> - + <!-- <logger name="org.onap.universalvesadapter.adapter" level="error" additivity="false"> + <appender-ref ref="FILE-ERROR" /> + </logger> --> + + + + + +</configuration>
\ No newline at end of file diff --git a/UniversalVesAdapter/src/main/resources/snmptovesTest.xml b/UniversalVesAdapter/src/main/resources/snmptovesTest.xml deleted file mode 100644 index 5fad2c9..0000000 --- a/UniversalVesAdapter/src/main/resources/snmptovesTest.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<smooks-resource-list - xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" - xmlns:json="http://www.milyn.org/xsd/smooks/json-1.1.xsd" - xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd"> - <json:reader rootName="simple" keyWhitspaceReplacement="-"> - </json:reader> - <!-- <jb:bean class="com.example.demo.Simple" beanId="simple" createOnElement="simple"> - <jb:value property="orderId" data="#/orderId" /> - <jb:value property="username" data="#/username" /> - <jb:wiring property="customer" beanIdRef="customer"/> - <jb:wiring property="orderItems" beanIdRef="orderItems"/> - </jb:bean> --> - - <jb:bean class="org.onap.dcaegen2.ves.domain.VesEvent" beanId="vesEvent" createOnElement="simple"> - <jb:wiring property="event" beanIdRef="event"/> - </jb:bean> - - <jb:bean class="org.onap.dcaegen2.ves.domain.Event" beanId="event" createOnElement="simple"> - <jb:wiring property="commonEventHeader" beanIdRef="commonEventHeader"/> - <jb:wiring property="faultFields" beanIdRef="faultFields"/> - <!--<jb:wiring property="measurementsForVfScalingFields" beanIdRef="measurementsForVfScalingFields"/> --> - </jb:bean> - <!--<jb:bean class="org.onap.dcaegen2.ves.domain.MeasurementsForVfScalingFields" beanId="measurementsForVfScalingFields" createOnElement="simple"> - <jb:wiring property="additionalMeasurements" beanIdRef="additionalMeasurements"/> - </jb:bean>--> - - <jb:bean class="org.onap.dcaegen2.ves.domain.CommonEventHeader" beanId="commonEventHeader" createOnElement="simple"> - <jb:value property="eventId" data="#/community" /> - <jb:value property="eventName" data="#/protocol-version" /> - <jb:value property="domain" data="#/trap-category" /> - <jb:value property="sequence" data="#/time-received" decoder="Long"/> - <jb:value property="lastEpochMicrosec" data="#/community-len" decoder="Double" /> - <jb:value property="startEpochMicrosec" data="#/notify-OID-len" /> - </jb:bean> - - <jb:bean class="org.onap.dcaegen2.ves.domain.FaultFields" beanId="faultFields" createOnElement="simple"> - <jb:value property="alarmCondition" data="#/cambria.partition" /> - <jb:value property="eventSeverity" data="#/notify-OID" /> - <jb:value property="eventSourceType" data="#/agent-name" /> - <jb:value property="specificProblem" data="#/agent-address" /> - <jb:value property="faultFieldsVersion" data="#/epoch_serno" decoder="Double" /> - </jb:bean> - - - <!--<jb:bean class="java.util.ArrayList" beanId="additionalMeasurements" createOnElement="simple"> - <jb:wiring beanIdRef="additionalMeasurement"/> - </jb:bean> - - <jb:bean class="org.onap.dcaegen2.ves.domain.AdditionalMeasurement" beanId="additionalMeasurement" createOnElement="varbinds/element"> - <jb:value property="name" data="#/varbind_value" /> - </jb:bean> --> - -</smooks-resource-list>
\ No newline at end of file |