dcaegen2/collectors/hv-ves.git
5 years agoMerge "Align logback configuration"
Piotr Jaszczyk [Thu, 13 Dec 2018 09:16:18 +0000 (09:16 +0000)]
Merge "Align logback configuration"

5 years agoAlign logback configuration 60/74560/6
Filip Krzywka [Wed, 12 Dec 2018 07:11:30 +0000 (08:11 +0100)]
Align logback configuration

- followed current logging guidelines in regard of format
- in simulators currently very simple (minimalistic) pattern will
be used as they do not contain any MDCs or Markers
- in main logbacks included three patterns varying on verbosity and
human-readability (for production full logging, ie. ONAP_LOG_PATTERN,
should be used)
- removed logback-test from domain module as it was not enabled anyway
(no dependency on logback) and we should never have need for logging
in this module
- made logback-tests consistent (using simple pattern) except in
component-tests, where it might be useful to have more verbose
output (including MDCs etc.)

Change-Id: Ifd851d12a77d5303b836a25c0e168e18a3a804e9
Issue-ID: DCAEGEN2-1026
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoMerge "Add of adapter fun with param ClientContext"
Piotr Jaszczyk [Thu, 13 Dec 2018 08:26:21 +0000 (08:26 +0000)]
Merge "Add of adapter fun with param ClientContext"

5 years agoAdd of adapter fun with param ClientContext 00/74600/2
kjaniak [Thu, 13 Dec 2018 06:39:51 +0000 (07:39 +0100)]
Add of adapter fun with param ClientContext

Change-Id: Ib9ac6ab16c51ddf40ae849f4ce04ab7e25609f56
Issue-ID: DCAEGEN2-1031
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
5 years agoAdd helper scripts 61/74561/5
Filip Krzywka [Wed, 12 Dec 2018 07:14:57 +0000 (08:14 +0100)]
Add helper scripts

Change-Id: I8d5b48511e1b7f9cb7d1f65e8605ebe4cf1b17fc
Issue-ID: DCAEGEN2-1027
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoAdd Markers logs 50/74450/4
Filip Krzywka [Mon, 10 Dec 2018 14:18:50 +0000 (15:18 +0100)]
Add Markers logs

Change-Id: I5d3c9e1e4659782719e4847c5bcedbca39c173a0
Issue-ID: DCAEGEN2-669
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoAdd log diagnostic context 92/74392/6
Piotr Jaszczyk [Fri, 7 Dec 2018 13:41:39 +0000 (14:41 +0100)]
Add log diagnostic context

As it's not trivial to use MDC directly from logging framework in
reactive application, we need to do some work manually. The approach
proposed is an explicit MDC handling, which means that context is
kept as an object created after establishing client connection. Next,
new instance of HvVesCollector (and its dependencies) is created. Every
object is propagated with ClientContext so it can use it when calling
logger methods.

In the future ClientContext might be used to support other use-cases,
ie. per-topic access control.

As a by-product I had to refactor our Logger wrapper, too. It already
had too many functions and after adding MDC number would be doubled.

Change-Id: I9c5d3f5e1d1be1db66d28d292eb0e1c38d8d0ffe
Issue-ID: DCAEGEN2-671
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoUpdate INFO.yaml 72/74372/1
Jessica Wagantall [Thu, 6 Dec 2018 23:34:01 +0000 (15:34 -0800)]
Update INFO.yaml

Add Piotr Jaszczyk and Piotr Wielebski
Remove Przemyslaw Wasala

Change-Id: I2b8fae7a3f3423dd9877e38d3ddc765d6b343291
Issue-ID: CIMAN-33
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
5 years agoEnhance of logging in test part 24/73924/17
kjaniak [Thu, 29 Nov 2018 12:44:50 +0000 (13:44 +0100)]
Enhance of logging in test part

Change-Id: Ibdec0ac5cead7e46ada4c32983b9ccf962df703b
Issue-ID: DCAEGEN2-1004
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
5 years agoHarmonize logging and add new logs 07/73907/10
Filip Krzywka [Thu, 29 Nov 2018 10:58:40 +0000 (11:58 +0100)]
Harmonize logging and add new logs

- corrected docker-compose consul url

Change-Id: I78df868e0dd51008ef39d01553e6a0a3b8273a54
Issue-ID: DCAEGEN2-1003
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoCustom detekt rule for logger usage check 91/73891/6
Piotr Jaszczyk [Wed, 28 Nov 2018 14:46:50 +0000 (15:46 +0100)]
Custom detekt rule for logger usage check

Check if logger invocations don't use unoptimal invocations, eg.
concatenation `debug("a=" + a)` instead of lambda use `debug {"a=" + a}`

Unfortunately to avoid defining dependencies in many places and having
circural dependencies it was necessarry to reorganize the maven module
structure. The goal was to have `sources` module with production code and
`build` module with build-time tooling (detekt rules among them).

Issue-ID: DCAEGEN2-1002
Change-Id: I36e677b98972aaae6905d722597cbce5e863d201
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoBump checkstyle version 68/73668/3
Filip Krzywka [Tue, 27 Nov 2018 12:04:48 +0000 (13:04 +0100)]
Bump checkstyle version

