aboutsummaryrefslogtreecommitdiffstats
path: root/core/core-engine
AgeCommit message (Collapse)AuthorFilesLines
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>
2018-10-31Set new master version for Dublinliamfallon1-3/+2
Issue-ID: POLICY-1232 Change-Id: If43c40e9e13bd9387e2b6ee876717f8413a17e34 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-10-24Fix refering to snapshot in policy/apex-pdp2.0.1ramverma1-1/+1
Issue-ID: POLICY-1213 Change-Id: I9187462aa470cff6ca7adc750c8a666bf8e15429 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-10-08Remove Sonar Vulnerabilitliamfallon1-1/+1
The coverage review for teh Apex engine introduced a vulnerability flag in Sonar. This review fixes that vulnerability Change-Id: Ie90c61a22c79604513ff2393a768a22ec9542484 Issue-ID: POLICY-1034 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-10-07Unit test for Apex engineliamfallon32-62/+3682
Coverage for unit test of engie state and state machine handling. Added coverage of the facade and executor context classes Added coverage for executors Added coverage for the remainder of the core engine Issue-ID: POLICY-1034 Change-Id: I85c66005dfdffdf2b4ee5672473a3ae4823d0d9c Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-10-03Add unit test for core events and contextliamfallon9-16/+888
This code is covered by feature testing but does not show up in Sonar. These unit tests give coverage on engine modules. Issue-ID: POLICY-1034 Change-Id: Ib7a288bcb9729ec88346cc8047e38f3a58f9a97c Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-26Allow custom JSON adapter specificationliamfallon1-15/+22
In order to decode and encode complex Java POJOs with GSON, type adapters must be specified. This change allows specification of GSON type adapters for decoding and encoding of JSON in apex. Issue-ID: POLICY-954 Change-Id: Ib402d4e82c4f22fa4d532c016f77fb8e7bb568d3 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-26Add JUnit for engine serviceliamfallon1-0/+4
Although the Apex engine service is called by the policy engine tests and the various interface tests, the test coverage on these classes is not showing up in Sonar. In any event it is better that specific JUint is done for them. Issue-ID: POLICY-1034 Change-Id: I0028c7e5e870c18649870536cf3691fce2ab689c Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-22Fix sonar problems in Apexliamfallon5-32/+78
Fixed some easy to resolve Sonar issues. Issue-ID: POLICY-1034 Change-Id: Ia8e4606bd4307daca499b4a74c96135211e572fd Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-16Fix Sonar issues in apexliamfallon3-4/+5
Fixing various Sonar issues in apex. Issue-ID: POLICY-1034 Change-Id: Ie693637d75bd7e38c71b7ba04886fb75636276ed Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-14Fix exception not logged or rethrownliamfallon1-0/+3
Eclipse sonarlint does not check for exception dropping by default, it must be configured. This commit addresses exception dropping in apex. Change-Id: I406838990b3424c2912124b25d7326502cacc96c Issue-ID: POLICY-1034 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-12Sonar/Checkstyle in model/context/coreliamfallon17-192/+203
Checkstyle and sonar changes in the model, contexot and core modules. Issue-ID: POLICY-1034 Change-Id: I2d40bc877f3a548844470fc290fc89d63fa465ae Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-12Fix soft stop and start of engineliamfallon1-2/+5
Stopping an apexc engine is a soft stop, allowing the engine to be restarted again. However, when a model upgrade is carried out the engine must be stopped and cleared to clear the previous model, loaded with the new model and started again. THis handling must work over the Web Socket admin interface and also when apex is started as a service. This change fixes the handling so that it is consistent and works the same when apex is stopped/started/upgraded from the command line or over the management web socket interface Issue-ID: POLICY-1101 Change-Id: I1fe619641cb6ecd34d0669b4b7df105280e5e2c0 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-10Checkstyle changes for apex modelliamfallon3-5/+5
Fix checkstyle warnings in the apex mode and knock on changes. Issue-ID: POLICY-1034 Change-Id: I10537e4288e9cad5ef18165ed2cdc1d3ab3139c1 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-06Fix package of apex examples and documentsliamfallon2-5/+5
The examples are not packaged correctly in the apex build and the client wars are missing The links and location of the documents are corrected. Some POM duplicate dependencies removed. Javadoc warnings removed. Issue-ID: POLICY-867 Change-Id: I555c29191c61c0a9887365d95005dbc584eddf04 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-04Fix checkstyle issues in apex model basicliamfallon14-93/+93
CHeckstyle issues in apex model basic and knock on changes in other apex modules. Issue-ID: POLICY-1034 Change-Id: I65823f5e2e344526abc74b0812877113acb056ec Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-08-31Use parameter service in apexliamfallon5-62/+126
Switch parameter handling in apex to use the ONAP PF common parameter service Change-Id: Id318d19c726b18b1a69c630fa81ca7d695355e9c Issue-ID: POLICY-954 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-08-14Fix checkstyle warnings in core-engine moduleDinh Danh Le27-196/+265
Change-Id: Ie79c88e21a3d1f4cd53fd678a7afcffe1c6c202c Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com> Issue-ID: POLICY-1034
2018-07-31Adding first set of apex-pdp document changesramverma4-0/+145
Adding document changes for auth, context, core, model, services & the main apex-pdp module. Change-Id: Id0d026baa258f1dc6998978f9911f3c4a73b5b3b Issue-ID: POLICY-867 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-06-08Fixing Sonar bugs and Vulnerabilitieswaqas.ikram4-15/+12
Change-Id: Id5a95f23f1308dbb9f7f0c0f5567e238ecf830af Issue-ID: POLICY-859 Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>
2018-06-04Adding apex core module to apex-pdpramverma39-0/+5365
Change-Id: I4bfe1df3e44fe62ff6789e813e59836e267ab3b2 Issue-ID: POLICY-858 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>