policy/apex-pdp.git
5 years agoMerge "Rename test classes in apex-pdp/model,core"
Liam Fallon [Fri, 21 Dec 2018 17:26:57 +0000 (17:26 +0000)]
Merge "Rename test classes in apex-pdp/model,core"

5 years agoRename test classes in apex-pdp/model,core 46/75046/1
Parshad Patel [Fri, 21 Dec 2018 06:36:35 +0000 (15:36 +0900)]
Rename test classes in apex-pdp/model,core

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>
5 years agoMerge "Add SSL keystore/truststore to Apex package"
Jorge Hernandez [Thu, 20 Dec 2018 14:27:09 +0000 (14:27 +0000)]
Merge "Add SSL keystore/truststore to Apex package"

5 years agoAdd SSL keystore/truststore to Apex package 32/74932/1
liamfallon [Wed, 19 Dec 2018 18:29:05 +0000 (18:29 +0000)]
Add SSL keystore/truststore to Apex package

Issue-ID: POLICY-1222
Change-Id: I4409b88d1a9439492f9aac6c3b971bae7dc04b19
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoAdd example policy for HTTPS 31/74931/1
liamfallon [Wed, 19 Dec 2018 17:48:47 +0000 (17:48 +0000)]
Add example policy for HTTPS

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>
5 years agoMerge "Add Java property parameters for HTTPS"
Jorge Hernandez [Wed, 19 Dec 2018 14:13:57 +0000 (14:13 +0000)]
Merge "Add Java property parameters for HTTPS"

5 years agoAdd Java property parameters for HTTPS 39/74839/1
liamfallon [Tue, 18 Dec 2018 17:18:45 +0000 (17:18 +0000)]
Add Java property parameters for HTTPS

Issue-ID: POLICY-1222
Change-Id: I4a683cf2f52e7f1d28164954f84d0744b5ca7e9c
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoRemove unused @throws warnings 99/74799/1
liamfallon [Tue, 18 Dec 2018 11:40:39 +0000 (11:40 +0000)]
Remove unused @throws warnings

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>
5 years agoFix sonar test renaming issues 86/74686/1
liamfallon [Sat, 15 Dec 2018 09:47:58 +0000 (09:47 +0000)]
Fix sonar test renaming issues

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>
5 years agoAdd period after inheritDoc 43/74543/1
liamfallon [Tue, 11 Dec 2018 20:58:57 +0000 (20:58 +0000)]
Add period after inheritDoc

Issue-ID: POLICY-1074
Change-Id: I88dc888b2a374b38499241f578a36dd116e2b85b
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoMerge "Remove unused parameter from test data"
Pamela Dragosh [Tue, 11 Dec 2018 15:50:07 +0000 (15:50 +0000)]
Merge "Remove unused parameter from test data"

5 years agoRemove unused parameter from test data 35/74435/4
liamfallon [Sat, 8 Dec 2018 11:31:30 +0000 (11:31 +0000)]
Remove unused parameter from test data

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>
5 years agoMerge "Support HTTP headers in REST Client"
Jorge Hernandez [Tue, 11 Dec 2018 00:32:30 +0000 (00:32 +0000)]
Merge "Support HTTP headers in REST Client"

5 years agoFix checkstyle issues 22/74422/2
liamfallon [Fri, 7 Dec 2018 22:28:49 +0000 (22:28 +0000)]
Fix checkstyle issues

Some minor line length and formatting checkstyle warnings fixed.

Change-Id: Ib92069bbdb444560083e6d0dbf5d16a3ab824d82
Issue-ID: POLICY-1074
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoSupport HTTP headers in REST Client 34/74434/1
liamfallon [Sat, 8 Dec 2018 11:27:17 +0000 (11:27 +0000)]
Support HTTP headers in REST Client

Fixed REST client plugin to supprot HTTP headers and add unit
test to plugin.

Change-Id: I6a71ab7f83ed2126b8600bb5e586f971dbdacdc0
Issue-ID: POLICY-1222
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoMerge "Fix bugs in context flushing"
Pamela Dragosh [Thu, 6 Dec 2018 16:33:15 +0000 (16:33 +0000)]
Merge "Fix bugs in context flushing"

5 years agoMerge "Support HTTP headers in REST Requestor"
Jorge Hernandez [Thu, 6 Dec 2018 14:42:18 +0000 (14:42 +0000)]
Merge "Support HTTP headers in REST Requestor"