- changed plugin invocation due to backwards incompatible
changes made in detekt's RC9 version
- disabled few rules that we actually don't follow in our code and
we seem to be fine with it
- turned on UnusedPrivateMember as it actually is a code smell/debt
- supressed warnings in where it was plausible (according to common sense)
- fixed warnings wherever possible

Change-Id: I7be97f471ff46786ef1fca3432b759e7820ac681
Issue-ID: DCAEGEN2-996
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoMerge "Remove Consul configuration decoding"
Vijay Venkatesh Kumar [Tue, 27 Nov 2018 23:28:54 +0000 (23:28 +0000)]
Merge "Remove Consul configuration decoding"

5 years agoMerge "Fix tagging for CSITs"
Vijay Venkatesh Kumar [Tue, 27 Nov 2018 23:22:05 +0000 (23:22 +0000)]
Merge "Fix tagging for CSITs"

5 years agoMerge "Add healthcheck script"
Vijay Venkatesh Kumar [Tue, 27 Nov 2018 23:21:22 +0000 (23:21 +0000)]
Merge "Add healthcheck script"

5 years agoFix tagging for CSITs 28/73228/2
Filip Krzywka [Mon, 19 Nov 2018 15:17:05 +0000 (16:17 +0100)]
Fix tagging for CSITs

- latest tag should not be used to prevent confusion with casablanca,
instead 1.1-SNAPSHOT should when referring to latests (Dublin) build
- this allows for less frequent changes in CSIT
repository after code freeze (when changes need to
update service version)

Change-Id: I4c94a5a2e90d0c77d51110ed97c9e28c30130f10
Issue-ID: DCAEGEN2-983
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoRemove Consul configuration decoding 27/68627/4
Filip Krzywka [Mon, 24 Sep 2018 08:42:47 +0000 (10:42 +0200)]
Remove Consul configuration decoding

Change-Id: I36a6aea55507abfb61613806c93257b049d6eea4
Issue-ID: DCAEGEN2-827
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoAdd healthcheck script 63/73363/4
Filip Krzywka [Thu, 22 Nov 2018 10:09:03 +0000 (11:09 +0100)]
Add healthcheck script

To be used in HV-VES deployment template

Change-Id: I87e1d52db2bb530e131837052f55a29adb5d524b
Issue-ID: DCAEGEN2-794
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoFix xNF simulator sslContext 36/73136/2
Filip Krzywka [Tue, 20 Nov 2018 12:58:12 +0000 (13:58 +0100)]
Fix xNF simulator sslContext

If --ssl-disable flag is specified in command line arguments, we shouldn't
put sslContext into TcpClient as this results in IllegalArgument.

Change-Id: I2e2d2ea89736f1e372e1b408c8f3cbe50bf1ecea
Issue-ID: DCAEGEN2-985
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoUpdate proto file to v14 23/73123/2
Jakub Dudycz [Tue, 20 Nov 2018 10:43:23 +0000 (11:43 +0100)]
Update proto file to v14

- update proto file
- update vesEventListenerVersion validation regex
  to match new requirements

Change-Id: Ic0bd855fd03caa3ca3120b2c49d5fa4f53de2540
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-984

5 years agoMerge "Fix Common Event Header fields validation"
Przemyslaw Wasala [Mon, 19 Nov 2018 10:28:28 +0000 (10:28 +0000)]
Merge "Fix Common Event Header fields validation"

5 years agoFix Common Event Header fields validation 75/72775/6
Jakub Dudycz [Thu, 15 Nov 2018 12:29:09 +0000 (13:29 +0100)]
Fix Common Event Header fields validation

- "sequence" is no longer a required parameter,
  since deafult value "0" is acceptable
- "vesEventListenerVersion" has to match the regular expression "7\.[0-9]+\.[0-9]+"

Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-976
Change-Id: I2f9fd6f375ccca3255cc9e035918dc37cc97bd6a

5 years agoUpdate project and dependencies 79/72279/5
Piotr Jaszczyk [Wed, 7 Nov 2018 14:08:43 +0000 (15:08 +0100)]
Update project and dependencies

* Changed version from 4.0.0-SNAPSHOT to 1.1.0-SNAPSHOT as per Vijay
  suggestion
* Updated Reactor to BOM Californium-SR2
* Updated mockito-kotlin to 2.0.0
* Introduced some fixes to support OpenJDK 11 compilation

Change-Id: Ib25979ef50c7241a019bf98efd9759e0b8792d58
Issue-ID: DCAEGEN2-961
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoHandle stream error early 40/72040/6
Filip Krzywka [Wed, 7 Nov 2018 07:16:09 +0000 (08:16 +0100)]
Handle stream error early

Should fix inconsistent logging due to Reactor Signal sometimes
propagating from WireChunkDecoder stream to VesHvCollector stream as
Signal.CANCEL instead of Signal.ERROR and thus not being handled
correctly.
As a drawback however we will log error twice in case it comes from
WireChunkDecoder as we want to terminate connection in such case and
so we need to propagate error.

In WireChunkDecoder `doOnTerminate` was changed to
`doFinally` as this method handles also cancellation
signals and not only terminal signals.

