aboutsummaryrefslogtreecommitdiffstats
path: root/core/core-engine
AgeCommit message (Collapse)AuthorFilesLines
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>
2019-06-28Replace non-Javadoc comments with inheritDocsliamfallon10-301/+140
Copyright headers not changed as this review only amends comments. Issue-ID: POLICY-1791 Change-Id: Icbeb2c6e591b3b160ae102bb67aef2d407924a4d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-27Add period after inheritDoc for Sonarliamfallon9-83/+89
Issue-ID: POLICY-1791 Change-Id: I60f65fb60ca77fe97bd1c23822038b835bd98a11 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-26Add passthrough properties for APEX engineliamfallon22-573/+415
APEX event receiver and sender plugins sometimes need to exchange information with tasks, especially in the case of REST communication. This change enables passthrough of Properties from the event carrier technology plugins to APEX task, task selection, and state finalizer logics. Apologies for the size of the review but this change involves passinng the properties through all the APEX components, hence the large number of small changes. Issue-ID: POLICY-1742 Change-Id: I219fd69550f06702ef64adbb165fe7baac422e96 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-21Replace uses of getCanonicalName() with getName() in APEXa.sreekumar1-1/+1
Change-Id: Ifcd8866e65a7bc1238d5a4137f7bad288a5bfb3b Issue-ID: POLICY-1861 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-06-20Enable maven-checkstyle-plugin in apex-pdpa.sreekumar1-1/+2
Enable maven-checkstyle-plugin in apex-pdp/pom.xml to fail the build at warning level. Fix all the existing check style issues in the component. Change-Id: I4de9c1bd9ca5a2876de9086d2d3526cbdc25c080 Issue-ID: POLICY-1732 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-05-30Bump apex-pdp to version 2.2.0Jim Hahn1-1/+1
Issue-ID: POLICY-1747 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Iba1c6a80917a37cc63e2250a32df40046df9ee4f
2019-05-16Step snapshot version of apex-pdpliamfallon1-1/+1
Issue-ID: POLICY-1630 Change-Id: I6dfce7eb33d9bc41caabf6b8842377b486de672d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-19Use Assertions class from policy-commonliamfallon6-9/+15
Change import line in all classes that use the Assertions class, there are a lot of them. Issue-ID: POLICY-1264 Change-Id: I8480264be4e36348b3fc63acf1bc36e9c9dd250b Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-21Rename test classes in apex-pdp/model,coreParshad Patel3-5/+5
Make test classes name consitence by adding 'Test' at end of junit test classes and adding 'Support' or 'Dummy' at start of util or dummy type of test classes Issue-ID: POLICY-1263 Change-Id: I6cb8d09799d7abd1b50ead1edbc4986649ad4ba7 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-12-18Remove unused @throws warningsliamfallon1-7/+3
Previous checkstyle fixes rationalised the exceptions thrown by methods, however the javadoc comments were not updated. This review updates them. Issue-ID: POLICY-1263 Change-Id: I2746f30e76018ec4d0f1e74a6a415979b7874329 Signed-off-by: liamfallon <liam.fallon@est.tech>