policy/drools-pdp.git
5 years agoRemove jackson from feature-pooling-dmaap 98/75898/1
Jim Hahn [Wed, 16 Jan 2019 16:06:28 +0000 (11:06 -0500)]
Remove jackson from feature-pooling-dmaap

Modified code to use gson instead of jackson.

Change-Id: I5a1b2dacdc1801b1110154ed7c3c81e0713ef369
Issue-ID: POLICY-1431
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoChange Junit to check for error code 406 19/75819/1
Jorge Hernandez [Tue, 15 Jan 2019 14:29:47 +0000 (08:29 -0600)]
Change Junit to check for error code 406

This is to support some clean up changes done in
policy/common under commit 55f5c4dc9e130e48a25b048e1f3091b10c17e365.

Change-Id: I2961d7ba719d22f144af972dc3964c3ac402e75c
Issue-ID: POLICY-1397
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
5 years agoReplace expectException with AssertJ 04/75504/1
Jim Hahn [Tue, 8 Jan 2019 22:48:31 +0000 (17:48 -0500)]
Replace expectException with AssertJ

Change-Id: I5c9c5e962a7e2a5617405d534c0719f4bdb6ff1c
Issue-ID: POLICY-1393
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd tooling for drools policy developers 17/75317/1
Jorge Hernandez [Fri, 4 Jan 2019 20:43:44 +0000 (14:43 -0600)]
Add tooling for drools policy developers

This commit adds tooling to better support development activities
for drools developers.

1. deploy artifacts to nexus or to local file repository on demand.
   It also allows to test on a single drools instance without the
   dependency on a nexus repo.

2. make installation configuration files conform to same
   convention (all upper case).

Change-Id: Ia0a2fc25db2ef21b774a9eee4ed51d4b876a1993
Issue-ID: POLICY-1367
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
5 years agoMerge "Environment variable pointing to logback.xml"
Jorge Hernandez [Mon, 17 Dec 2018 14:57:25 +0000 (14:57 +0000)]
Merge "Environment variable pointing to logback.xml"

5 years agoEnvironment variable pointing to logback.xml 44/74644/3
Jorge Hernandez [Fri, 14 Dec 2018 00:24:06 +0000 (18:24 -0600)]
Environment variable pointing to logback.xml

Per current logging spec, the location is recommended to be
under /etc/onap/<component>/subcomponent but is acceptable
to have an enviroment variable pointing to it instead.

Environment variable is preferred over fixed location so
the config files are not all over the place, and is not
placed under directories owned by root.

Change-Id: Id5679f49a726fa43147ffb3e141acec30ebfdaaf
Issue-ID: POLICY-1294
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
5 years agoUpdate to latest keystore from AAF tooling 35/74635/1
Jorge Hernandez [Thu, 13 Dec 2018 20:43:39 +0000 (14:43 -0600)]
Update to latest keystore from AAF tooling

It is generic with extended expiration, and support for
policy-distribution and policy-apex-pdp components.

Change-Id: I02157b063159ed6f8fc71f00cf0f890059b20c7b
Issue-ID: POLICY-1377
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
5 years agoMerge "Fix sonar issue in droolspdf"
Jorge Hernandez [Mon, 3 Dec 2018 19:40:19 +0000 (19:40 +0000)]
Merge "Fix sonar issue in droolspdf"

5 years agoFix sonar issue in droolspdf 12/74112/2
Krishnakumar Jinka [Mon, 3 Dec 2018 00:38:51 +0000 (09:38 +0900)]
Fix sonar issue in droolspdf

Modify protocol coder to fix sonar issue about method
params too many. Using existing builder. Address review
comments, replace modified with modification

Issue-ID: POLICY-1251
Change-Id: I67bd753f346108865404b733e7cf6008c2012766
Signed-off-by: krisjinka <kris.jinka@samsung.com>
5 years agoUpdate eclipselink version in drools-pdp 75/74075/2
Jim Hahn [Fri, 30 Nov 2018 15:07:10 +0000 (10:07 -0500)]
Update eclipselink version in drools-pdp

Use eclipselink from policy parent.
Re-insert scope=provided.

Change-Id: I325d13b7249747469d93bf451f5753cfbc728568
Issue-ID: POLICY-1361
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Remove Factory from various drools-pdp classes"
Jorge Hernandez [Thu, 29 Nov 2018 16:27:36 +0000 (16:27 +0000)]
Merge "Remove Factory from various drools-pdp classes"

5 years agoMerge "Fix sonar issue in event protocol coder"
Jorge Hernandez [Thu, 29 Nov 2018 15:52:49 +0000 (15:52 +0000)]
Merge "Fix sonar issue in event protocol coder"

5 years agoFix sonar issue in event protocol coder 77/73477/3
krishnajinka [Sun, 25 Nov 2018 01:57:13 +0000 (10:57 +0900)]
Fix sonar issue in event protocol coder

Add method in Eventprotocolcoder uses more params than
allowed causing sonar issue, use builder object instead
Modify javadoc and tostring methods based on review comments

