policy/drools-pdp.git
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>
6 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"

6 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"

6 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>
6 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>
6 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>
6 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>
6 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"

6 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>
6 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>
6 years agoMerge "Remove references to SpecPropertyConfiguration"
Pamela Dragosh [Wed, 20 Jun 2018 17:26:17 +0000 (17:26 +0000)]
Merge "Remove references to SpecPropertyConfiguration"

6 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"

6 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>
6 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>
6 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>
6 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"

6 years agocook policy-keystore into drools image 87/44687/1
Jorge Hernandez [Wed, 25 Apr 2018 15:49:09 +0000 (10:49 -0500)]
cook policy-keystore into drools image

OOM team reported issues with ONAP installation in
terms of config map sizes.   After discussion with
OOM team, one solution is to cook it in the docker
image itself.   This will solve the size issue on
the OOM side.

Change-Id: I6848370f119cabdae450a1153a88ebd8c0f6b392
Issue-ID: POLICY-747
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoAdd locking and pooling to installation package 93/44393/1
Jim Hahn [Tue, 24 Apr 2018 15:11:02 +0000 (11:11 -0400)]
Add locking and pooling to installation package

Added feature-distributed-locking and feature-pooling-dmaap
as dependencies to the packages/install pom.

Change-Id: I2275ebcf93648ccdbf24355201bad9399e4143b1
Issue-ID: POLICY-760
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoFix simple sonar issues in BusConsumer 23/44223/1
Jim Hahn [Mon, 23 Apr 2018 17:04:59 +0000 (13:04 -0400)]
Fix simple sonar issues in BusConsumer

Fixed simple sonar issues in policy-endpoints BusConsumer.

Change-Id: I6dbcdc58bf26d62eeb6bc0357d5f859474028984
Issue-ID: POLICY-728
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoMerge "Close old UEB/DMaaP consumer"
Jorge Hernandez [Mon, 23 Apr 2018 15:11:38 +0000 (15:11 +0000)]
Merge "Close old UEB/DMaaP consumer"

6 years agoMerge "Fix simple sonar issues in policy-endpoints"
Jorge Hernandez [Mon, 23 Apr 2018 12:17:52 +0000 (12:17 +0000)]
Merge "Fix simple sonar issues in policy-endpoints"

6 years agoSonar fixes for latest pooling code 29/44029/2
Jim Hahn [Sat, 21 Apr 2018 04:01:49 +0000 (00:01 -0400)]
Sonar fixes for latest pooling code

Made changes to pooling code to address new sonar issues.
Add comments to awaitActive() methods.

Change-Id: I390173de00135a0a5fe50af82ed4ba780df9df80
Issue-ID: POLICY-728
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoFix simple sonar issues in policy-endpoints 23/44023/2
Jim Hahn [Fri, 20 Apr 2018 21:44:29 +0000 (17:44 -0400)]
Fix simple sonar issues in policy-endpoints

Fixed various sonar issues.  Did not fix issues in BusConsumer,
as that has an update that is yet to be merged.
Update license dates.

Change-Id: I393dbb3852a218a62129f59cc84886fb10122ee1
Issue-ID: POLICY-728
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoAdd comprehensive junit tests for pooling feature 39/43439/8
Jim Hahn [Tue, 17 Apr 2018 22:00:40 +0000 (18:00 -0400)]
Add comprehensive junit tests for pooling feature

Added FeatureTest.java and FeatureTest2.java.
Fixed a number of issues that were identified via the above
tests.
Moved fixes of policy-endpoints to other JIRA tickets.
Resolved potential sonar issue with commented-out code by
making STD_XXX constants into plain variables to they could be
changed via a method call.
Changed stdEventWaitMs to stdEventWaitSec.

Change-Id: Icf8fcc9b0dfe2578aa0787e0c9224a6f76a068ee
Issue-ID: POLICY-748
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoSet default consumer instance to hostname 77/43777/1
Jim Hahn [Thu, 19 Apr 2018 20:08:20 +0000 (16:08 -0400)]
Set default consumer instance to hostname

Modified the code to generate a consumer instance via UUID,
when no consumer instance is provided.
Removed DEFAULT_CONSUMER_INSTANCE.
Set the consumer instance to the hostname instead of a UUID.

