aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
AgeCommit message (Collapse)AuthorFilesLines
2022-10-18Add support for KafkaAvroSerializer in apex-pdpRam Krishna Verma3-9/+51
Adding the support for KafkaAvroSerializer to deserialize the messages sent on a kafka topic using the KafkaAvroSerializer. The default StringDeserializer that comes from KafkaConsumer is not able to work with avro encoded messages. Issue-ID: POLICY-4369 Change-Id: Ia97bee9546baa78c237e21a220df9374b84121dd Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca> (cherry picked from commit b1296de01e61cb8d8e2a8476bad108b2046783de)
2022-10-17Revert "Add support for KafkaAvroSerializer in apex-pdp"Ram Krishna Verma2-19/+6
This reverts commit 9bf76281dae15941f3d53c1f1a419a8faa5f20f4. Reason for revert: Will cherry pick the changes from master branch instead to keep them in sync across releases. Issue-ID: POLICY-4369 Change-Id: Ia73e177d432db32352324a800b09426c3bf145c1 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2022-09-29Add support for KafkaAvroSerializer in apex-pdpRam Krishna Verma2-6/+19
Adding the support for KafkaAvroSerializer to deserialize the messages sent on a kafka topic using the KafkaAvroSerializer. The default StringDeserializer that comes from KafkaConsumer is not able to work with avro encoded messages. Issue-ID: POLICY-4369 Change-Id: Ic12dc156b88e1ef323f8b600e464beef4a02d72e Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2022-09-09Revert "Fix bug in json schema helper"Ram Krishna Verma1-1/+1
This reverts commit 76c38f09e566b09c9879bdd624b6919b6840beed. Reason for revert: The bug was not in the code, rather in the schemas defined in the policy implementation. Issue-ID: POLICY-4353 Change-Id: I39b60bc40e8c3be8e5820e7d618ef0c47916056d Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2022-09-07Fix bug in json schema helperRam Krishna Verma1-1/+1
Fixing a bug in json schema helper where it tries to pass through JsonElement and not attempting to compare the incoming object with schema. Issue-ID: POLICY-4353 Change-Id: I0ec8f6a8ec3723bca796e8cf43b6ec9164fbf582 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2022-08-18Bump apex-pdp to 2.5.6-SNAPSHOTRam Krishna Verma33-33/+33
Issue-ID: POLICY-4295 Change-Id: I44e6ef00b28291956fa802e41c1acce5b1be531e Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2022-08-01Adding JSON Schema support in APEX-PDPa.sreekumar13-3/+815
More details can be found here: https://wiki.onap.org/display/DW/JSON+Schema+support+in+APEX-PDP A separate review will be raised as part of POLICY-4292 with a reference example on how to use the JSON Schema. Change-Id: I903d48969c6c5a24c63b8465b2412ed0b75b9351 Issue-ID: POLICY-4291 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca> (cherry picked from commit c354fba3fb87ebe21a7fbb2a15268ccc9d033fbd)
2021-08-05Bump apex-pdp to 2.5.5-SNAPSHOTRam Krishna Verma32-32/+32
Issue-ID: POLICY-3329 Change-Id: Iae6b3d356483398740da602d950879cf21d28a34 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-08-03Improve APEX logging for irrelevant eventsa.sreekumar2-2/+3
When multiple policies are expecting event on the same topic/endpoint, a lot of event parsing failure log messages are generated unnecessarily. With this change, only a 1 line message will be printed if an event cannot be parsed, and the detailed messages will be available at debug level. Change-Id: If1e7460ef5ed86fd470396f1e2ed8cc3c8af70c4 Issue-ID: POLICY-3499 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca> (cherry picked from commit 1036206455218a4722079b749e628ca96825418d)
2021-06-25Bump apex-pdp to 2.5.4-SNAPSHOTRam Krishna Verma32-32/+32
Issue-ID: POLICY-3329 Change-Id: I86c81ddb4ba8e5961690c451e1dd5185ecf20d3b Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-05-26Support ':' in Apex Event Avro schema fieldnamesJohnKeeney4-10/+124
Similar to '.' (_DoT_) and '-' (_Dash_), the ':' (_ColoN_) character can now be used in Apex Event Field names specified using Avro Schema Change-Id: I320058441a1a1a544b9f1619e45c96e71e5aa9e3 Signed-off-by: JohnKeeney <john.keeney@est.tech> Issue-ID: POLICY-3301 Signed-off-by: JohnKeeney <john.keeney@est.tech> (cherry picked from commit fe40844bba4a94e26efc0f1c57d62c97e35bfc79)
2021-05-07Changes to retain executionProperties per event flow for better context handlinga.sreekumar3-19/+6
Change-Id: I11668e9222dd9c61cc3096fa5c754c8702a781bf Issue-ID: POLICY-3227 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca> (cherry picked from commit 7bcbd221e350e45db5be0c4f1ceb2e4e1a418f63)
2021-05-07Changes to support Kafka over SSL in APEXa.sreekumar2-2/+17
The Kafka plugin in APEX-PDP already has a field "kafkaProperties" that can take in any properties required for the Kafka client. This is apt to store the SSL related properties as they could change based on the server implementation. To make the communication possible, the only change required in APEX is to allow a property to have an empty value. For e.g., to disable the server host name verification, ssl.endpoint.identification.algorithm must to be explicitly set to an empty string on the client. Change-Id: If3adaeaf11e5fbbd2aff582b5d4ba7824017ea8a Issue-ID: POLICY-3194 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca> (cherry picked from commit bd21c78ed6953de4e8f9fd43311fd22bee7a5472)
2021-03-24Bump apex-pdp to 2.5.3-SNAPSHOTRam Krishna Verma32-32/+32
Issue-ID: POLICY-3150 Change-Id: I563f3f4f2d0d3355b6f683db5904bd2d339f6623 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-03-23Fixing parallel event execution problem in APEX-PDP REST layera.sreekumar1-26/+21
Parallel event execution in APEX was resulting in incorrect dynamic REST url. This issue is fixed in this review. Change-Id: Id8a28c001a7fd7915df1f5909109bb369667ab40 Issue-ID: POLICY-3019 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca> (cherry picked from commit 369a94a9fd626b35d52c2e7ee5f19e6ff6e1b9d8)
2021-03-10Bump apex-pdp to 2.5.2-SNAPSHOTa.sreekumar32-32/+32
Change-Id: I291f968367b1f864bb417a72fd0bdb22a07ba0f7 Issue-ID: POLICY-3127 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-24Bump apex-pdp to 2.5.1-SNAPSHOTa.sreekumar32-32/+32
Change-Id: I761ded255a97128f858d3a7ce95f2479b6208a4e Issue-ID: POLICY-3088 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-18Fix sonars in apex-pdpJim Hahn6-220/+117
Addressed the following issues: - initialize mocks before use - use parameterized queries - Random() is not secure - provide parameterized type for generics - unused imports - constructor visibility - use compute() instead of containsKey()/put() - make final fields static - rename constants to all upper case - no assert() in Thread.run() methods - nested try - nested if/else - too many break/continue - use try-with-resources - repeatable annotations - overlapping characters in reg ex - hashcode is not sufficient in compareTo() - need equals() with compareTo() - make class an interface - use parameterized test - multiple calls in assert() - log or re-throw - use different type of lambda - use parameterized logging - use StringBuilder instead of concatenation - use StandardCharsets.UTF_8 Issue-ID: POLICY-2906 Change-Id: I2cf8c885e3e22c2c6cbe6403a34906928afad022 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-11Changes related to multi policy handling improvement in APEXa.sreekumar1-19/+30
This review fixes an issue identified during testing the changes done for improving multiple policy handling in APEX. Changes done to a few test files in the previous review are reverted as well. Change-Id: I98324da708239d314aadd4c45dc377137fd552ba Issue-ID: POLICY-2883 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-10Remove URL and useerid from JMS pluginliamfallon2-38/+50
This review makes the default URL and userid for JMS null, the actual values must be specified as parameters. Issue-ID: POLICY-3035 Change-Id: I9c06d94d8816092425e2df58b849d837ad953fb2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-02-08Remove security credentials from JMS pluginliamfallon4-26/+40
The default security credential of "password" was encoded in a constant in the JMS plugin parameters file. This commit removes these credentials and defaults the credentials to null. Issue-ID: POLICY-3035 Change-Id: I6313340e64c893c4f99de78d9dd448ac53d81246 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-01-28Improve handling of multiple policy in APEX PDPa.sreekumar1-18/+6
Change-Id: Ic4adf5bd8876dc31fc93993298e90389baaa2c39 Issue-ID: POLICY-2883 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-01-20Merge "Add logs for REST request/response in APEX"Ram Krishna Verma5-16/+29
2021-01-20Update Hazelcast version, remove security vulnerabilityliamfallon2-9/+11
Security vulnerabillitles were flagged in CLM in Hazelcast version 3.11-BETA-1. Hazelcast version 4.1.1 removes that vulnerability. The lock handling is slightly different in version 4.1.1 and the old ILock class is removed. The code is updated to use the new FencedLock locks. Issue-ID: POLICY-2943 Change-Id: I0cb7d3cb279fed17b3f8758e55902703491f4b5c Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-01-20Add logs for REST request/response in APEXa.sreekumar5-16/+29
Change-Id: Ibf2cf19a1ec91473d8c655b87a712aa8738848c8 Issue-ID: POLICY-3003 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-01-15Add exception to logsRam Krishna Verma2-8/+8
Fixing the comments from previous review - https://gerrit.onap.org/r/c/policy/apex-pdp/+/116833 Issue-ID: POLICY-2885 Change-Id: I85474b365d92771e6e1b56bba95bde6e319d4ec2 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-01-13Avoiding unwanted logging in APEX during event processinga.sreekumar9-101/+45
Change-Id: If0c93bfea08025c6c10e3f4572a14088990f415f Issue-ID: POLICY-2885 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-01-06Removing duplicate logging of single response eventa.sreekumar1-4/+2
Change-Id: I88c8f2eea9cb295e422d20222df21a46ef84cd4e Issue-ID: POLICY-2885 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-12-17Prune superfluous log and exception messagesgregory.hayes5-19/+19
Large volume exception messages should not be repeated in log messages or in rethrown exceptions. Jira-Link: https://jira.onap.org/browse/POLICY-2885 Issue-ID: POLICY-2885 Signed-off-by: gregory.hayes <gregory.hayes@est.tech> Change-Id: I345531d3a7640cc5ad9dbfc367052b9c8cc19387
2020-10-27Bump apex-pdp master to 2.5.0-SNAPSHOTRam Krishna Verma32-32/+32
Issue-ID: POLICY-2875 Change-Id: Ibb0e9a243bf92f0255cb5c145d31ccddb988fdf5 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-10-20Bump apex-pdp to 2.4.4-SNAPSHOTa.sreekumar32-32/+32
Change-Id: I5e2cd92ee3620dea4070d9fa3aeb5ffd65f9412c Issue-ID: POLICY-2869 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-10-16Merge "Remove apex asciidoc documents"Jim Hahn28-1398/+0
2020-10-16Remove apex asciidoc documentsliamfallon28-1398/+0
Apex documentation has now all been ported to use the ONAP recommended rst format. This review removes the old asciidoc documents. Issue-ID: POLICY-2824 Change-Id: I562bd344cb7d6ff36e7d54bdb8f95e3b656468f8 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-10-08Bump apex-pdp to 2.4.3-SNAPSHOTRam Krishna Verma32-32/+32
Issue-ID: POLICY-2839 Change-Id: Ia7c847b3dafd28958d5df209af95cac19fa480a0 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-09-17Cleanup related to removal of legacy format support in APEXa.sreekumar4-4/+0
This review basically just removes all "policyModelFileName" occurences which are not used anymore. Change-Id: Ibac8ec776dd989a5d677ff27a99eb7a36110773f Issue-ID: POLICY-2835 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-09-10Bump APEX version to 2.4.2-SNAPSHOTa.sreekumar32-32/+32
Change-Id: Idde5050b425eb1bebe312e80e795c21513367a1b Issue-ID: POLICY-2789 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-09-09APEX standalone support for ToscaPolicy formata.sreekumar21-1178/+10845
Legacy format support is removed, and Tosca format support is added. Change-Id: I3cfc181ccb5471a5d224c0162af18c1fa0fdbc70 Issue-ID: POLICY-2812 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-09-03Merge "Sonar Bug fixes"Pamela Dragosh1-1/+1
2020-09-03Sonar Bug fixeswaynedunican1-1/+1
Removal of remaining bugs in apex-pdp Issue-ID: POLICY-2774 Change-Id: I370796e7c8a41c116155155c33176512e9e0cd91 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-09-03Clean up warnings and SONAR issuesliamfallon4-29/+14
Issue-ID: POLICY-2654 Change-Id: Ifd391ea9141d37cfd3ca4110d66c667962230ae1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-08-26Update apex JRuby joni dependency for securityliamfallon1-2/+12
Issue-ID: POLICY-2799 Change-Id: Ifdc16e99093995665db61329f61455fc0f327386 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-08-13SONAR fixes - log formattingwaynedunican2-4/+5
Fixed the sonar issues relating to Printf format being used for logging instead of String concatenation Issue-ID: POLICY-2773 Change-Id: I38db8d1df077fd7102f6c4f9b33685f2914bd624 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-08-07Sonar FixesJvD_Ericsson1-1/+1
Replace the type specification in this constructor call with the diamond operator and other small fixes Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Issue-ID: POLICY-2760 Change-Id: I83821859a4a1dbbffbaeae15281abac2de3b5712
2020-07-27SONAR assertions apex-pdpwaynedunican4-25/+39
Ensure assertions are present in test cases Issue-ID: POLICY-2706 Change-Id: I3673a7668564401d2136450b0bdd7a013605dd7c Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-23Merge "Fix replaceAll SONAR issues in apex-pdp"Ram Krishna Verma1-3/+4
2020-07-22Fix replaceAll SONAR issues in apex-pdpJvD_Ericsson1-3/+4
Change replaceAll() with repalce() in apex-pdp/plugins and apex-pdp/testsuites Issue-ID: POLICY-2722 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: Ib9d5256c050197b06f9df9c4cbb7562be081283c
2020-07-21Fix assertTrue in apex-pdp/model apex-pdp/plugins, apex-pdp/services and ↵JvD_Ericsson3-11/+12
apex-pdp/testsuites Replace assertTrue with assertEquals and assertFalse with assertNotEquals in apex-pdp/model, apex-pdp/plugins, apex-pdp/services and apex-pdp/testsuites Issue-ID: POLICY-2690 Change-Id: If088371cf012d5648e04ade2aa4d49b38945f6d2 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
2020-07-16Merge "Replaced try/catch blocks with assertj - apex-pdp"Pamela Dragosh12-636/+250
2020-07-16Merge "Replace try/catch with assertj"Pamela Dragosh8-427/+174
2020-07-15Replace try/catch with assertjwaynedunican8-427/+174
Replaced try/catch blocks with assertj assertions in apex-pdp. Last batch of changes Issue-ID: POLICY-2451 Change-Id: I39bd02fdbd8389818dcf1b786189c1e344ddcea5 Signed-off-by: waynedunican <wayne.dunican@est.tech>