aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-domain/src/main
AgeCommit message (Collapse)AuthorFilesLines
2018-11-29Custom detekt rule for logger usage checkPiotr Jaszczyk10-525/+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-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-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 Jaszczyk3-9/+7
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 Jaszczyk1-2/+2
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 Krzywka6-162/+91
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 Krzywka7-150/+265
- 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 Jaszczyk1-1/+1
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 Jaszczyk3-111/+105
Change-Id: I8f989a3913f1592b4d740a80ed30b01bc3aceff2 Issue-ID: DCAEGEN2-722 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-02Enhance wire protocolfkrzywka3-24/+82
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 Dudycz2-2/+14
- 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 Jaszczyk5-119/+45
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 Jaszczyk3-13/+50
Closes ONAP-404 Change-Id: I6adfb542ffdafad678e7bc6e062d3d59c250b39e 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 Jaszczyk3-69/+162
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 Jaszczyk5-13/+161
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 modulefkrzywka3-0/+233
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