5 years agoFix bugs in context flushing 83/74283/1
liamfallon [Wed, 5 Dec 2018 17:38:40 +0000 (17:38 +0000)]
Fix bugs in context flushing

The context flushing support in the context distributor can throw a
concurrent exception when a lot of context is active and a flush takes
place. This fix introduces proper synchronized access to the album maps.

In addition, there was an incorrect cast in the call to the persist() method
of the persistor.

Change-Id: I6594ffed83a0b34251a0c5c7893d4abb17437fd4
Issue-ID: POLICY-1380
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoSupport HTTP headers in REST Requestor 36/74236/3
liamfallon [Tue, 4 Dec 2018 22:36:39 +0000 (22:36 +0000)]
Support HTTP headers in REST Requestor

Change-Id: Iea4211e7d3324f5ea6244f45c91241a4067d8d33
Issue-ID: POLICY-1222
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoAdd unit test for Java executor 82/74182/1
liamfallon [Mon, 3 Dec 2018 22:48:10 +0000 (22:48 +0000)]
Add unit test for Java executor

Code coverage in the Apex-PDP plugins is very low. JUnit coverage will be
increased for the Plugins over the Dublin design timeline.

Issue-ID: POLICY-1379
Change-Id: Ie70ab5a9be650818cb330ec5be2a89a5db6153c5
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoMerge "Fix checkstyle/sonar issues"
Jorge Hernandez [Mon, 3 Dec 2018 19:41:57 +0000 (19:41 +0000)]
Merge "Fix checkstyle/sonar issues"

5 years agoMerge "Rename test classes in apex-pdp"
Pamela Dragosh [Mon, 3 Dec 2018 15:25:38 +0000 (15:25 +0000)]
Merge "Rename test classes in apex-pdp"

5 years agoFix checkstyle/sonar issues 39/74139/2
liamfallon [Mon, 3 Dec 2018 14:35:21 +0000 (14:35 +0000)]
Fix checkstyle/sonar issues

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>
5 years agoUse Parent Eclipselink 11/74111/2
liamfallon [Sun, 2 Dec 2018 19:35:23 +0000 (19:35 +0000)]
Use Parent Eclipselink

Issue-ID: POLICY-1360
Change-Id: I99a9e7bf60590fd0da5d7ba001e8ab322623fee6
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoRename test classes in apex-pdp 46/74046/2
Parshad Patel [Fri, 30 Nov 2018 11:15:11 +0000 (20:15 +0900)]
Rename test classes in apex-pdp

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: I1dc1a7f174660a90664ebdcff2ea79ed30aa465c
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
5 years agoMerge "Fixing issues in apex documents"
Jorge Hernandez [Thu, 29 Nov 2018 15:56:19 +0000 (15:56 +0000)]
Merge "Fixing issues in apex documents"

5 years agoFixing issues in apex documents 35/73935/5
ramverma [Thu, 29 Nov 2018 13:47:30 +0000 (13:47 +0000)]
Fixing issues in apex documents

Change-Id: Ibc07c20fa8ac1018443a3c061613fdaecc5efb83
Issue-ID: POLICY-1280
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
5 years agoMerge "Rename test classes in apex-pdp/model/basic-model"
Pamela Dragosh [Thu, 29 Nov 2018 14:16:14 +0000 (14:16 +0000)]
Merge "Rename test classes in apex-pdp/model/basic-model"

5 years agoRename test classes in apex-pdp/model/basic-model 69/73769/1
Parshad Patel [Wed, 28 Nov 2018 07:53:33 +0000 (16:53 +0900)]
Rename test classes in apex-pdp/model/basic-model

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>
5 years agoMerge "Fix sonar issue cli codegen"
Jorge Hernandez [Mon, 26 Nov 2018 17:15:31 +0000 (17:15 +0000)]
Merge "Fix sonar issue cli codegen"

5 years agoFix sonar issue cli codegen 75/73475/4
Krishnakumar Jinka [Sat, 24 Nov 2018 17:53:57 +0000 (02:53 +0900)]
Fix sonar issue cli codegen

Modify CodeGeneratorCliEditor to use param object for sonar issue fix
Add javadoc for the method addEventDecl Method. Modify meth
declaration. Run formatter

Issue-ID: POLICY-1251
Change-Id: I4f95e868c047f54dff9cf991e8f4f60e8954c788
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
5 years agoCreate label for architecture to ref 34/73434/2
Pamela Dragosh [Fri, 23 Nov 2018 19:46:05 +0000 (14:46 -0500)]
Create label for architecture to ref

