diff options
Diffstat (limited to 'test')
80 files changed, 3942 insertions, 262 deletions
diff --git a/test/csit/plans/aai/esr-server/setup.sh b/test/csit/plans/aai/esr-server/setup.sh index a2cfa5e8d..42d9676d7 100644 --- a/test/csit/plans/aai/esr-server/setup.sh +++ b/test/csit/plans/aai/esr-server/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2017 ZTE Corporation. +# Copyright 2017-2018 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/aai_keystore b/test/csit/plans/aai/resources/aai-resources/appconfig/aai_keystore Binary files differnew file mode 100644 index 000000000..1ddef0c9b --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/aai_keystore diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/aaiconfig.properties b/test/csit/plans/aai/resources/aai-resources/appconfig/aaiconfig.properties new file mode 100644 index 000000000..435507a81 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/aaiconfig.properties @@ -0,0 +1,119 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + + + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json + +aai.server.url.base=https://aai.api.simpledemo.onap.org:8443/aai/ +aai.server.url=https://aai.api.simpledemo.onap.org:8443/aai/v11/ +aai.global.callback.url=https://aai.api.simpledemo.onap.org:8443/aai/ + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.truststore.filename=aai_keystore +aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 +aai.keystore.filename=aai_keystore +aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 + + +aai.notification.current.version=v11 +aai.notificationEvent.default.status=UNPROCESSED +aai.notificationEvent.default.eventType=AAI-EVENT +aai.notificationEvent.default.domain=dev +aai.notificationEvent.default.sourceName=aai +aai.notificationEvent.default.sequenceNumber=0 +aai.notificationEvent.default.severity=NORMAL +aai.notificationEvent.default.version=v11 +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=true +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=v11 + + + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=50 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.file=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +# for transaction log +aai.logging.hbase.interceptor=true +aai.logging.hbase.enabled=true +aai.logging.hbase.logrequest=true +aai.logging.hbase.logresponse=true + +# for gremlin server +aai.server.rebind=g +hbase.table.name=aailogging.dev +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=localhost +hbase.zookeeper.property.clientPort=2181 +hbase.zookeeper.znode.parent=/hbase + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.transaction.logging=true +aai.transaction.logging.get=false +aai.transaction.logging.post=false + +#timeout for crud enabled flag +aai.crud.timeoutenabled=true + +#timeout app specific -1 to bypass for that app id, a whole number to override the timeout with that value (in ms) +aai.crud.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1|DCAE-CCS,-1|DCAES,-1|AAIRctFeed,-1|NewvceCreator,-1|IANewvceCreator,-1|AAI-CSIOVALS,-1 + +#default timeout limit added for crud if not overridden (in ms) +aai.crud.timeoutlimit=100000 +#limit set for bulk consumer APIS +aai.bulkconsumer.payloadlimit=30 + +#uncomment and use header X-OverrideLimit with the value to override the bulk api limit +#aai.bulkconsumer.payloadoverride=E6F04B93462CB5B0EDF41C05A9DDF5C3FE59748F +aai.bulkconsumer.payloadoverride=false diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/application.properties b/test/csit/plans/aai/resources/aai-resources/appconfig/application.properties new file mode 100644 index 000000000..b9c51eaf2 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/application.properties @@ -0,0 +1,72 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-resources +info.build.name=resources +info.build.description=Resources Microservice +info.build.version=1.2.0 + +spring.application.name=aai-resources +spring.jersey.type=filter + +server.contextPath=/ +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + +spring.profiles.active=production,dmaap +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + + +#Add this properties only if you want to change the URL, AJSC Framework interceptors will intercept +#com.att.ajsc.common.interceptors.PreInterceptor.url=/** +#com.att.ajsc.common.interceptors.PostInterceptor.url=/** + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +kubernetes.namespace=org-onap-aai + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=aai-resources/src/main/resources/ +server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties + +server.port=8447 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 +dmaap.ribbon.eureka.enabled=false +dmaap.ribbon.listOfServers=mr.api.simpledemo.onap.org:3904 +# Number of milliseconds to wait before making ping requests again +dmaap.ribbon.ServerListRefreshInterval=75000 +dmaap.ribbon.NFLoadBalancerPingInterval=75000 +dmaap.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.AvailabilityFilteringRule +dmaap.ribbon.NFLoadBalancerPingClassName=org.onap.aai.config.HttpPingImpl +dmaap.ribbon.EnableMarkingServerDownOnReachingFailureLimit=true +dmaap.ribbon.ServerDownFailureLimit=1 +# This needs to be verified but it seems that adding this property should automatically +# Make the dmaap client change the url from http to https depending on the server +dmaap.ribbon.securePorts=3905 + +# Custom Dmaap Specific Configuration +dmaap.ribbon.username= +dmaap.ribbon.password= +dmaap.ribbon.health.endpoint=/topics/AAI-EVENT +# Number of seconds to wait for the ping to work and might need to increase this if the pings are all failing +dmaap.ribbon.pingport.timeout=3 + +niws.loadbalancer.dmaap.filterCircuitTripped=true +niws.loadbalancer.dmaap.connectionFailureCountThreshold=3 +niws.loadbalancer.dmaap.circuitTripMaxTimeoutSeconds=180 +#dmaap.ribbon.retryableStatusCodes=404,503 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetriesNextServer=2 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetries=2 +#dmaap.ribbon.retryableStatusCodes.OkToRetryOnAllOperations=true diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/localhost-access-logback.xml b/test/csit/plans/aai/resources/aai-resources/appconfig/localhost-access-logback.xml new file mode 100644 index 000000000..a318796c5 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/localhost-access-logback.xml @@ -0,0 +1,62 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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. + +--> +<configuration> + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <appender name="ACCESS" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder"> + <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D</Pattern> + </encoder> + </appender> + <appender-ref ref="ACCESS" /> +</configuration> + +<!-- +%a - Remote IP address +%A - Local IP address +%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent +%B - Bytes sent, excluding HTTP headers +%h - Remote host name +%H - Request protocol +%l - Remote logical username from identd (always returns '-') +%m - Request method +%p - Local port +%q - Query string (prepended with a '?' if it exists, otherwise an empty string +%r - First line of the request +%s - HTTP status code of the response +%S - User session ID +%t - Date and time, in Common Log Format format +%u - Remote user that was authenticated +%U - Requested URL path +%v - Local server name +%I - current request thread name (can compare later with stacktraces) + +%z - Custom pattern that parses the cert for the subject +%y - Custom pattern determines rest or dme2 + -->
\ No newline at end of file diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/logback.xml b/test/csit/plans/aai/resources/aai-resources/appconfig/logback.xml new file mode 100644 index 000000000..ee7ee61a6 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/logback.xml @@ -0,0 +1,391 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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. + +--> +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + + <property resource="application.properties" /> + + <property name="namespace" value="aai-resources"/> + + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <jmxConfigurator /> + <property name="logDirectory" value="${AJSC_HOME}/logs" /> + <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{targetVirtualEntity}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <!-- <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> --> + <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{partnerName}:%m%n"/> + + <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> + <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> + <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern> + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + </pattern> + </encoder> + </appender> + + <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/sane.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="SANE" /> + </appender> + + <appender name="METRIC" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="METRIC" /> + </appender> + + <appender name="DEBUG" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/debug.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="DEBUG" /> + </appender> + + <appender name="ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/rest/error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfErrorLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="ERROR" /> + </appender> + + <appender name="AUDIT" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfAuditLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="translog" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/translog.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfTransLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="translog" /> + </appender> + + <appender name="dmaapAAIEventConsumer" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="dmaapAAIEventConsumerDebug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <appender name="dmaapAAIEventConsumerMetric" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="external" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/external/external.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <logger name="org.onap.aai" level="DEBUG" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncSANE" /> + </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" /> + <logger name="com.jayway.jsonpath" 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="org.codehaus.groovy" level="WARN" /> + <logger name="com.att.scamper" level="WARN" /> + <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.ajsc" level="WARN" /> + <logger name="com.att.ajsc.csi.logging" level="WARN" /> + <logger name="com.att.ajsc.filemonitor" level="WARN" /> + <logger name="com.netflix.loadbalancer" level="WARN" /> + + <logger name="org.apache.zookeeper" level="OFF" /> + + <!-- Other Loggers that may help troubleshoot --> + <logger name="net.sf" 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" /> + + <logger name="org.hibernate.validator" level="WARN" /> + <logger name="org.hibernate" level="WARN" /> + <logger name="org.hibernate.ejb" level="OFF" /> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + + <logger name="org.eclipse.jetty" level="WARN" /> + + <!-- logback jms appenders & loggers definition starts here --> + <appender name="auditLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%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 [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <appender name="perfLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%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 [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <logger name="AuditRecord" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="AuditRecord_DirectCall" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="PerfTrackerRecord" level="INFO" additivity="false"> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + + <logger name="org.onap.aai.interceptors.post" level="DEBUG" + additivity="false"> + <appender-ref ref="asynctranslog" /> + </logger> + + <logger name="org.onap.aai.interceptors.pre.SetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.interceptors.post.ResetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false"> + <appender-ref ref="dmaapAAIEventConsumer" /> + <appender-ref ref="dmaapAAIEventConsumerDebug" /> + <appender-ref ref="dmaapAAIEventConsumerMetric" /> + </logger> + + <logger name="org.apache" level="OFF" /> + <logger name="org.zookeeper" level="OFF" /> + <logger name="com.thinkaurelius" level="WARN" /> + <logger name="com.att.aft.dme2" level="WARN" /> + + <!-- ============================================================================ --> + <!-- General EELF logger --> + <!-- ============================================================================ --> + <logger name="com.att.eelf" level="WARN" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + </logger> + + <root level="DEBUG"> + <appender-ref ref="external" /> + </root> +</configuration> diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/realm.properties b/test/csit/plans/aai/resources/aai-resources/appconfig/realm.properties new file mode 100644 index 000000000..fb692cc3e --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/realm.properties @@ -0,0 +1,12 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/titan-cached.properties b/test/csit/plans/aai/resources/aai-resources/appconfig/titan-cached.properties new file mode 100644 index 000000000..97bb81863 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/titan-cached.properties @@ -0,0 +1,39 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/titan-realtime.properties b/test/csit/plans/aai/resources/aai-resources/appconfig/titan-realtime.properties new file mode 100644 index 000000000..0c97b753a --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/titan-realtime.properties @@ -0,0 +1,36 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/aai_keystore b/test/csit/plans/aai/resources/aai-traversal/appconfig/aai_keystore Binary files differnew file mode 100644 index 000000000..1ddef0c9b --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/aai_keystore diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/aaiconfig.properties b/test/csit/plans/aai/resources/aai-traversal/appconfig/aaiconfig.properties new file mode 100644 index 000000000..cef109033 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/aaiconfig.properties @@ -0,0 +1,114 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + + + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json + +aai.server.url.base=https://aai.api.simpledemo.onap.org:8443/aai/ +aai.server.url=https://aai.api.simpledemo.onap.org:8443/aai/v11/ +aai.global.callback.url=https://aai.api.simpledemo.onap.org:8443/aai/ + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.truststore.filename=aai_keystore +aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 +aai.keystore.filename=aai_keystore +aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 + + +aai.notification.current.version=v11 +aai.notificationEvent.default.status=UNPROCESSED +aai.notificationEvent.default.eventType=AAI-EVENT +aai.notificationEvent.default.domain=dev +aai.notificationEvent.default.sourceName=aai +aai.notificationEvent.default.sequenceNumber=0 +aai.notificationEvent.default.severity=NORMAL +aai.notificationEvent.default.version=v11 +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=true +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=v11 + + + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=50 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.file=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +# for transaction log +aai.logging.hbase.interceptor=true +aai.logging.hbase.enabled=true +aai.logging.hbase.logrequest=true +aai.logging.hbase.logresponse=true + +# for gremlin server +aai.server.rebind=g +hbase.table.name=aailogging.dev +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=localhost +hbase.zookeeper.property.clientPort=2181 +hbase.zookeeper.znode.parent=/hbase + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.transaction.logging=true +aai.transaction.logging.get=false +aai.transaction.logging.post=false + +#timeout for traversal enabled flag +aai.traversal.timeoutenabled=true + +#timeout app specific +aai.traversal.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1|DCAE-CCS,-1|DCAES,-1|AAI-FILEGEN-GFPIP,-1 + +#default timeout limit added for traversal if not overridden (in ms) +aai.traversal.timeoutlimit=180000 + diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/application.properties b/test/csit/plans/aai/resources/aai-traversal/appconfig/application.properties new file mode 100644 index 000000000..0292512c1 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/application.properties @@ -0,0 +1,72 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-traversal +info.build.name=traversal +info.build.description=Traversal Microservice +info.build.version=1.2.0 + +spring.application.name=aai-traversal +spring.jersey.type=filter + +server.contextPath=/ +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + +spring.profiles.active=production,dmaap +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + + +#Add this properties only if you want to change the URL, AJSC Framework interceptors will intercept +#com.att.ajsc.common.interceptors.PreInterceptor.url=/** +#com.att.ajsc.common.interceptors.PostInterceptor.url=/** + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +kubernetes.namespace=org-onap-aai + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=aai-traversal/src/main/resources/ +server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties + +server.port=8446 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 +dmaap.ribbon.eureka.enabled=false +dmaap.ribbon.listOfServers=mr.api.simpledemo.onap.org:3904 +# Number of milliseconds to wait before making ping requests again +dmaap.ribbon.ServerListRefreshInterval=75000 +dmaap.ribbon.NFLoadBalancerPingInterval=75000 +dmaap.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.AvailabilityFilteringRule +dmaap.ribbon.NFLoadBalancerPingClassName=org.onap.aai.config.HttpPingImpl +dmaap.ribbon.EnableMarkingServerDownOnReachingFailureLimit=true +dmaap.ribbon.ServerDownFailureLimit=1 +# This needs to be verified but it seems that adding this property should automatically +# Make the dmaap client change the url from http to https depending on the server +dmaap.ribbon.securePorts=3905 + +# Custom Dmaap Specific Configuration +dmaap.ribbon.username= +dmaap.ribbon.password= +dmaap.ribbon.health.endpoint=/topics/AAI-EVENT +# Number of seconds to wait for the ping to work and might need to increase this if the pings are all failing +dmaap.ribbon.pingport.timeout=3 + +niws.loadbalancer.dmaap.filterCircuitTripped=true +niws.loadbalancer.dmaap.connectionFailureCountThreshold=3 +niws.loadbalancer.dmaap.circuitTripMaxTimeoutSeconds=180 +#dmaap.ribbon.retryableStatusCodes=404,503 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetriesNextServer=2 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetries=2 +#dmaap.ribbon.retryableStatusCodes.OkToRetryOnAllOperations=true diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/localhost-access-logback.xml b/test/csit/plans/aai/resources/aai-traversal/appconfig/localhost-access-logback.xml new file mode 100644 index 000000000..a318796c5 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/localhost-access-logback.xml @@ -0,0 +1,62 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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. + +--> +<configuration> + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <appender name="ACCESS" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder"> + <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D</Pattern> + </encoder> + </appender> + <appender-ref ref="ACCESS" /> +</configuration> + +<!-- +%a - Remote IP address +%A - Local IP address +%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent +%B - Bytes sent, excluding HTTP headers +%h - Remote host name +%H - Request protocol +%l - Remote logical username from identd (always returns '-') +%m - Request method +%p - Local port +%q - Query string (prepended with a '?' if it exists, otherwise an empty string +%r - First line of the request +%s - HTTP status code of the response +%S - User session ID +%t - Date and time, in Common Log Format format +%u - Remote user that was authenticated +%U - Requested URL path +%v - Local server name +%I - current request thread name (can compare later with stacktraces) + +%z - Custom pattern that parses the cert for the subject +%y - Custom pattern determines rest or dme2 + -->
\ No newline at end of file diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/logback.xml b/test/csit/plans/aai/resources/aai-traversal/appconfig/logback.xml new file mode 100644 index 000000000..31bfe10cf --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/logback.xml @@ -0,0 +1,391 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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. + +--> +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + + <property resource="application.properties" /> + + <property name="namespace" value="aai-traversal"/> + + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <jmxConfigurator /> + <property name="logDirectory" value="${AJSC_HOME}/logs" /> + <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{targetVirtualEntity}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <!-- <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> --> + <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{partnerName}:%m%n"/> + + <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> + <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> + <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern> + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + </pattern> + </encoder> + </appender> + + <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/sane.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="SANE" /> + </appender> + + <appender name="METRIC" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="METRIC" /> + </appender> + + <appender name="DEBUG" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/debug.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="DEBUG" /> + </appender> + + <appender name="ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/rest/error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfErrorLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="ERROR" /> + </appender> + + <appender name="AUDIT" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfAuditLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="translog" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/translog.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfTransLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="translog" /> + </appender> + + <appender name="dmaapAAIEventConsumer" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="dmaapAAIEventConsumerDebug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <appender name="dmaapAAIEventConsumerMetric" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="external" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/external/external.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <logger name="org.onap.aai" level="DEBUG" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncSANE" /> + </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" /> + <logger name="com.jayway.jsonpath" 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="org.codehaus.groovy" level="WARN" /> + <logger name="com.att.scamper" level="WARN" /> + <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.ajsc" level="WARN" /> + <logger name="com.att.ajsc.csi.logging" level="WARN" /> + <logger name="com.att.ajsc.filemonitor" level="WARN" /> + <logger name="com.netflix.loadbalancer" level="WARN" /> + + <logger name="org.apache.zookeeper" level="OFF" /> + + <!-- Other Loggers that may help troubleshoot --> + <logger name="net.sf" 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" /> + + <logger name="org.hibernate.validator" level="WARN" /> + <logger name="org.hibernate" level="WARN" /> + <logger name="org.hibernate.ejb" level="OFF" /> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + + <logger name="org.eclipse.jetty" level="WARN" /> + + <!-- logback jms appenders & loggers definition starts here --> + <appender name="auditLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%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 [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <appender name="perfLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%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 [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <logger name="AuditRecord" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="AuditRecord_DirectCall" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="PerfTrackerRecord" level="INFO" additivity="false"> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + + <logger name="org.onap.aai.interceptors.post" level="DEBUG" + additivity="false"> + <appender-ref ref="asynctranslog" /> + </logger> + + <logger name="org.onap.aai.interceptors.pre.SetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.interceptors.post.ResetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false"> + <appender-ref ref="dmaapAAIEventConsumer" /> + <appender-ref ref="dmaapAAIEventConsumerDebug" /> + <appender-ref ref="dmaapAAIEventConsumerMetric" /> + </logger> + + <logger name="org.apache" level="OFF" /> + <logger name="org.zookeeper" level="OFF" /> + <logger name="com.thinkaurelius" level="WARN" /> + <logger name="com.att.aft.dme2" level="WARN" /> + + <!-- ============================================================================ --> + <!-- General EELF logger --> + <!-- ============================================================================ --> + <logger name="com.att.eelf" level="WARN" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + </logger> + + <root level="DEBUG"> + <appender-ref ref="external" /> + </root> +</configuration> diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/realm.properties b/test/csit/plans/aai/resources/aai-traversal/appconfig/realm.properties new file mode 100644 index 000000000..fb692cc3e --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/realm.properties @@ -0,0 +1,12 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-cached.properties b/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-cached.properties new file mode 100644 index 000000000..97bb81863 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-cached.properties @@ -0,0 +1,39 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-realtime.properties b/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-realtime.properties new file mode 100644 index 000000000..0c97b753a --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-realtime.properties @@ -0,0 +1,36 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/resources/docker-compose.yml b/test/csit/plans/aai/resources/docker-compose.yml index 80865bb90..3f465c3ec 100644 --- a/test/csit/plans/aai/resources/docker-compose.yml +++ b/test/csit/plans/aai/resources/docker-compose.yml @@ -4,13 +4,19 @@ services: image: ${DOCKER_REGISTRY}/onap/aai-resources hostname: aai-resources.api.simpledemo.onap.org environment: - - AAI_CHEF_ENV=simpledemo - - AAI_CHEF_LOC=/var/chef/aai-data/environments - - CHEF_BRANCH=master - - CHEF_GIT_URL=http://gerrit.onap.org/r/aai - LOCAL_USER_ID=${USER_ID} + - LOCAL_GROUP_ID=${GROUP_ID} ports: - 8447:8447 + volumes: + - ${CURRENT_PWD}/aai-resources/appconfig/titan-realtime.properties:/opt/app/aai-resources/resources/etc/appprops/titan-realtime.properties + - ${CURRENT_PWD}/aai-resources/appconfig/titan-cached.properties:/opt/app/aai-resources/resources/etc/appprops/titan-cached.properties + - ${CURRENT_PWD}/aai-resources/appconfig/aaiconfig.properties:/opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties + - ${CURRENT_PWD}/aai-resources/appconfig/application.properties:/opt/app/aai-resources/resources/application.properties + - ${CURRENT_PWD}/aai-resources/appconfig/logback.xml:/opt/app/aai-resources/resources/logback.xml + - ${CURRENT_PWD}/aai-resources/appconfig/localhost-access-logback.xml:/opt/app/aai-resources/resources/localhost-access-logback.xml + - ${CURRENT_PWD}/aai-resources/appconfig/aai_keystore:/opt/app/aai-resources/resources/etc/auth/aai_keystore + - ${CURRENT_PWD}/aai-resources/appconfig/realm.properties:/opt/app/aai-resources/resources/etc/auth/realm.properties logging: driver: "json-file" options: @@ -20,12 +26,18 @@ services: image: ${DOCKER_REGISTRY}/onap/aai-traversal hostname: aai-traversal.api.simpledemo.onap.org environment: - - AAI_CHEF_ENV=simpledemo - - AAI_CHEF_LOC=/var/chef/aai-data/environments - - CHEF_BRANCH=master - - CHEF_GIT_URL=http://gerrit.onap.org/r/aai - LOCAL_USER_ID=${USER_ID} + - LOCAL_GROUP_ID=${GROUP_ID} - DISABLE_UPDATE_QUERY=true + volumes: + - ${CURRENT_PWD}/aai-traversal/appconfig/titan-realtime.properties:/opt/app/aai-traversal/resources/etc/appprops/titan-realtime.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/titan-cached.properties:/opt/app/aai-traversal/resources/etc/appprops/titan-cached.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/aaiconfig.properties:/opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/application.properties:/opt/app/aai-traversal/resources/application.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/logback.xml:/opt/app/aai-traversal/resources/logback.xml + - ${CURRENT_PWD}/aai-traversal/appconfig/localhost-access-logback.xml:/opt/app/aai-traversal/resources/localhost-access-logback.xml + - ${CURRENT_PWD}/aai-traversal/appconfig/aai_keystore:/opt/app/aai-traversal/resources/etc/auth/aai_keystore + - ${CURRENT_PWD}/aai-traversal/appconfig/realm.properties:/opt/app/aai-traversal/resources/etc/auth/realm.properties ports: - 8446:8446 logging: diff --git a/test/csit/plans/aai/resources/setup.sh b/test/csit/plans/aai/resources/setup.sh index a4c7648c0..14b567108 100644 --- a/test/csit/plans/aai/resources/setup.sh +++ b/test/csit/plans/aai/resources/setup.sh @@ -26,6 +26,8 @@ DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) DOCKER_REGISTRY=${NEXUS_DOCKER_REPO} DOCKER_IMAGE_VERSION=1.2-STAGING-latest +export CURRENT_PWD=$(pwd); + function wait_for_container() { CONTAINER_NAME="$1"; @@ -101,7 +103,7 @@ else fi; RESOURCES_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-resources.api.simpledemo.onap.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); -wait_for_container ${RESOURCES_CONTAINER_NAME} '0.0.0.0:8447'; +wait_for_container $RESOURCES_CONTAINER_NAME 'Resources Microservice Started'; docker logs ${RESOURCES_CONTAINER_NAME}; diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/aai_keystore b/test/csit/plans/aai/traversal/aai-resources/appconfig/aai_keystore Binary files differnew file mode 100644 index 000000000..1ddef0c9b --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/aai_keystore diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/aaiconfig.properties b/test/csit/plans/aai/traversal/aai-resources/appconfig/aaiconfig.properties new file mode 100644 index 000000000..435507a81 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/aaiconfig.properties @@ -0,0 +1,119 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + + + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json + +aai.server.url.base=https://aai.api.simpledemo.onap.org:8443/aai/ +aai.server.url=https://aai.api.simpledemo.onap.org:8443/aai/v11/ +aai.global.callback.url=https://aai.api.simpledemo.onap.org:8443/aai/ + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.truststore.filename=aai_keystore +aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 +aai.keystore.filename=aai_keystore +aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 + + +aai.notification.current.version=v11 +aai.notificationEvent.default.status=UNPROCESSED +aai.notificationEvent.default.eventType=AAI-EVENT +aai.notificationEvent.default.domain=dev +aai.notificationEvent.default.sourceName=aai +aai.notificationEvent.default.sequenceNumber=0 +aai.notificationEvent.default.severity=NORMAL +aai.notificationEvent.default.version=v11 +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=true +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=v11 + + + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=50 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.file=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +# for transaction log +aai.logging.hbase.interceptor=true +aai.logging.hbase.enabled=true +aai.logging.hbase.logrequest=true +aai.logging.hbase.logresponse=true + +# for gremlin server +aai.server.rebind=g +hbase.table.name=aailogging.dev +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=localhost +hbase.zookeeper.property.clientPort=2181 +hbase.zookeeper.znode.parent=/hbase + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.transaction.logging=true +aai.transaction.logging.get=false +aai.transaction.logging.post=false + +#timeout for crud enabled flag +aai.crud.timeoutenabled=true + +#timeout app specific -1 to bypass for that app id, a whole number to override the timeout with that value (in ms) +aai.crud.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1|DCAE-CCS,-1|DCAES,-1|AAIRctFeed,-1|NewvceCreator,-1|IANewvceCreator,-1|AAI-CSIOVALS,-1 + +#default timeout limit added for crud if not overridden (in ms) +aai.crud.timeoutlimit=100000 +#limit set for bulk consumer APIS +aai.bulkconsumer.payloadlimit=30 + +#uncomment and use header X-OverrideLimit with the value to override the bulk api limit +#aai.bulkconsumer.payloadoverride=E6F04B93462CB5B0EDF41C05A9DDF5C3FE59748F +aai.bulkconsumer.payloadoverride=false diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/application.properties b/test/csit/plans/aai/traversal/aai-resources/appconfig/application.properties new file mode 100644 index 000000000..b9c51eaf2 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/application.properties @@ -0,0 +1,72 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-resources +info.build.name=resources +info.build.description=Resources Microservice +info.build.version=1.2.0 + +spring.application.name=aai-resources +spring.jersey.type=filter + +server.contextPath=/ +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + +spring.profiles.active=production,dmaap +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + + +#Add this properties only if you want to change the URL, AJSC Framework interceptors will intercept +#com.att.ajsc.common.interceptors.PreInterceptor.url=/** +#com.att.ajsc.common.interceptors.PostInterceptor.url=/** + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +kubernetes.namespace=org-onap-aai + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=aai-resources/src/main/resources/ +server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties + +server.port=8447 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 +dmaap.ribbon.eureka.enabled=false +dmaap.ribbon.listOfServers=mr.api.simpledemo.onap.org:3904 +# Number of milliseconds to wait before making ping requests again +dmaap.ribbon.ServerListRefreshInterval=75000 +dmaap.ribbon.NFLoadBalancerPingInterval=75000 +dmaap.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.AvailabilityFilteringRule +dmaap.ribbon.NFLoadBalancerPingClassName=org.onap.aai.config.HttpPingImpl +dmaap.ribbon.EnableMarkingServerDownOnReachingFailureLimit=true +dmaap.ribbon.ServerDownFailureLimit=1 +# This needs to be verified but it seems that adding this property should automatically +# Make the dmaap client change the url from http to https depending on the server +dmaap.ribbon.securePorts=3905 + +# Custom Dmaap Specific Configuration +dmaap.ribbon.username= +dmaap.ribbon.password= +dmaap.ribbon.health.endpoint=/topics/AAI-EVENT +# Number of seconds to wait for the ping to work and might need to increase this if the pings are all failing +dmaap.ribbon.pingport.timeout=3 + +niws.loadbalancer.dmaap.filterCircuitTripped=true +niws.loadbalancer.dmaap.connectionFailureCountThreshold=3 +niws.loadbalancer.dmaap.circuitTripMaxTimeoutSeconds=180 +#dmaap.ribbon.retryableStatusCodes=404,503 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetriesNextServer=2 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetries=2 +#dmaap.ribbon.retryableStatusCodes.OkToRetryOnAllOperations=true diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/localhost-access-logback.xml b/test/csit/plans/aai/traversal/aai-resources/appconfig/localhost-access-logback.xml new file mode 100644 index 000000000..a318796c5 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/localhost-access-logback.xml @@ -0,0 +1,62 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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. + +--> +<configuration> + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <appender name="ACCESS" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder"> + <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D</Pattern> + </encoder> + </appender> + <appender-ref ref="ACCESS" /> +</configuration> + +<!-- +%a - Remote IP address +%A - Local IP address +%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent +%B - Bytes sent, excluding HTTP headers +%h - Remote host name +%H - Request protocol +%l - Remote logical username from identd (always returns '-') +%m - Request method +%p - Local port +%q - Query string (prepended with a '?' if it exists, otherwise an empty string +%r - First line of the request +%s - HTTP status code of the response +%S - User session ID +%t - Date and time, in Common Log Format format +%u - Remote user that was authenticated +%U - Requested URL path +%v - Local server name +%I - current request thread name (can compare later with stacktraces) + +%z - Custom pattern that parses the cert for the subject +%y - Custom pattern determines rest or dme2 + -->
\ No newline at end of file diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/logback.xml b/test/csit/plans/aai/traversal/aai-resources/appconfig/logback.xml new file mode 100644 index 000000000..ee7ee61a6 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/logback.xml @@ -0,0 +1,391 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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. + +--> +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + + <property resource="application.properties" /> + + <property name="namespace" value="aai-resources"/> + + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <jmxConfigurator /> + <property name="logDirectory" value="${AJSC_HOME}/logs" /> + <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{targetVirtualEntity}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <!-- <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> --> + <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{partnerName}:%m%n"/> + + <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> + <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> + <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern> + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + </pattern> + </encoder> + </appender> + + <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/sane.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="SANE" /> + </appender> + + <appender name="METRIC" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="METRIC" /> + </appender> + + <appender name="DEBUG" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/debug.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="DEBUG" /> + </appender> + + <appender name="ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/rest/error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfErrorLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="ERROR" /> + </appender> + + <appender name="AUDIT" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfAuditLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="translog" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/translog.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfTransLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="translog" /> + </appender> + + <appender name="dmaapAAIEventConsumer" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="dmaapAAIEventConsumerDebug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <appender name="dmaapAAIEventConsumerMetric" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="external" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/external/external.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <logger name="org.onap.aai" level="DEBUG" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncSANE" /> + </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" /> + <logger name="com.jayway.jsonpath" 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="org.codehaus.groovy" level="WARN" /> + <logger name="com.att.scamper" level="WARN" /> + <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.ajsc" level="WARN" /> + <logger name="com.att.ajsc.csi.logging" level="WARN" /> + <logger name="com.att.ajsc.filemonitor" level="WARN" /> + <logger name="com.netflix.loadbalancer" level="WARN" /> + + <logger name="org.apache.zookeeper" level="OFF" /> + + <!-- Other Loggers that may help troubleshoot --> + <logger name="net.sf" 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" /> + + <logger name="org.hibernate.validator" level="WARN" /> + <logger name="org.hibernate" level="WARN" /> + <logger name="org.hibernate.ejb" level="OFF" /> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + + <logger name="org.eclipse.jetty" level="WARN" /> + + <!-- logback jms appenders & loggers definition starts here --> + <appender name="auditLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%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 [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <appender name="perfLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%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 [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <logger name="AuditRecord" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="AuditRecord_DirectCall" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="PerfTrackerRecord" level="INFO" additivity="false"> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + + <logger name="org.onap.aai.interceptors.post" level="DEBUG" + additivity="false"> + <appender-ref ref="asynctranslog" /> + </logger> + + <logger name="org.onap.aai.interceptors.pre.SetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.interceptors.post.ResetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false"> + <appender-ref ref="dmaapAAIEventConsumer" /> + <appender-ref ref="dmaapAAIEventConsumerDebug" /> + <appender-ref ref="dmaapAAIEventConsumerMetric" /> + </logger> + + <logger name="org.apache" level="OFF" /> + <logger name="org.zookeeper" level="OFF" /> + <logger name="com.thinkaurelius" level="WARN" /> + <logger name="com.att.aft.dme2" level="WARN" /> + + <!-- ============================================================================ --> + <!-- General EELF logger --> + <!-- ============================================================================ --> + <logger name="com.att.eelf" level="WARN" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + </logger> + + <root level="DEBUG"> + <appender-ref ref="external" /> + </root> +</configuration> diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/realm.properties b/test/csit/plans/aai/traversal/aai-resources/appconfig/realm.properties new file mode 100644 index 000000000..fb692cc3e --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/realm.properties @@ -0,0 +1,12 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-cached.properties b/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-cached.properties new file mode 100644 index 000000000..97bb81863 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-cached.properties @@ -0,0 +1,39 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-realtime.properties b/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-realtime.properties new file mode 100644 index 000000000..0c97b753a --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-realtime.properties @@ -0,0 +1,36 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/aai_keystore b/test/csit/plans/aai/traversal/aai-traversal/appconfig/aai_keystore Binary files differnew file mode 100644 index 000000000..1ddef0c9b --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/aai_keystore diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/aaiconfig.properties b/test/csit/plans/aai/traversal/aai-traversal/appconfig/aaiconfig.properties new file mode 100644 index 000000000..cef109033 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/aaiconfig.properties @@ -0,0 +1,114 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + + + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json + +aai.server.url.base=https://aai.api.simpledemo.onap.org:8443/aai/ +aai.server.url=https://aai.api.simpledemo.onap.org:8443/aai/v11/ +aai.global.callback.url=https://aai.api.simpledemo.onap.org:8443/aai/ + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.truststore.filename=aai_keystore +aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 +aai.keystore.filename=aai_keystore +aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 + + +aai.notification.current.version=v11 +aai.notificationEvent.default.status=UNPROCESSED +aai.notificationEvent.default.eventType=AAI-EVENT +aai.notificationEvent.default.domain=dev +aai.notificationEvent.default.sourceName=aai +aai.notificationEvent.default.sequenceNumber=0 +aai.notificationEvent.default.severity=NORMAL +aai.notificationEvent.default.version=v11 +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=true +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=v11 + + + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=50 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.file=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +# for transaction log +aai.logging.hbase.interceptor=true +aai.logging.hbase.enabled=true +aai.logging.hbase.logrequest=true +aai.logging.hbase.logresponse=true + +# for gremlin server +aai.server.rebind=g +hbase.table.name=aailogging.dev +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=localhost +hbase.zookeeper.property.clientPort=2181 +hbase.zookeeper.znode.parent=/hbase + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.transaction.logging=true +aai.transaction.logging.get=false +aai.transaction.logging.post=false + +#timeout for traversal enabled flag +aai.traversal.timeoutenabled=true + +#timeout app specific +aai.traversal.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1|DCAE-CCS,-1|DCAES,-1|AAI-FILEGEN-GFPIP,-1 + +#default timeout limit added for traversal if not overridden (in ms) +aai.traversal.timeoutlimit=180000 + diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/application.properties b/test/csit/plans/aai/traversal/aai-traversal/appconfig/application.properties new file mode 100644 index 000000000..0292512c1 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/application.properties @@ -0,0 +1,72 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-traversal +info.build.name=traversal +info.build.description=Traversal Microservice +info.build.version=1.2.0 + +spring.application.name=aai-traversal +spring.jersey.type=filter + +server.contextPath=/ +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + +spring.profiles.active=production,dmaap +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + + +#Add this properties only if you want to change the URL, AJSC Framework interceptors will intercept +#com.att.ajsc.common.interceptors.PreInterceptor.url=/** +#com.att.ajsc.common.interceptors.PostInterceptor.url=/** + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +kubernetes.namespace=org-onap-aai + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=aai-traversal/src/main/resources/ +server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties + +server.port=8446 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 +dmaap.ribbon.eureka.enabled=false +dmaap.ribbon.listOfServers=mr.api.simpledemo.onap.org:3904 +# Number of milliseconds to wait before making ping requests again +dmaap.ribbon.ServerListRefreshInterval=75000 +dmaap.ribbon.NFLoadBalancerPingInterval=75000 +dmaap.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.AvailabilityFilteringRule +dmaap.ribbon.NFLoadBalancerPingClassName=org.onap.aai.config.HttpPingImpl +dmaap.ribbon.EnableMarkingServerDownOnReachingFailureLimit=true +dmaap.ribbon.ServerDownFailureLimit=1 +# This needs to be verified but it seems that adding this property should automatically +# Make the dmaap client change the url from http to https depending on the server +dmaap.ribbon.securePorts=3905 + +# Custom Dmaap Specific Configuration +dmaap.ribbon.username= +dmaap.ribbon.password= +dmaap.ribbon.health.endpoint=/topics/AAI-EVENT +# Number of seconds to wait for the ping to work and might need to increase this if the pings are all failing +dmaap.ribbon.pingport.timeout=3 + +niws.loadbalancer.dmaap.filterCircuitTripped=true +niws.loadbalancer.dmaap.connectionFailureCountThreshold=3 +niws.loadbalancer.dmaap.circuitTripMaxTimeoutSeconds=180 +#dmaap.ribbon.retryableStatusCodes=404,503 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetriesNextServer=2 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetries=2 +#dmaap.ribbon.retryableStatusCodes.OkToRetryOnAllOperations=true diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/localhost-access-logback.xml b/test/csit/plans/aai/traversal/aai-traversal/appconfig/localhost-access-logback.xml new file mode 100644 index 000000000..a318796c5 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/localhost-access-logback.xml @@ -0,0 +1,62 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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. + +--> +<configuration> + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <appender name="ACCESS" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder"> + <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D</Pattern> + </encoder> + </appender> + <appender-ref ref="ACCESS" /> +</configuration> + +<!-- +%a - Remote IP address +%A - Local IP address +%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent +%B - Bytes sent, excluding HTTP headers +%h - Remote host name +%H - Request protocol +%l - Remote logical username from identd (always returns '-') +%m - Request method +%p - Local port +%q - Query string (prepended with a '?' if it exists, otherwise an empty string +%r - First line of the request +%s - HTTP status code of the response +%S - User session ID +%t - Date and time, in Common Log Format format +%u - Remote user that was authenticated +%U - Requested URL path +%v - Local server name +%I - current request thread name (can compare later with stacktraces) + +%z - Custom pattern that parses the cert for the subject +%y - Custom pattern determines rest or dme2 + -->
\ No newline at end of file diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/logback.xml b/test/csit/plans/aai/traversal/aai-traversal/appconfig/logback.xml new file mode 100644 index 000000000..31bfe10cf --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/logback.xml @@ -0,0 +1,391 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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. + +--> +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + + <property resource="application.properties" /> + + <property name="namespace" value="aai-traversal"/> + + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <jmxConfigurator /> + <property name="logDirectory" value="${AJSC_HOME}/logs" /> + <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{targetVirtualEntity}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <!-- <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> --> + <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{partnerName}:%m%n"/> + + <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> + <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> + <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern> + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + </pattern> + </encoder> + </appender> + + <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/sane.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="SANE" /> + </appender> + + <appender name="METRIC" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="METRIC" /> + </appender> + + <appender name="DEBUG" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/debug.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="DEBUG" /> + </appender> + + <appender name="ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/rest/error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfErrorLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="ERROR" /> + </appender> + + <appender name="AUDIT" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfAuditLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="translog" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/translog.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfTransLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="translog" /> + </appender> + + <appender name="dmaapAAIEventConsumer" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="dmaapAAIEventConsumerDebug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <appender name="dmaapAAIEventConsumerMetric" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="external" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/external/external.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <logger name="org.onap.aai" level="DEBUG" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncSANE" /> + </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" /> + <logger name="com.jayway.jsonpath" 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="org.codehaus.groovy" level="WARN" /> + <logger name="com.att.scamper" level="WARN" /> + <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.ajsc" level="WARN" /> + <logger name="com.att.ajsc.csi.logging" level="WARN" /> + <logger name="com.att.ajsc.filemonitor" level="WARN" /> + <logger name="com.netflix.loadbalancer" level="WARN" /> + + <logger name="org.apache.zookeeper" level="OFF" /> + + <!-- Other Loggers that may help troubleshoot --> + <logger name="net.sf" 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" /> + + <logger name="org.hibernate.validator" level="WARN" /> + <logger name="org.hibernate" level="WARN" /> + <logger name="org.hibernate.ejb" level="OFF" /> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + + <logger name="org.eclipse.jetty" level="WARN" /> + + <!-- logback jms appenders & loggers definition starts here --> + <appender name="auditLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%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 [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <appender name="perfLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%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 [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <logger name="AuditRecord" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="AuditRecord_DirectCall" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="PerfTrackerRecord" level="INFO" additivity="false"> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + + <logger name="org.onap.aai.interceptors.post" level="DEBUG" + additivity="false"> + <appender-ref ref="asynctranslog" /> + </logger> + + <logger name="org.onap.aai.interceptors.pre.SetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.interceptors.post.ResetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false"> + <appender-ref ref="dmaapAAIEventConsumer" /> + <appender-ref ref="dmaapAAIEventConsumerDebug" /> + <appender-ref ref="dmaapAAIEventConsumerMetric" /> + </logger> + + <logger name="org.apache" level="OFF" /> + <logger name="org.zookeeper" level="OFF" /> + <logger name="com.thinkaurelius" level="WARN" /> + <logger name="com.att.aft.dme2" level="WARN" /> + + <!-- ============================================================================ --> + <!-- General EELF logger --> + <!-- ============================================================================ --> + <logger name="com.att.eelf" level="WARN" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + </logger> + + <root level="DEBUG"> + <appender-ref ref="external" /> + </root> +</configuration> diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/realm.properties b/test/csit/plans/aai/traversal/aai-traversal/appconfig/realm.properties new file mode 100644 index 000000000..fb692cc3e --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/realm.properties @@ -0,0 +1,12 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-cached.properties b/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-cached.properties new file mode 100644 index 000000000..97bb81863 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-cached.properties @@ -0,0 +1,39 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-realtime.properties b/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-realtime.properties new file mode 100644 index 000000000..0c97b753a --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-realtime.properties @@ -0,0 +1,36 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/traversal/docker-compose.yml b/test/csit/plans/aai/traversal/docker-compose.yml index 8b07c336f..3f465c3ec 100644 --- a/test/csit/plans/aai/traversal/docker-compose.yml +++ b/test/csit/plans/aai/traversal/docker-compose.yml @@ -4,13 +4,19 @@ services: image: ${DOCKER_REGISTRY}/onap/aai-resources hostname: aai-resources.api.simpledemo.onap.org environment: - - AAI_CHEF_ENV=simpledemo - - AAI_CHEF_LOC=/var/chef/aai-data/environments - - CHEF_BRANCH=master - - CHEF_GIT_URL=http://gerrit.onap.org/r/aai - LOCAL_USER_ID=${USER_ID} + - LOCAL_GROUP_ID=${GROUP_ID} ports: - 8447:8447 + volumes: + - ${CURRENT_PWD}/aai-resources/appconfig/titan-realtime.properties:/opt/app/aai-resources/resources/etc/appprops/titan-realtime.properties + - ${CURRENT_PWD}/aai-resources/appconfig/titan-cached.properties:/opt/app/aai-resources/resources/etc/appprops/titan-cached.properties + - ${CURRENT_PWD}/aai-resources/appconfig/aaiconfig.properties:/opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties + - ${CURRENT_PWD}/aai-resources/appconfig/application.properties:/opt/app/aai-resources/resources/application.properties + - ${CURRENT_PWD}/aai-resources/appconfig/logback.xml:/opt/app/aai-resources/resources/logback.xml + - ${CURRENT_PWD}/aai-resources/appconfig/localhost-access-logback.xml:/opt/app/aai-resources/resources/localhost-access-logback.xml + - ${CURRENT_PWD}/aai-resources/appconfig/aai_keystore:/opt/app/aai-resources/resources/etc/auth/aai_keystore + - ${CURRENT_PWD}/aai-resources/appconfig/realm.properties:/opt/app/aai-resources/resources/etc/auth/realm.properties logging: driver: "json-file" options: @@ -20,11 +26,18 @@ services: image: ${DOCKER_REGISTRY}/onap/aai-traversal hostname: aai-traversal.api.simpledemo.onap.org environment: - - AAI_CHEF_ENV=simpledemo - - AAI_CHEF_LOC=/var/chef/aai-data/environments - - CHEF_BRANCH=master - - CHEF_GIT_URL=http://gerrit.onap.org/r/aai + - LOCAL_USER_ID=${USER_ID} + - LOCAL_GROUP_ID=${GROUP_ID} - DISABLE_UPDATE_QUERY=true + volumes: + - ${CURRENT_PWD}/aai-traversal/appconfig/titan-realtime.properties:/opt/app/aai-traversal/resources/etc/appprops/titan-realtime.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/titan-cached.properties:/opt/app/aai-traversal/resources/etc/appprops/titan-cached.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/aaiconfig.properties:/opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/application.properties:/opt/app/aai-traversal/resources/application.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/logback.xml:/opt/app/aai-traversal/resources/logback.xml + - ${CURRENT_PWD}/aai-traversal/appconfig/localhost-access-logback.xml:/opt/app/aai-traversal/resources/localhost-access-logback.xml + - ${CURRENT_PWD}/aai-traversal/appconfig/aai_keystore:/opt/app/aai-traversal/resources/etc/auth/aai_keystore + - ${CURRENT_PWD}/aai-traversal/appconfig/realm.properties:/opt/app/aai-traversal/resources/etc/auth/realm.properties ports: - 8446:8446 logging: diff --git a/test/csit/plans/aai/traversal/setup.sh b/test/csit/plans/aai/traversal/setup.sh index d3635d4ca..118a1bc9c 100644 --- a/test/csit/plans/aai/traversal/setup.sh +++ b/test/csit/plans/aai/traversal/setup.sh @@ -26,6 +26,8 @@ DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) DOCKER_REGISTRY=${NEXUS_DOCKER_REPO} DOCKER_IMAGE_VERSION=1.2-STAGING-latest +export CURRENT_PWD=$(pwd); + function wait_for_container() { CONTAINER_NAME="$1"; @@ -95,17 +97,21 @@ function check_if_user_exists(){ if [ "${USER_EXISTS}" -eq 0 ]; then export USER_ID=9000; + export GROUP_ID=9000; else export USER_ID=$(id -u aaiadmin); + export GROUP_ID=$(id -g aaiadmin); fi; RESOURCES_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-resources.api.simpledemo.onap.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); -wait_for_container ${RESOURCES_CONTAINER_NAME} '0.0.0.0:8447'; +wait_for_container $RESOURCES_CONTAINER_NAME 'Resources Microservice Started'; -TRAVERSAL_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-traversal.api.simpledemo.onap.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); -wait_for_container ${TRAVERSAL_CONTAINER_NAME} '0.0.0.0:8446'; +${DOCKER_COMPOSE_CMD} up -d aai-traversal.api.simpledemo.onap.org aai.api.simpledemo.onap.org +TRAVERSAL_CONTAINER_NAME=$(echo $RESOURCES_CONTAINER_NAME | sed 's/aai-resources/aai-traversal/g'); -${DOCKER_COMPOSE_CMD} up -d aai.api.simpledemo.onap.org echo "A&AI Microservices, resources and traversal, are up and running along with HAProxy"; + +wait_for_container $TRAVERSAL_CONTAINER_NAME 'Traversal Microservice Started'; + # Set the host ip for robot from the haproxy ROBOT_VARIABLES="-v HOST_IP:`ip addr show docker0 | head -3 | tail -1 | cut -d' ' -f6 | cut -d'/' -f1`" diff --git a/test/csit/plans/music/music-test-plan/setup.sh b/test/csit/plans/music/music-test-plan/setup.sh index 228aa1f2f..63d2ef93f 100755 --- a/test/csit/plans/music/music-test-plan/setup.sh +++ b/test/csit/plans/music/music-test-plan/setup.sh @@ -25,32 +25,51 @@ source ${WORKSPACE}/test/csit/scripts/music/music-scripts/music_script.sh # add here all the configuration steps eventually needed to be carried out for music CSIT testing # echo "# music configuration step"; + +CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_music:latest +TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.0 +ZK_IMG=nexus3.onap.org:10001/library/zookeeper:3.4 +MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:latest +WORK_DIR=/tmp/music +CASS_USERNAME=nelson24 +CASS_PASSWORD=winman123 MUSIC_SOURCE_PROPERTIES=${WORKSPACE}/test/csit/scripts/music/music-properties MUSIC_PROPERTIES=/tmp/music/properties MUSIC_LOGS=/tmp/music/logs - mkdir -p ${MUSIC_PROPERTIES} mkdir -p ${MUSIC_LOGS} -cp ${MUSIC_SOURCE_PROPERTIES}/* ${MUSIC_PROPERTIES} +cp ${MUSIC_SOURCE_PROPERTIES}/* ${WORK_DIR}/properties + +# Create Volume for mapping war file and tomcat +docker volume create --name music-vol; + +# Create a network for all the containers to run in. +docker network create music-net; + +# Start Cassandra +docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001" -p "7199:7199" -p "9042:9042" -p "9160:9160" -e CASSUSER=${CASS_USERNAME} -e CASSPASS=${CASS_PASSWORD} ${CASS_IMG}; + +# Start Music war +docker run -d --name music-war -v music-vol:/app ${MUSIC_IMG}; -#docker cp /home/lb7254/integration/test/csit/scripts/music/music-scripts/music_init.cql cassandra:/tmp/music_init.cql -#docker cp ${WORKSPACE}/test/csit/scripts/music/music-scripts/music_init.cql cassandra:/tmp/music_init.cql -#docker exec -it cassandra /usr/bin/cqlsh -umusic -pmusic -f /tmp/music_init.cql +# Start Zookeeper +docker run -d --name music-zk --network music-net -p "2181:2181" -p "2888:2888" -p "3888:3888" ${ZK_IMG}; +# Delay for Cassandra +sleep 20; +# Start Up tomcat - Needs to have properties,logs dir and war file volume mapped. +docker run -d --name music-tomcat --network music-net -p "8080:8080" -v music-vol:/usr/local/tomcat/webapps -v ${WORK_DIR}/properties:/opt/app/music/etc:ro -v ${WORK_DIR}/logs:/opt/app/music/logs ${TOMCAT_IMG}; + +# Connect tomcat to host bridge network so that its port can be seen. +docker network connect bridge music-tomcat; + +################################## # # add here below the start of all docker containers needed for music CSIT testing # -echo "# music docker containers spinoff"; - - -docker volume create music-vol -docker run -d --name music-war -v music-vol:/app nexus3.onap.org:10001/onap/music/music:latest -docker run -d --name music-db -p 7000:7000 -p 7001:7001 -p 7199:7199 -p 9042:9042 -p 9160:9160 nexus3.onap.org:10001/onap/music/cassandra_music:latest -docker run -d --name music-zk -p 2181:2181 -p 2888:2888 -p 3888:3888 nexus3.onap.org:10001/library/zookeeper:3.4 -sleep 30 CASSA_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-db` echo "CASSANDRA_IP=${CASSA_IP}" @@ -60,18 +79,19 @@ echo "ZOOKEEPER_IP=${ZOO_IP}" ${WORKSPACE}/test/csit/scripts/music/music-scripts/wait_for_port.sh ${CASSA_IP} 9042 -docker run -d --name music-tomcat -p 8080:8080 -v music-vol:/usr/local/tomcat/webapps -v ${MUSIC_PROPERTIES}:/opt/app/music/etc:ro -v ${MUSIC_LOGS}:/opt/app/music/logs nexus3.onap.org:10001/library/tomcat:8.0 - TOMCAT_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` echo "TOMCAT_IP=${TOMCAT_IP}" +${WORKSPACE}/test/csit/scripts/music/music-scripts/wait_for_port.sh ${TOMCAT_IP} 8080 ---- old part: it will be removed -#docker run --name cassandra -d -p 9042:9042 -p 7000:7000 -p 7001:7001 -p 7199:7199 -p 9160:9160 nexus3.onap.org:10001/library/cassandra -#docker run --name zookeeper -d -p 2181:2181 -p 2888:2888 -p 3888:3888 nexus3.onap.org:10001/library/zookeeper -#docker run --name music -d -v /app nexus3.onap.org:10001/music -#docker run --name tomcat -d -p 8080:8080 --volumes-from music nexus3.onap.org:10001/library/tomcat +echo "inspect docker things for tracing purpose" +docker inspect music-db +docker inspect music-zk +docker inspect music-tomcat +docker inspect music-war +docker volume inspect music-vol +docker network inspect music-net @@ -80,7 +100,7 @@ echo "TOMCAT_IP=${TOMCAT_IP}" # add here all ROBOT_VARIABLES settings # echo "# music robot variables settings"; -ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://localhost -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://localhost -v COND_PORT:8091" +ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://${TOMCAT_IP} -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://localhost -v COND_PORT:8091" echo ${ROBOT_VARIABLES} diff --git a/test/csit/plans/music/music-test-plan/teardown.sh b/test/csit/plans/music/music-test-plan/teardown.sh index 0806eb273..e9982ae27 100755 --- a/test/csit/plans/music/music-test-plan/teardown.sh +++ b/test/csit/plans/music/music-test-plan/teardown.sh @@ -24,13 +24,29 @@ echo "#"; echo "# music scripts docker containers killing"; echo "#"; echo "##########################################################"; -kill-instance.sh music-tomcat -kill-instance.sh music-war -kill-instance.sh music-zk -kill-instance.sh music-db +docker stop music-tomcat +docker stop music-war +docker stop music-zk +docker stop music-db + +docker rm music-zk +docker rm music-tomcat +docker rm music-war +docker rm music-db + +docker network rm music-net; +sleep 5; + docker volume rm music-vol -rm -Rf /tmp/music +echo "dump music.log files" +ls -alF /tmp/music +ls -alF /tmp/music/properties +cat /tmp/music/properties/music.properties +cat /tmp/music/logs/MUSIC/music.log +cat /tmp/music/logs/MUSIC/error.log + +#rm -Rf /tmp/music diff --git a/test/csit/plans/optf/has/setup.sh b/test/csit/plans/optf-has/has/setup.sh index b2c81433c..f2ae3c78b 100755 --- a/test/csit/plans/optf/has/setup.sh +++ b/test/csit/plans/optf-has/has/setup.sh @@ -15,44 +15,39 @@ # limitations under the License. # + +# +# add here eventual scripts needed for music +# +echo "# music scripts calling"; +source ${WORKSPACE}/test/csit/scripts/optf-has/has/music_script.sh + + # # add here eventual scripts needed for optf/has # -echo "##########################################################"; -echo "#"; echo "# optf/has scripts calling"; -echo "#"; -echo "##########################################################"; -source ${WORKSPACE}/test/csit/scripts/optf/has/has_script.sh +source ${WORKSPACE}/test/csit/scripts/optf-has/has/has_script.sh # # add here below the start of all docker containers needed for optf/has CSIT testing # -echo "##########################################################"; -echo "#"; echo "# optf/has scripts docker containers spinoff"; -echo "#"; -echo "##########################################################"; # # add here all the configuration steps eventually needed to be carried out for optf/has CSIT testing # -echo "##########################################################"; -echo "#"; echo "# optf/has configuration step"; -echo "#"; -echo "##########################################################"; # # add here all ROBOT_VARIABLES settings # -echo "##########################################################"; -echo "#"; echo "# optf/has robot variables settings"; -echo "#"; -echo "##########################################################"; -ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://localhost -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://localhost -v COND_PORT:8091" +echo "conductor ip = ${COND_IP}" +echo "music ip = ${TOMCAT_IP}" + +ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://${TOMCAT_IP} -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://${COND_IP} -v COND_PORT:8091" echo ${ROBOT_VARIABLES} diff --git a/test/csit/plans/optf-has/has/teardown.sh b/test/csit/plans/optf-has/has/teardown.sh new file mode 100755 index 000000000..f4a91f9d5 --- /dev/null +++ b/test/csit/plans/optf-has/has/teardown.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# + + +# +# add here below the killing of all docker containers used for optf/has CSIT testing +# + +# +echo "# optf/has scripts docker containers killing"; +# +echo "# optf/has scripts calling"; +source ${WORKSPACE}/test/csit/scripts/optf-has/has/has_teardown_script.sh + + +# +echo "# optf/has scripts docker containers killing"; +# +echo "# optf/has scripts calling"; +source ${WORKSPACE}/test/csit/scripts/optf-has/has/music_teardown_script.sh + diff --git a/test/csit/plans/optf/has/testplan.txt b/test/csit/plans/optf-has/has/testplan.txt index 0f9f84dfe..980050c90 100644 --- a/test/csit/plans/optf/has/testplan.txt +++ b/test/csit/plans/optf-has/has/testplan.txt @@ -1,3 +1,3 @@ # Test suites are relative paths under [integration.git]/test/csit/tests/. # Place the suites in run order. -optf/has +optf-has/has diff --git a/test/csit/plans/optf/osdf/sample.txt b/test/csit/plans/optf-has/osdf/sample.txt index 9f4e8d7d6..9f4e8d7d6 100644 --- a/test/csit/plans/optf/osdf/sample.txt +++ b/test/csit/plans/optf-has/osdf/sample.txt diff --git a/test/csit/plans/sdnc/healthcheck/setup.sh b/test/csit/plans/sdnc/healthcheck/setup.sh index 3ffed5d26..f2d7f6e45 100644 --- a/test/csit/plans/sdnc/healthcheck/setup.sh +++ b/test/csit/plans/sdnc/healthcheck/setup.sh @@ -64,9 +64,7 @@ docker tag $NEXUS_DOCKER_REPO/onap/sdnc-dmaap-listener-image:$DOCKER_IMAGE_VERSI # start SDNC containers with docker compose and configuration from docker-compose.yml -curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > docker-compose -chmod +x docker-compose -./docker-compose up -d +docker-compose up -d # WAIT 10 minutes maximum and test every 5 seconds if SDNC is up using HealthCheck API TIME_OUT=1000 diff --git a/test/csit/plans/vnfsdk-ice/sanity-check/setup.sh b/test/csit/plans/vnfsdk-ice/sanity-check/setup.sh new file mode 100644 index 000000000..7e777a133 --- /dev/null +++ b/test/csit/plans/vnfsdk-ice/sanity-check/setup.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Copyright 2018 Orange Labs. +# +# 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. +# +# These scripts are sourced by run-csit.sh. + + +#Start ice server +docker run --rm --name vnfsdk-ice -d -p 5000:5000 onap/vnfsdk/ice + +# Wait for server initialization +echo Wait for vnfsdk-ice initialization +until [ "`/usr/bin/docker inspect -f {{.State.Running}} vnfsdk-ice`"=="true" ]; do + sleep 1; +done; +ICE_IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' vnfsdk-ice` + + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS} -v ICE_IP:${ICE_IP}" +echo ${ROBOT_VARIABLES} + diff --git a/test/csit/plans/vnfsdk-ice/sanity-check/teardown.sh b/test/csit/plans/vnfsdk-ice/sanity-check/teardown.sh new file mode 100644 index 000000000..c84ea757b --- /dev/null +++ b/test/csit/plans/vnfsdk-ice/sanity-check/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2018 Orange Labs. +# +# 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. +# +# This script is sourced by run-csit.sh after Robot test completion. + + +kill-instance.sh vnfsdk-ice + + diff --git a/test/csit/plans/vnfsdk-ice/sanity-check/testplan.txt b/test/csit/plans/vnfsdk-ice/sanity-check/testplan.txt new file mode 100644 index 000000000..c84eb0312 --- /dev/null +++ b/test/csit/plans/vnfsdk-ice/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +## Test suites are relative paths under [integration.git]/test/csit/tests/. +## Place the suites in run order. +vnfsdk-ice/ice-server/validation_test.robot diff --git a/test/csit/scripts/music/music-properties/music.properties b/test/csit/scripts/music/music-properties/music.properties index a26fc0317..02fb52df1 100644 --- a/test/csit/scripts/music/music-properties/music.properties +++ b/test/csit/scripts/music/music-properties/music.properties @@ -5,8 +5,8 @@ all.ids=0 ####################################### # Optional current values are defaults ####################################### -#zookeeper.host=localhost -#cassandra.host=localhost +zookeeper.host=music-zk +cassandra.host=music-db #music.ip=localhost #debug=true #music.rest.ip=localhost diff --git a/test/csit/scripts/optf/has/has-properties/cert.cer b/test/csit/scripts/optf-has/has/has-properties/cert.cer index 67bb1303a..67bb1303a 100644 --- a/test/csit/scripts/optf/has/has-properties/cert.cer +++ b/test/csit/scripts/optf-has/has/has-properties/cert.cer diff --git a/test/csit/scripts/optf/has/has-properties/cert.key b/test/csit/scripts/optf-has/has/has-properties/cert.key index b8a957ff8..b8a957ff8 100644 --- a/test/csit/scripts/optf/has/has-properties/cert.key +++ b/test/csit/scripts/optf-has/has/has-properties/cert.key diff --git a/test/csit/scripts/optf-has/has/has-properties/cert.pem b/test/csit/scripts/optf-has/has/has-properties/cert.pem new file mode 100644 index 000000000..5ecf38234 --- /dev/null +++ b/test/csit/scripts/optf-has/has/has-properties/cert.pem @@ -0,0 +1,36 @@ +Bag Attributes + friendlyName: mso-client + localKeyID: 54 69 6D 65 20 31 35 31 39 32 39 37 30 37 31 32 33 33 +subject=/C=US/ST=Michigan/L=Southfield/O=AT&T Services, Inc./OU=mso-bpel-client-mtanj/CN=msobpel-client.mtanj.aic.cip.att.com +issuer=/C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA +-----BEGIN CERTIFICATE----- +MIIFZDCCBEygAwIBAgIQCDZ0gBbsclD2Ino3w+NqPDANBgkqhkiG9w0BAQsFADBN +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E +aWdpQ2VydCBTSEEyIFNlY3VyZSBTZXJ2ZXIgQ0EwHhcNMTgwMTE5MDAwMDAwWhcN +MTkwMTE5MTIwMDAwWjCBojELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE1pY2hpZ2Fu +MRMwEQYDVQQHEwpTb3V0aGZpZWxkMRwwGgYDVQQKDBNBVCZUIFNlcnZpY2VzLCBJ +bmMuMR4wHAYDVQQLExVtc28tYnBlbC1jbGllbnQtbXRhbmoxLTArBgNVBAMTJG1z +b2JwZWwtY2xpZW50Lm10YW5qLmFpYy5jaXAuYXR0LmNvbTCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBAOJtbcWtMUYCIgIvdqm2CPN/cVTD8j3fDAsd42vn +7I3PYJ4aBu8tiJVRheJhj9mejfwjBd5f5E2z9kWfNMPZU/9q0RB+cYbKWv0lP+q5 +q/RkbXN7iRtGUkXUyNpekvxNT3IKYfXK3P29qVDVhvUSey2ngIALRvBrRIKRTmb8 +gzrvcavJSwm8oQw2JXE1+Da+8PYR3TjJ19nfmoTmKbO+QDD58I5+2TgNqd/b7zhN +GLaS3oiVONDmJ1b5iWwKg31otPDP8AJb7cNtl8vgfnGK2zvFIWnF2TRzMb6FePbn +JBLaEyi7+c1iKJafj61t5nn27I2psbJloT9/2fmb6l4NU8MCAwEAAaOCAegwggHk +MB8GA1UdIwQYMBaAFA+AYRyCMWHVLyjnjUY4tCzhxtniMB0GA1UdDgQWBBSQcljn +BCxIKpisBfyoNgGCdtPzBzAvBgNVHREEKDAmgiRtc29icGVsLWNsaWVudC5tdGFu +ai5haWMuY2lwLmF0dC5jb20wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsG +AQUFBwMBBggrBgEFBQcDAjBrBgNVHR8EZDBiMC+gLaArhilodHRwOi8vY3JsMy5k +aWdpY2VydC5jb20vc3NjYS1zaGEyLWc2LmNybDAvoC2gK4YpaHR0cDovL2NybDQu +ZGlnaWNlcnQuY29tL3NzY2Etc2hhMi1nNi5jcmwwTAYDVR0gBEUwQzA3BglghkgB +hv1sAQEwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQ +UzAIBgZngQwBAgIwfAYIKwYBBQUHAQEEcDBuMCQGCCsGAQUFBzABhhhodHRwOi8v +b2NzcC5kaWdpY2VydC5jb20wRgYIKwYBBQUHMAKGOmh0dHA6Ly9jYWNlcnRzLmRp +Z2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJTZWN1cmVTZXJ2ZXJDQS5jcnQwCQYDVR0T +BAIwADANBgkqhkiG9w0BAQsFAAOCAQEAxkadmzFcpA3f3qc9PbzMWfV2lJCXWxfr +/6z4RXotl255GBZFR2zLn56k8J3hAJGWRc0WeSgSsLH1fxrxF60fWk+cmYCrMC9t +C5ha5zWav/kz+dkZvJVbUxIFdx0Cd5uqBsLFnAaGrnSR6WzJkZHQ2rQUvwvQXwdP +XL01FleDSNbV8jtHXvzmcdnVQWeLjcVOeOeBF3dW6lSvDRV0G6fe6+R9U+Gz0MwK +x93XbsIAMTCJKUBkV7QdHwHzis3fhKJHwJUrb1p2Byhn/RwYUmFbjkamFiEfAyzw ++KdkwripOgYHnmGyLBJ16FdO/8kGhn4URW/qL1FO/sN2loGGlyA82w== +-----END CERTIFICATE----- diff --git a/test/csit/scripts/optf/has/has-properties/conductor.conf.onap b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap index 9770f5194..d3e391cde 100644 --- a/test/csit/scripts/optf/has/has-properties/conductor.conf.onap +++ b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap @@ -9,7 +9,7 @@ #api_paste_config = api_paste.ini # Music keyspace for content (string value) -keyspace = conductor_saisree +keyspace = conductor # # From oslo.log @@ -34,7 +34,7 @@ debug = true # example, logging_context_format_string). (string value) # Note: This option can be changed without restarting. # Deprecated group/name - [DEFAULT]/log_config -#log_config_append = /home/saisree/conductor/etc/conductor/log.conf +log_config_append = /usr/local/bin/log.conf # Defines the format string for %%(asctime)s in log records. Default: # %(default)s . This option is ignored if log_config_append is set. (string @@ -51,7 +51,7 @@ log_date_format = %d-%m-%Y %H:%M:%S # (Optional) The base directory used for relative log_file paths. This option # is ignored if log_config_append is set. (string value) # Deprecated group/name - [DEFAULT]/logdir -#log_dir = /home/saisree/Log/ +log_dir = /var/log @@ -143,7 +143,7 @@ server_url = http://localhost:8081/aai/ # The version of A&AI (string value) -server_url_version = v11 +server_url_version = v13 # SSL/TLS certificate file in pem format. This certificate must be registered # with the A&AI endpoint. (string value) @@ -154,7 +154,7 @@ certificate_key_file = /usr/local/bin/cert.key # Certificate Authority Bundle file in pem format. Must contain the appropriate # trust chain for theCertificate file. (string value) -# certificate_authority_bundle_file = ~/certs/ca-bundle.pem +certificate_authority_bundle_file = /usr/local/bin/cert.pem [api] @@ -169,6 +169,18 @@ certificate_key_file = /usr/local/bin/cert.key # Minimum value: 1 #default_api_return_limit = 100 +[conductor_api] + +# Basic Authentication Username (string value) +username = admin1 + +# Basic Authentication Password (string value) +password = plan.15 + +# To disable basic_auth_secure = false and to enable basic_auth_secure = true +basic_auth_secure = false + + [controller] @@ -206,7 +218,7 @@ certificate_key_file = /usr/local/bin/cert.key # # Music keyspace for messages (string value) -keyspace = conductor_rpc_saisree +keyspace = conductor_rpc # Wait interval while checking for a message response. Default value is 1 # second. (integer value) @@ -237,14 +249,12 @@ timeout = 3600 # # Base URL for Music REST API without a trailing slash. (string value) -server_url = http://localhost:8080/MUSIC/rest +server_url = http://localhost:8080/MUSIC/rest/v2 # DEPRECATED: List of hostnames (round-robin access) (list value) # This option is deprecated for removal. # Its value may be silently ignored in the future. # Reason: Use server_url instead -# hostnames = 135.197.226.85 -# 135.197.226.83, 135.197.226.85 # DEPRECATED: Port (integer value) # This option is deprecated for removal. @@ -298,7 +308,7 @@ server_url = http://localhost:8080/MUSIC/rest #table_prefix = sdnc # Base URL for SDN-C. (string value) -server_url = https://localhost:8082/restconf/ +server_url = http://localhost:8082/restconf/ # Basic Authentication Username (string value) username = admin diff --git a/test/csit/scripts/optf-has/has/has-properties/log.conf.onap b/test/csit/scripts/optf-has/has/has-properties/log.conf.onap new file mode 100644 index 000000000..41d66444e --- /dev/null +++ b/test/csit/scripts/optf-has/has/has-properties/log.conf.onap @@ -0,0 +1,65 @@ +[loggers] +keys=root + +[handlers] +keys=trfhand,consoleHandler,audithand,metrichand,errhand,debughand + +[logger_root] +level=NOTSET +handlers=trfhand,consoleHandler,audithand,metrichand,errhand,debughand + +[handler_consoleHandler] +class=StreamHandler +level=NOTSET +formatter=generic +args=(sys.stdout,) + +[handler_trfhand] +class=handlers.TimedRotatingFileHandler +level=NOTSET +formatter=generic +args=('application.log','midnight', 1, 10) + +[handler_audithand] +class=handlers.TimedRotatingFileHandler +level=INFO +formatter=audit +args=('audit.log', 'midnight', 1, 10) + +[handler_metrichand] +class=handlers.TimedRotatingFileHandler +level=INFO +formatter=metric +args=('metric.log','midnight', 1, 10) + +[handler_errhand] +class=handlers.TimedRotatingFileHandler +level=ERROR +formatter=error +args=('error.log','midnight', 1, 10) + +[handler_debughand] +class=handlers.TimedRotatingFileHandler +level=DEBUG +formatter=generic +args=('debug.log','midnight', 1, 10) + +[formatters] +keys=generic,audit,metric,error + +[formatter_audit] +format=%(asctime)s|%(asctime)s|00000000-0000-0000-0000-000000000000||%(thread)d||Conductor|N/A|COMPLETE|200|sucessful||%(levelname)s|||0|%(module)s|||||||||%(name)s : [-] %(message)s +datefmt= + +[formatter_metric] +format=%(asctime)s|%(asctime)s|00000000-0000-0000-0000-000000000000||%(thread)d||Conductor|N/A|N/A|N/A|COMPLETE|200|sucessful||%(levelname)s|||0|%(module)s||||||||||%(name)s : [-] %(message)s +datefmt= + +[formatter_error] +format=%(asctime)s|00000000-0000-0000-0000-000000000000|%(thread)d|Conductor|N/A|N/A|N/A|ERROR|500|N/A|%(name)s : [-] %(message)s +datefmt= + +[formatter_generic] +format=%(asctime)s||%(thread)d|%(levelname)s|%(module)s|%(name)s: [-] %(message)s +datefmt= + diff --git a/test/csit/scripts/optf-has/has/has_proxy_settings.sh b/test/csit/scripts/optf-has/has/has_proxy_settings.sh new file mode 100755 index 000000000..92f8d93c7 --- /dev/null +++ b/test/csit/scripts/optf-has/has/has_proxy_settings.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# +# put into this file local proxy settings in case they are needed on your local environment +echo "### This is ${WORKSPACE}/test/csit/scripts/optf-has/has/has_proxy_settings.sh" + +echo "optf/has proxy settings" +if [ "$#" -eq "1" ]; then + echo "$1" + cd $1 + pwd +else + exit 1 +fi + +# don't remove following lines: commands can be attached here + + diff --git a/test/csit/scripts/optf-has/has/has_script.sh b/test/csit/scripts/optf-has/has/has_script.sh new file mode 100755 index 000000000..f6c2e7d51 --- /dev/null +++ b/test/csit/scripts/optf-has/has/has_script.sh @@ -0,0 +1,103 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# +echo "### This is ${WORKSPACE}/test/csit/scripts/optf-has/has/has_script.sh" +# +# add here whatever commands is needed to prepare the optf/has CSIT testing +# + +# assume the base is /tmp dir +DIR=/tmp + +# the directory of the script +echo ${DIR} +cd ${DIR} + +# the temp directory used, within $DIR +# omit the -p parameter to create a temporal directory in the default location +WORK_DIR=`mktemp -d -p "$DIR"` +echo ${WORK_DIR} + +cd ${WORK_DIR} + +# check if tmp dir was created +if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then + echo "Could not create temp dir" + exit 1 +fi + +#git clone https://gerrit.onap.org/r/optf/has +cd has + +echo "i am ${USER} : only non jenkins users may need proxy settings" +if [ ${USER} != 'jenkins' ]; then + + # add proxy settings into this script when you work behind a proxy + ${WORKSPACE}/test/csit/scripts/optf-has/has/has_proxy_settings.sh ${WORK_DIR} + +fi + +# check Dockerfile content +# cat conductor/docker/Dockerfile + +#./build-dockers.sh + +# create directory for volume and copy configuration file +# run docker containers +COND_CONF=/tmp/conductor/properties/conductor.conf +LOG_CONF=/tmp/conductor/properties/log.conf +IMAGE_NAME=nexus3.onap.org:10001/onap/optf-has +CERT=/tmp/conductor/properties/cert.cer +KEY=/tmp/conductor/properties/cert.key +BUNDLE=/tmp/conductor/properties/cert.pem + +mkdir -p /tmp/conductor/properties +mkdir -p /tmp/conductor/logs +cp ${WORKSPACE}/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap /tmp/conductor/properties/conductor.conf +cp ${WORKSPACE}/test/csit/scripts/optf-has/has/has-properties/log.conf.onap /tmp/conductor/properties/log.conf +cp ${WORKSPACE}/test/csit/scripts/optf-has/has/has-properties/cert.cer /tmp/conductor/properties/cert.cer +cp ${WORKSPACE}/test/csit/scripts/optf-has/has/has-properties/cert.key /tmp/conductor/properties/cert.key +cp ${WORKSPACE}/test/csit/scripts/optf-has/has/has-properties/cert.pem /tmp/conductor/properties/cert.pem +#chmod -R 777 /tmp/conductor/properties + +MUSIC_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` +echo "MUSIC_IP=${MUSIC_IP}" + +# change MUSIC reference to the local instance +sed -i -e "s%localhost:8080/MUSIC%${MUSIC_IP}:8080/MUSIC%g" /tmp/conductor/properties/conductor.conf + +docker run -d --name cond-cont -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-controller --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-api -p "8091:8091" -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-solv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-solver --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-resv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-reservation --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-data -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${CERT}:/usr/local/bin/cert.cer -v ${KEY}:/usr/local/bin/cert.key -v ${BUNDLE}:/usr/local/bin/cert.pem ${IMAGE_NAME}:latest python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf + +COND_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' cond-api` +${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${COND_IP} 8091 + +# wait a while before continuing +sleep 30 + +echo "inspect docker things for tracing purpose" +docker inspect cond-data +docker inspect cond-cont +docker inspect cond-api +docker inspect cond-solv +docker inspect cond-resv + +docker exec -it music-db /usr/bin/nodetool status +docker exec -it music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM system_schema.keyspaces' +docker exec -it music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM admin.keyspace_master' diff --git a/test/csit/plans/optf/has/teardown.sh b/test/csit/scripts/optf-has/has/has_teardown_script.sh index c586d92ca..40a536a87 100755 --- a/test/csit/plans/optf/has/teardown.sh +++ b/test/csit/scripts/optf-has/has/has_teardown_script.sh @@ -14,30 +14,16 @@ # See the License for the specific language governing permissions and # limitations under the License. # - - -# -# add here below the killing of all docker containers used for optf/has CSIT testing -# -echo "##########################################################"; -echo "#"; -echo "# optf/has scripts docker containers killing"; -echo "#"; -echo "##########################################################"; -#kill-instance.sh cond-api -#kill-instance.sh cond-solv -#kill-instance.sh cond-cont -#kill-instance.sh cond-data -#kill-instance.sh cond-resv +echo "optf/has scripts docker containers killing"; docker stop cond-api docker stop cond-solv docker stop cond-cont -#docker stop cond-data +docker stop cond-data docker stop cond-resv docker rm cond-api docker rm cond-solv docker rm cond-cont -#docker rm cond-data +docker rm cond-data docker rm cond-resv diff --git a/test/csit/scripts/optf-has/has/music-properties/log4j.properties b/test/csit/scripts/optf-has/has/music-properties/log4j.properties new file mode 100644 index 000000000..1312e9bb9 --- /dev/null +++ b/test/csit/scripts/optf-has/has/music-properties/log4j.properties @@ -0,0 +1,3 @@ +# No longer needed, please see the logback properties + + diff --git a/test/csit/scripts/optf-has/has/music-properties/music.properties b/test/csit/scripts/optf-has/has/music-properties/music.properties new file mode 100644 index 000000000..02fb52df1 --- /dev/null +++ b/test/csit/scripts/optf-has/has/music-properties/music.properties @@ -0,0 +1,17 @@ +my.public.ip=localhost +all.public.ips=localhost +my.id=0 +all.ids=0 +####################################### +# Optional current values are defaults +####################################### +zookeeper.host=music-zk +cassandra.host=music-db +#music.ip=localhost +#debug=true +#music.rest.ip=localhost +#lock.lease.period=6000 +cassandra.user=nelson24 +cassandra.password=winman123 + + diff --git a/test/csit/scripts/optf-has/has/music_script.sh b/test/csit/scripts/optf-has/has/music_script.sh new file mode 100755 index 000000000..be4eb8c63 --- /dev/null +++ b/test/csit/scripts/optf-has/has/music_script.sh @@ -0,0 +1,97 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# +echo "### This is ${WORKSPACE}/test/csit/scripts/optf-has/has/music_script.sh" +# +# add here whatever commands is needed to prepare the music setup for optf-has CSIT testing +# + +# +# add here all the configuration steps eventually needed to be carried out for music CSIT testing +# +echo "# music configuration step"; + +CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_music:latest +TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.0 +ZK_IMG=nexus3.onap.org:10001/library/zookeeper:3.4 +MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:latest +WORK_DIR=/tmp/music +CASS_USERNAME=nelson24 +CASS_PASSWORD=winman123 +MUSIC_SOURCE_PROPERTIES=${WORKSPACE}/test/csit/scripts/optf-has/has/music-properties +MUSIC_PROPERTIES=/tmp/music/properties +MUSIC_LOGS=/tmp/music/logs +mkdir -p ${MUSIC_PROPERTIES} +mkdir -p ${MUSIC_LOGS} + +cp ${MUSIC_SOURCE_PROPERTIES}/* ${WORK_DIR}/properties + +# Create Volume for mapping war file and tomcat +docker volume create --name music-vol; + +# Create a network for all the containers to run in. +docker network create music-net; + +# Start Cassandra +docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001" -p "7199:7199" -p "9042:9042" -p "9160:9160" -e CASSUSER=${CASS_USERNAME} -e CASSPASS=${CASS_PASSWORD} ${CASS_IMG}; + +# Start Music war +docker run -d --name music-war -v music-vol:/app ${MUSIC_IMG}; + +# Start Zookeeper +docker run -d --name music-zk --network music-net -p "2181:2181" -p "2888:2888" -p "3888:3888" ${ZK_IMG}; + +# Delay for Cassandra +sleep 20; + +# Start Up tomcat - Needs to have properties,logs dir and war file volume mapped. +docker run -d --name music-tomcat --network music-net -p "8080:8080" -v music-vol:/usr/local/tomcat/webapps -v ${WORK_DIR}/properties:/opt/app/music/etc:ro -v ${WORK_DIR}/logs:/opt/app/music/logs ${TOMCAT_IMG}; + +# Connect tomcat to host bridge network so that its port can be seen. +docker network connect bridge music-tomcat; + +# +# add here below the start of all docker containers needed for music CSIT testing +# + +CASSA_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-db` +echo "CASSANDRA_IP=${CASSA_IP}" + +ZOO_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-zk` +echo "ZOOKEEPER_IP=${ZOO_IP}" + +${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${CASSA_IP} 9042 + +TOMCAT_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` +echo "TOMCAT_IP=${TOMCAT_IP}" + +${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${TOMCAT_IP} 8080 + + +echo "inspect docker things for tracing purpose" +docker inspect music-db +docker inspect music-zk +docker inspect music-tomcat +docker inspect music-war +docker volume inspect music-vol +docker network inspect music-net + + + + + + + diff --git a/test/csit/scripts/optf-has/has/music_teardown_script.sh b/test/csit/scripts/optf-has/has/music_teardown_script.sh new file mode 100755 index 000000000..fa91f6e97 --- /dev/null +++ b/test/csit/scripts/optf-has/has/music_teardown_script.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# +echo "music scripts docker containers killing"; +docker stop music-tomcat +docker stop music-war +docker stop music-zk +docker stop music-db + +docker rm music-zk +docker rm music-tomcat +docker rm music-war +docker rm music-db + +docker network rm music-net; +sleep 5; + +docker volume rm music-vol + +echo "dump music.log files" +ls -alF /tmp/music +ls -alF /tmp/music/properties +cat /tmp/music/properties/music.properties +cat /tmp/music/logs/MUSIC/music.log +cat /tmp/music/logs/MUSIC/error.log + diff --git a/test/csit/scripts/optf-has/has/wait_for_port.sh b/test/csit/scripts/optf-has/has/wait_for_port.sh new file mode 100755 index 000000000..10f08ded1 --- /dev/null +++ b/test/csit/scripts/optf-has/has/wait_for_port.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "Usage: wait-for-port hostname port" >&2 + exit 1 +fi + +host=$1 +port=$2 + +echo "Waiting for $host port $port open" +until telnet $host $port </dev/null 2>/dev/null | grep -q '^Connected'; do + sleep 1 +done + +echo "$host port $port is open" + +exit 0 diff --git a/test/csit/scripts/optf/osdf/testsample.txt b/test/csit/scripts/optf-has/osdf/testsample.txt index 9f4e8d7d6..9f4e8d7d6 100644 --- a/test/csit/scripts/optf/osdf/testsample.txt +++ b/test/csit/scripts/optf-has/osdf/testsample.txt diff --git a/test/csit/scripts/optf/has/has_script.sh b/test/csit/scripts/optf/has/has_script.sh deleted file mode 100755 index 3da7e04c6..000000000 --- a/test/csit/scripts/optf/has/has_script.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# 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. -# -echo "### This is ${WORKSPACE}/test/csit/scripts/optf/has/has_script.sh" -# -# add here whatever commands is needed to prepare the optf/has CSIT testing -# - -# assume the base is /opt -DIR=/opt -#cd /opt - -# the directory of the script -#DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -echo ${DIR} -cd ${DIR} - -# the temp directory used, within $DIR -# omit the -p parameter to create a temporal directory in the default location -WORK_DIR=`mktemp -d -p "$DIR"` -echo ${WORK_DIR} - -cd ${WORK_DIR} - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - - -git clone https://gerrit.onap.org/r/optf/has -cd has -cd conductor/docker - -#sed -i -e "s%FROM python:2\.7%FROM python:2\.7\\nENV http_proxy http:\/\/one\.proxy\.att\.com:8080\\nENV https_proxy http:\/\/one\.proxy\.att\.com:8080%g" api/Dockerfile -#sed -i -e "s%FROM python:2\.7%FROM python:2\.7\\nENV http_proxy http:\/\/one\.proxy\.att\.com:8080\\nENV https_proxy http:\/\/one\.proxy\.att\.com:8080%g" controller/Dockerfile -#sed -i -e "s%FROM python:2\.7%FROM python:2\.7\\nENV http_proxy http:\/\/one\.proxy\.att\.com:8080\\nENV https_proxy http:\/\/one\.proxy\.att\.com:8080%g" data/Dockerfile -#sed -i -e "s%FROM python:2\.7%FROM python:2\.7\\nENV http_proxy http:\/\/one\.proxy\.att\.com:8080\\nENV https_proxy http:\/\/one\.proxy\.att\.com:8080%g" reservation/Dockerfile -#sed -i -e "s%FROM python:2\.7%FROM python:2\.7\\nENV http_proxy http:\/\/one\.proxy\.att\.com:8080\\nENV https_proxy http:\/\/one\.proxy\.att\.com:8080%g" solver/Dockerfile - - -# ./build-dockers.sh -docker build -t api api/ -docker build -t controller controller/ -docker build -t data data/ -docker build -t solver solver/ -docker build -t reservation reservation/ - - -# create directory for volume and copy configuration file -mkdir -p /tmp/conductor/properties -cp ${WORKSPACE}/test/csit/scripts/optf/has/has-properties/conductor.conf.onap /tmp/conductor/properties/conductor.conf -cp ${WORKSPACE}/test/csit/scripts/optf/has/has-properties/cert.cer /tmp/conductor/properties/cert.cer -cp ${WORKSPACE}/test/csit/scripts/optf/has/has-properties/cert.key /tmp/conductor/properties/cert.key - - - -# run docker containers -#docker run -d --name cond-data -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf -v /tmp/conductor/properties/cert.key:/usr/local/bin/cert.key -v /tmp/conductor/properties/cert.cer:/usr/local/bin/cert.cer data -#docker run -d --name cond-data -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf data -docker run -d --name cond-cont -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf controller -docker run -d --name cond-api -p 8091:8091 -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf api -docker run -d --name cond-solv -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf solver -docker run -d --name cond-resv -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf reservation - -# wait a while before continuing -sleep 30 diff --git a/test/csit/scripts/policy/script1.sh b/test/csit/scripts/policy/script1.sh index d66b0734c..cfa29ec6f 100755 --- a/test/csit/scripts/policy/script1.sh +++ b/test/csit/scripts/policy/script1.sh @@ -73,19 +73,19 @@ git clone http://gerrit.onap.org/r/oparent git clone http://gerrit.onap.org/r/policy/engine cd engine/packages/docker ${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn prepare-package --settings ${WORK_DIR}/oparent/settings.xml -docker build -t onap/policy/policy-pe target/policy-pe +docker build -t onap/policy-pe target/policy-pe cd ${WORK_DIR} git clone http://gerrit.onap.org/r/policy/drools-pdp cd drools-pdp/packages/docker ${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn prepare-package --settings ${WORK_DIR}/oparent/settings.xml -docker build -t onap/policy/policy-drools target/policy-drools +docker build -t onap/policy-drools target/policy-drools cd ${WORK_DIR} git clone http://gerrit.onap.org/r/policy/docker cd docker -docker build -t onap/policy/policy-nexus policy-nexus +docker build -t onap/policy-nexus policy-nexus chmod +x config/drools/drools-tweaks.sh diff --git a/test/csit/tests/aai/esr-server/startup/test1.robot b/test/csit/tests/aai/esr-server/startup/test1.robot index 53afeed27..d1504a1b4 100644 --- a/test/csit/tests/aai/esr-server/startup/test1.robot +++ b/test/csit/tests/aai/esr-server/startup/test1.robot @@ -4,7 +4,7 @@ Library RequestsLibrary *** Test Cases *** Liveness Test [Documentation] Check various endpoints for basic liveness check - Create Session esr-server http://${ESRSERVER_IP}:9518 + Create Session esr-server https://${ESRSERVER_IP}:9518 CheckUrl esr-server /api/aai-esr-server/v1/test *** Keywords *** diff --git a/test/csit/tests/dcaegen2/testcases/dcae_ves.robot b/test/csit/tests/dcaegen2/testcases/dcae_ves.robot index eee6ea569..47ce5f14d 100644 --- a/test/csit/tests/dcaegen2/testcases/dcae_ves.robot +++ b/test/csit/tests/dcaegen2/testcases/dcae_ves.robot @@ -75,12 +75,13 @@ Publish Single VES VNF Measurement Event Publish VES VoLTE Fault Batch Events [Tags] DCAE-VESC-R1 - [Documentation] Post batched events and expect 202 Response + [Documentation] Post batched events and expect 200 Response ${evtdata}= Get Event Data From File ${EVENT_BATCH_DATA_FILE} ${headers}= Create Header From String ${HEADER_STRING} ${resp}= Publish Event To VES Collector No Auth ${VESC_URL} ${VES_BATCH_EVENT_PATH} ${headers} ${evtdata} Should Be Equal As Strings ${resp.status_code} 200 - ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016 + #${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016 + ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546025 Should Be Equal As Strings ${ret} true @@ -118,16 +119,16 @@ Publish VES Event With Invalid URL Path Should Be Equal As Strings ${resp.status_code} 404 -Enable VESC HTTPS And Basic Auth - [Tags] DCAE-VESC-R1 - [Documentation] Enable VESC Https and Authentication, Disable Http and Run Health Check - Enable VESC Https Auth - - ${auth}= Create List ${VESC_HTTPS_USER} ${VESC_HTTPS_PD} - ${session}= Create Session dcaegen2-r1 ${VESC_URL_HTTPS} auth=${auth} disable_warnings=1 - ${headers}= Create Dictionary Accept=*/* X-FromAppId=${GLOBAL_APPLICATION_ID} - ${resp}= Get Request dcaegen2-r1 /healthcheck headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 +#Enable VESC HTTPS And Basic Auth + #[Tags] DCAE-VESC-R1 + #[Documentation] Enable VESC Https and Authentication, Disable Http and Run Health Check + #Enable VESC Https Auth + # + #${auth}= Create List ${VESC_HTTPS_USER} ${VESC_HTTPS_PD} + #${session}= Create Session dcaegen2-r1 ${VESC_URL_HTTPS} auth=${auth} disable_warnings=1 + #${headers}= Create Dictionary Accept=*/* X-FromAppId=${GLOBAL_APPLICATION_ID} + #${resp}= Get Request dcaegen2-r1 /healthcheck headers=${headers} + #Should Be Equal As Strings ${resp.status_code} 200 Publish Single VES Fault Event Over HTTPS [Tags] DCAE-VESC-R1 @@ -164,7 +165,8 @@ Publish VES Fault Batch Events Over HTTPS ${headers}= Create Header From String ${HEADER_STRING} ${resp}= Publish Event To VES Collector ${VESC_URL_HTTPS} ${VES_BATCH_EVENT_PATH} ${headers} ${evtdata} ${VESC_HTTPS_USER} ${VESC_HTTPS_PD} Should Be Equal As Strings ${resp.status_code} 200 - ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016 + #${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016 + ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546025 Should Be Equal As Strings ${ret} true diff --git a/test/csit/tests/music/music-suite/music-test.robot b/test/csit/tests/music/music-suite/music-test.robot index 4af4ebc0d..9f8e435c8 100644 --- a/test/csit/tests/music/music-suite/music-test.robot +++ b/test/csit/tests/music/music-suite/music-test.robot @@ -56,6 +56,130 @@ Get Music Version Log To Console body = ${resp.text} Should Be Equal As Integers ${resp.status_code} 200 +Music AddOnBoarding + [Documentation] It sends a REST POST request to Music to Onboard a new application + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}onboard.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/admin/onboardAppWithMusic data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + ${response_json} json.loads ${resp.content} + ${generatedAID}= Convert To String ${response_json['Generated AID']} + Set Global Variable ${generatedAID} + Log To Console generatedAID = ${generatedAID} + Should Be Equal As Integers ${resp.status_code} 200 + +Music CreateKeyspace + [Documentation] It sends a REST POST request to Music to create a new keyspace in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}createkeyspace.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music CreateTable + [Documentation] It sends a REST POST request to Music to create a new Table in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}createtable.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music InsertRow + [Documentation] It sends a REST POST request to Music to create a new row in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}insertrow_eventual.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows/?row=emp1 data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music ReadRowJustInserted + [Documentation] It sends a REST GET request to Music to Read the row just inserted in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Get Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music UpdateRowInAtomicWay + [Documentation] It sends a REST PUT request to Music to create a new row in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}updaterow_atomic.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Put Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music ReadRowAfterUpdate + [Documentation] It sends a REST GET request to Music to Read the row just inserted in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Get Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music DeleteRow + [Documentation] It sends a REST DELETE request to Music to delete a row in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}deleterow_eventual.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music DropTable + [Documentation] It sends a REST Delete request to Music to drop one existing Table in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}droptable.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music DropKeyspace + [Documentation] It sends a REST DELETE request to Music to drop one existing keyspace in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}dropkeyspace.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + + +Music DeleteOnBoarding + [Documentation] It sends a REST DELETE request to Music to remove a previosly onboarded application + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}onboard.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/admin/onboardAppWithMusic data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + *** Keywords *** diff --git a/test/csit/tests/optf/has/__init__.robot b/test/csit/tests/optf-has/has/__init__.robot index fb654d7bb..fb654d7bb 100644 --- a/test/csit/tests/optf/has/__init__.robot +++ b/test/csit/tests/optf-has/has/__init__.robot diff --git a/test/csit/tests/optf/has/data/plan_with_wrong_version.json b/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json index 9471fbf82..9471fbf82 100644 --- a/test/csit/tests/optf/has/data/plan_with_wrong_version.json +++ b/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json diff --git a/test/csit/tests/optf/has/data/plan_without_demand_section.json b/test/csit/tests/optf-has/has/data/plan_without_demand_section.json index 87a459d87..87a459d87 100644 --- a/test/csit/tests/optf/has/data/plan_without_demand_section.json +++ b/test/csit/tests/optf-has/has/data/plan_without_demand_section.json diff --git a/test/csit/tests/optf-has/has/optf_has_test.robot b/test/csit/tests/optf-has/has/optf_has_test.robot new file mode 100644 index 000000000..4882c229f --- /dev/null +++ b/test/csit/tests/optf-has/has/optf_has_test.robot @@ -0,0 +1,120 @@ +*** Settings *** +Library OperatingSystem +Library RequestsLibrary +Library json + +*** Variables *** +${MESSAGE} {"ping": "ok"} +${RESP_STATUS} "error" +${RESP_MESSAGE_WRONG_VERSION} "conductor_template_version must be one of: 2016-11-01" +${RESP_MESSAGE_WITHOUT_DEMANDS} Undefined Demand + +#global variables +${generatedPlanId} + +*** Test Cases *** +Check Cassandra Docker Container + [Documentation] It checks cassandra docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} music-db + +Check Zookeeper Docker Container + [Documentation] It checks zookeeper docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} music-zk + +Check Tomcat Docker Container + [Documentation] It checks tomcat docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} music-tomcat + +Check Music War Docker Container + [Documentation] It checks music.war docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} music-war + +Get Music Version + [Documentation] It sends a REST GET request to retrieve the Music.war version + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + ${resp}= Get Request musicaas /MUSIC/rest/v2/version headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Check ConductorApi Docker Container + [Documentation] It checks conductor-api docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} cond-api + +Check ConductorController Docker Container + [Documentation] It checks conductor-controller docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} cond-cont + +Check ConductorSolver Docker Container + [Documentation] It checks conductor-solver docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} cond-solv + +Check ConductorReservation Docker Container + [Documentation] It checks conductor-reservation docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} cond-resv + +Check ConductorData Docker Container + [Documentation] It checks conductor-data docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} cond-data + +Get Root Url + [Documentation] It sends a REST GET request to root url + Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} + &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + ${resp}= Get Request optf-cond / headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + + +*** Keywords *** + + diff --git a/test/csit/tests/optf/osdf/data/sampletest.txt b/test/csit/tests/optf-has/osdf/data/sampletest.txt index 9f4e8d7d6..9f4e8d7d6 100644 --- a/test/csit/tests/optf/osdf/data/sampletest.txt +++ b/test/csit/tests/optf-has/osdf/data/sampletest.txt diff --git a/test/csit/tests/optf/has/optf_has_test.robot b/test/csit/tests/optf/has/optf_has_test.robot deleted file mode 100644 index f939bd91a..000000000 --- a/test/csit/tests/optf/has/optf_has_test.robot +++ /dev/null @@ -1,65 +0,0 @@ -*** Settings *** -Library OperatingSystem -Library RequestsLibrary -Library json - -*** Variables *** -${MESSAGE} {"ping": "ok"} -${RESP_STATUS} "error" -${RESP_MESSAGE_WRONG_VERSION} "conductor_template_version must be one of: 2016-11-01" -${RESP_MESSAGE_WITHOUT_DEMANDS} Undefined Demand - -#global variables -${generatedPlanId} - -*** Test Cases *** -Check ConductorApi Docker Container - [Documentation] It checks cassandra docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-api - -Check ConductorController Docker Container - [Documentation] It checks zookeeper docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-cont - -Check ConductorSolver Docker Container - [Documentation] It checks tomcat docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-solv - -Check ConductorReservation War Docker Container - [Documentation] It checks music.war docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-resv - -Get Root Url - [Documentation] It sends a REST GET request to root url - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond / headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - - -*** Keywords *** - - diff --git a/test/csit/tests/vnfsdk-ice/ice-server/heat_template_empty.zip b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_empty.zip Binary files differnew file mode 100644 index 000000000..d1e6d9970 --- /dev/null +++ b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_empty.zip diff --git a/test/csit/tests/vnfsdk-ice/ice-server/heat_template_ok.zip b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_ok.zip Binary files differnew file mode 100644 index 000000000..4e89aba3e --- /dev/null +++ b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_ok.zip diff --git a/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot b/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot new file mode 100644 index 000000000..1a134b017 --- /dev/null +++ b/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot @@ -0,0 +1,69 @@ +*** settings *** +Library OperatingSystem +Library Process +Library String +Library Collections +Library RequestsLibrary +Library json + + +*** Variables *** +${valid_heat_zip} ${SCRIPTS}/../tests/vnfsdk-ice/ice-server/heat_template_ok.zip +${empty_heat_zip} ${SCRIPTS}/../tests/vnfsdk-ice/ice-server/heat_template_empty.zip +${ice_uri} /onapapi/ice/v1/ + +*** Test Cases *** + +ICE health Check + [Documentation] Validate that ICE is up + Create Session ice_session http://${ICE_IP}:5000 + &{headers}= Create Dictionary Content-Type=application/json + + ${resp}= Get Request ice_session ${ice_uri} headers=${headers} + + Should Be Equal As Strings ${resp.status_code} 200 + +Check status code for valid HEAT based VNF package + [Documentation] Post a valid VNF package and expect 200 Response + ${fileData}= Get Binary File ${valid_heat_zip} + ${fileDir} ${fileName}= Split Path ${valid_heat_zip} + ${partData}= Create List ${fileName} ${fileData} application/octet-stream + &{fileParts}= Create Dictionary + Set To Dictionary ${fileParts} file=${partData} + + ${resp}= Post Request ice_session ${ice_uri} files=${fileParts} + + Log Receive HTTP Status code ${resp.status_code} + Should Be Equal As Strings ${resp.status_code} 200 + ${json} = Set Variable ${resp.json()} + ${message} = Get From Dictionary ${json} message + Should Be Equal ${message} OK + +Check status code for empty VNF package + [Documentation] Post an empty VNF package and expect 422 Response + ${fileData}= Get Binary File ${empty_heat_zip} + ${fileDir} ${fileName}= Split Path ${empty_heat_zip} + ${partData}= Create List ${fileName} ${fileData} application/octet-stream + &{fileParts}= Create Dictionary + Set To Dictionary ${fileParts} file=${partData} + + ${resp}= Post Request ice_session ${ice_uri} files=${fileParts} + + Log Receive HTTP Status code ${resp.status_code} + Should Be Equal As Strings ${resp.status_code} 422 + ${json} = Set Variable ${resp.json()} + ${message} = Get From Dictionary ${json} message + Should Be Equal ${message} Tests failed + +Check status code for invalid request + [Documentation] Post an invalid request and expect 400 Response + ${fileData}= Get Binary File ${empty_heat_zip} + ${fileDir} ${fileName}= Split Path ${empty_heat_zip} + ${partData}= Create List ${fileName} ${fileData} application/octet-stream + &{fileParts}= Create Dictionary + Set To Dictionary ${fileParts} foo=${partData} + + ${resp}= Post Request ice_session ${ice_uri} files=${fileParts} + + Log Receive HTTP Status code ${resp.status_code} + Should Be Equal As Strings ${resp.status_code} 400 diff --git a/test/ete/labs/windriver/Integration-SB-06-DNS-openrc b/test/ete/labs/windriver/Integration-SB-06-DNS-openrc new file mode 100644 index 000000000..5f211585a --- /dev/null +++ b/test/ete/labs/windriver/Integration-SB-06-DNS-openrc @@ -0,0 +1,9 @@ +export OS_PROJECT_ID=2d7c6ec2cf9147fa974fa059b3673d7a +export OS_PROJECT_NAME=Integration-SB-06 +export OS_USER_DOMAIN_NAME=Default +export OS_USERNAME=demo +export OS_PASSWORD=onapdemo +export OS_AUTH_URL=http://10.12.25.5:5000/v3 +export OS_IDENTITY_API_VERSION=3 +export OS_REGION_NAME=RegionOne +export OS_INTERFACE=public diff --git a/test/ete/labs/windriver/Integration-SB-06-openrc b/test/ete/labs/windriver/Integration-SB-06-openrc new file mode 100644 index 000000000..c7b650e2c --- /dev/null +++ b/test/ete/labs/windriver/Integration-SB-06-openrc @@ -0,0 +1,9 @@ +export OS_PROJECT_ID=7fad299815104c0a8f90a8df80343f03 +export OS_PROJECT_NAME=Integration-SB-06 +export OS_USER_DOMAIN_NAME=Default +export OS_USERNAME=demo +export OS_PASSWORD=onapdemo +export OS_AUTH_URL=http://10.12.25.2:5000/v3 +export OS_IDENTITY_API_VERSION=3 +export OS_REGION_NAME=RegionOne +export OS_INTERFACE=public diff --git a/test/ete/labs/windriver/Integration-SB-07-DNS-openrc b/test/ete/labs/windriver/Integration-SB-07-DNS-openrc new file mode 100644 index 000000000..170859f87 --- /dev/null +++ b/test/ete/labs/windriver/Integration-SB-07-DNS-openrc @@ -0,0 +1,9 @@ +export OS_PROJECT_ID=885777d5e9074f31ad7801f9e6876b84 +export OS_PROJECT_NAME=Integration-SB-07 +export OS_USER_DOMAIN_NAME=Default +export OS_USERNAME=demo +export OS_PASSWORD=onapdemo +export OS_AUTH_URL=http://10.12.25.5:5000/v3 +export OS_IDENTITY_API_VERSION=3 +export OS_REGION_NAME=RegionOne +export OS_INTERFACE=public diff --git a/test/ete/labs/windriver/Integration-SB-07-openrc b/test/ete/labs/windriver/Integration-SB-07-openrc new file mode 100644 index 000000000..faf6b4bba --- /dev/null +++ b/test/ete/labs/windriver/Integration-SB-07-openrc @@ -0,0 +1,9 @@ +export OS_PROJECT_ID=1e097c6713e74fd7ac8e4295e605ee1e +export OS_PROJECT_NAME=Integration-SB-07 +export OS_USER_DOMAIN_NAME=Default +export OS_USERNAME=demo +export OS_PASSWORD=onapdemo +export OS_AUTH_URL=http://10.12.25.2:5000/v3 +export OS_IDENTITY_API_VERSION=3 +export OS_REGION_NAME=RegionOne +export OS_INTERFACE=public |