Also fixed minor checkstyle reported issues.

Change-Id: I6e91d96c5a1a3ecf30603db9a71e032c770d507f
Issue-ID: DCAEGEN2-955
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoMerge "Switch to JRE 11 in Dockerfiles"
Przemyslaw Wasala [Fri, 9 Nov 2018 13:52:17 +0000 (13:52 +0000)]
Merge "Switch to JRE 11 in Dockerfiles"

5 years agoSwitch to JRE 11 in Dockerfiles 95/72295/3
Jakub Dudycz [Fri, 9 Nov 2018 10:30:27 +0000 (11:30 +0100)]
Switch to JRE 11 in Dockerfiles

Change-Id: I3f8cc792677f01b6f4eeb7cc36822b6a9ed482d9
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-969

5 years agoUpdate protobuf version to 3.6.1 88/72088/1
Jakub Dudycz [Wed, 7 Nov 2018 15:36:17 +0000 (16:36 +0100)]
Update protobuf version to 3.6.1

Update protobuf and maven protobuf plugin versions

Change-Id: I12dbc71926d74eb78ef4553e4b7abe72d34274e0
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-962

5 years agoUpgrade Kotlin to 1.3 27/71927/1
Piotr Jaszczyk [Tue, 6 Nov 2018 09:09:32 +0000 (10:09 +0100)]
Upgrade Kotlin to 1.3

Migrate to Kotlin 1.3 with non-experimental coroutines support. Also
bump Arrow-Kt version so it follows 1.3 release.

Change-Id: Ia2f26d0c710b7cfae709e35700b72607aeddaf00
Issue-ID: DCAEGEN2-949
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoChange version numbers for Dublin release 48/71848/1
Piotr Jaszczyk [Mon, 5 Nov 2018 14:08:50 +0000 (15:08 +0100)]
Change version numbers for Dublin release

Change-Id: I4e1a53ea95ec8d880ff00aa94d3ba5511c23eadf
Issue-ID: DCAEGEN2-943
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoRemove any inconsistencies with specification 96/69896/1 1.0.0 3.0.0-ONAP
Piotr Jaszczyk [Fri, 5 Oct 2018 08:19:57 +0000 (10:19 +0200)]
Remove any inconsistencies with specification

* Fix payloadId field issue (was 1 byte, should use 2 byts)
* Copy final version of protobuf and asn definitions (mostly comments)
* Added links to yet-to-be updated RTD documentation

Change-Id: I69bda676423ad601797d95577ff8af6707cacb0c
Issue-ID: DCAEGEN2-857
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoIntroduce configurable payload size limitation 93/69893/1
Piotr Jaszczyk [Fri, 5 Oct 2018 07:02:06 +0000 (09:02 +0200)]
Introduce configurable payload size limitation

Maximum payload size will be configurable (from command line parameter
or environment variable). The default value is same as previous
hardcoded value, ie. 1 MiB = 1024 * 1024 bytes.

Change-Id: Iec83d8295252bac353d3794b13454fdbbc80ecc4
Issue-ID: DCAEGEN2-856
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoChange magic byte from 0xFF to 0xAA 89/69789/1
Piotr Jaszczyk [Thu, 4 Oct 2018 06:04:00 +0000 (08:04 +0200)]
Change magic byte from 0xFF to 0xAA

In final protocol specification the value has changed to 0xAA.

Change-Id: Id86c15117732b03bca38c674960d5eba8da88a6e
Issue-ID: DCAEGEN2-854
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoChange domain to lower case 20/69720/2
Piotr Jaszczyk [Wed, 3 Oct 2018 08:33:40 +0000 (10:33 +0200)]
Change domain to lower case

Change-Id: I097def2ba720fafe0a1e1a88e87f8c03663627c9
Issue-ID: DCAEGEN2-847
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoHV-VES Domain update 68/69568/5
Piotr Jaszczyk [Mon, 1 Oct 2018 05:54:26 +0000 (07:54 +0200)]
HV-VES Domain update

Change domain name. In this project this yields following changes:
* Comment change in VesEvent proto
* Updated measurements proto (kept as documentation only, ie. not used
    in the collector)
* Update name in test scenarios for unit and component scope

Change-Id: I719077b5fcb642c067d25b7aa174a2e629404689
Issue-ID: DCAEGEN2-847
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoUse JDK security provider 57/68057/8
Piotr Jaszczyk [Thu, 20 Sep 2018 10:04:03 +0000 (12:04 +0200)]
Use JDK security provider

Replace netty-tcnative bindings for OpenSSL with JDK provided
implementation by default.

Change-Id: I59a4797ce43d15a791eab00bfd25cb730a271207
Issue-ID: DCAEGEN2-816
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoMerge "Remove end-of-transmission message from protocol"
Przemyslaw Wasala [Mon, 24 Sep 2018 10:11:42 +0000 (10:11 +0000)]
Merge "Remove end-of-transmission message from protocol"

5 years agoMerge "Update README.md"
Przemyslaw Wasala [Mon, 24 Sep 2018 09:05:43 +0000 (09:05 +0000)]
Merge "Update README.md"