Creating a label so other documentation in the architecture
section can reference this PDP engine documentation.

Issue-ID: POLICY-1163
Change-Id: Ida9caba405e36675f65843b1d49e79175634fa02
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoRefactor Apex benchmark tests 52/73152/7
liamfallon [Tue, 20 Nov 2018 15:59:50 +0000 (15:59 +0000)]
Refactor Apex benchmark tests

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>
5 years agoRename test classes in apex-pdp 05/73105/1
Parshad Patel [Tue, 20 Nov 2018 05:46:45 +0000 (14:46 +0900)]
Rename test classes in apex-pdp

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>
5 years agoRename test classes in apex-pdp 01/73001/1
Parshad Patel [Fri, 16 Nov 2018 11:59:14 +0000 (20:59 +0900)]
Rename test classes in apex-pdp

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>
5 years agoFix timing and move tests 33/72833/2
liamfallon [Thu, 15 Nov 2018 22:07:45 +0000 (22:07 +0000)]
Fix timing and move tests

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>
5 years agoFix checkstyle warnings in AxState/Codegen 97/72797/1
liamfallon [Thu, 15 Nov 2018 15:43:17 +0000 (15:43 +0000)]
Fix checkstyle warnings in AxState/Codegen

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>
5 years agoMerge "Use param obj for contxt album decln"
Jorge Hernandez [Thu, 15 Nov 2018 14:36:02 +0000 (14:36 +0000)]
Merge "Use param obj for contxt album decln"

5 years agoMerge "Refactored Asynchronous tests to integration"
Jorge Hernandez [Thu, 15 Nov 2018 14:35:08 +0000 (14:35 +0000)]
Merge "Refactored Asynchronous tests to integration"

5 years agoRefactored Asynchronous tests to integration 79/72679/4
liamfallon [Wed, 14 Nov 2018 17:01:39 +0000 (17:01 +0000)]
Refactored Asynchronous tests to integration

Moved the tests of asynchronous and synchronous inputs and outputs
for Apex from benchmark tests to integration tests which is where
they should be. Also the tests were amended to use the common
integration test data.

Change-Id: Id2d098b0a7d70c50dbb4547b0386cc7bcf6245a9
Issue-ID: POLICY-954
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoUse param obj for contxt album decln 19/72719/1
kris.jinka [Thu, 15 Nov 2018 02:26:38 +0000 (11:26 +0900)]
Use param obj for contxt album decln

Modify code generator cli editor to use param object
for the sonar issue fix

Issue-ID: POLICY-1251
Change-Id: I3efbdbe2ce7c16702508b9f1f36ecbb9b1e12856
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
5 years agoUse param obj for policymodel AxState 90/72490/2
kris.jinka [Tue, 13 Nov 2018 01:45:42 +0000 (10:45 +0900)]
Use param obj for policymodel AxState

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>
5 years agoClean up eclipse and document warnings 51/72351/3
liamfallon [Sat, 10 Nov 2018 00:39:12 +0000 (00:39 +0000)]
Clean up eclipse and document warnings

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>
5 years agoRefactor unit test data 38/71938/15
liamfallon [Tue, 6 Nov 2018 12:02:46 +0000 (12:02 +0000)]
Refactor unit test data

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>
5 years agoUpgrade Jython for security, add doc warning 41/71641/1
liamfallon [Thu, 1 Nov 2018 14:59:21 +0000 (14:59 +0000)]
Upgrade Jython for security, add doc warning

Upgrading Jython to use a full release version. This will probably
noit remove security problem but upgrades Jython to the most popular
version.

A warning is added telling developers to check extra pcakages in the
Jython plugin documentation.

Issue-ID: POLICY-1065
Change-Id: I83275204c1905bd48dd5ea58e98dcbbd9c47195f
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoSet new master version for Dublin 64/71564/2
liamfallon [Wed, 31 Oct 2018 16:35:54 +0000 (16:35 +0000)]
Set new master version for Dublin

Issue-ID: POLICY-1232
Change-Id: If43c40e9e13bd9387e2b6ee876717f8413a17e34
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix refering to snapshot in policy/apex-pdp 75/71175/1 2.0.1
ramverma [Wed, 24 Oct 2018 19:14:02 +0000 (20:14 +0100)]
Fix refering to snapshot in policy/apex-pdp