Change-Id: I143eb6d2ec51a7913536a46041de761d51222006
Issue-ID: POLICY-749
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoClose old UEB/DMaaP consumer 41/43541/4
Jim Hahn [Wed, 18 Apr 2018 15:12:54 +0000 (11:12 -0400)]
Close old UEB/DMaaP consumer

Modified code to close the old consumer when the filter is changed.
Made some changes to toString() methods to resolve some sonar
issues.
Modified so-as to not interfere with fetch().
Use synchronized instead of AtomicReferences.

Change-Id: I4c9d2cc32993208fd345e66ef1f1dce7a1e7de7d
Issue-ID: POLICY-750
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoSonar cleanup 99/43399/8
Magnusen, Drew (dm741q) [Tue, 17 Apr 2018 16:59:43 +0000 (11:59 -0500)]
Sonar cleanup

More sonar cleanup. Resolved some of the simpler issues.

Issue-ID: POLICY-728
Change-Id: If9c4718f10c6d3524239d2a05c09badb791ef2f0
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoUpgrade 1.2.1 SNAPSHOT packages 45/43745/1
Pamela Dragosh [Thu, 19 Apr 2018 15:06:28 +0000 (11:06 -0400)]
Upgrade 1.2.1 SNAPSHOT packages

These were missed in the initial review
https://gerrit.onap.org/r/#/c/42783/

Issue-ID: POLICY-736
Change-Id: I63cc42f4cea4674e7f542bfeab262b1cd0c311fb
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agosupport for AAF provided trustore 99/43599/1
Jorge Hernandez [Wed, 18 Apr 2018 18:48:40 +0000 (13:48 -0500)]
support for AAF provided trustore

Change-Id: I20c5136636f922ee31a773b462e5c2318b2f222f
Issue-ID: POLICY-747
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agostrip timestamped versions in feature installs 21/43221/1
Jorge Hernandez [Tue, 17 Apr 2018 02:04:29 +0000 (21:04 -0500)]
strip timestamped versions in feature installs

This is to satisfy CSIT tests that contains
a mix of SNAPSHOT and timestamped versions while
running tests

Change-Id: I1fe426dcca9250d0fe2c9c5264f1acb1ffbde57b
Issue-ID: POLICY-745
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Sonar fixes to pooling"
Jorge Hernandez [Mon, 16 Apr 2018 23:12:22 +0000 (23:12 +0000)]
Merge "Sonar fixes to pooling"

6 years agoSonar fixes to pooling 35/41235/12
Jim Hahn [Thu, 5 Apr 2018 17:27:38 +0000 (13:27 -0400)]
Sonar fixes to pooling

Made various changes to the pooling feature to address some of the
sonar issues.
Remove duplicate classes, Pair & Triple.
Fix sonar issue about duplicate process(xxx) methods.
Remove extra items from pom.xml and add assembly builder.
Fix license text in pom.xml, inadvertently reformatted.
Fix a few typos in comments and change LinkedList to Queue.
Move assembly.xml to correct source directory.
Replace ScheduledFuture<?> with CancellableScheduledTask, to satisfy
sonar.
Eliminate "TODO" items: add logging, delay after sending Offline
message.
Add more logging in process(Message) methods.
Begin creating end-to-end junit test, fixed bugs found as a result.
Restore logback-test.xml to WARN.
Fix merge conflict - restored test properties file.

Change-Id: Ic70a8cee49678ea0fc3da309699aec1f6088fe70
Issue-ID: POLICY-728
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoMerge "Switch to cambria client 1.2.1-oss"
Pamela Dragosh [Mon, 16 Apr 2018 14:50:54 +0000 (14:50 +0000)]
Merge "Switch to cambria client 1.2.1-oss"

6 years agoMerge "Sonar cleanup"
Jorge Hernandez [Mon, 16 Apr 2018 14:06:32 +0000 (14:06 +0000)]
Merge "Sonar cleanup"

6 years agoAdd missing licenses 45/43045/1
Pamela Dragosh [Mon, 16 Apr 2018 13:40:04 +0000 (09:40 -0400)]
Add missing licenses

Adding missing licenses to files that should not harm
compilation, JUnit tests and instantiation.

Issue-ID: POLICY-741
Change-Id: I3075e3493676ee28693323f978c0b5b210b20a34
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoSwitch to cambria client 1.2.1-oss 23/42823/3
Jim Hahn [Fri, 13 Apr 2018 20:34:35 +0000 (16:34 -0400)]
Switch to cambria client 1.2.1-oss