5 years agoRemove end-of-transmission message from protocol 67/68367/2
Filip Krzywka [Fri, 21 Sep 2018 08:14:03 +0000 (10:14 +0200)]
Remove end-of-transmission message from protocol

Also update protobuf files definitions to latest version.

Change-Id: I0cd5d2d8deec5c787e2d3948d3d905fa672f9fea
Issue-ID: DCAEGEN2-775
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoEnhance releasing memory 49/68049/5
Filip Krzywka [Thu, 20 Sep 2018 10:17:46 +0000 (12:17 +0200)]
Enhance releasing memory

- Some buffers may be emitted as cancelled and thus they would not be
handled by doOnTerminate method
- Moved data stream creation for Netty inbound to time when
collector is fully functional

Change-Id: If2f2195fadeca957679f6be696802f48a616f48d
Issue-ID: DCAEGEN2-815
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoRevert reactor upgrade (fix for tcnative bug) 39/68039/1
Piotr Jaszczyk [Thu, 20 Sep 2018 10:05:14 +0000 (12:05 +0200)]
Revert reactor upgrade (fix for tcnative bug)

For now revert the update. Will provide another fix later.

Change-Id: Iaf5fdd64c6e06e63ddc93d759025ab989b0d63db
Issue-ID: DCAEGEN2-801
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoUpdate README.md 13/67613/6
Izabela Zawadzka [Wed, 19 Sep 2018 06:30:20 +0000 (08:30 +0200)]
Update README.md

Add important links, background and implementation details, describe compability aspects and extendability

Change-Id: Ie38300a0d33b347c5d0d82b3e8547039e54829f3
Issue-ID: DCAEGEN2-798
Signed-off-by: Izabela Zawadzka <izabela.zawadzka@nokia.com>
5 years agoUpdate Kotlin and Reactor versions 87/67687/2
Piotr Jaszczyk [Wed, 19 Sep 2018 11:07:13 +0000 (13:07 +0200)]
Update Kotlin and Reactor versions

Change-Id: I7237cede772e79a1cd18835c85b43bcd81710a50
Issue-ID: DCAEGEN2-801
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoAlign to logging requirements 15/67615/3
Filip Krzywka [Wed, 19 Sep 2018 06:53:42 +0000 (08:53 +0200)]
Align to logging requirements

- Pattern does not contain MDCs and Markers as HV-VES will not
provide that kind of trace context in Casablanca release.
- Pattern does not contain replace(...){} parts from most recent version
of guideline as these parts significantly decrease logs readability
in current format

Change-Id: I03a9cef8b7f92208244a65c4846f280d560e037a
Issue-ID: DCAEGEN2-799
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoMerge "Align with latest HV-VES proto definition"
Przemyslaw Wasala [Tue, 18 Sep 2018 06:53:20 +0000 (06:53 +0000)]
Merge "Align with latest HV-VES proto definition"

5 years agoMerge "update root license"
Lusheng Ji [Mon, 17 Sep 2018 16:21:46 +0000 (16:21 +0000)]
Merge "update root license"

5 years agoAlign with latest HV-VES proto definition 75/66575/6
Filip Krzywka [Tue, 11 Sep 2018 12:45:53 +0000 (14:45 +0200)]
Align with latest HV-VES proto definition

- excluded measurements proto files from build to keep them
reference-only

Change-Id: I8c6de20eeeb1b9f8cd2ae4e865de368afe55cc91
Issue-ID: DCAEGEN2-775
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoRead flags from env variables 73/66973/1
Filip Krzywka [Mon, 17 Sep 2018 11:22:41 +0000 (13:22 +0200)]
Read flags from env variables

The application configuration should be read from command line
options as well as from environment variables. The priority: cmd-line over env over defaults.

Change-Id: Ib62d5d68003a006901d9be8a81fca354def8fea4
Issue-ID: DCAEGEN2-748
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoupdate root license 79/66679/1
vagrant [Fri, 14 Sep 2018 14:46:47 +0000 (14:46 +0000)]
update root license

Change-Id: If7db842404cc345057414d478b58874dd8b6853b
Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
Issue-ID: DCAEGEN2-595

5 years agoAlign with configuration present in consul 93/66293/1
Jakub Dudycz [Thu, 13 Sep 2018 07:55:02 +0000 (09:55 +0200)]
Align with configuration present in consul

Rename few configuration json keys inside collector code to match those on consul.

Change-Id: I400aebce98049118a30d7959dc6655a4da6016bf
Issue-ID: DCAEGEN2-774
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
5 years agoRemove security vulnerability 09/65709/1
Filip Krzywka [Tue, 11 Sep 2018 08:29:31 +0000 (10:29 +0200)]
Remove security vulnerability

Change-Id: If706e3eefb41f7c4a55212c70518f61069efeb40
Issue-ID: DCAEGEN2-766
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoEnable ssl-disable option for xNF simulator 39/65539/3
Filip Krzywka [Mon, 10 Sep 2018 09:35:13 +0000 (11:35 +0200)]
Enable ssl-disable option for xNF simulator