Issue-ID: POLICY-1213
Change-Id: I9187462aa470cff6ca7adc750c8a666bf8e15429
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
5 years agoAdding stability test plan of apex-pdp 73/71073/1
ramverma [Tue, 23 Oct 2018 15:58:34 +0000 (16:58 +0100)]
Adding stability test plan of apex-pdp

Change-Id: I41e1237c350b9cceca2b80db3fc9dcccf1173a66
Issue-ID: POLICY-817
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
5 years agoMerge "Add utility packages to Apex docker image"
Jorge Hernandez [Fri, 19 Oct 2018 13:35:36 +0000 (13:35 +0000)]
Merge "Add utility packages to Apex docker image"

5 years agoAdd utility packages to Apex docker image 10/70810/1
liamfallon [Fri, 19 Oct 2018 12:46:41 +0000 (13:46 +0100)]
Add utility packages to Apex docker image

Add zip/curl/ping/vi to the image for debugging

Issue-ID: POLICY-812
Change-Id: I31b156aedd1500ef0ae50a45354f033b057dc7e4
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix bug to allow JSON arrays of events 06/70806/1
liamfallon [Fri, 19 Oct 2018 11:03:35 +0000 (12:03 +0100)]
Fix bug to allow JSON arrays of events

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>
5 years agoAdded documentation for readthedocs 95/69995/6
mmis [Mon, 8 Oct 2018 14:54:36 +0000 (15:54 +0100)]
Added documentation for readthedocs

Issue-ID: POLICY-1161
Change-Id: I8a3ac2b8fbfccacd04cfd5cb3bc649d9674ec59b
Signed-off-by: mmis <michael.morris@ericsson.com>
5 years agoUpgrade to release policy/common 15/70015/1 2.0.0
Pamela Dragosh [Mon, 8 Oct 2018 20:19:31 +0000 (16:19 -0400)]
Upgrade to release policy/common

1.3.0 is released.

Change-Id: I2da787ab3203ef7eba5f50aa4bff30c76f1c6cd4
Issue-ID: POLICY-1189
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoRemove Sonar Vulnerabilit 94/69994/1
liamfallon [Mon, 8 Oct 2018 14:58:34 +0000 (15:58 +0100)]
Remove Sonar Vulnerabilit

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>
5 years agoMerge "Unit test for Apex engine"
Pamela Dragosh [Mon, 8 Oct 2018 11:59:25 +0000 (11:59 +0000)]
Merge "Unit test for Apex engine"

5 years agoUnit test for Apex engine 51/69951/4
liamfallon [Sat, 6 Oct 2018 12:33:26 +0000 (13:33 +0100)]
Unit test for Apex engine

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>
5 years agoJUnit for apex Admin Protocol listener 44/69944/1
liamfallon [Fri, 5 Oct 2018 22:33:00 +0000 (23:33 +0100)]
JUnit for apex Admin Protocol listener

Added coverage for this package.
i
Issue-ID: POLICY-1034
Change-Id: I2e4b51983eec245eb9f105587d15f853656ce35a
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix sonar bugs in apex-pdp 18/69918/1
ramverma [Fri, 5 Oct 2018 14:36:11 +0000 (15:36 +0100)]
Fix sonar bugs in apex-pdp

Change-Id: I1ab9b9d9b0b8d1655301959d7d6b9ab3cc87eba3
Issue-ID: POLICY-954
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
5 years agoSet pretty print on JSON creation 13/69913/1
liamfallon [Fri, 5 Oct 2018 12:28:30 +0000 (13:28 +0100)]
Set pretty print on JSON creation

Pretty printing was set off, making debugging of JSON
messages more difficult.

Issue-ID: POLICY-954
Change-Id: Ifcc32cdba822f2bfc105c99cc3dc85ee05a89f6f
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix creation of sub Avro items 90/69790/2
liamfallon [Thu, 4 Oct 2018 06:06:41 +0000 (07:06 +0100)]
Fix creation of sub Avro items

When an Avro object is created, nested sub avro objects
are not created automatically. This change allows
invocation of a method to create sub objects of Avro
objects.

Issue-ID: POLICY-954
Change-Id: Ie510867f2631ba6a8c6f5452c08aef5db67e8997
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoAdd unit test for core events and context 53/69753/1
liamfallon [Wed, 3 Oct 2018 14:22:53 +0000 (15:22 +0100)]
Add unit test for core events and context

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>
5 years agoAdd Unit Test for Admin Protocol messages 79/69679/2
liamfallon [Tue, 2 Oct 2018 13:57:43 +0000 (14:57 +0100)]
Add Unit Test for Admin Protocol messages