Switched to new version of cambria client.
Added code to set cambria socket timeout.
Modified code to use cambria client instead of dmaap client.
Removed extra, unnecessary items that had been added to
the top-level pom.xml

Change-Id: If71d36f50da5423ec0cf21b30e66aff5b1c9222a
Issue-ID: POLICY-742
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoSonar cleanup 95/42795/2
Magnusen, Drew (dm741q) [Fri, 13 Apr 2018 18:53:49 +0000 (13:53 -0500)]
Sonar cleanup

Sonar cleanup for distributed-locking

Issue-ID: POLICY-728
Change-Id: I52523a0149436805509706a4a732d1da8a1b4511
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoMerge "Update SNAPSHOT to 1.2.1"
Jorge Hernandez [Fri, 13 Apr 2018 20:25:02 +0000 (20:25 +0000)]
Merge "Update SNAPSHOT to 1.2.1"

6 years agoUpdate SNAPSHOT to 1.2.1 83/42783/1
Pamela Dragosh [Fri, 13 Apr 2018 18:25:19 +0000 (14:25 -0400)]
Update SNAPSHOT to 1.2.1

Issue-ID: POLICY-736
Change-Id: Ic293a7347db4e5001a4084e1b98c5d44a145d16c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoSonar fixes for policy-core locks 61/42561/3
Jim Hahn [Thu, 12 Apr 2018 18:23:25 +0000 (14:23 -0400)]
Sonar fixes for policy-core locks

Made a number of changes to the locking code in policy-core, to address
sonar issues.  This entaileed changing some of the Lock API methods to
return OperResult instead of Boolean.
Updated distributed locking with the new API return types.
Simplified Thread creation using functional methods.

Change-Id: If32bf7a435d2aedb969de1b77c7e7e27e110ecb0
Issue-ID: POLICY-728
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoMerge "Distributed-locking feature sonar cleanup"
Jorge Hernandez [Thu, 12 Apr 2018 13:56:11 +0000 (13:56 +0000)]
Merge "Distributed-locking feature sonar cleanup"

6 years agoOptionally load available applications 27/41227/1 v1.2.0
Jorge Hernandez [Thu, 5 Apr 2018 17:19:21 +0000 (12:19 -0500)]
Optionally load available applications

During container instantiation, it will check
for available applications to preload, ie. control loop
or any other ones.   It will install them if available
or start with no applications loaded otherwise.

Change-Id: I6908d279cbe34e04bcabf830ed30480ba147598f
Issue-ID: POLICY-735
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoDistributed-locking feature sonar cleanup 45/41045/2
Magnusen, Drew (dm741q) [Wed, 4 Apr 2018 19:44:51 +0000 (14:44 -0500)]
Distributed-locking feature sonar cleanup

Code cleanup and some refactoring to resolve sonar issues.

Issue-ID: POLICY-728
Change-Id: I19051dcc8e1cec293d5d7104e63239fc2b89071e
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoSmall modification to resolve junit failures 97/40997/1
Magnusen, Drew (dm741q) [Wed, 4 Apr 2018 16:52:26 +0000 (11:52 -0500)]
Small modification to resolve junit failures

Added protected method to Heartbeat class that allowed for the passing
of a CountDown latch. This will resolve the timing-related junit
failures in Jenkins environment.

Issue-ID: POLICY-729
Change-Id: I3d2d8bddfb6d9f82be54a2f13bdcd7e1fc65a286
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoMerge "disable problematic private keystore"
Pamela Dragosh [Wed, 4 Apr 2018 01:12:07 +0000 (01:12 +0000)]
Merge "disable problematic private keystore"

6 years agoMerge "Add api-resource-locks feature"
Jorge Hernandez [Tue, 3 Apr 2018 21:33:29 +0000 (21:33 +0000)]
Merge "Add api-resource-locks feature"

6 years agoMerge "Add pooling capability"
Jorge Hernandez [Tue, 3 Apr 2018 21:32:51 +0000 (21:32 +0000)]
Merge "Add pooling capability"

6 years agoMerge "Implementation of distributed locking feature"
Jorge Hernandez [Tue, 3 Apr 2018 21:31:12 +0000 (21:31 +0000)]
Merge "Implementation of distributed locking feature"