Change-Id: I8d4459c4b612e6066ae0da9521333fc3083952d3
Issue-ID: DCAEGEN2-760
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoFix common event header parsing 85/64985/8
Filip Krzywka [Thu, 6 Sep 2018 11:37:27 +0000 (13:37 +0200)]
Fix common event header parsing

During JSON parsing we were using 3 times 'version' field. Replaced
parsing with protobuf parser to avoid mistakes like this in future

Change-Id: I6224dc6533ab553e7e2315a95567a1fa48c1c5ad
Issue-ID: DCAEGEN2-710
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoIncrease of UT coverage in project 47/65547/2
kjaniak [Mon, 10 Sep 2018 13:06:34 +0000 (15:06 +0200)]
Increase of UT coverage in project

Change-Id: I8ac9ce21b5034f795da19e27e42ba95ce87db10d
Issue-ID: DCAEGEN2-741
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
5 years agoMerge "Enable env parameters read"
Przemyslaw Wasala [Mon, 10 Sep 2018 09:19:46 +0000 (09:19 +0000)]
Merge "Enable env parameters read"

5 years agoEnable env parameters read 45/64945/5
kjaniak [Thu, 6 Sep 2018 08:07:17 +0000 (10:07 +0200)]
Enable env parameters read

Disabling require option on mandatory parameters
to fetch them from env variables.

Change-Id: I007dea1a7f369a04479801aa508cf1034ac1341a
Issue-ID: DCAEGEN2-741
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
5 years agoMerge "Use managed guava version"
Vijay Venkatesh Kumar [Fri, 7 Sep 2018 16:13:53 +0000 (16:13 +0000)]
Merge "Use managed guava version"

5 years agoHandle non-existing Collector instance 59/64659/3
Filip Krzywka [Wed, 5 Sep 2018 08:37:51 +0000 (10:37 +0200)]
Handle non-existing Collector instance

Change-Id: I0b6cd5023b2bca0f0bee6958c107fc560fc95b52
Issue-ID: DCAEGEN2-751
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoBuild enhancements 17/64917/4
Piotr Jaszczyk [Thu, 6 Sep 2018 06:20:03 +0000 (08:20 +0200)]
Build enhancements

* Handling docker proxy configuration in a reasonable way
* Should skip coverage verification when skipTests was set
* Get rid of resources encoding warning
* Fix check-coverage output on Jenkins

Change-Id: If828fc41a88074931649e739c615a8b9d8db8739
Issue-ID: DCAEGEN2-755
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoImprove coverage of xNF simulator 53/63453/13
Piotr Jaszczyk [Wed, 29 Aug 2018 11:24:59 +0000 (13:24 +0200)]
Improve coverage of xNF simulator

Also refactor to make it possible.

Change-Id: I6da6d3f33e57c524a7e353ecebd3e045d8ceed2a
Issue-ID: DCAEGEN2-739
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoRead config from environment variables 51/64351/4
Piotr Jaszczyk [Tue, 4 Sep 2018 07:59:20 +0000 (09:59 +0200)]
Read config from environment variables

The application configuration should be read from command line options
as well as from environment variables. The priority: cmd-line over env
over defaults.

Change-Id: I785fd1fbaf66f3eab84a162f037153f1688ed791
Issue-ID: DCAEGEN2-748
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoImprove DCAE APP Simulator coverage 01/62301/13
Piotr Jaszczyk [Fri, 24 Aug 2018 10:51:14 +0000 (12:51 +0200)]
Improve DCAE APP Simulator coverage

Also there was a need to refactor the code, because application logic
was placed inside Ratpack handlers.

Change-Id: Iba3d4d039a98ba88e0dba580c1b7726b53440538
Issue-ID: DCAEGEN2-732
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoRemove additional SNAPSHOT from docker tag 87/63687/1
Piotr Jaszczyk [Thu, 30 Aug 2018 06:42:21 +0000 (08:42 +0200)]
Remove additional SNAPSHOT from docker tag

Change-Id: I3fa764feef63d1318adf7ba8128ea2b86055951a
Issue-ID: DCAEGEN2-742
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoUse managed guava version 73/62573/2
Gary Wu [Fri, 24 Aug 2018 22:20:36 +0000 (15:20 -0700)]
Use managed guava version

Use centrally managed guava version specified in
oparent.  Includes upgrade to oparent 1.2.0.

This change was submitted by script and may include
additional whitespace or formatting changes.

Change-Id: I0f54a8a9fb9ce4536c621c81f9c3be54d121a4e1
Issue-ID: INT-619
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
5 years agoFail build when coverage is too low 89/62089/4
Piotr Jaszczyk [Thu, 23 Aug 2018 12:45:39 +0000 (14:45 +0200)]
Fail build when coverage is too low

Minimum coverage set to 60%. It works by parsing aggregated Jacoco
report as oposed to jacoco:check goal which checks coverage at most
on submodule level.

Change-Id: Ie6f50ce9b2f15e62ad84480611897a98321a7af2
Issue-ID: DCAEGEN2-681
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoUpdate to Jacoco 0.8.2 & fix coverage report 93/61993/3
Piotr Jaszczyk [Thu, 23 Aug 2018 07:06:19 +0000 (09:06 +0200)]
Update to Jacoco 0.8.2 & fix coverage report

