summaryrefslogtreecommitdiffstats
path: root/model
AgeCommit message (Collapse)AuthorFilesLines
2020-04-15Release policy/apex-pdp2.3.1jenkins-releng8-8/+8
2020-03-25Bump policy-apex-pdp to 2.3.1-SNAPSHOTa.sreekumar8-18/+18
Change-Id: I59b93fccb0f3a41f8db753d1e8e2978bbb51e9a0 Issue-ID: POLICY-2378 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-03-11Fix minor checkstyle/eclipse warningsliamfallon1-1/+3
Some minor checkstyle and eclipse warnings have crept into the code in the last few weeks. This review cleams them up. Issue-ID: POLICY-1913 Change-Id: Ib5f103bc28c71a6c4db05ea05719eff41bb38914 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-11Sonar Security vulnerabilities fixaditya.puthuparambil1-17/+14
Issue-ID: POLICY-1913 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: Ic86e04776c9300e37134210cd9db5b6d7e6a5a9e
2020-03-09Use Rhino javascript executor in apex-pdpliamfallon8-443/+18
Integation unit tests resultd in StackOverflowException errors in the Graal Javascript interpreter. Following extensive testing and trouobleshooting, it proved very difficult to fix these issues in Graal as the stck overflow errors were occurring in native class instantiation methods being invoked by Grall on the JVM. The alternative Rhino Javascript engine is developed by mozilla, and was incorporated into the Java 6 JVM and evolved into Nashorn in the Java 8 JVM. Oracle dropped Nashorn in Java 11. However, in parallel, Rhino development has continued. This review brings in the Rhino javascript engine into apex-pdp as the replacement for Nashorn and instead of Graal. Graal seems to be pretty unstable as yet so we may bring it in in future releases but for now Rhino is a more stable and reliable alternative. Issue-ID: POLICY-2106 Change-Id: I0edeff3b0bee404b38e3ebe22001a6e3375a44dc Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-26Fix Java 11/Checkstyle/Sonar warningsliamfallon7-102/+86
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-01-23Remove apex-pdp TextFileUtils classliamfallon9-193/+82
This class was moved to policy-common some time ago. Removing it in apex-pdp. Issue-ID: POLICY-1913 Change-Id: I982fbd799334b34f1526e19f339236b52205b91e Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-23Run apex-pdp in Java 11: base changesliamfallon4-30/+68
This change brings in the minimum changes to get apex-pdp running in Java 11. Other reviews will bring in changes to remove Java 11 warnings and to convert apex-pdp Javascript handling from the now deprecated nashorn engine. Issue-ID: POLICY-1581 Change-Id: I879bbae08d4e67aca3f1bfeedeca639d8dbbc281 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-08Populate the PdpStatistics data in heartbeatshaoqiu1-2/+4
Apex to populate the PdpStatistics data in every heartbeat sent to PAP Issue-ID: POLICY-2302 Change-Id: I2d3a6c1e8605d53bf754a135980527bd50762abd Signed-off-by: shaoqiu <tim.huang@est.tech>
2019-12-04Minor changes for new Eclipse checkstyle checksliamfallon5-45/+51
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 baseliamfallon3-32/+51
Issue-ID: POLICY-1861 Change-Id: Iccbdcbc5b5978305c56ab74c01a52a562697bee1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-26Reduce verbosity of logging during unit testliamfallon6-9/+9
Logging dialled back in logback.xml files and on ligging statements in unit test java code. Issue-ID: POLICY-2272 Change-Id: I3b9a46d8993b1571c8dc62687a9c136af46c1f51 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-04Fixing multiple policies with optional event fields fails execution in APEXa.sreekumar2-4/+2
Policy execution fails when multiple policy models are running and the policies have optional fields. Change-Id: Ifb1a45a25e3a88b8707fb8b76f8279b6ec0b91ce Issue-ID: POLICY-2211 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-11-01Resolve mapping between TOSCA policies and APEX policy modelsa.sreekumar4-140/+144
Change-Id: Ifaedc5074bcc51a5d495e342feae89b6a2aac1cf Issue-ID: POLICY-1626 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-09-12Bump version in apex-pdp masterjrh38-8/+8
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-13Merge "Fix copy&paste typo in KeyedMapDifference"Pamela Dragosh1-1/+1
2019-08-13Fix copy&paste typo in AxEvent.compareToArtem Naluzhnyy1-1/+1
Coverity-scan: CID-229652 Issue-ID: POLICY-1961 Signed-off-by: Artem Naluzhnyy <A.Naluzhnyy@samsung.com> Change-Id: I29fa25d0ead6930dd47a0eed17d2a4dd6e489ee6
2019-08-08Fix copy&paste typo in KeyedMapDifferenceArtem Naluzhnyy1-1/+1
Coverity-scan: CID-229696 Issue-ID: POLICY-1961 Signed-off-by: Artem Naluzhnyy <A.Naluzhnyy@samsung.com> Change-Id: I4ed17eb14310501cb5de864e8c62839a4d41b56c
2019-08-07Bump version of apex-pdpjrh38-8/+8
Issue-ID: POLICY-1965 Signed-off-by: jrh3 <jrh3@att.com> Change-Id: Icd437f10c4d991030652ffa1abf48b7b5738145c
2019-07-01Merge "ApexPDP: Adding support to omit the (context) albums entry in an apex ↵Pamela Dragosh6-48/+298
policy model if it is empty. Implemented as a pair of JAXB XMLAdaters Updated copyright, fixed somecheckstyle issues, refactored affected tests & Merge"
2019-07-01ApexPDP: Adding support to omit the (context) albums entry in an apexJohnKeeney6-48/+298
policy model if it is empty. Implemented as a pair of JAXB XMLAdaters Updated copyright, fixed somecheckstyle issues, refactored affected tests & Merge Issue-ID: POLICY-1802 Change-Id: Id68d9a524700f44c164939b7533f2d511b591e36 Signed-off-by: JohnKeeney <John.Keeney@est.tech>
2019-06-28Bump apex-pdp to 2.2.1-SNAPSHOTPamela Dragosh8-8/+8
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 inheritDocsliamfallon46-1953/+862
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-27Fix Sonar/Checkstyle issues in apex-pdpliamfallon18-30/+48
BBS Java code introduced Sonar issues, these are resolved. Also fixed checkstyle errors in other classes. Also fiexed "unexpected type" eclipse errors. Issue-ID: POLICY-1791 Change-Id: I3931051f0944c6d53745c8dd1db7cca4ee118f1c Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-21Replace uses of getCanonicalName() with getName() in APEXa.sreekumar2-2/+2
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.sreekumar3-13/+10
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 Hahn8-8/+8
Issue-ID: POLICY-1747 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Iba1c6a80917a37cc63e2250a32df40046df9ee4f
2019-05-16Step snapshot version of apex-pdpliamfallon8-8/+8
Issue-ID: POLICY-1630 Change-Id: I6dfce7eb33d9bc41caabf6b8842377b486de672d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-16Fix Security and Unit Test DB issuesliamfallon14-145/+39
This review removes more links to the Zookeeper version 3.5.4-beta with Zookeeper version 3.4.14. It also replaces the Derby in-memory database with the H2 in memory database for unit tests. Issue-ID: POLICY-1540 Change-Id: Ic44f2e866644114b7c0cf66aac7e528017b8206b Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-19Fix checkstyle/Sonar issues on juint/sonar fixesliamfallon4-285/+209
Recent changes to increase code coverage and fox Sonar bugs have introduced checkstyle and further Sonar issues. This review cleans those up. Issue-ID: POLICY-1523 Change-Id: I829217ef77d52e57f9713cfeee5b122e1f25efbc Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-19Use Assertions class from policy-commonliamfallon45-468/+227
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>
2019-03-14reduce too many method paramArindam Mondal3-135/+287
Issue-ID: POLICY-1535 Change-Id: Ia6f699d315ebd214257dc64d559a0ac4685307f5 Signed-off-by: arind.mondal <arind.mondal@samsung.com>
2019-02-28Fix checkstyle problems on sonar fixliamfallon3-200/+199
A sonar fix brought in some minor checkstyle issues. This review fixes those. Issue-ID: POLICY-1535 Change-Id: I4f9d66ffc0a4fcc8901d7e18bfb21a1d1cf135b7 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-02-25sonar:reduce number of method paramArindam Mondal3-93/+217
Changes done according to sonar recommendation. Issue-ID: POLICY-1535 Change-Id: I57a608e4db1b67959cbabe23e7fe0b1aa91e30cd Signed-off-by: arind.mondal <arind.mondal@samsung.com>
2018-12-21Merge "Rename test classes in apex-pdp/model,core"Liam Fallon15-15/+15
2018-12-21Rename test classes in apex-pdp/model,coreParshad Patel15-15/+15
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-19Add example policy for HTTPSliamfallon1-2/+4
Added an example of how to configure HTTPS for an Apex policy. Issue-ID: POLICY-1222 Change-Id: Iea8a8accac32f6d25c64a8324e202ad5e6221c7a Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-18Remove unused @throws warningsliamfallon1-1/+0
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-12-15Fix sonar test renaming issuesliamfallon22-48/+475
Renaming tests introduced Sonar issues: - Tests where coverage was <80% flagged as they are new code - Support test classes with names ending in "Test" flagged becasue they did not contain test cases Issue-ID: POLICY-1263 Change-Id: I17a4b27b2952a4978fab1c76579a013478b60ae1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-03Use Parent Eclipselinkliamfallon1-1/+0
Issue-ID: POLICY-1360 Change-Id: I99a9e7bf60590fd0da5d7ba001e8ab322623fee6 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-11-29Merge "Fixing issues in apex documents"Jorge Hernandez1-30/+25
2018-11-29Fixing issues in apex documentsramverma1-30/+25
Change-Id: Ibc07c20fa8ac1018443a3c061613fdaecc5efb83 Issue-ID: POLICY-1280 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-11-28Rename test classes in apex-pdp/model/basic-modelParshad Patel21-80/+80
Make test classes name consitence by adding 'Support' or 'Dummy' at start of util or dummy type of test classes Issue-ID: POLICY-1263 Change-Id: Ia90e0ea73af16f6cde37692e98f1c4afc408dd2b Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-11-20Refactor Apex benchmark testsliamfallon4-4/+4
Apex performance tests are refactored and reorganised to be all in the one place and to be coherent. A test REST server that can generate events in batches is introduced and this can be configured to respond to REST calls from Apex with various batch sizes that can be varied for performance tests. Actual performance tests are added for the various executors in Apex. Change-Id: I692b41e1e4451e821a618c64dead5cc8e9685d08 Issue-ID: POLICY-812 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-11-20Rename test classes in apex-pdpParshad Patel18-29/+29
Make test classes name consistence under auth, model, plugins, testsuits, tools projects Issue-ID: POLICY-1263 Change-Id: I49ec9a9f5b457d6381e693de2c04ec0268ad1b02 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-11-19Rename test classes in apex-pdpParshad Patel31-31/+31
Make test classes name consistence by putting 'Test' at end Issue-ID: POLICY-1263 Change-Id: I0179388d84826e698276a1995dd8173a40b5fd2b Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-11-15Fix checkstyle warnings in AxState/Codegenliamfallon3-289/+237
Recent checkins introduced some very minor checkstyle warnings, this review fixes those. Change-Id: Ie7784ad22a748017e1647be0e23dc9d3fe100cf0 Issue-ID: POLICY-1251 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-11-14Use param obj for policymodel AxStatekris.jinka3-117/+325
Define AxStateParams object for parameters input Fix sonar issue about more than 7 parameters in method Modify the builder approach as suggested in review Issue-ID: POLICY-1251 Change-Id: Ic11b8cc2a4aed5394c5450fed4f0702c4ad9eda4 Signed-off-by: kris.jinka <kris.jinka@samsung.com>
2018-11-07Refactor unit test dataliamfallon1-1/+1
There were many copies of test policies and examples strewn through the Apex unit tests. This change cleans up the unit tests so that a single version of all example policies is used in all tests. Also added a new relative file root command line parameter to Apex to allow the root of relative paths in configuration files to be set. Apologies for the size of this review but unfortunately all of this must be done in one shot. Issue-ID: POLICY-1252 Change-Id: Ibbb18fbf18e3897a1c61301d0a65e62bc643a0e9 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-10-31Set new master version for Dublinliamfallon8-24/+16
Issue-ID: POLICY-1232 Change-Id: If43c40e9e13bd9387e2b6ee876717f8413a17e34 Signed-off-by: liamfallon <liam.fallon@ericsson.com>