Issue-ID: POLICY-1034
Change-Id: Ie07d5036ab328ab51843694a3b2a6bac87920f2e
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoAdd JUnit for test concepts 13/69613/2
liamfallon [Mon, 1 Oct 2018 17:19:50 +0000 (18:19 +0100)]
Add JUnit for test concepts

JUnit test for test concepts.

Issue-ID: POLICY-1034
Change-Id: Ia2cd896272d4278d842d19d21237edcdca54a1f8
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoRefactor monitoring REST tests to remove PowerMock 85/69585/1
liamfallon [Mon, 1 Oct 2018 14:05:58 +0000 (15:05 +0100)]
Refactor monitoring REST tests to remove PowerMock

Removed PowerMock from tests becasue coverage of PowerMock is not counted
by JaCoCO. It was easier to remove PowerMock than to try and hack the build
get PowerMock coverage counted.

Issue-ID: POLICY-1034
Change-Id: Ifc3e1ff93b2bfcb5619a5af6dec320d2de992f87
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoUnit test for client monitoring 32/69532/2
liamfallon [Fri, 28 Sep 2018 21:48:30 +0000 (22:48 +0100)]
Unit test for client monitoring

Coverage for the client monitoring module.

Issue-ID: POLICY-1034
Change-Id: I6bb6dab26ce0572923c3d451a3b5f4745d40d088
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoAdd JUnit for cli-codegen 91/69491/1
liamfallon [Fri, 28 Sep 2018 13:26:40 +0000 (14:26 +0100)]
Add JUnit for cli-codegen

The cli-codegen tool did not have any unit tests.

Issue-ID: POLICY-1034
Change-Id: If9d3924adea703b165b360e314ea3cb417a91d21
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoAdd unit test for core distribution 83/69483/1
liamfallon [Fri, 28 Sep 2018 11:11:59 +0000 (12:11 +0100)]
Add unit test for core distribution

JUnit for the batch deployer and deploy facade.

Issue-ID: POLICY-1034
Change-Id: I3959578ba8666d64b48bbe4ee9aeab27b92d77ae
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoUnit test for core deployment 19/69419/1
liamfallon [Thu, 27 Sep 2018 21:42:56 +0000 (22:42 +0100)]
Unit test for core deployment

This module was not covered by unit test.

Issue-ID: POLICY-1034
Change-Id: I700d43c0bde58c2b236f46994f380e20116418d9
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoAdd JUnit for web service client tool 71/69371/1
liamfallon [Thu, 27 Sep 2018 15:52:23 +0000 (16:52 +0100)]
Add JUnit for web service client tool

JUnit, SOnar fixes, and some minor bug fixes.

Issue-ID: POLICY-1034
Change-Id: I72f46e944051f7d65d6b106afe33c759975283af
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoAdd missing example policy models to install 47/69347/1
liamfallon [Thu, 27 Sep 2018 14:40:13 +0000 (15:40 +0100)]
Add missing example policy models to install

The policy models for the decision maker, periodic, and
vCPE examples were not included in the install because the
policy model json files are generated from CLI commands.
THis review installs the generated policy models.

Issue-ID: POLICY-954
Change-Id: Ie2076ddfb6199dac0c8b272de8d7c47f1652485e
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoAdd unit test for Apex command line tools 17/69317/1
liamfallon [Thu, 27 Sep 2018 13:29:21 +0000 (14:29 +0100)]
Add unit test for Apex command line tools

THere was no unit test for the command line tools. This
review adds unit test and also fixes a few small bugs that
showed up when uit test was run.

Issue-ID: POLICY-1034
Change-Id: Ic19aacdb168fb5a6faa0cd83ed22ccfcedaa51f5
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoAllow custom JSON adapter specification 49/69149/2
liamfallon [Wed, 26 Sep 2018 17:30:37 +0000 (18:30 +0100)]
Allow custom JSON adapter specification

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>
5 years agoFix boolean constants in examples 39/69139/1
liamfallon [Wed, 26 Sep 2018 15:50:18 +0000 (16:50 +0100)]
Fix boolean constants in examples

When the checkstyle changes were made in the java code
the .TRUE and .FALSE values were changed to .isTrue and
.isFalse to comply with checkstyle. THis change needs to
be propogated into example scripts.