Issue-ID: POLICY-1251
Change-Id: I6f283135560bfa61ca9d9512f5c971d118d7e071
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
5 years agoRemove Factory from various drools-pdp classes 70/73570/2
Jim Hahn [Thu, 29 Nov 2018 14:33:02 +0000 (09:33 -0500)]
Remove Factory from various drools-pdp classes

Also merged changes from 'Rename test classes in drools-pdp'.

Change-Id: I4d0a3a1b0b5523eadf38d1edb5aa86c404b69d19
Issue-ID: POLICY-1288
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoRename test classes in drools-pdp 04/73404/3
Parshad Patel [Fri, 23 Nov 2018 06:21:20 +0000 (15:21 +0900)]
Rename test classes in drools-pdp

Make test classes name consistence

Issue-ID: POLICY-1281
Change-Id: I9632831dd36b1d362aeadfb53fda600762c835ca
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
5 years agoModify decoder to use param obj 98/72898/1
kris.jinka [Fri, 16 Nov 2018 11:16:14 +0000 (20:16 +0900)]
Modify decoder to use param obj

Modify decoder to use param object for sonar issue fix

Issue-ID: POLICY-1251
Change-Id: Iae68ba276f02be51058037b56d901a131b25838e
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
5 years agoModify event (en)coder to use param objs 17/72717/1
kris.jinka [Thu, 15 Nov 2018 00:51:02 +0000 (09:51 +0900)]
Modify event (en)coder to use param objs

Use builder object to send params to event protocol
coder and encoder methods to fix sonar issue

Issue-ID: POLICY-1251
Change-Id: I6ca5823e1aa35d9aa3a05eb23ac159947efdde23
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
5 years agoFix for Test failure issue in drools-pdp 44/72044/1
Parshad Patel [Wed, 7 Nov 2018 07:36:25 +0000 (16:36 +0900)]
Fix for Test failure issue in drools-pdp

Replace JAVA_HOME with PATH env variable in assert statement

Issue-ID: POLICY-1241
Change-Id: I2441d7be44a9578a3137a7a0b5747ec0799f0869
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
5 years agoSet new master version for Dublin 60/71560/4
liamfallon [Wed, 31 Oct 2018 16:00:08 +0000 (16:00 +0000)]
Set new master version for Dublin

Issue-ID: POLICY-1232
Change-Id: I768c9f4e0e1411854fe6aadb52abbc616654127d
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoRemove openecomp repo from drools-pdp pom 66/71466/1
Jim Hahn [Tue, 30 Oct 2018 14:00:16 +0000 (10:00 -0400)]
Remove openecomp repo from drools-pdp pom

Change-Id: I44437c34f79fe7f169f38715bfd88d5ebfab93e4
Issue-ID: POLICY-1231
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoEnable Authorization AAF Filter programmatically 17/71317/2 3.0.0-ONAP
Jorge Hernandez [Fri, 26 Oct 2018 14:27:05 +0000 (09:27 -0500)]
Enable Authorization AAF Filter programmatically

The intent is to reduce configuration options and
automatically set up the authorization filter
(that will complement the authentication filter
that the policy-endpoints common framework automatically
provides).

Previously to enable the AAF authorization filter,
it will need the configuration had to kept track of
AAF flag, and the "filterClasses" property configuration,
make a bit more difficult to keep them sync, and easily
turn on/off AAF.

Change-Id: I3d59de6fa83986c5dcb6b3d38077278b8e75689a
Issue-ID: POLICY-1216
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
5 years agoFix refering to snapshot in policy/drools-pdp 74/71174/3 1.3.1
ramverma [Wed, 24 Oct 2018 18:35:48 +0000 (19:35 +0100)]
Fix refering to snapshot in policy/drools-pdp

Issue-ID: POLICY-1213
Change-Id: I485c15044ba5cc0d3daceaf0876f543cc5c8af82
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
5 years agoUpdated the keystore to include pdp wildcard 19/70319/1 1.3.0
Jorge Hernandez [Thu, 11 Oct 2018 22:36:16 +0000 (17:36 -0500)]
Updated the keystore to include pdp wildcard

This allows to talk directly to OOM PDP-X pods
without going through the service

Change-Id: I9acd171f483c28473442afad80361be374bd4901
Issue-ID: POLICY-1198
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
5 years agoRegenerate policy keystore 21/70121/1
Jorge Hernandez [Wed, 10 Oct 2018 00:47:25 +0000 (19:47 -0500)]
Regenerate policy keystore

The keystore has been regenerated using the latest tooling
from AAF.

Previous versions seem to add a bogus " fqdn" which makes
the the particular policy.api.simpledemo.onap.org entry invalid.
The latest version does not append it.

This change is done for consistency with policy/engine for
which proper format of this entry is necessary to interact
with CLAMP.

Drools is never accessed with this identity, therefore the
changes are complimentary and do not require release of new
artifacts.

Change-Id: Ibf6c2e7130dda247ac320f334765e04d369d6b20
Issue-ID: POLICY-1193
Signed-off-by: Jorge Hernandez <jh1730@att.com>
5 years agoAdd coverage to test-transaction 08/70008/2
Jim Hahn [Mon, 8 Oct 2018 16:23:06 +0000 (12:23 -0400)]
Add coverage to test-transaction