6 years agodisable problematic private keystore 11/40811/1
Jorge Hernandez [Tue, 3 Apr 2018 21:16:48 +0000 (16:16 -0500)]
disable problematic private keystore

it causes bad interactions fetching dependencies with
nexus libraries, it has been disabled (at least for
the short term) and rely on the JVM one instead.

Change-Id: Ie9d1ae7fe304c06807e457c5bfcf34d07e8d83b8
Issue-ID: POLICY-720
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoImplementation of distributed locking feature 91/37591/26
Magnusen, Drew (dm741q) [Wed, 21 Mar 2018 21:44:45 +0000 (16:44 -0500)]
Implementation of distributed locking feature

This feature is a very basic implementation of a distributed locking
system.

Issue-ID: POLICY-699
Change-Id: I012fd37926ccbbdd87a3e4acb2788b53680115f0
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoAdd api-resource-locks feature 53/40253/8
Jim Hahn [Thu, 29 Mar 2018 19:07:36 +0000 (15:07 -0400)]
Add api-resource-locks feature

Added ResourceLockFeatureAPI, to provide an interface for PolicyGuard
to use to access other locking mechanisms.
Move lock API to policy-core.
Changed the interface and added Callback support.  Added a class to
invoke the API implementers.
Changed to set a future instead of expecting the callback to implement
the future interface. Also refactored, creating "lock" sub-package.
Add junit tests.
Increase junit coverage.
IsLocked & isLockedBy should check all arguments.
Make ImplFuture protected instead of public.
Simplify locking - move callback support to an optional feature.
Move Reference class to policy-utils.
Return plain Future instead of LockRequestFuture.

Change-Id: I65154d33833914b4332e02d1ef2512f4c5f09b16
Issue-ID: POLICY-577
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoCompanion changes to apps startup improvements 81/40581/1
Jorge Hernandez [Mon, 2 Apr 2018 22:53:09 +0000 (17:53 -0500)]
Companion changes to apps startup improvements

see https://gerrit.onap.org/r/40577 for reference

Change-Id: I76eb0d791a012d1ad2046ef27ec9f8b181cf3cb3
Issue-ID: POLICY-534
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Update docker tag convention"
Pamela Dragosh [Thu, 29 Mar 2018 14:31:49 +0000 (14:31 +0000)]
Merge "Update docker tag convention"

6 years agoMerge "persit controller configuration upon restarts"
Pamela Dragosh [Thu, 29 Mar 2018 14:08:10 +0000 (14:08 +0000)]
Merge "persit controller configuration upon restarts"

6 years agoUpdate docker tag convention 05/40105/1
mmis [Thu, 29 Mar 2018 08:47:04 +0000 (09:47 +0100)]
Update docker tag convention

Update docker scripts to comply with ONAP docker standard tag format

$VERSION-STAGING-YYYYMMDDTHHMMSSZ

Issue-ID: CIMAN-132
Change-Id: I7e40c6769612842dceae7698279abc7cbda3ed3f
Signed-off-by: mmis <michael.morris@ericsson.com>
6 years agoAdd pooling capability 27/38727/3
Jim Hahn [Mon, 26 Mar 2018 20:48:31 +0000 (16:48 -0400)]
Add pooling capability

Add an optional feature that that supports session pooling, wherein
more than one host can be active at a time.
Use beforeInsert() instead of beforeOffer(), where possible.
Move request-id-extraction from policy-managment to feature-pooling.
Combined AdditionalProperties into PoolingProperties.
Finished junit tests for DmaapManager.
Adjusted filters for all XxxState classes, and added testGetFilter to
all XxxStateTest classes.
Always publish Offline message when the internal topic fails.
Remove DelayedExtractor, as it isn't needed.
Renamed ExtractorMap to ClassExtractors, and added property name prefix
to the constructor to give more control over property naming to invokers.
Remove State copy constructor.
Use class name instead of class in ClassExtractors map.
Remove BucketAssignments from ProcessingState.
Remove some TODO items.
Add META-INF for implemented feature APIs.
Fix ClassExtractor bug where it can't find a field in a superclass,
and add a test for classes defined in another file.
Add assembly and rename project directory.
Add more junit coverage.

