diff options
Diffstat (limited to 'pnfsimulator/src/test/resources')
-rw-r--r-- | pnfsimulator/src/test/resources/application.properties | 2 | ||||
-rw-r--r-- | pnfsimulator/src/test/resources/client.p12 | bin | 0 -> 2685 bytes | |||
-rw-r--r-- | pnfsimulator/src/test/resources/logback-test.xml | 69 | ||||
-rw-r--r-- | pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/filesystem/test1.json | 12 | ||||
-rw-r--r-- | pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/invalidJsonStructureEvent.json | 1 | ||||
-rw-r--r-- | pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/validExampleMeasurementEvent.json | 89 | ||||
-rw-r--r-- | pnfsimulator/src/test/resources/trustStore | bin | 0 -> 1455 bytes |
7 files changed, 173 insertions, 0 deletions
diff --git a/pnfsimulator/src/test/resources/application.properties b/pnfsimulator/src/test/resources/application.properties new file mode 100644 index 0000000..6815680 --- /dev/null +++ b/pnfsimulator/src/test/resources/application.properties @@ -0,0 +1,2 @@ +templates.dir=src/test/resources/org/onap/pnfsimulator/simulator +ssl.clientCertificateEnabled=false diff --git a/pnfsimulator/src/test/resources/client.p12 b/pnfsimulator/src/test/resources/client.p12 Binary files differnew file mode 100644 index 0000000..0bbec38 --- /dev/null +++ b/pnfsimulator/src/test/resources/client.p12 diff --git a/pnfsimulator/src/test/resources/logback-test.xml b/pnfsimulator/src/test/resources/logback-test.xml new file mode 100644 index 0000000..ad4f0c8 --- /dev/null +++ b/pnfsimulator/src/test/resources/logback-test.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + Simulator + ================================================================================ + Copyright (C) 2019 Nokia. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<Configuration complete="true" compact="true"> + + <Property name="outputFilename" value="pnfsimulator_output"/> + <Property name="log-path" value="${java.io.tmpdir}"/> + <property name="maxFileSize" value="50MB"/> + <property name="maxHistory" value="30"/> + <property name="totalSizeCap" value="10GB"/> + + <appender name="Console" target="SYSTEM_OUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <Pattern>%nopexception%logger + |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} + |%level + |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'} + |%thread + |%n</Pattern> + </encoder> + </appender> + + <appender name="ROLLING-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <encoder> + <pattern>%nopexception%logger + |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} + |%level + |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'} + |%thread + |%n</pattern> + </encoder> + <File>${log-path}/${outputFilename}.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <FileNamePattern>${log-path}/${outputFilename}.%d{yyyy-MM-dd}.%i.log.zip</FileNamePattern> + <MaxFileSize>${maxFileSize}</MaxFileSize> + <MaxHistory>${maxHistory}</MaxHistory> + <TotalSizeCap>${totalSizeCap}</TotalSizeCap> + </rollingPolicy> + </appender> + + <root level="info"> + <appender-ref ref="Console" /> + <appender-ref ref="ROLLING-FILE" /> + </root> +</Configuration> diff --git a/pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/filesystem/test1.json b/pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/filesystem/test1.json new file mode 100644 index 0000000..89e4a76 --- /dev/null +++ b/pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/filesystem/test1.json @@ -0,0 +1,12 @@ +{ + "field1": "value1", + "field2": 2, + "nested": { + "key1": [ + 1, + 2, + 3 + ], + "key2": "sampleValue2" + } +} diff --git a/pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/invalidJsonStructureEvent.json b/pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/invalidJsonStructureEvent.json new file mode 100644 index 0000000..4d6ef7d --- /dev/null +++ b/pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/invalidJsonStructureEvent.json @@ -0,0 +1 @@ +{"sampleKey1": [{"sampleKey2": "1"}, {"sampleKey2": "2"}] diff --git a/pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/validExampleMeasurementEvent.json b/pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/validExampleMeasurementEvent.json new file mode 100644 index 0000000..989d6ea --- /dev/null +++ b/pnfsimulator/src/test/resources/org/onap/pnfsimulator/simulator/validExampleMeasurementEvent.json @@ -0,0 +1,89 @@ +{ + "event": { + "commonEventHeader": { + "domain": "measurementsForVfScaling", + "eventName": "vFirewallBroadcastPackets", + "eventId": "4cfc-91cf-31a46", + "nfType": "mrfx", + "priority": "Normal", + "reportingEntityName": "myVNF", + "sequence": 1, + "sourceName": "ClosedLoopVNF", + "startEpochMicrosec": 1531616794, + "lastEpochMicrosec": 1531719042, + "version": 2.0 + }, + "measurementsForVfScalingFields": { + "measurementsForVfSclaingFieldsVersion": 2.0, + "measurementsForVfScalingVersion": 2.0, + "measurementInterval": 180, + "concurrentSessions": 2, + "cpuUsageArray": [ + { + "cpuIdentifier": "INTEL_CORE_I7_1", + "percentUsage": 50 + }, + { + "cpuIdentifier": "INTEL_CORE_I7_2", + "percentUsage": 70 + } + ], + "memoryUsageArray": [ + { + "vmIdentifier": "vmIdentifier", + "memoryFree": 50, + "memoryUsed": 10 + } + ], + "vNicUsageArray": [ + { + "receivedTotalPacketsDelta": 30 + } + ], + "numberOfMediaPortsInUse": 100, + "additionalMeasurements": [ + { + "name": "licenseUsage", + "arrayOfFields": [ + { + "name": "G711AudioPort", + "value": "1" + }, + { + "name": "G729AudioPort", + "value": "1" + }, + { + "name": "G722AudioPort", + "value": "1" + }, + { + "name": "AMRAudioPort", + "value": "4" + }, + { + "name": "AMRWBAudioPort", + "value": "5" + }, + { + "name": "OpusAudioPort", + "value": "6" + }, + { + "name": "H263VideoPort", + "value": "7" + }, + { + "name": "H264NonHCVideoPort", + "value": "8" + }, + { + "name": "H264HCVideoPort", + "value": "9" + } + ] + } + ] + } + } +} diff --git a/pnfsimulator/src/test/resources/trustStore b/pnfsimulator/src/test/resources/trustStore Binary files differnew file mode 100644 index 0000000..e90b710 --- /dev/null +++ b/pnfsimulator/src/test/resources/trustStore |