aboutsummaryrefslogtreecommitdiffstats
path: root/core/core-engine
AgeCommit message (Collapse)AuthorFilesLines
2021-09-15Bump apex-pdp to 2.6.1-SNAPSHOTa.sreekumar1-1/+1
Change-Id: Ie39d324e02a302b882318d46735a727322ce409d Issue-ID: POLICY-3587 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-08-31Fix sonar issues in apex-pdpRam Krishna Verma5-11/+15
Issue-ID: POLICY-3077 Change-Id: Id5e7c2ddada2bac3b73fe543f9adade6f9b83e6c Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-08-24Use CompareToBuilderJim Hahn5-46/+32
Also added lombok to test classes. Issue-ID: POLICY-3391 Change-Id: I9ecf479f3861a2e5211b037e885029d1719b6a56 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-06Use lombok for apex-pdp #7Jim Hahn16-295/+76
Updated thru core-protocols. Issue-ID: POLICY-3391 Change-Id: I2226fee16b276eba5c7f3fd1921a6cef36654f07 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-02Cleanup input & outputFields from Task definitiona.sreekumar3-23/+27
1) Remove the usage of inputField and outputField from Task definition. 2) Fix issues around populating events to task in case of State Finalizer Logic. Change-Id: Ief17f400729410b83c6b7c665980d443e0cf6f28 Issue-ID: POLICY-3336 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-06-28Changes to support multiple outputs from a statea.sreekumar14-227/+434
This review addresses two main changes: 1) inputFields and outputFields are not tied to task definition anymore. Instead inputEvent and outputEvents associated to a task is populated as part of the policy state definition, as the state definition have the information anyway. - Clean up of the usage of inputFields and outputFields in task definition will happen in a future review - inputFields and outputFields defined in task definition in policies until honolulu will not make the policy invalid as the changes are done in backward compatible way. 2) Multiple output events can come out of a final state now. - Define another policy state output with the relevant eventName in the command file - In the task logic, create a map to store the fields of the relevant outputEvent, and then just call "executor.addFieldsToOutput(<the_map_of_fields>)" These 2 steps are enough to send multiple events to relevant components as per the apex configuration. Change-Id: Id88ca402704106404f529e595e1a76f6bf167876 Issue-ID: POLICY-3336 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-05-31Fix Sonar Issues on Apex-pdplapentafd3-7/+31
Changes made into cli-codegen, cli-editor, and core-engine Renamed one test class to match other test classes Issue-ID: POLICY-3093 Change-Id: Ib2d947782021590ffc08d426e7a1607a8c33f98a Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-05-03Remove GroupValidationResultJim Hahn4-65/+28
Removed GroupValidationResult, replacing it with BeanValidationResult. Modified the ParameterGroup subclasses to use BeanValidator, adding annotations where needed to trigger the validations that had been automatically performed by GroupValidationResult. Issue-ID: POLICY-2059 Change-Id: I2c0c01fac355e6cde4d8d6998dc42f8a2e2ebb65 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-12Bump apex-pdp to 2.6.0-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3105 Change-Id: I53abd7e9cf8c1425d115b0bb917db6389e9ded92 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-03-10Bump apex-pdp to 2.5.2-SNAPSHOTa.sreekumar1-1/+1
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.sreekumar1-1/+1
Change-Id: I761ded255a97128f858d3a7ce95f2479b6208a4e Issue-ID: POLICY-3088 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-18Fix sonars in apex-pdpJim Hahn5-13/+13
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-10Remove URL and useerid from JMS pluginliamfallon1-2/+1
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>
2020-11-11Add method to allow JSON conversion to execution context for logicliamfallon4-63/+108
The Rhino JSON.Stringify() method does not work well. This patch allows the user to call schema specific or generic JSON conversion using the schema handling in Apex or not as the developer chooses. Added a single argument stringify2Json() method. Issue-ID: POLICY-2463 Change-Id: I9ec1e0dea2f6cd153b73b2eace63d8806674884d Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-10-27Bump apex-pdp master to 2.5.0-SNAPSHOTRam Krishna Verma1-1/+1
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.sreekumar1-1/+1
Change-Id: I5e2cd92ee3620dea4070d9fa3aeb5ffd65f9412c Issue-ID: POLICY-2869 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-10-08Bump apex-pdp to 2.4.3-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2839 Change-Id: Ia7c847b3dafd28958d5df209af95cac19fa480a0 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-09-10Bump APEX version to 2.4.2-SNAPSHOTa.sreekumar1-1/+1
Change-Id: Idde5050b425eb1bebe312e80e795c21513367a1b Issue-ID: POLICY-2789 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-09-03Clean up warnings and SONAR issuesliamfallon1-5/+4
Issue-ID: POLICY-2654 Change-Id: Ifd391ea9141d37cfd3ca4110d66c667962230ae1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-08-10SONAR assertion cleanupwaynedunican1-2/+2
Replaced assertions to not have the same actual and expected expression in apex-pdp Issue-ID: POLICY-2761 Change-Id: I2bf45a3cc4411bd39f93f9d0b8c8e56dd318281e Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-20Replace try/catch with assertj - apex-pdpwaynedunican12-722/+264
Replaced try/catch blocks apex-pdp with assertj assertions. Part III of changes. Issue-ID: POLICY-2451 Change-Id: I77ee4140cdfc2066f463459f92163677c3e34ef2 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-17Fix double initiation error on EngineServiceFacadeliamfallon1-6/+0
The engineServiceFacade allows it's init() method to be called twice, the second call should return that the facade is already initialized. Issue-ID: POLICY-2720 Change-Id: Id241e232163a8812a72f92841ce7b11f59358d45 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-07-13Merge "Remove old documentation from build"Jim Hahn4-145/+0
2020-07-13Merge "Fix assertTrue SONAR issues in apex-pdp/contex and apex-pdp/core"Pamela Dragosh1-9/+11
2020-07-13Remove old documentation from buildliamfallon4-145/+0
apex-pdp had an in-line docuemntation build system built on asciidoc. It has proven to be very difficult to maintain and keep up to date and it is incompatible with the ONAP official RST/ReadTheDocs docuementation system. In the Dublin release, we converted the asciidoc documentation to RST format, and hae been updating the RST documentation since. The asciidoc docuemntation system is now so out of date that it is being removed. In this change, the "site" directory is removed from all modules in apex-pdp and a profile called "apexSite" is removed from the pom.xml file in all modules. Issue-ID: POLICY-2686 Change-Id: I645f3ed101159d356cd90e619cef791067ad5eb5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-07-10Bump apex-pdp to 2.4.1-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2695 Change-Id: I15b489de9ca2614e3a6c94b450a3d6397d17d4ff Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-10Fix assertTrue SONAR issues in apex-pdp/contex and apex-pdp/coreJvD_Ericsson1-9/+11
Replace assertTrue with assertEquals and assertFalse with assertNotEquals in apex-pdp/client apex-pdp/context and apex-pdp/core Issue-ID: POLICY-2690 Change-Id: Ic1e69c75e5f8f887cac135b6728b007faf4b19a6 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
2020-06-19Changes for checkstyle 8.32liamfallon33-44/+3
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-05-21Bump apex master to 2.4.0RossC1-1/+1
Issue-ID: POLICY-2514 Change-Id: I764cfe41ed8cf8ffebd4ff076d0b76b79d61e142 Signed-off-by: RossC <ross.carter@est.tech>
2020-05-20Bump Apex to 2.3.3RossC1-1/+1
Issue-ID: POLICY-2514 Change-Id: I5b130b052150eb0e51759c751b83ab9d6f199759 Signed-off-by: RossC <ross.carter@est.tech>
2020-04-15Bump policy-apex-pdp to 2.3.2-SNAPSHOTa.sreekumar1-1/+1
Change-Id: Ic668ab20498bdc41edc78f52c7ce9d89a1385f19 Issue-ID: POLICY-2378 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-03-31Fix State Finalizer Prepare and Cleanupliamfallon5-65/+75
The prepare() and cleanup() method were not called on state finalizers for states. This review adds calls for them. Issue-ID: POLICY-2450 Change-Id: I27aec4dea51f3e22b5922c04c7b7b974fca24292 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-25Bump policy-apex-pdp to 2.3.1-SNAPSHOTa.sreekumar1-2/+2
Change-Id: I59b93fccb0f3a41f8db753d1e8e2978bbb51e9a0 Issue-ID: POLICY-2378 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-03-09Sonar Bug fixaditya.puthuparambil1-56/+55
Change-Id: Icb465fdcf5a580f599a111ed3c5d3510f5346f64 Issue-ID: POLICY-1913 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech>
2020-03-04Merge "replace test sleep() with awaitality package"Liam Fallon2-5/+8
2020-03-04replace test sleep() with awaitality packageHenry.Sun2-5/+8
Signed-off-by: Henry.Sun <henry.a.sun@est.tech> Change-Id: I305771ddef42bd3032ad52f4c5ecd55b01ed5a1a Issue-ID: POLICY-1914 Signed-off-by: Henry.Sun <henry.a.sun@est.tech>
2020-03-01Switch apex to Graal javascript engineliamfallon3-15/+18
This is the main review to switch out the Nashorn Javascript interpreter and switch in the Graal javascript interpreter for apex Javascript tasks. The Graal Javascript dialect differs slightly from Nashorn in the way it accesses information passed over from the Java world so Javascript tasks need to be converted. Subsequent reviews will convert the JUnit tests marked @Ignore in previous reviews to this one and will convert the Javascript tasks into a format Graal can handle. Subsequent reviews will also convert the examples over to Graal format. Issue-ID: POLICY-2106 Change-Id: Ief582a36539e8a87724c17fb7e56864d5e471c07 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-26Fix Java 11/Checkstyle/Sonar warningsliamfallon2-26/+34
A number of Java 11, checkstyle, and SONAR warnings have crept into the Apex codebase over the last number of reviews. This change fixes those issues. Issue-ID: POLICY-1913 Change-Id: I2afd607e80f48323355380fb2fe5e048e18879f9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-20Passing taskParameters from ApexConfig to policy logica.sreekumar9-194/+271
TaskParameters can be used to pass parameters from ApexConfig to the policy logic. In the config, these are optional. Usage as below: { "engineParameters": { "taskParameters": [ { "key": "ParameterKey1", "value": "ParameterValue1" }, { "taskId": "TaskIdVal", "key": "ParameterKey2", "value": "ParameterValue2" } ] } } In the taskLogic, taskParameters can be accessed as below: eg: executor.parameters.get("ParameterKey1")) If taskId is provided in ApexConfig for an entry, then that parameter is updated only for that particular task. Otherwise, the task parameter is added to all tasks. Change-Id: I9e1b3d3697428309e7d86db40b63ffe822935b69 Issue-ID: POLICY-2364 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-12-04Minor changes for new Eclipse checkstyle checksliamfallon3-5/+11
The laest Eclipse checkstyle version 8.26.0 does more thorough checking and identified a number of small issues in the apex-pdp codebase. This review fixes those issues. Issue-ID: POLICY-1913 Change-Id: I30ba25e3e425c6d54c77f925e8da3ab841a8357c Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-28Replace getCaononicalName() with getName() in code baseliamfallon1-3/+3
Issue-ID: POLICY-1861 Change-Id: Iccbdcbc5b5978305c56ab74c01a52a562697bee1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-14Retaining context in APEX Engine based on policies received in PdpUpdatea.sreekumar6-266/+125
Change-Id: I73fad5bf76ed6b4979f5ab76013f204ea82da30b Issue-ID: POLICY-2215 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-09-16Merge "Disable Jython Excutor for security"Liam Fallon1-3/+3
2019-09-14Disable Jython Excutor for securityliamfallon1-3/+3
The Jython interpreter pulls in many dependencies that are flagged as having security problems. We will disable Python support in apex-pdp until Frankfurt, users can compile from source if they wish to re-enable python support. Issue-ID: POLICY-1509 Change-Id: I84215ba8d1009cb7af99cd98ba19008fdff5c378 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-09-12Bump version in apex-pdp masterjrh31-1/+1
Also added defaultbranch to the .gitreview file to make it easier to change it when apex-pdp is branched in the future. Issue-ID: POLICY-2045 Signed-off-by: jrh3 <jrh3@att.com> Change-Id: Ib2570fd395aae38862299f2193b07ab06e32ace5
2019-08-07Bump version of apex-pdpjrh31-1/+1
Issue-ID: POLICY-1965 Signed-off-by: jrh3 <jrh3@att.com> Change-Id: Icd437f10c4d991030652ffa1abf48b7b5738145c
2019-07-10Add integration tests for executor propertiesliamfallon10-91/+92
Added integration test that sets properties in a dummy plugin and amends them in tasks in a policy. Variosu tests added to check combinations of where properties are set in plugins or in tasks or both. Implementaiton changed to: - Always pass in a Properies object, the properties object coming into the policy cannot be null because the task/TSL/SFL may wish to set it - Fix a bug where the properties were not passed from the ApexEvent to the engine event in the ApexEventUnmarshaller class Issue-ID: POLICY-1743 Change-Id: I6aa152b28d46cf3cc6fa56a1a95b76a8e55f5a49 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-07-01Merge "Fix issues from Checkstyle reviews"Ram Krishna Verma2-81/+15
2019-07-01Fix issues from Checkstyle reviewsliamfallon2-81/+15
Use lombok on fields in EnEvent. Remove unnecessary code in BBS WebClient class Address Sonar issue in Execurot class Issue-ID: POLICY-1791 Change-Id: If07dc4529b121f8bfcd6ab1ae6c9def4774f9f4d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-28Bump apex-pdp to 2.2.1-SNAPSHOTPamela Dragosh1-1/+1
Released 2.2.0 Issue-ID: POLICY-1737 Change-Id: I144a3c07d3eaf8c53d339eecedf2b3d8d3ce3c7e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>