* Upgrade to Jacoco version with Kotlin support
* Reorganize hv-collector-coverage pom.xml so aggregated report works
  again

Change-Id: I636d901114701e2c6669d45add85aafcad8a6783
Issue-ID: DCAEGEN2-729
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoAlign with latest proposal of wire proto frame 89/61589/2
Piotr Jaszczyk [Tue, 21 Aug 2018 12:46:40 +0000 (14:46 +0200)]
Align with latest proposal of wire proto frame

Change-Id: I8f989a3913f1592b4d740a80ed30b01bc3aceff2
Issue-ID: DCAEGEN2-722
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoMerge "Harmonize docker image names"
Przemyslaw Wasala [Tue, 21 Aug 2018 10:12:01 +0000 (10:12 +0000)]
Merge "Harmonize docker image names"

5 years agoHarmonize docker image names 95/61495/1
Piotr Jaszczyk [Tue, 21 Aug 2018 07:44:46 +0000 (09:44 +0200)]
Harmonize docker image names

Use groupId.artifactId naming convention.

Change-Id: Iddcf59c895305677db10534696e4b026ca97e042
Issue-ID: DCAEGEN2-719
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoUpdate dependenies' versions 81/61481/3
Piotr Jaszczyk [Tue, 21 Aug 2018 06:49:39 +0000 (08:49 +0200)]
Update dependenies' versions

Kotlin and Arrow updated. Also used Jacoco in version 0.8.1 because one
defined in oparent fails with new Kotlin.

Change-Id: I42e70c08454205fc732cca092c3ec0637f6118d3
Issue-ID: DCAEGEN2-720
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoRename artifacts to match LF requirements 69/61469/1
Piotr Jaszczyk [Tue, 21 Aug 2018 06:28:54 +0000 (08:28 +0200)]
Rename artifacts to match LF requirements

Group ID has been changed from org.onap.dcaegen2.collectors.veshv to
org.onap.dcaegen2.collectors.hv-ves.

Change-Id: I077e244ed56df22dd45bfe8dd1eee238f811a552
Issue-ID: DCAEGEN2-719
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoMerge "Remove Ratpack dependency for HV-VES health checks"
Lusheng Ji [Fri, 17 Aug 2018 18:09:49 +0000 (18:09 +0000)]
Merge "Remove Ratpack dependency for HV-VES health checks"

5 years agoRemove Ratpack dependency for HV-VES health checks 27/60527/10
Piotr Jaszczyk [Tue, 14 Aug 2018 10:52:28 +0000 (12:52 +0200)]
Remove Ratpack dependency for HV-VES health checks

In order to minimize complexity and possibly improve performance (thread count)
reactor-netty should be used instead of Ratpack. Also reorganize code to
be more consistent and differentiated readiness and liveness endpoints
(for future use in K8s Pod definition).

As an example I've defined health check probe in docker-compose YAML.

Change-Id: I1b5ce3d685e7ae5b0515b2146ae4fa88b3b41186
Issue-ID: DCAEGEN2-705
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoAlign with release docker & JARs CI definitions 49/60849/4
Piotr Jaszczyk [Thu, 16 Aug 2018 06:09:27 +0000 (08:09 +0200)]
Align with release docker & JARs CI definitions

If not explocitly called with -DskipDockerPush=false Maven will not push
docker images to the registry. The change is introduced in order for
'{project-name}-{stream}-docker-java-shell-daily' to do the push but all
other Jenkins jobs should skip this step.

Also set hv-collector-analysis version to 1.0.0-SNAPSHOT as it's not a
child of root pom (it contains only custom definitions needed for detekt
plugin to work).

Change-Id: Icc4a1d6cc1a763fad417860b45ffdad30524f67b
Issue-ID: DCAEGEN2-661
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoReorganize docker build 23/58923/8
Piotr Jaszczyk [Fri, 3 Aug 2018 11:05:15 +0000 (13:05 +0200)]
Reorganize docker build

* Docker is built in "docker" profile
* It is turned on by default
* "mvn install" builds and tags docker image
* "mvn deploy" pushes the image to the registry
* "mvn -DskipDocker ..." skips docker build
* Temporarily use OpenJDK 8 instead of 10 - it require us to
  specify additional JVM options for use inside containers on production
  hence addition of run-java.sh

Change-Id: Ifa67df4ed7de9f3d300d6f6de999a890486dea24
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Issue-ID: DCAEGEN2-653
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoLink project as ONAP oparent module child 05/60005/4
Filip Krzywka [Fri, 10 Aug 2018 06:26:42 +0000 (08:26 +0200)]
Link project as ONAP oparent module child

- Downgraded checkstyle-plugin version to not break build - oparent
uses deprecated config property that cannot be overriden... Also it
uses plugin version from 2014...
- Moved jacoco plugin definition for similiar reasons.
- Bumped maven-surefire-plugin.
- Also added missing license in file. Not sure why CI did not catch
that one earlier
- removed nexus properties that should be inherited from onap
`version` artifact (parent of oparent)
- Use upgraded maven-failsafe-plugin - works with java 8, not sure
about Java 9+

