aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-domain
AgeCommit message (Collapse)AuthorFilesLines
2018-11-29Custom detekt rule for logger usage checkPiotr Jaszczyk13-992/+0
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>
2018-11-28Bump checkstyle versionFilip Krzywka3-3/+1
- 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>
2018-11-20Update proto file to v14Jakub Dudycz2-9/+8
- 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
2018-11-19Merge "Fix Common Event Header fields validation"Przemyslaw Wasala1-1/+3
2018-11-19Fix Common Event Header fields validationJakub Dudycz1-1/+3
- "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
2018-11-15Update project and dependenciesPiotr Jaszczyk1-2/+2
* 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>
2018-11-05Change version numbers for Dublin releasePiotr Jaszczyk1-1/+1
Change-Id: I4e1a53ea95ec8d880ff00aa94d3ba5511c23eadf Issue-ID: DCAEGEN2-943 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-10-05Remove any inconsistencies with specification3.0.0-ONAP1.0.0Piotr Jaszczyk7-139/+37
* 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>
2018-10-05Introduce configurable payload size limitationPiotr Jaszczyk4-14/+12
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>
2018-10-04Change magic byte from 0xFF to 0xAAPiotr Jaszczyk2-6/+6
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>
2018-10-03Change domain to lower casePiotr Jaszczyk2-16/+16
Change-Id: I097def2ba720fafe0a1e1a88e87f8c03663627c9 Issue-ID: DCAEGEN2-847 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-10-01HV-VES Domain updatePiotr Jaszczyk4-128/+125
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>
2018-09-24Use JDK security providerPiotr Jaszczyk1-3/+21
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>
2018-09-24Remove end-of-transmission message from protocolFilip Krzywka7-222/+124
Also update protobuf files definitions to latest version. Change-Id: I0cd5d2d8deec5c787e2d3948d3d905fa672f9fea Issue-ID: DCAEGEN2-775 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-09-17Align with latest HV-VES proto definitionFilip Krzywka9-152/+266
- 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>
2018-09-11Fix common event header parsingFilip Krzywka1-0/+35
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>
2018-08-31Improve DCAE APP Simulator coveragePiotr Jaszczyk2-2/+2
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>
2018-08-22Align with latest proposal of wire proto framePiotr Jaszczyk4-121/+136
Change-Id: I8f989a3913f1592b4d740a80ed30b01bc3aceff2 Issue-ID: DCAEGEN2-722 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-08-21Rename artifacts to match LF requirementsPiotr Jaszczyk1-1/+1
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>
2018-08-03Extract test-utils modulefkrzywka1-1/+0
- 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
2018-08-03Enable UNDEFINED option in commonHeader GPB schemakjaniak1-15/+17
Closes ONAP-655 Change-Id: I6fc830d2b8c7bdd726f306a6fbf7e979f39e03f0 Signed-off-by: kjaniak <kornel.janiak@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Add command line option to disable SSL/TLSkjaniak1-0/+1
Closes ONAP-508 Change-Id: If6c3935ede7b00dea9b36747c6cd1422c1c8d330 Signed-off-by: kjaniak <kornel.janiak@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Include msg generator module in coverage reportfkrzywka1-1/+1
* Reordered alphabetically modules in main pom file * Removed unused imports * Corrected visibility for fields/methods * Fix typos in tests Change-Id: I35c515b3844bc8517cc6ffb0c6557596505536c9 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Add byte-buffer handling assertions when decodingfkrzywka1-2/+14
ByteBuffer reader index should be reset in case of failed decoding of wire frame, as parsing might be retried when more bytes arrive Change-Id: I6dcb5c94c8cffba969f572fca8bbb728ea9500bd Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Enhance wire protocolfkrzywka4-51/+145
Handle new wire frame message type which should allow clients to indicate that all data has been sent to collector Change xNF Simulator to send end-of-transmission message after sending all messages Close ves-hv-collector stream after encountering EOT message Remove duplicated file in project Closes ONAP-391 Change-Id: Idb6afc41d4bb0220a29df10c2aecfd76acd3ad16 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Reject messages with payload size > 1MiBJakub Dudycz3-7/+63
- Update validation in WireFrameDecoder class - Write unit and component tests for that case Closes ONAP-340 Change-Id: I68cb608fd76118719b12a83de1ef930160f8a162 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Use Either instead of exceptions in frame decoderPiotr Jaszczyk7-133/+68
Goals: * Make code cleaner (in a FP way) * Avoid costly exception throw each time we wait for the rest of the frame (collecting stack traces is costly and we do not need them anyway) Closes ONAP-437 Change-Id: I40341d3c2cb85f3ff581d89167245cb009dbb070 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Include payload content type in wire framePiotr Jaszczyk4-26/+75
Closes ONAP-404 Change-Id: I6adfb542ffdafad678e7bc6e062d3d59c250b39e Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Various improvementsPiotr Jaszczyk1-1/+0
* Kotlin upgrade * Monad usage on APIs * Idle timeout * Simulator enhancements Closes ONAP-390 Change-Id: I3c00fcfe38c722caf661ddaad428cf089eeefcaa Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Refactor ArgBasedConfigurationfkrzywka1-0/+31
Extracted duplicate code from Client/Server ArgBasedConfiguration, as it probably would be used third time in future work Change-Id: I581abbcd5f1dd4a1a049e1d28e68a7e4d82a84f8 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Implement Kafka SinkPiotr Jaszczyk4-90/+178
Closes ONAP-146 Change-Id: I119a8abe70a9042f65a43909e5aa2fbed439e26f Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-01Fix TCP stream framing issuePiotr Jaszczyk6-30/+308
Because of the nature of TCP protocol we receive consecutive IO buffer snapshots - not separate messages. That means that we need to join incomming buffers and then split it into separate WireFrames. Closes ONAP-312 Change-Id: I84ba0ec58a41ff9026f2fca24d2b15f3adcf0a19 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-01Add SSL/TLS to client simulatorPiotr Jaszczyk1-1/+3
Change-Id: Iedebd222be08931b95e52a84c8c4d9c0df9e1da1 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-01Extract domain modulefkrzywka6-0/+470
WireFrame extracted to domain module Domain package name in collector-core changed to avoid collision Merged Protobuf module with new domain module Closes ONAP-253. Change-Id: Ie7ac0bb877eae018a7520b4f3ceebe9fd51dbf65 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601