Fixed bug in test-transaction, wherein it was sometimes using the controller
instead of the controller name as the key into the map.
Changed test to use latch instead of sleep.
Added a little more register/unregister testing.

Change-Id: I2647b44cf164038d211063bd499c25af70c2d9d7
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd coverage to policy-core 43/69943/1
Jim Hahn [Fri, 5 Oct 2018 20:06:17 +0000 (16:06 -0400)]
Add coverage to policy-core

Added easy junit test coverage cases.
Fixed sonar issue: removed sleep from DroolsContainerTest.
Fixed sonar bug in ClassExtractors.

Change-Id: I942badf17c42346c1735bc3951450fc31c02a769
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd junit coverage to PolicyEngine class 24/69924/2
Jim Hahn [Thu, 4 Oct 2018 21:47:24 +0000 (17:47 -0400)]
Add junit coverage to PolicyEngine class

Also fixed a typo in a test comment.

Change-Id: I4ad72cc7c103014e6f5920f912c862560af5a331
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Add coverage for policy-management"
Jorge Hernandez [Thu, 4 Oct 2018 14:14:12 +0000 (14:14 +0000)]
Merge "Add coverage for policy-management"

5 years agoMerge "Add more coverage to drools-pdp health check"
Pamela Dragosh [Thu, 4 Oct 2018 01:53:12 +0000 (01:53 +0000)]
Merge "Add more coverage to drools-pdp health check"

5 years agoAdd coverage for policy-management 71/69771/2
Jim Hahn [Tue, 2 Oct 2018 20:46:57 +0000 (16:46 -0400)]
Add coverage for policy-management

Added coverage for PolicyControllerFactory and AggregatedPolicyController.
Fixed some typos in comments.
Reformatted some code.

Change-Id: I33aea8e1e7dde29bd51218d0ecad7b34047b33e5
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd more coverage to drools-pdp health check 90/69690/3
Jim Hahn [Tue, 2 Oct 2018 19:29:54 +0000 (15:29 -0400)]
Add more coverage to drools-pdp health check

Added getProperties() method to Factory, as the system properties could
not be found in the jenkins build, for some reason.
Removed Factory, as not needed for junit testing.

Change-Id: I5070b9502ae06be6995cccbb005653928591512c
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Add junit coverage to drools-pdp"
Liam Fallon [Tue, 2 Oct 2018 21:02:28 +0000 (21:02 +0000)]
Merge "Add junit coverage to drools-pdp"

5 years agoRecreate latest keystore 70/69670/1
Jorge Hernandez [Tue, 2 Oct 2018 14:49:45 +0000 (09:49 -0500)]
Recreate latest keystore

Some changes have been made since the first set of
stores were generated from the cert manager tooling
in the windriver test instance used for this purpose.

Change-Id: Ic9a0b056fb2c4e8fb23a0c0e0462087b8b7125da
Issue-ID: POLICY-1156
Signed-off-by: Jorge Hernandez <jh1730@att.com>
5 years agoAdd junit coverage to drools-pdp 35/69635/3
Jim Hahn [Mon, 1 Oct 2018 17:52:03 +0000 (13:52 -0400)]
Add junit coverage to drools-pdp

Added coverage to distributed locking.
Added coverage to test-transaction - still more to do.
Added coverage to healthcheck - still more to do.
Also fixed "code smell" in pooling.
Also fixed "code smell" in session persistence.
Fixed typo in comment.
Removed unneeded setUp() method from test.
Fixed new checkstyle errors.
Fixed another new checkstyle error.

Change-Id: I0d2ab13fcbd64486af88affb02e114e624c6a3d1
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoSet drools-pdp checkstyle config 71/69471/11
Pamela Dragosh [Fri, 28 Sep 2018 08:58:26 +0000 (04:58 -0400)]
Set drools-pdp checkstyle config

Fixed last remaining checkstyle issues along with
setting the pom.xml to the correct path setting.

Fixed forbidden summary fragments, not allowed
to prepend summary with "This method returns"

Issue-ID: POLICY-1153
Change-Id: I267842080494132a7b5507731e14f027a3f6fe44
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoUse powermock artifacts from parent pom 63/69163/1
Jim Hahn [Wed, 26 Sep 2018 14:29:44 +0000 (10:29 -0400)]
Use powermock artifacts from parent pom

Change-Id: I0a42dd468b44fc732c526701bb6dd8f8c040233c
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agonew sonar issues in drools-pdp 89/68489/1
Jim Hahn [Fri, 21 Sep 2018 20:11:46 +0000 (16:11 -0400)]
new sonar issues in drools-pdp

No "@Test" methods - renamed class from XxxTest to XxxMock.
Changed functional call syntax.

Change-Id: I954c2549705e80c00aed8ecbcb19f386cc8b0310
Issue-ID: POLICY-1137
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAAF Configuration in PDP-D 65/67865/2
Jorge Hernandez [Wed, 19 Sep 2018 19:35:22 +0000 (14:35 -0500)]
AAF Configuration in PDP-D