Change-Id: I47e441315cc0e1dc49ed474450db0ee3d2701a10
Issue-ID: DCAEGEN2-700
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
5 years agoAdd netcat to docker image 47/59847/1
Filip Krzywka [Thu, 9 Aug 2018 11:39:21 +0000 (13:39 +0200)]
Add netcat to docker image

As it's not included in `slim` version of jre image and will be
required for healthcheck

Change-Id: Ic2e73e58c46d72fc845266a6953bd0dc4d8bc8b9
Issue-ID: DCAEGEN2-697
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
5 years agoImplement simple health check mechanism 03/59603/6
Jakub Dudycz [Wed, 8 Aug 2018 07:17:14 +0000 (09:17 +0200)]
Implement simple health check mechanism

Change-Id: Ic4b8b59ced9dc19c9ebf26131036a9e1a752164f
Issue-ID: DCAEGEN2-659
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
5 years agoCreate health check module 01/59601/4
Jakub Dudycz [Tue, 7 Aug 2018 12:18:37 +0000 (14:18 +0200)]
Create health check module

Create ves-hv-collector-health-check module with dummy api server and connect it with ves-hv-collector-main
This is a preparation for health check mechanism implementation

Change-Id: I2f668ab7337b1ed7e2afea6c56f34880de3ef1b5
Issue-ID: DCAEGEN2-659
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
5 years agoClean up repository 37/59337/1
Jakub Dudycz [Tue, 7 Aug 2018 07:32:43 +0000 (09:32 +0200)]
Clean up repository

There are some leftover from gitlab that should be removed from/updated in official repo.

Change-Id: I9e47321433ed2f744135b7fb85f140f381fe84e1
Issue-ID: DCAEGEN2-690
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
5 years agoCorrection of version.properties typo 27/59327/1
kjaniak [Tue, 7 Aug 2018 05:46:11 +0000 (07:46 +0200)]
Correction of version.properties typo

Change-Id: Ib321f24ffc54b6dca321cc3a5929c7bdaebc790a
Issue-ID: DCAEGEN2-683
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
5 years agoAdd INFO.yaml file 67/57767/3
Jessica Wagantall [Thu, 26 Jul 2018 21:08:39 +0000 (14:08 -0700)]
Add INFO.yaml file

Add INFO.yaml to list:
- Project description
- Properties
- PTL information
- Meeting information
- Committer information

Change-Id: I1180a4d0840ef7b5f6f5f684ed2bf6d531e565bf
Issue-ID: CIMAN-134
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
5 years agoAdd of version.properties file 07/59207/1
kjaniak [Mon, 6 Aug 2018 12:55:16 +0000 (14:55 +0200)]
Add of version.properties file

Change-Id: Id6e282d8865a425bc1a093d6a495cd4fabe3d98f
Issue-ID: DCAEGEN2-683
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
5 years agoUpgrade to Kotlin 1.2.60 85/59185/1
Jakub Dudycz [Mon, 6 Aug 2018 11:56:40 +0000 (13:56 +0200)]
Upgrade to Kotlin 1.2.60

Change-Id: I089c63edd1859c6941f0791f1cf3a09526b6d028
Issue-ID: DCAEGEN2-660
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
5 years agoDisable proxy when building Docker images 11/58911/1
Piotr Jaszczyk [Fri, 3 Aug 2018 10:07:28 +0000 (12:07 +0200)]
Disable proxy when building Docker images

Change-Id: I72d5c511a90fd2d357227aa94b968cc63bd4ca68
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Issue-ID: DCAEGEN2-653

5 years agoRe-enable docker build 07/58907/1
Piotr Jaszczyk [Fri, 3 Aug 2018 09:50:23 +0000 (11:50 +0200)]
Re-enable docker build

* re-enable after seed code temporary workaround
* move docker build from package to deploy phase

Change-Id: Ic338247590b019c90cf9241075a255bfaff28c5b
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Issue-ID: DCAEGEN2-653

5 years agoRemove default consul configuration 97/58897/1
Jakub Dudycz [Tue, 31 Jul 2018 12:49:35 +0000 (14:49 +0200)]
Remove default consul configuration

Default consul configuration is not needed in real life use case
and it doesnt even bring anything useful in our test environment,
since it's immediately overriden.

Tasks:
- remove default consul configuration
- make "config-url" argument required

Closes ONAP-727

Change-Id: I4a01cebfc6b2918fa3aa6020504def60572b09da
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoExtract test-utils module 83/58883/1
fkrzywka [Tue, 31 Jul 2018 12:26:09 +0000 (14:26 +0200)]
Extract test-utils module

- removed duplicate code that was creating VesMessages
and similiar objects
- removed duplicate code in command line parsing tests
- made minor refactorings to avoid passing unnecessary params
and to be as verbose as possible in tests

Closes ONAP-699

Change-Id: I2607f1f775054ae1c5f275c231895f838b415371
Signed-off-by: fkrzywka <filip.krzywka@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoMerge "Move MessageParametersParser"
Przemyslaw Wasala [Fri, 3 Aug 2018 08:59:40 +0000 (08:59 +0000)]
Merge "Move MessageParametersParser"