Issue-ID: POLICY-103
Change-Id: I419b5f398ef4f43b1b877d52bbe4ec638870f31d
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoAdd JUnit for engine service 79/68979/2
liamfallon [Tue, 25 Sep 2018 21:53:45 +0000 (22:53 +0100)]
Add JUnit for engine service

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>
5 years agoJUnit for evaluation test model generator 73/68873/1
liamfallon [Tue, 25 Sep 2018 13:34:08 +0000 (14:34 +0100)]
JUnit for evaluation test model generator

Issue-ID: POLICY-1034
Change-Id: Ic8f9971d612dd5500c73f95e5cbbb786c5ad51f3
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix sonar issues in Command line editor 47/68847/1
liamfallon [Tue, 25 Sep 2018 12:03:21 +0000 (13:03 +0100)]
Fix sonar issues in Command line editor

THe Apex command line editor had issues in teh way its loops for processing
commands were written. The loops are simplified in this review.

Issue-ID: POLICY-1034
Change-Id: If684a57de79bd56211e1ca3e8c446bd9698666be
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix more sonar issues 81/68581/1
liamfallon [Sun, 23 Sep 2018 13:37:49 +0000 (14:37 +0100)]
Fix more sonar issues

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>
5 years agoFix sonar problems in Apex 47/68547/2
liamfallon [Sat, 22 Sep 2018 20:07:43 +0000 (21:07 +0100)]
Fix sonar problems in Apex

Fixed some easy to resolve Sonar issues.

Issue-ID: POLICY-1034
Change-Id: Ia8e4606bd4307daca499b4a74c96135211e572fd
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix bug with POJO events in APex 67/68267/2
liamfallon [Thu, 20 Sep 2018 20:13:19 +0000 (21:13 +0100)]
Fix bug with POJO events in APex

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>
5 years agoRefactor Editor REST servlet 89/67789/3
liamfallon [Wed, 19 Sep 2018 16:23:48 +0000 (17:23 +0100)]
Refactor Editor REST servlet

Issue-ID: POLICY-1034
Change-Id: Ifa08c7a31b4fe19eb62c2035b67b6f5cad313b5f
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix examples broken by checkstyle changes 85/67885/2
liamfallon [Wed, 19 Sep 2018 20:44:33 +0000 (21:44 +0100)]
Fix examples broken by checkstyle changes

Checkstyle changes to some class names must be propgated
into example configurations and name changes meant some
examples were not being packaged.

Issue-ID: POLICY-1034
Change-Id: I5485fc2ffc22c496bbae9465e1c3b09c4feade97
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix license issue with Hibernate dependency 49/67849/1
liamfallon [Wed, 19 Sep 2018 19:08:03 +0000 (20:08 +0100)]
Fix license issue with Hibernate dependency

Change-Id: I0f0ce81661c505a7df4b6199c6d0baf7a9d0ce3e
Issue-ID: POLICY-1059
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoMerge "remove license issues"
Pamela Dragosh [Tue, 18 Sep 2018 16:15:29 +0000 (16:15 +0000)]
Merge "remove license issues"

5 years agoremove license issues 53/67353/1
liamfallon [Tue, 18 Sep 2018 15:20:26 +0000 (16:20 +0100)]
remove license issues

Change the versions of some second order dependencies to
mitigate license issues.

Change-Id: I39745ec1eb7c72fb481a4adafc2805e4bbbd8386
Issue-ID: POLICY-1059
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix issue in apex client editor 29/67329/1
ramverma [Tue, 18 Sep 2018 14:39:34 +0000 (15:39 +0100)]
Fix issue in apex client editor

Change-Id: If12bd289d9c8a22b86b4a9c9bff21c1a9d42a3d1
Issue-ID: POLICY-954
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
5 years agoFix sonar issues in apex utilties 27/67027/1
liamfallon [Mon, 17 Sep 2018 14:50:34 +0000 (15:50 +0100)]
Fix sonar issues in apex utilties

This change fixes Sonar issues in apex command line
utilities.

Issue-ID: POLICY-1034
Change-Id: Ib63a3d4107260c5909405e6f0d899279da869028
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoMerge "Re-implement Kafka tests that periodically fail"
Jorge Hernandez [Mon, 17 Sep 2018 14:38:09 +0000 (14:38 +0000)]
Merge "Re-implement Kafka tests that periodically fail"