AAF is disabled by default until pairwise testing is completed.

Change-Id: Ica83873a2605742689ed0c2e06dfade20bef8bf0
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Issue-ID: POLICY-1043
Signed-off-by: Jorge Hernandez <jh1730@att.com>
5 years agoFixes for oparent upgrade 17/67517/1
Pamela Dragosh [Tue, 18 Sep 2018 23:18:25 +0000 (19:18 -0400)]
Fixes for oparent upgrade

Clean out the defined properties to allow oparent version
to pull through.

Issue-ID: POLICY-1126
Change-Id: Ib521110493bdb01712d3e81bdfd0128511f748b7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agodon't begin new transaction 05/67105/3
Jim Hahn [Mon, 17 Sep 2018 18:41:02 +0000 (14:41 -0400)]
don't begin new transaction

Persistence code was not checking to see if a transaction was already
in progress before beginning a transaction.
Fix checkstyle issue with comments and parameter for EntityMgrException.
Restore other checkstyle fixes.
More checkstyle fixes.
Rename some variables.

Change-Id: Ic820944781571ba2ef411cb86d12fa32fb206124
Issue-ID: POLICY-1106
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoUse policy/parent mariadb version 49/66649/1
Pamela Dragosh [Fri, 14 Sep 2018 13:39:53 +0000 (09:39 -0400)]
Use policy/parent mariadb version

Use the same version of mariadb across policy repositories.
This will also clear a license issue, albeit a false
positive.

Issue-ID: POLICY-1061
Change-Id: I4267975518fe9efce9530db687a2cfd3bf872641
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoFix checkstyle for features submodules. 89/66489/2
Pamela Dragosh [Fri, 14 Sep 2018 00:37:15 +0000 (20:37 -0400)]
Fix checkstyle for features submodules.

These are the remaining submodules that have checkstyle. Pretty
clean compile after this. There were a couple of sonar fixes
in there also.

Issue-ID: POLICY-882
Change-Id: I8191ea1aa261f4a7b9d3d21c108572fd31db1b8c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoFix checkstyle in policy-management 81/66481/2
Pamela Dragosh [Thu, 13 Sep 2018 23:35:18 +0000 (19:35 -0400)]
Fix checkstyle in policy-management

The submodule policy-management checkstyle fixes. There may be
one or two sonar fixes in there.

Issue-ID: POLICY-882
Change-Id: I9cb43c573c6811dd058943650ba1ea5f6dc880aa
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "Remove unnecessary properties"
Jorge Hernandez [Wed, 12 Sep 2018 19:06:32 +0000 (19:06 +0000)]
Merge "Remove unnecessary properties"

5 years agoRemove unnecessary properties 87/66187/1
Pamela Dragosh [Wed, 12 Sep 2018 18:01:41 +0000 (14:01 -0400)]
Remove unnecessary properties

In upgrading dmaap client, these properties were found
and were unnecessary to be defined here. They are already
defined in policy/parent and dmaap/cambria code was moved
to policy/common.

Issue-ID: POLICY-1116
Change-Id: Ic85b46e556167387acd82af3f21a7446adb43216
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agodisable http for healthchecks 31/65931/1
Jorge Hernandez [Tue, 11 Sep 2018 19:52:33 +0000 (14:52 -0500)]
disable http for healthchecks

Change-Id: If1d6d86e7622432d4f8b4de6b1f86bd212adc233
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Issue-ID: POLICY-1108

5 years agoMerge "Revert back to Drools 6.5.0.Final"
Pamela Dragosh [Tue, 11 Sep 2018 14:40:05 +0000 (14:40 +0000)]
Merge "Revert back to Drools 6.5.0.Final"

5 years agoRevert back to Drools 6.5.0.Final 49/65849/1
Jim Hahn [Tue, 11 Sep 2018 14:11:29 +0000 (10:11 -0400)]
Revert back to Drools 6.5.0.Final

Decided to abandon the conversion to Drools 7.9.0.Final.  This undoes the
associated changes.

Change-Id: I457266d09f7e481da5c0415290241a348786f8ea
Issue-ID: POLICY-1093
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agodisabling http for configuration services 53/65653/1
Jorge Hernandez [Tue, 11 Sep 2018 04:27:53 +0000 (23:27 -0500)]
disabling http for configuration services

per security recommendations.

Change-Id: Ic195f8270c2270239408e33e27f87436878e28b4
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Issue-ID: POLICY-1104

5 years agoSwitch to drools 7.9.0.Final 69/65569/3
Jim Hahn [Mon, 10 Sep 2018 14:23:56 +0000 (10:23 -0400)]
Switch to drools 7.9.0.Final

Note: This will break policy/drools-applications until the corresponding
change is merged there, too.
Reformatted lengthy line.

Change-Id: I4ae7838dfbc2d537580636eccc545710b5ebc799
Issue-ID: POLICY-1093
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoFix checkstyle policy-core 99/65099/4
Pamela Dragosh [Fri, 7 Sep 2018 00:17:27 +0000 (20:17 -0400)]
Fix checkstyle policy-core

Working on the policy-core submodule in drools pdp.