5 years agoMerge "Fix NPE when getting Consul configuration"
Przemyslaw Wasala [Fri, 3 Aug 2018 08:58:49 +0000 (08:58 +0000)]
Merge "Fix NPE when getting Consul configuration"

5 years agoMove MessageParametersParser 79/58879/1
fkrzywka [Tue, 31 Jul 2018 12:22:59 +0000 (14:22 +0200)]
Move MessageParametersParser

To avoid dependency of utilities module on modules other than domain

Change-Id: I90ef8640a86501315d84848118d3e748aafd095c
Signed-off-by: fkrzywka <filip.krzywka@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoFix NPE when getting Consul configuration 77/58877/1
Piotr Jaszczyk [Tue, 31 Jul 2018 07:28:29 +0000 (09:28 +0200)]
Fix NPE when getting Consul configuration

No initial value for AtomicReference was provided hence we had a little
race condition.

Retry when consul returns error.

Change-Id: Ie38ca7fbf445123e98ee94703eba501bb5233fab
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoUse proxy while publishing docker images on CI 75/58875/2
fkrzywka [Tue, 31 Jul 2018 07:31:05 +0000 (09:31 +0200)]
Use proxy while publishing docker images on CI

Also fix gitlab-ci syntax

Change-Id: I5e5e1db3888f976640bacc161d703cc6be3ab613
Signed-off-by: fkrzywka <filip.krzywka@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoDefine simple healthchecks for simulators 71/58871/1
fkrzywka [Mon, 30 Jul 2018 10:55:03 +0000 (12:55 +0200)]
Define simple healthchecks for simulators

- currently containers are healthy if they have successfully started
their Http servers thus simple endpoint at /healthcheck is sufficient
- to enable docker healthcheck we need to add `curl` to docker images
- http_proxy needs to be provided for docker to be able to build images
behind proxy

Closes ONAP-695

Change-Id: I02f0b8cc2732713b5307dbc34ba604d8185b74fc
Signed-off-by: fkrzywka <filip.krzywka@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoDCAE APP simulator rework 69/58869/1
Jakub Dudycz [Thu, 26 Jul 2018 09:49:45 +0000 (11:49 +0200)]
DCAE APP simulator rework

- Extract message parameters parsing logic to standalone class in utils
- Make DCAE APP simulator store whole received messages history
- Add validation endpoint
- Add new messege type: FIXED_PAYLOAD

Closes ONAP-686

Change-Id: I865804716ad5e46a7503a8eee70cfe9ac75a6c1e
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoPass CommonEventHeader to XNF simulator api 63/58863/1
Jakub Dudycz [Wed, 25 Jul 2018 14:13:28 +0000 (16:13 +0200)]
Pass CommonEventHeader to XNF simulator api

This change makes XNF simulator more configurable and
allows to validate more message parameters in robot integration tests

Closes ONAP-689

Change-Id: Ic0a10f1e1cdd84ac415c00050b4cca1ac496c56b
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoEnable UNDEFINED option in commonHeader GPB schema 61/58861/1
kjaniak [Wed, 25 Jul 2018 12:02:27 +0000 (14:02 +0200)]
Enable UNDEFINED option in commonHeader GPB schema

Closes ONAP-655

Change-Id: I6fc830d2b8c7bdd726f306a6fbf7e979f39e03f0
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoRework argument configuration 59/58859/1
Jakub Dudycz [Tue, 24 Jul 2018 09:48:12 +0000 (11:48 +0200)]
Rework argument configuration

- Unify names of argument configuration classes in
  DCAE APP simulator, XNF simualtor and VES HV Collector
- Make some of the arguments required
- Adjust docker-compose and Dockerfiles
- Adjust test cases and error handling

Closes ONAP-683

Change-Id: I4a9d43791cced9dcb52eb83e2f7956462e8712d9
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoConfigure xnf simulator api listen port 49/58849/1
Jakub Dudycz [Mon, 23 Jul 2018 12:51:00 +0000 (14:51 +0200)]
Configure xnf simulator api listen port

Closes ONAP-664
Closes ONAP-647

Change-Id: I8d1e57c0c66f1968925660fe47fa96a2a634c039
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoFix consul request timeout issue 45/58845/2
Jakub Dudycz [Fri, 20 Jul 2018 14:37:02 +0000 (16:37 +0200)]
Fix consul request timeout issue

Fix timeout issue when using consul blocking query calls
by switching to standard requests peformed in given interval

Closes ONAP-628

Change-Id: Ifaf7ddfa27045015a7a90c178e0d6d38955c0c58
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-601

5 years agoSupport scenarios for continuous streaming test 43/58843/1
Jakub Dudycz [Wed, 18 Jul 2018 12:33:10 +0000 (14:33 +0200)]
Support scenarios for continuous streaming test

Added support for below scenarios
-too big payloads
-invalid wire frames
-invalid GPB data
-unsupported domains

Changed input json for xnf simulator endpoint

Closes ONAP-500

Change-Id: I19e84a76cef501e274ea8152f3c33c95dddcaac9
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-601