5 years agoFix Sonar issues in apex 09/66809/1
liamfallon [Sun, 16 Sep 2018 01:03:12 +0000 (02:03 +0100)]
Fix Sonar issues in apex

Fixing various Sonar issues in apex.

Issue-ID: POLICY-1034
Change-Id: Ie693637d75bd7e38c71b7ba04886fb75636276ed
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoRe-implement Kafka tests that periodically fail 71/66771/4
liamfallon [Fri, 14 Sep 2018 22:05:56 +0000 (23:05 +0100)]
Re-implement Kafka tests that periodically fail

The Kafla integration tests fail, this change re-implements
the tests using a test framework from salesforce.com
i
Issue-ID: POLICY-1034
Change-Id: Iffcc9e0a9f419c8ec439771be7a7a58faa2f9860
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoFix exception not logged or rethrown 99/66699/1
liamfallon [Fri, 14 Sep 2018 15:45:06 +0000 (16:45 +0100)]
Fix exception not logged or rethrown

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>
5 years agoMerge "Try new version of JRuby"
Pamela Dragosh [Fri, 14 Sep 2018 13:42:12 +0000 (13:42 +0000)]
Merge "Try new version of JRuby"

5 years agoMerge "Address sonar/Checkstyle Issues"
Jorge Hernandez [Fri, 14 Sep 2018 13:19:52 +0000 (13:19 +0000)]
Merge "Address sonar/Checkstyle Issues"

5 years agoTry new version of JRuby 25/66625/1
liamfallon [Fri, 14 Sep 2018 12:00:30 +0000 (13:00 +0100)]
Try new version of JRuby

We had to use an old versino of JRuby due to security issues.

A new version of JRuby was released in May, it
seems to have a lower vulnerability level when tested
using the "pom" test. Raising this review to check it
in CLM.

Change-Id: I77bf8bae4f7efe66d7e244d0ff9a52432b00a5ce
Issue-ID: POLICY-1065
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoUpdated examples for renamed parameter classes 19/66619/2
mmis [Fri, 14 Sep 2018 10:54:23 +0000 (11:54 +0100)]
Updated examples for renamed parameter classes

Parameter classes were renamed to correct camel case names, hence
the references to those parameter classes in the example config files
needs to be updated

Issue-ID: POLICY-1034
Change-Id: Ie388d6e25cf4bbec6984d4386cdeb19a7a3916c0
Signed-off-by: mmis <michael.morris@ericsson.com>
5 years agoAddress sonar/Checkstyle Issues 77/66477/1
liamfallon [Thu, 13 Sep 2018 22:48:50 +0000 (23:48 +0100)]
Address sonar/Checkstyle Issues

Sweep through Apex codebase to fix most ceheckstyle and
straightforward sonar issues.

Issue-ID: POLICY-1034
Change-Id: I149d9a94ad893affc93573e8de5e3304b6bdde2d
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoSonar/Checkstyle in service/plugins 77/66377/1
liamfallon [Thu, 13 Sep 2018 14:25:32 +0000 (15:25 +0100)]
Sonar/Checkstyle in service/plugins

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>
5 years agoSonar/Checkstyle in model/context/core 41/66241/2
liamfallon [Wed, 12 Sep 2018 22:29:25 +0000 (23:29 +0100)]
Sonar/Checkstyle in model/context/core

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>
5 years agoMerge "Fix soft stop and start of engine"
Pamela Dragosh [Wed, 12 Sep 2018 19:54:09 +0000 (19:54 +0000)]
Merge "Fix soft stop and start of engine"

5 years agoFix soft stop and start of engine 41/66141/2
liamfallon [Wed, 12 Sep 2018 15:12:14 +0000 (16:12 +0100)]
Fix soft stop and start of engine

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>
5 years agoFix build fails 29/66129/1
liamfallon [Wed, 12 Sep 2018 14:40:10 +0000 (15:40 +0100)]
Fix build fails

Apex end to end tests often fail because the tests are not tuned correctly
for Jenkins.

The JRuby test needs a delay to allow the first test to completely clear dowm
The volume of events sent in the Kafka tests is reduced from 100 to 10

The dom4j version is also changed back to 1.6.1 because 1.6 has the same security
issues.

Issue-ID: POLICY-954
Change-Id: Id38bf9fe526942870181bfd9c0762f0a471c0c02
Signed-off-by: liamfallon <liam.fallon@ericsson.com>