Issue-ID: POLICY-882
Change-Id: I58d418110fe0fda90f97117ef17edfc13d648ccc
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoFix checkstyle in utils 87/65087/2
Pamela Dragosh [Thu, 6 Sep 2018 21:07:46 +0000 (17:07 -0400)]
Fix checkstyle in utils

Just focusing on the policy-utils submodule.

Issue-ID: POLICY-882
Change-Id: I9f2ecac8f435f2d743b1fafc477d320b10852bdc
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoFix security issues 57/64457/2
Pamela Dragosh [Tue, 4 Sep 2018 15:18:15 +0000 (11:18 -0400)]
Fix security issues

Guava was not fully defined correctly. In order to exclude
an older version being pulled in, the dependencyManagement
needs to come from oparent and not overriden in drools-pdp.

Issue-ID: INT-619
Change-Id: I58dfb815f02d61e47552e671540144b7b1ed3df5
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoRemove guava override 23/64423/1
Pamela Dragosh [Tue, 4 Sep 2018 13:01:34 +0000 (09:01 -0400)]
Remove guava override

The oparent repo now declares guava for all the ONAP projects
to inherit from. Removing the override so we are upgrading to
a version without security or license issues.

Issue-ID: INT-619
Change-Id: I5ff9745b723db74cf46d63520f7cf00796bb2a01
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "handle null drools object in configuration"
Pamela Dragosh [Thu, 30 Aug 2018 12:26:14 +0000 (12:26 +0000)]
Merge "handle null drools object in configuration"

5 years agoMerge "Set parent to policy/parent"
Liam Fallon [Thu, 30 Aug 2018 08:09:41 +0000 (08:09 +0000)]
Merge "Set parent to policy/parent"

5 years agohandle null drools object in configuration 99/63599/2
Jim Hahn [Wed, 29 Aug 2018 21:15:37 +0000 (17:15 -0400)]
handle null drools object in configuration

Modified code to explicitly check for missing drools object, and
to not throw an exception during MDC setup.

Change-Id: Iac16f2fc46e2ffff03195985383b09b814fa4008
Issue-ID: POLICY-1082
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoSet parent to policy/parent 43/63343/8
Pamela Dragosh [Tue, 28 Aug 2018 22:10:51 +0000 (18:10 -0400)]
Set parent to policy/parent

Set the parent to point to policy/parent instead of
oparent. Clean up some duplicate management versions.

Change-Id: I28957b05b80c9564ad32c958143822b6b0768219
Issue-ID: INT-619
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoFixed feature-healthcheck issue 39/63339/1
Michael Mokry [Tue, 28 Aug 2018 21:39:50 +0000 (16:39 -0500)]
Fixed feature-healthcheck issue

Modified properties to true for https on PAP and PDP
Found a minor typo in do-start.sh that is benign currently but could
cause an issue in the future so figured I would clean it up now.

Change-Id: I06385d36d69955d49cabeb39b09d75ffeaec2fdc
Issue-ID: POLICY-781
Signed-off-by: Michael Mokry <mm117s@att.com>
5 years agoMerge "https certs with aaf+pdpd containers compatibility"
Pamela Dragosh [Mon, 20 Aug 2018 18:33:55 +0000 (18:33 +0000)]
Merge "https certs with aaf+pdpd containers compatibility"

5 years agohttps certs with aaf+pdpd containers compatibility 47/61147/2
Jorge Hernandez [Fri, 17 Aug 2018 21:40:58 +0000 (16:40 -0500)]
https certs with aaf+pdpd containers compatibility

Updated license date (jrh3).

Change-Id: I1bc244da64f4a1e683f8c6a1be53157474f46ee9
Issue-ID: POLICY-1026
Signed-off-by: Jorge Hernandez <jh1730@att.com>
5 years agoFix sonar issues in drools-pdp 63/60863/5
Krishnajinka [Thu, 16 Aug 2018 07:59:07 +0000 (16:59 +0900)]
Fix sonar issues in drools-pdp

Fix sonar issues about nested control loops in drools-pdp.
Rework1 build failed due to incorrect condition. fixing it
Fix checkstyle. Add modified copyright notice

Issue-ID: POLICY-1017
Change-Id: I21a4ad9399b1d234b8d5416ab0d595302a441f10
Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
5 years agoFix basic Java issue in pdp drools sys comp 37/59037/3
krishnajinka [Sun, 5 Aug 2018 09:27:28 +0000 (18:27 +0900)]
Fix basic Java issue in pdp drools sys comp

Modify pdp drools system component files to fix basic
Java warnings from analysis tools. Possibly flagged by
Sonar tool as well.Rework based on comments

Issue-ID: POLICY-1017
Change-Id: I1f2a5d727d2673cade5f69a07f708e16754c78e4
Signed-off-by: krisjinka <kris.jinka@samsung.com>
5 years agoCopy policy-endpoints from drools-pdp to common 71/58071/2
mmis [Mon, 30 Jul 2018 18:24:09 +0000 (19:24 +0100)]
Copy policy-endpoints from drools-pdp to common

