aboutsummaryrefslogtreecommitdiffstats
path: root/services
AgeCommit message (Collapse)AuthorFilesLines
2019-05-30Bump apex-pdp to version 2.2.0Jim Hahn3-3/+3
Issue-ID: POLICY-1747 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Iba1c6a80917a37cc63e2250a32df40046df9ee4f
2019-05-16Step snapshot version of apex-pdpliamfallon3-3/+3
Issue-ID: POLICY-1630 Change-Id: I6dfce7eb33d9bc41caabf6b8842377b486de672d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-05-07Fix to accomodate recent changes in policy-models-toscaa.sreekumar3-5/+5
Recent change in JpaToscaPolicy require corresponding changes in PDP-A as the code was expecting a simple string earlier. This review contains the changes to fix this Change-Id: I3bbae264800b2c8bb8bdd61eae7b171028a85bc3 Issue-ID: POLICY-1739 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-29Updating the supportedPolicyTypes in config filesa.sreekumar4-4/+4
Changing the supportedPolicyTypes in apex-pdp configuration files to "onap.policies.controlloop.operational.Apex" Change-Id: Ie92d5284fbd80da48318ce7863471876ccb380bb Issue-ID: POLICY-1632 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-25Changes to fix PDP-A not going to ACTIVE statea.sreekumar2-7/+19
PDP-A state will now change to ACTIVE even when the policy list is empty. When the state is ACTIVE and PAP sends a PDP_UPDATE with policies, PDP-A will start executing the policies. Change-Id: Icb5b139939698920d4fa3991dcca33536c6caefc Issue-ID: POLICY-1674 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-17Add DMaaP sim configuration filesliamfallon2-0/+38
Add configurtion files that work with the DMaaP simulator. Issue-ID: POLICY-1643 Change-Id: I719f9db4ec5273a32ba350811eb39b4238002341 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-16Bug fix as per Jim's commenta.sreekumar1-11/+6
Changing the PdpUpdate already handled check back to previous code. Change-Id: Icc195b5a8609fba8601dc151f62fdaf0c67b7be0 Issue-ID: POLICY-1632 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-16Merge "Fix Security and Unit Test DB issues"Pamela Dragosh1-6/+0
2019-04-16Fix Security and Unit Test DB issuesliamfallon1-6/+0
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-04-16Changes for RestServer support and some sonar fixa.sreekumar25-65/+939
1) Changes to add RestServer to the PDP-A for healthcheck. 2) Adding Junit testcases. 3) Fixing some sonar issues. 4) Fixing checkstyle issues. Change-Id: I03530190c733432d219284dda9d9d4cc32ab0773 Issue-ID: POLICY-1632 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-11Changes for packaging services-onappf and some refactoringa.sreekumar32-207/+165
1) Added the code for packaging PDP-A. 2) Updating the package names. 3) Updating the dependencies in services-onappf. Some dependencies can be removed as they are brought in while packaging. 4) Some other minor changes. Change-Id: Idf62d7854f3435806a9e8aa975138fbfd45e3ea8 Issue-ID: POLICY-1632 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-09Some changes and bug fixes for PdpMessage handlinga.sreekumar7-102/+229
1) Updating pom file of services-onappf to fix dependency related issues. 2) Some changes to accomodate recent updates. 3) Fix for some issues identified during testing. Change-Id: I8150ed9858902ebbe12321a793770df3fdc7e773 Issue-ID: POLICY-1453 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-08Changes to handle PdpUpdate and PdpStateChange messagesa.sreekumar21-199/+1083
1) Adding listeners and handlers for PdpUpdate messages. 2) Adding listeners and handlers for PdpStateChange messages. 3) Some changes to accomodate recent changes in the models. 4) Test cases. Change-Id: I66644d94fd2a242738d9b0f78e5d0ece76342057 Issue-ID: POLICY-1453 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-02Changes to send pdp status messagesa.sreekumar18-54/+642
1) Adding handlers to create and send pdp status messages from apex-pdp. 2) Changes to read initial pdp status parameters from configuration file. 3) Adding test cases. Change-Id: Id2d1caa8abc124865a9ef8fbfe4d9f751e4491b5 Issue-ID: POLICY-1452 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-03-26Adding services-onappf module to apex-pdpa.sreekumar22-1/+1553
1) Adding services-onappf module to apex-pdp. 2) Following the code base from policy/pap to build the module. 3) Currently PAP is using property & configuration file for bootstrap. Continuing the same in this module as well. 4) Adding relevant test cases. Change-Id: Id9740ea60ae3ecbd88e5d6d3586ee0dde1054cca Issue-ID: POLICY-1452 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-01-15Fix crashing unit tests in Apexliamfallon3-16/+17
Issue-ID: POLICY-1403 Change-Id: Ie9d2cc46f3daf4d6b2eb2774a8be8c35e0c45754 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-01-15Update comment to check Sonar build issueliamfallon1-2/+3
Issue-ID: POLICY-1403 Change-Id: I87ebf85dbbe8544e38666e8e793a8e1cbbcfc7c6 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-01-09Fix context clearing on model upgradeliamfallon1-84/+66
Existing context is cleared when a model upgrade is carried out on an Apex PDP. The clear() method is called in error on the Apex engine during the upgrade. This change also has some small updates to the DecisionMaker example, which is used to test this feature. Issue-ID: POLICY-1395 Change-Id: I547a3a60712d1572d9daadf5eab4afcae2a5c321 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-26Rename test classes in apex-pdp/servicesParshad Patel17-53/+53
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: I951f4e30736144010d69a0fb3b9181f7fee76013 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-12-18Add Java property parameters for HTTPSliamfallon12-48/+775
Issue-ID: POLICY-1222 Change-Id: I4a683cf2f52e7f1d28164954f84d0744b5ca7e9c Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-11Remove unused parameter from test dataliamfallon1-1/+1
The "restRequestTimeout" parameter is not used in the current version of Apex, it was replaced by the "requestorTimeout" paramter. However, the parameter remained in the JSON data files. Also updated to improve output of messages during unit test. This review also sets the Jersey injection dependendy scope to "test" Issue-ID: POLICY-1074 Change-Id: I75f495f571c8101310bd1eaec01a305318346cd9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-03Fix checkstyle/sonar issuesliamfallon1-24/+30
Remove unused imports Add @FunctionalInterface annotation Reduce the complexity of some methods Change-Id: If519c31b113233361fbb935121fe6494263ac957 Issue-ID: POLICY-1074 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-11-29Fixing issues in apex documentsramverma1-11/+10
Change-Id: Ibc07c20fa8ac1018443a3c061613fdaecc5efb83 Issue-ID: POLICY-1280 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-11-16Fix timing and move testsliamfallon1-0/+6
The timings on the REST test are too short and time out on ONAP Jenkins The tests of the Apex service and Apex model upgrade are not benchmark tests so are moved to Integration. Issue-ID: POLICY-1251 Change-Id: I2672d01042b33fe0cce5223005295e3b1aa26e7a Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-11-12Clean up eclipse and document warningsliamfallon1-4/+4
Parent versions in some POMs only called on the test profile were incorrect Warnings in Eclipse on POM including from outside its project are fixed Some checkstyle fixes Some javadoc warnings fixed Issue-ID: POLICY-954 Change-Id: I640bc842dc79a9fa580015abb9a76c84a7845efe Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-11-07Refactor unit test dataliamfallon67-15289/+1615
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 Dublinliamfallon2-6/+4
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.1ramverma2-2/+2
Issue-ID: POLICY-1213 Change-Id: I9187462aa470cff6ca7adc750c8a666bf8e15429 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-10-19Fix bug to allow JSON arrays of eventsliamfallon2-3/+5
Apex should allow JSON arrays of events to be processed, processing the array of events as they come in. This review changes the Apex JSON array handling to allow arrays of JSON events to be processed. Arrays of events are required to perform Apex pewrformance tests. Change-Id: I08ddc9659414bd076fbaa250182335d6f38473e6 Issue-ID: POLICY-812 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-10-08Merge "Unit test for Apex engine"Pamela Dragosh2-9/+33
2018-10-07Unit test for Apex engineliamfallon2-9/+33
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-05JUnit for apex Admin Protocol listenerliamfallon8-12/+668
Added coverage for this package. i Issue-ID: POLICY-1034 Change-Id: I2e4b51983eec245eb9f105587d15f853656ce35a Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-26Allow custom JSON adapter specificationliamfallon1-12/+32
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 serviceliamfallon11-810/+9261
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-23Fix more sonar issuesliamfallon1-108/+218
These are the last few easy to fix issues. Most remaining issues are to do with code coverage. Othersare due tot he way script interpreters work and will have to be exempted. Issue-ID: POLICY-1034 Change-Id: Ie1d1def43d33ef78a13d7f9b43ae4e22ef00cb5b Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-22Fix sonar problems in Apexliamfallon9-34/+64
Fixed some easy to resolve Sonar issues. Issue-ID: POLICY-1034 Change-Id: Ia8e4606bd4307daca499b4a74c96135211e572fd Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-20Fix bug with POJO events in APexliamfallon20-87/+1505
When an envet should be decoded entirely into a POJO and is too complex for Avro, apex decoding breaks. This reviuew fixes thsi issue. Issue-ID: POLICY-1034 Change-Id: Iccd739c4bb5c1645a2a7165f5bbfdfd4b964d79e Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-16Fix Sonar issues in apexliamfallon3-1/+3
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 rethrownliamfallon5-11/+26
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-13Sonar/Checkstyle in service/pluginsliamfallon44-725/+881
Sonar and Checkstyle changes in plugins and services, and knock on changes Issue-ID: POLICY-1034 Change-Id: Iff7df74e54fce2c661dcc2fae75ae93d4cacfe5b Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-12Sonar/Checkstyle in model/context/coreliamfallon3-11/+11
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 engineliamfallon5-111/+198
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-07Parameter group fields must have gettersliamfallon21-159/+258
Modifications to apex parameters to include getters that follow naming conventions, and knock on changes. Also checkstyle fixes taken in modifified classes. Issue-ID: POLICY-1095 Change-Id: Iff5ccc7a069a4ec2b2b974ed9f5ed70a88692e00 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-06Fix package of apex examples and documentsliamfallon4-13/+10
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 basicliamfallon4-90/+90
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 apexliamfallon31-925/+1188
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-09Checkstyle the services-engine packageDinh Danh Le43-306/+350
Change-Id: I0d7fd6f867ba280953eb4fd0dc2a5ad1779fb045 Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com> Issue-ID: POLICY-1034
2018-08-03Use common components in apexliamfallon4-6/+9
Common ResourceUtil class replaces specific one in APEX Managed dependency version clashes removed in POMs Dependency versions with security vulnerabilities changed for zookeeper kafka infinispan Change-Id: I3c4b367cb5556b2dc255ab62c84f85738165eb81 Issue-ID: POLICY-954 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-07-31Adding first set of apex-pdp document changesramverma16-0/+688
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-07-24Fix bug in APEX parameter serviceliamfallon1-3/+1
The parameter calss name was not initialized in the constructor of the parameter service The web socket connections() method is depricated and replaced by getConnections() Fixed order of build in main pom to put packages module last fixed some comments that were incorrect Change-Id: I6340655100655e181e2d97fe39def4874873dff5 Issue-ID: POLICY-954 Signed-off-by: liamfallon <liam.fallon@ericsson.com>