Change-Id: I7f132f84a7b284a58ab09c9069db19b853acd7e9
Issue-ID: POLICY-577
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoUpgrade jackson 2.9.5 91/39891/1
Pamela Dragosh [Thu, 29 Mar 2018 00:11:44 +0000 (17:11 -0700)]
Upgrade jackson 2.9.5

May not clear the security issue yet as this was just
released.

Issue-ID: POLICY-506
Change-Id: I61eaac9edfb3802c5508a9812d685a1464585af2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agopersit controller configuration upon restarts 85/39885/1
Jorge Hernandez [Wed, 28 Mar 2018 23:38:53 +0000 (18:38 -0500)]
persit controller configuration upon restarts

case of drools containers restarts or pulling new images.

Change-Id: I30747a605bf1cb5ae351cd1359263728d82afcca
Issue-ID: POLICY-575
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoRemove ECOMP trademark 71/39771/1
Pamela Dragosh [Wed, 28 Mar 2018 18:21:14 +0000 (11:21 -0700)]
Remove ECOMP trademark

Issue-ID: POLICY-696
Change-Id: I98e06bb466c5bae985e55a4a1192b69acae06e89
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "Support server-side filtering for UEB"
Jorge Hernandez [Tue, 27 Mar 2018 15:10:33 +0000 (15:10 +0000)]
Merge "Support server-side filtering for UEB"

6 years agoSupport server-side filtering for UEB 61/38661/2
Jim Hahn [Mon, 26 Mar 2018 20:06:57 +0000 (16:06 -0400)]
Support server-side filtering for UEB

Cambria client supports server-side filtering.  Enhanced the TopicSource
classes that use cambria client to support server-side filtering.
Updated license date in one of the files.

Change-Id: Ia56d73c7a5f3ab960418709c1ea7f1e73aa4ba87
Issue-ID: POLICY-577
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agol2 management maturity pdp-d 51/38351/3
Jorge Hernandez [Mon, 26 Mar 2018 04:34:27 +0000 (23:34 -0500)]
l2 management maturity pdp-d

configurable log location
metric/audit log for transaction metrics conforming to
new field definition.
support metrics/audits records with custom logback filters
so they are not intrusive with developer log testing.

Change-Id: I7a4dcc6790b85539e613ad8705e731e7298ce106
Issue-ID: POLICY-533
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoFix bugs identified by Sonar on drools-pdp 97/37197/2
liamfallon [Tue, 20 Mar 2018 17:28:29 +0000 (17:28 +0000)]
Fix bugs identified by Sonar on drools-pdp

Three bugs fixed:
1. Set of static variable in DMaaPSimulatorJaxR
2. Use of opssibly null variable "output" in RepositoryAudit
3. Unreachable statement error in RepositoryAudit

Change-Id: I72e028cfc51a82250afd02fb4109d3dea08072dc
Issue-ID: POLICY-691
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoMerge "Renamed policy-drools docker image"
Pamela Dragosh [Fri, 16 Mar 2018 12:46:41 +0000 (12:46 +0000)]
Merge "Renamed policy-drools docker image"

6 years agoUpdate oparent version to 1.1.0 37/35837/1
liamfallon [Wed, 14 Mar 2018 21:39:40 +0000 (21:39 +0000)]
Update oparent version to 1.1.0

Directive from ONAP project that all repos should be
updated. Change vierified with a build with .m2 /org/onap
cleared.

Change-Id: I19d3554bdc9aef4576de1917d5258f23a4ec42d9
Issue-ID: POLICY-693
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoRenamed policy-drools docker image 77/35777/2
mmis [Wed, 14 Mar 2018 12:10:52 +0000 (12:10 +0000)]
Renamed policy-drools docker image

Renamed from:
onap/policy/policy-drools
to
onap/policy-drools
to enable consistent naming across nexus and docker hub

Issue-ID: POLICY-674
Change-Id: Ib0b9df97f398c5c1715f736f11f6481cf6d8427f
Signed-off-by: mmis <michael.morris@ericsson.com>
6 years agoUnit test modified to be order independent 73/35773/1
liamfallon [Wed, 14 Mar 2018 13:41:17 +0000 (13:41 +0000)]
Unit test modified to be order independent

The change of dmaap version caused the order of execution of unit tests to
change. This triggered an assertion fail in this test. The test has been redesigned
to be independent of test invocation order.

Also some small Sonar issues fixed.

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