Issue-ID: POLICY-967
Change-Id: Ib19d3a89ffa328c39f7871bff59efb3dd1617f7a
Signed-off-by: mmis <michael.morris@ericsson.com>
5 years agoCopy policy-endpoints from drools-pdp to common 51/57151/2
mmis [Thu, 19 Jul 2018 12:21:08 +0000 (13:21 +0100)]
Copy policy-endpoints from drools-pdp to common

Removed policy-endpoints, and 3 classes from policy-core. Replaced
refenences to the deleted classes with references to the corresponding
classes in policy-common

Issue-ID: POLICY-967
Change-Id: I547cde4894424b8f40b7ddd4e2342ebb729cb588
Signed-off-by: mmis <michael.morris@ericsson.com>
5 years agoDeny subsequent lock() 75/56775/2
Jim Hahn [Wed, 18 Jul 2018 17:49:42 +0000 (13:49 -0400)]
Deny subsequent lock()

This is the final step of separating the lock "refresh" operation
from the original "lock" operation.  This step entails rejecting
subsequent "lock" requests, even by the same owner, when a resource
is already locked; "refresh" should now be used, instead, to extend
a lock.
Modified comments to indicate that the lock can only be extended
using "refresh".

Change-Id: I406cf60c076dbce87afbd94fb301732359dbd2db
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoUpgrade jetty to 9.3.24 security 29/56729/2
Pamela Dragosh [Wed, 18 Jul 2018 11:48:03 +0000 (07:48 -0400)]
Upgrade jetty to 9.3.24 security

Upgrade to clear security flag in CLM.
Removed unnecessary properties already declared

Issue-ID: POLICY-987
Change-Id: Iefe4a9b264148a6bd661d5cff3bff6019b0b3def
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "Distinguish lock from refresh"
Jorge Hernandez [Tue, 17 Jul 2018 14:04:29 +0000 (14:04 +0000)]
Merge "Distinguish lock from refresh"

5 years agoDistinguish lock from refresh 23/56323/3
Jim Hahn [Thu, 12 Jul 2018 21:47:09 +0000 (17:47 -0400)]
Distinguish lock from refresh

This is the first step of separating the lock "refresh" operation
from the original "lock" operation.  This step entails adding the
refresh() method to both the default and the feature-distriubted
locking mechanisms.
Change method call, in junit test, from lock to refresh.
Change branch name in git review.

Change-Id: I506de7a96cb3ee786839aca04ad67cdd7378832c
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoDon't stop controller on dmaap failure 19/56419/2
Jim Hahn [Fri, 13 Jul 2018 21:11:33 +0000 (17:11 -0400)]
Don't stop controller on dmaap failure

Modified feature-pooling-dmaap so that it continues to work even
if it's unable to communicate with the internal DMaaP topic.  When
that happens, it simply starts processing locally, until communication
is re-established and it receives a bucket assignment.
Fixed typo in comment.
Added to comment for State.internalTopicFailed().
Removed extra space before @Ignore.

Change-Id: I9c851c66c9162c608f2df98e11d49fc526539434
Issue-ID: POLICY-878
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Fix sonar issues on new code"
Jorge Hernandez [Tue, 3 Jul 2018 22:45:50 +0000 (22:45 +0000)]
Merge "Fix sonar issues on new code"

5 years agoMerge "Final piece to remove lock Callback"
Pamela Dragosh [Tue, 3 Jul 2018 14:08:14 +0000 (14:08 +0000)]
Merge "Final piece to remove lock Callback"

5 years agoFix sonar issues on new code 99/55699/1
Jim Hahn [Tue, 3 Jul 2018 13:27:02 +0000 (09:27 -0400)]
Fix sonar issues on new code

Removed new technical debt.

Change-Id: I04e86b85897ab42deca17ecee55f29d48cc24427
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoFinal piece to remove lock Callback 47/55647/1
Jim Hahn [Fri, 29 Jun 2018 17:11:58 +0000 (13:11 -0400)]
Final piece to remove lock Callback

Now that drools-applications no longer uses the lock Callback, it
can be removed from drools-pdp.

Change-Id: Ie82a6d382b54041ab612e73ad8c96176bd01a9f6
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoUse DB time instead of jvm time 85/55585/2
Jim Hahn [Fri, 29 Jun 2018 14:54:00 +0000 (10:54 -0400)]
Use DB time instead of jvm time

Modified distributed locking code to use the DB time (i.e., "now()") when
determining expiration times of locks.  This will eliminate concerns that
may arise from different timestamps on different JVMs.  As part of the
change, the expirationTime column was changed from BIGINT to TIMESTAMP.
Rename 1810 sql scripts to 1811, to match release date.

Change-Id: Ibfb15742f447133b001e4340027657ac202864a6
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd time limit to locking facility 87/55487/4
Jim Hahn [Wed, 27 Jun 2018 14:12:45 +0000 (10:12 -0400)]
Add time limit to locking facility

Modified the locking facility to add a time limit and remove the
callback parameter.  This affected both the default facility as
well as the distributed locking feature.  It will also require
a change to the rules for Closed Loop.
Changed testUnlock() to try locking with a different owner.
Default feature API should be OPER_UNHANDLED.
Put a few things back so-as not to break the drools-applications
build.  They can be removed once drools-applications is updated.
Fix newlines in API java.

Change-Id: I3ed7835cac6a582493a9bc8f6d1d4f3e6cb6289e
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Added expiration timer to default locking strategy"
Liam Fallon [Wed, 27 Jun 2018 13:20:23 +0000 (13:20 +0000)]
Merge "Added expiration timer to default locking strategy"

5 years agoAdded expiration timer to default locking strategy 45/55345/2
Jim Hahn [Mon, 25 Jun 2018 21:23:02 +0000 (17:23 -0400)]
Added expiration timer to default locking strategy

Fixed comment (missing "}").
Changed default age from 15 hours to 15 minutes.
Only increment test time by 1 when testing hashCode.

Change-Id: I70ef6cfd34e31ded45b3975f33e5b0ba22afa627
Issue-ID: POLICY-912
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoUse connection pooling for locking 35/55335/2
Jim Hahn [Mon, 25 Jun 2018 15:29:41 +0000 (11:29 -0400)]
Use connection pooling for locking

Modified distributed locking to use connection pooling.
Add comment for new dataSource parameter.

Change-Id: I5dc33605797f95072af9b6911a468457f6fd9f3d
Issue-ID: POLICY-910
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Remove references to SpecPropertyConfiguration"
Pamela Dragosh [Wed, 20 Jun 2018 17:26:17 +0000 (17:26 +0000)]
Merge "Remove references to SpecPropertyConfiguration"

5 years agoMerge "Add setXxx methods for @Property annotation"
Liam Fallon [Tue, 19 Jun 2018 21:09:34 +0000 (21:09 +0000)]
Merge "Add setXxx methods for @Property annotation"

5 years agoRemove references to SpecPropertyConfiguration 91/55091/1
Jim Hahn [Mon, 18 Jun 2018 21:10:44 +0000 (17:10 -0400)]
Remove references to SpecPropertyConfiguration

Change-Id: Ib4779611f124277cf8be2b3eddfe41bf69dfd74b
Issue-ID: POLICY-907
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd setXxx methods for @Property annotation 73/55073/1
Jim Hahn [Mon, 18 Jun 2018 18:40:05 +0000 (14:40 -0400)]
Add setXxx methods for @Property annotation

We'll be modifying the PropertyConfiguration class so that, instead
of directly setting values in private fields, it will use public
setXxx methods.  Consequently, we have to add the setXxx methods to
the PropertyConfiguration subclasses so that they're available when
the superclass is modified policy/common.

Change-Id: Idff9942eabec182670cbb427b960f6308a2ca30c
Issue-ID: POLICY-906
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoFix fortify issue with pooling extractor class 23/55023/1
Jim Hahn [Mon, 18 Jun 2018 17:51:39 +0000 (13:51 -0400)]
Fix fortify issue with pooling extractor class

The pooling extractor class was using reflection to extract
values from private fields.  It has been modified to only extract
from public fields or to use public getXxx() methods instead.

Change-Id: I3aafe9ebfcd41d0e71dc3529030597609b704f53
Issue-ID: POLICY-906
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoUpdate drools-pdp to SNAPSHOT-1.3.0 81/50381/1
liamfallon [Tue, 5 Jun 2018 15:22:44 +0000 (16:22 +0100)]
Update drools-pdp to SNAPSHOT-1.3.0

Snapshot updated for Casablanca.

Change-Id: I75c0a41ce2c1a56ab658be8bfd27a5c81977f990
Issue-ID: POLICY-875
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoChange extractor log level from warn to info 11/49011/1 2.0.0-ONAP beijing 2.0.0-ONAP v1.2.3
Jim Hahn [Thu, 24 May 2018 19:05:44 +0000 (15:05 -0400)]
Change extractor log level from warn to info

Change-Id: I26ae7c0c83b5e3c6b128af262bd334b09696590d
Issue-ID: POLICY-870
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoUpdate Policy Drools PDP to 1.2.3-SNAPSHOT 17/48317/1
liamfallon [Mon, 21 May 2018 13:14:40 +0000 (14:14 +0100)]
Update Policy Drools PDP to 1.2.3-SNAPSHOT

These reviews must be merged in order because of layering.

This review should be merged SECOND.

Change-Id: I3d3fb84622686b23d435aaf0cd43d307684a4a1f
Issue-ID: POLICY-844
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoUpgrade 1.2.2 version.properties 77/47877/1 v1.2.2
Pamela Dragosh [Wed, 16 May 2018 18:18:36 +0000 (14:18 -0400)]
Upgrade 1.2.2 version.properties

Upgrading the version.properties

Issue-ID: POLICY-798
Change-Id: Ibfbd5b221a8f5a4eb79063b066d458c3512949b8
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoUpgrade SNAPSHOT to 1.2.2 25/47825/1
liamfallon [Wed, 16 May 2018 13:21:03 +0000 (14:21 +0100)]
Upgrade SNAPSHOT to 1.2.2

These reviews must be merged in order because of layering.

This review should be merged THIRD

Change-Id: Icdb5c18106ade60bbc1eea67a1b42e70ac5383e5
Issue-ID: POLICY-798
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoRemove unneeded dependencies from poms 01/47401/1
Jim Hahn [Mon, 14 May 2018 13:11:50 +0000 (09:11 -0400)]
Remove unneeded dependencies from poms

Changed scope to "provided" for jars that are already included
with drools-pdp.
Changed scope to "test" for utils-test.

Change-Id: Ic2d85706e00e015cc7b0e3a0bd9855753fada64e
Issue-ID: POLICY-794
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoautomatic upgrade/downgrade features db 39/47339/4
Jorge Hernandez [Mon, 14 May 2018 04:04:14 +0000 (23:04 -0500)]
automatic upgrade/downgrade features db

add enable and disable scripts to the feature-distributed-locking
to upgrade/downgrade their databases when these features are
enabled or disabled.

Change-Id: Iff9368c915f6da7f7c75d9a5a20ffe27e290e7d3
Issue-ID: POLICY-788
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoUpdate of StandbyStateManagementTest 57/47157/1
Kevin McKiou [Thu, 10 May 2018 23:19:44 +0000 (18:19 -0500)]
Update of StandbyStateManagementTest

Patch 1:
This change modifies StandbyStateManagementTest
testPMStandbyStateChangeNotifer() to use a fresh instance of
StateManagement to avoid interaction with previous tests.

Issue-ID: POLICY-790
Change-Id: I5907ba6b50091bc4f7789f102f48a853d8498ed5
Signed-off-by: Kevin McKiou <km097d@att.com>
6 years agoDiscard Forward to wrong host 11/46911/1
Jim Hahn [Wed, 9 May 2018 21:06:59 +0000 (17:06 -0400)]
Discard Forward to wrong host

Changed to discard Forward message if the channel does not
match the host that received it.

Change-Id: I9235bd3b0c5eb264f9b1cfe53552fadf66a0edc2
Issue-ID: POLICY-787
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoChange pooling property name 31/46831/5 v1.2.1
Jim Hahn [Wed, 9 May 2018 13:14:08 +0000 (09:14 -0400)]
Change pooling property name

Removed "AMSTERDAM_" prefix from pooling topic property name.
Added feature-specific conf file with pooling topic property.
Enabled distributed locking DB properties.
Change distributed locking DB name to "pooling" to match the
code.
Add default value to feature-specific conf file.
Change "_" in default topic name to "-".

Change-Id: I53de51787694e5920dc9ced07b5a9ac60bb63e45
Issue-ID: POLICY-782
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoRemoved unneeded extractor properties 83/46683/1
Jim Hahn [Tue, 8 May 2018 20:16:26 +0000 (16:16 -0400)]
Removed unneeded extractor properties

Change-Id: I5a52ba7358d27a2db0176cb02289b1bdcce0e9e2
Issue-ID: POLICY-783
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoFix various problems in pooling 87/45987/4
Jim Hahn [Thu, 3 May 2018 18:47:23 +0000 (14:47 -0400)]
Fix various problems in pooling

Renamed META-INF SessionAPI to EngineAPI, as it implements the latter.
Created default PoolingFeature.factory object.
Don't delete a controller's pooling manager when stop is called; do
that in afterHalt and afterShutdown.  This enables it to be restarted
as long as the controller still exists.
Only stop & start the internal DMaaP topic at the engine level instead
of the controller level.  This is necessary to prevent sinks for ALL
controllers from being started each time an individual controller starts.
Clear all bucket assignments when controller is stopped.
Mark test methods with @Override annotation.
Add default property file for pooling feature.
Add license to default property file.
Remove tests for doDeleteManager(), as it no longer exists.
Changed " = " to "=" in the property file.

Change-Id: I80c0c3f1879b5a320044db93e3dfa3b7281cda51
Issue-ID: POLICY-774
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoMerge "Make custom preinstallation available in image"
Pamela Dragosh [Tue, 1 May 2018 12:33:19 +0000 (12:33 +0000)]
Merge "Make custom preinstallation available in image"

6 years agoAdd INFO.yaml file 63/45363/4
Jessica Wagantall [Tue, 1 May 2018 03:08:12 +0000 (20:08 -0700)]
Add INFO.yaml file

Add INFO.yaml to list:
- Project description
- Properties
- PTL information
- Meeting information
- Committer information

Change-Id: Ia97c9a2b6bc23b280467d930dbe06ed4437ed532
Issue-ID: CIMAN-134
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
6 years agoMake custom preinstallation available in image 35/45335/3
Jorge Hernandez [Mon, 30 Apr 2018 22:24:44 +0000 (17:24 -0500)]
Make custom preinstallation available in image

This script could be used by OOM installation to
trigger the installation of a drools application
or other purposes (ie. control loop)

Change-Id: Iafdb413ee85aa341351481584e8c967cc1a3c112
Issue-ID: POLICY-566
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "cook policy-keystore into drools image"
Pamela Dragosh [Thu, 26 Apr 2018 11:19:35 +0000 (11:19 +0000)]
Merge "cook policy-keystore into drools image"