policy/drools-pdp.git
3 years agoMake feature-pooling-dmaap work without filtering 21/114421/5
Jim Hahn [Thu, 29 Oct 2020 22:15:51 +0000 (18:15 -0400)]
Make feature-pooling-dmaap work without filtering

As DMaaP server-side filtering has been deprecated, modified
feature-pooling-dmaap to work without it.  The new design assumes that
each pdp gets its own unique consumer group, thus all pdps receive all
events.  Each pdp then uses the bucket assignments to determine whether
or not to process the event.  Note: this means that events no longer
have to be forwarded to the correct host, thus the "Forward" class has
been deleted.

Other than that, the code already did post-filtering of events so most
of it still works even without server-side filtering.  As a result, most
of the effort was in simply removing code that no longer applies.

Per review comments:
Modified code to use the event hash code instead of the request ID has
code when routing events.  This eliminated the need for the extractor
classes and related properties.
Replaced amsterdam and beijing properties with usecases properties.

Issue-ID: POLICY-2881
Change-Id: I87e4f98c14f419593879c278d7da053c80575553
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRe-encrypt drools-pdp properties 02/114402/1
Jim Hahn [Wed, 28 Oct 2020 20:28:41 +0000 (16:28 -0400)]
Re-encrypt drools-pdp properties

To satisfy sonar, the algorithm for policy/common CryptoUtils has been
changed, necessitating the properties be re-encrypted.

Issue-ID: POLICY-2801
Change-Id: I59e63d68c1c7f62e321aa729e11fe41e13efd396
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoBump drools-pdp master to 1.8.0-SNAPSHOT 25/114325/1
Jim Hahn [Tue, 27 Oct 2020 19:06:03 +0000 (15:06 -0400)]
Bump drools-pdp master to 1.8.0-SNAPSHOT

Bumping minor version now that guilin branch has been created.
Also repointed to snapshot versions for dependencies.

Issue-ID: POLICY-2875
Change-Id: Ic3d5b96e610db0487ce316a9397d2f9ecb04bda6
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoBump drools-pdp to 1.7.5 SNAPSHOT 54/114054/1
Jim Hahn [Tue, 20 Oct 2020 14:54:36 +0000 (10:54 -0400)]
Bump drools-pdp to 1.7.5 SNAPSHOT

Issue-ID: POLICY-2869
Change-Id: Id2fcbfcb5435f79b5ebb74a403fd6133d1b79a7c
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRelease drools-pdp 1.7.4 docker 48/114048/1 7.0.0-ONAP
Jim Hahn [Tue, 20 Oct 2020 14:36:46 +0000 (10:36 -0400)]
Release drools-pdp 1.7.4 docker

Issue-ID: POLICY-2869
Change-Id: I4e92d996dc55d000c4150c9e983bdc4904c30699
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRelease drools-pdp 1.7.4 artifacts 39/114039/1
Jim Hahn [Tue, 20 Oct 2020 14:06:33 +0000 (10:06 -0400)]
Release drools-pdp 1.7.4 artifacts

Issue-ID: POLICY-2869
Change-Id: I4121fefa2ddcefb0f8c2cca15990a1d494c64827
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoPoint drools to models 2.3.5 28/114028/1
Pamela Dragosh [Tue, 20 Oct 2020 12:07:13 +0000 (08:07 -0400)]
Point drools to models 2.3.5

Issue-ID: POLICY-2869
Change-Id: I00931ad9b9df9c1f9ca893e0967693356c9eccfa
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoenforce httpie 1.0.3 installed 07/113807/1
Taka Cho [Mon, 12 Oct 2020 17:00:27 +0000 (13:00 -0400)]
enforce httpie 1.0.3 installed

http-prompt has a compatibility
issue with httpie 2.x.x
enforce to use httpie 1.0.3

Issue-ID: POLICY-2864
Change-Id: Ibfdd9afb48d0f755051516edb9ab790f12331cdc
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agobump drools-pdp to 1.7.4-SNAPSHOT 43/113743/1
Taka Cho [Sat, 10 Oct 2020 01:04:07 +0000 (21:04 -0400)]
bump drools-pdp to 1.7.4-SNAPSHOT

Issue-ID: POLICY-2839
Change-Id: I85d286a012d7b54b8c847d94951703d2e6462e13
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agorelease policy-drool 1.7.3 docker 42/113742/1
Taka Cho [Sat, 10 Oct 2020 00:38:21 +0000 (20:38 -0400)]
release policy-drool 1.7.3 docker

Issue-ID: POLICY-2839
Change-Id: I496b7b992a5c2843e3e9fac933e1f376f03feb0f
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agorelease drools-pdp 1.7.3 artifact 40/113740/1
Taka Cho [Sat, 10 Oct 2020 00:21:13 +0000 (20:21 -0400)]
release drools-pdp 1.7.3 artifact

Issue-ID: POLICY-2839
Change-Id: I1088f94022e370a9d4029fb47666b776c5ccd979
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoPoint to model 2.3.4 38/113738/1
Taka Cho [Fri, 9 Oct 2020 22:32:06 +0000 (18:32 -0400)]
Point to model 2.3.4

Issue-ID: POLICY-2839
Change-Id: Ifbc8239f9f5912eb7d1074424cf7c8060f71fdda
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoPoint to model 2.3.3 34/113734/1
Taka Cho [Fri, 9 Oct 2020 21:19:07 +0000 (17:19 -0400)]
Point to model 2.3.3

Issue-ID: POLICY-2839
Change-Id: I0bab7451436d5f76c19b743fe384cc0303a41228
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoUse models 2.3.3-SNAPSHOT in drools-pdp 28/113728/1
Jim Hahn [Fri, 9 Oct 2020 16:46:35 +0000 (12:46 -0400)]
Use models 2.3.3-SNAPSHOT in drools-pdp

Issue-ID: POLICY-2863
Change-Id: Iaffc87711f33e4a5c35d1fdcaa21f8ec0d742baf
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoBump drools-pdp to 1.7.3 snapshot 56/113656/1
Taka Cho [Wed, 7 Oct 2020 22:08:23 +0000 (18:08 -0400)]
Bump drools-pdp to 1.7.3 snapshot

Issue-ID: POLICY-2839
Change-Id: I750b5130c421dafd95dc4f323e891384a7815841
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agorelease drools-pdp 1.7.2 docker 54/113654/1
Taka Cho [Wed, 7 Oct 2020 21:02:39 +0000 (17:02 -0400)]
release drools-pdp 1.7.2 docker

Issue-ID: POLICY-2839
Change-Id: I687bd06a5fd1f56348b08f3866a0e18eef6bb848
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoRelease drool-pdp 1.7.2 maven artifacts 48/113648/2
Taka Cho [Wed, 7 Oct 2020 20:28:39 +0000 (16:28 -0400)]
Release drool-pdp 1.7.2 maven artifacts

Issue-ID: POLICY-2839
Change-Id: Ia80368ae6632779451e9a3f9a595fa235906ac4b
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoPoint to model 2.3.2 33/113633/1
Taka Cho [Wed, 7 Oct 2020 19:29:35 +0000 (15:29 -0400)]
Point to model 2.3.2

Issue-ID: POLICY-2839
Change-Id: I6110baaf281b82cbbfc384693dd5dc30c6c6d19b
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoFix new sonars in drools-pdp 00/113400/3
Jim Hahn [Wed, 30 Sep 2020 18:32:56 +0000 (14:32 -0400)]
Fix new sonars in drools-pdp

Addressed the following sonar issues:
- extract common test method
- too many assertions in test method
- don't always return the same value

Issue-ID: POLICY-2616
Change-Id: Iab836cdcd667b35e2db9db7d6ffc7896df33e1c8
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoupdate default keystores 31/113131/1
jhh [Thu, 24 Sep 2020 20:06:26 +0000 (15:06 -0500)]
update default keystores

Issue-ID: POLICY-2827
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: If74e7eeb0ab8ff35accbfddb719bd477cd889b06

3 years agoFix more sonars in feature-server-pool 97/112897/1
Jim Hahn [Fri, 18 Sep 2020 15:48:06 +0000 (11:48 -0400)]
Fix more sonars in feature-server-pool

Addressed the following sonars:
- move fields from "interface" to "class"
- don't always return the same value
- remove commented-out code
- make constants "final"
- don't synchronize on parameters

Issue-ID: POLICY-2546
Change-Id: If2d410664d956a7efabf3a4dbef96bbf7d24de5e
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoUse alpine base image 2.1.1 49/112649/1
Jim Hahn [Mon, 14 Sep 2020 22:13:23 +0000 (18:13 -0400)]
Use alpine base image 2.1.1

Issue-ID: POLICY-2819
Change-Id: I5722330bff9c37ee9dd89d3fce0bd7fbdf975f1b
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoHandle CR in pom property files 79/112579/2
Jim Hahn [Fri, 11 Sep 2020 19:18:51 +0000 (15:18 -0400)]
Handle CR in pom property files

Fixed deploy-artifacts to strip carriage returns from pom.properties
files before attempting to extract variables from them.
Switched to using 'sed' instead of dos2unix.

Issue-ID: POLICY-2823
Change-Id: I1114af13a3262e49b87fb270d5c78cda4de9e5c9
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agobump to 1.7.2-SNAPSHOT 36/112336/1
jhh [Tue, 8 Sep 2020 22:11:22 +0000 (17:11 -0500)]
bump to 1.7.2-SNAPSHOT

Issue-ID: POLICY-2789
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I0fb5ead444c23882454e3a48efea9d936a84e455

3 years agodocker release 1.7.1 32/112332/1
jhh [Tue, 8 Sep 2020 21:21:03 +0000 (16:21 -0500)]
docker release 1.7.1

Issue-ID: POLICY-2789
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I4271ce650490afbe9023f71f6c0ced0194e8d624

3 years agomaven release 1.7.1 25/112325/2
jhh [Tue, 8 Sep 2020 19:57:59 +0000 (14:57 -0500)]
maven release 1.7.1

Issue-ID: POLICY-2789
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I807f85c5ab4398146ddb50a5942623a49eadbd26
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoUpdate common and models to 1.7.1 and 2.3.1 19/112319/1
jhh [Tue, 8 Sep 2020 18:26:23 +0000 (13:26 -0500)]
Update common and models to 1.7.1 and 2.3.1

Issue-ID: POLICY-2789
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I9ecd6b7d5cc741be5ed304d4a2a181f47c25a391

3 years agopoint to 2.1.0 policy-alpine base - droolspdp 63/112163/2
Taka Cho [Fri, 4 Sep 2020 12:42:27 +0000 (08:42 -0400)]
point to 2.1.0 policy-alpine base - droolspdp

In G-rel, using 2.1.0 base.

Issue-ID: POLICY-2789
Change-Id: I3b0b3d98b8915d7e45ec1231f41a7b97836d80c1
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoFix more sonars in drools-pdp 89/111889/3
Jim Hahn [Mon, 31 Aug 2020 12:22:13 +0000 (08:22 -0400)]
Fix more sonars in drools-pdp

Fixed more sonars in drools-pdp:
- remove commented code
- don't throw generic Exception
- unused field (made it protected instead of private)
- log conditionally
- cognitive complexity
- too many break/continue
- return empty list instead of null
- Random() is not secure

Fixed more eclipse warnings:
- parameterize generic types

Issue-ID: POLICY-2616-sonars3
Change-Id: Ia5ad769b2ea763568cfae3d81807926d89153b09
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Fix sonars in server-pool"
Pamela Dragosh [Mon, 31 Aug 2020 11:07:37 +0000 (11:07 +0000)]
Merge "Fix sonars in server-pool"

3 years agoFix sonars in server-pool 55/111855/1
Jim Hahn [Fri, 28 Aug 2020 21:19:25 +0000 (17:19 -0400)]
Fix sonars in server-pool

Addressed the following sonars in feature-server-pool:
- re-interrupt after catching an InterruptException
- reduce cognitive complexity
- cognitive complexity
- not enough arguments for logger message
- use UnaryOperator instead of Function
- update static fields via static methods
- too many break/continue in for-loop

Also fixed some Eclipse warnings:
- add parameter to generic types
- useless assignments
- newInstance() has been deprecated
- close streams

Issue-ID: POLICY-2616
Change-Id: Ibf6c20e6c2a7eb8c60e1b38f388d86a0f9b8804b
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoFix sonar issue in distributed locking 54/111854/1
Jim Hahn [Fri, 28 Aug 2020 21:01:46 +0000 (17:01 -0400)]
Fix sonar issue in distributed locking

Fixed sonar issue:
- Refactor the code of the lambda to have only one invocation throwing
  an exception

Issue-ID: POLICY-2616
Change-Id: I8d96b95d0da9a780daacec7a4de17167642b03c1
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRemove commons-io dependency 39/111739/2
Pamela Dragosh [Wed, 26 Aug 2020 11:50:00 +0000 (07:50 -0400)]
Remove commons-io dependency

Policy parent has this declaration to the latest 2.7
version of commons-io which fixes a sonatype security
issue. There is no reason that drools-pdp should be
declaring this.

Issue-ID: POLICY-2798
Change-Id: Ie7dbe14458be4ead395dfcbebbc1c0cd3ccc4ea6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoAddress more sonars in drools-pdp 20/111720/1
Jim Hahn [Tue, 25 Aug 2020 21:05:37 +0000 (17:05 -0400)]
Address more sonars in drools-pdp

Addressed the following sonars:
- either log or rethrow
- call "remove()" for thread-local-storage
- use assertEquals
- only one method call in exception test
- swap arguments in assertEquals
- add assertion to assertThatThrownBy()
- explain @Ignore

Also addressed eclipse warnings:
- unused fields and methods

Issue-ID: POLICY-2616
Change-Id: I6590c0d2b103885bc933014d48bf5fd92401cd80
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoblock status operations until controllers ready 65/111665/3
jhh [Tue, 25 Aug 2020 01:04:52 +0000 (20:04 -0500)]
block status operations until controllers ready

Status messages to the PAP won't be send until
all mandatory resources specified in the
lifecycle.pdp.policytypes property are functional.

Issue-ID: POLICY-2669
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ia9d4c678fcfbdb232059d0827235845ee11f1201
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoexit jvm when detecting configuration problems 56/111656/2
jhh [Mon, 24 Aug 2020 18:09:58 +0000 (13:09 -0500)]
exit jvm when detecting configuration problems

It follows the same approach that in other policy
components by throwing a runtime-exception vs
System.exit(x).

Issue-ID: POLICY-2752
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iba508fc7095b060373742849e394c8fdd2a2334f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoMerge "remove legacy operational policies support"
Jim Hahn [Mon, 24 Aug 2020 15:02:30 +0000 (15:02 +0000)]
Merge "remove legacy operational policies support"

3 years agomove to alpine from debian 49/111349/5
Taka Cho [Mon, 17 Aug 2020 22:23:00 +0000 (18:23 -0400)]
move to alpine from debian

moving to alpine-jdk base for
drool-pdp apps

csit drools/apps tested in windriver labs:
http://10.12.6.96:8080/tmp/tmp.yxBE30uD1m-robot-workdir/report.html

1, httpie has to install via apk
2, http-prompt has to install via pip

Issue-ID: POLICY-2787
Change-Id: I3d1bd86c7c2c3c48e9ac2a823b988bb9b1bdf98f
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoremove legacy operational policies support 96/111496/1
jhh [Thu, 20 Aug 2020 23:27:40 +0000 (18:27 -0500)]
remove legacy operational policies support

Issue-ID: POLICY-2765
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I6066b8040add53ed32572a71854f3f7094bc41d6

3 years agoUpdate INFO.yaml in policy-drools-pdp 58/110758/1
Taka Cho [Thu, 30 Jul 2020 18:11:43 +0000 (14:11 -0400)]
Update INFO.yaml in policy-drools-pdp

Verified with Jessica W that the "type" should still be "Addition",
even when updating the PTL.
Updated to Mature, per TSC.

Issue-ID: POLICY-2738
Change-Id: I3a90f3dff643f89cc5eba3a46ba4570dc756bfef
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoRemove more jackson dependencies from drools-pdp 32/110632/1
Jim Hahn [Mon, 27 Jul 2020 17:08:33 +0000 (13:08 -0400)]
Remove more jackson dependencies from drools-pdp

Issue-ID: POLICY-1528
Change-Id: I9b4054cbfd41ec1abe61d6fe459ebb29adaa7a45
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoAdd Ajith to policy/drools-pdp info 63/110563/1
Jim Hahn [Fri, 24 Jul 2020 16:55:12 +0000 (12:55 -0400)]
Add Ajith to policy/drools-pdp info

Issue-ID: POLICY-2738
Change-Id: Ib40ad93e6c0562fa60c99c9c6eff5072e355c062
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Support multiple Policy/Controller types using 'controller.type' property"
Jorge Hernandez [Tue, 21 Jul 2020 23:29:12 +0000 (23:29 +0000)]
Merge "Support multiple Policy/Controller types using 'controller.type' property"

3 years agoSupport multiple Policy/Controller types using 'controller.type' property 26/110126/6
Straubs, Ralph (rs8887) [Mon, 13 Jul 2020 14:26:50 +0000 (10:26 -0400)]
Support multiple Policy/Controller types using 'controller.type' property

It provides a feature base to allow for custom Policy
and Drools Controllers.

Issue-ID: POLICY-2415
Change-Id: Ibe3f11e3ecd925537ffd03d2420bb3b8214029c9
Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoRemove jackson from drools-pdp 89/110389/1
Jim Hahn [Mon, 20 Jul 2020 20:38:12 +0000 (16:38 -0400)]
Remove jackson from drools-pdp

Issue-ID: POLICY-1528
Change-Id: I616c48d62c63f8f213ec012f8746509471c38f89
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoPoint to SNAPSHOT for drools-pdp 48/110348/1
Jim Hahn [Fri, 17 Jul 2020 16:23:31 +0000 (12:23 -0400)]
Point to SNAPSHOT for drools-pdp

Issue-ID: POLICY-2695
Change-Id: I65fb75dda4dd26a54c593ecb26d7e0950a59e27c
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "add exec option to policy usage message"
Jorge Hernandez [Fri, 17 Jul 2020 13:21:30 +0000 (13:21 +0000)]
Merge "add exec option to policy usage message"

3 years agoadd exec option to policy usage message 98/110298/1
jhh [Thu, 16 Jul 2020 21:23:40 +0000 (16:23 -0500)]
add exec option to policy usage message

Issue-ID: POLICY-2673
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I5b3bbc36ea33c30625119a9e624b68c82a91b634

3 years agoMerge "exec pdp-d java process to run in the foreground"
Jorge Hernandez [Wed, 15 Jul 2020 19:05:34 +0000 (19:05 +0000)]
Merge "exec pdp-d java process to run in the foreground"

3 years agoexec pdp-d java process to run in the foreground 75/110175/1
jhh [Tue, 14 Jul 2020 21:55:25 +0000 (16:55 -0500)]
exec pdp-d java process to run in the foreground

Issue-ID: POLICY-2673
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I0a08a2760e4dc5a61a59c7f0f3096db76d42cc29

3 years agoMerge "sonar fix for server pool"
Jim Hahn [Mon, 13 Jul 2020 13:08:44 +0000 (13:08 +0000)]
Merge "sonar fix for server pool"

3 years agoBump drools-pdp to 1.7.1-SNAPSHOT 94/110094/1
Taka Cho [Fri, 10 Jul 2020 19:09:52 +0000 (15:09 -0400)]
Bump drools-pdp to 1.7.1-SNAPSHOT

Issue-ID: POLICY-2709
Change-Id: Ifb6232eb428e2cd9c729fef54862779b2ee55bbc
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agorelease docker 1.7.0 74/110074/2
Taka Cho [Fri, 10 Jul 2020 14:36:58 +0000 (10:36 -0400)]
release docker 1.7.0

Issue-ID: POLICY-2695
Change-Id: I250bd36079484f9869f39ec000347c106384ebaf
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agorelease drool-pdp 1.7.0 39/110039/2
Taka Cho [Thu, 9 Jul 2020 21:46:02 +0000 (17:46 -0400)]
release drool-pdp 1.7.0

Issue-ID: POLICY-2709
Change-Id: Ide08c4847a7c41bcb76b6009be59be7ec3621191
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agopoint to release parent, common and model 30/110030/2
Taka Cho [Thu, 9 Jul 2020 20:06:49 +0000 (16:06 -0400)]
point to release parent, common and model

release 1.7.0

Issue-ID: POLICY-270
Change-Id: I4975883ef85ab99345d7f9f32bbc72c091c0573a
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agosonar fix for server pool 88/109988/4
Taka Cho [Wed, 8 Jul 2020 19:58:29 +0000 (15:58 -0400)]
sonar fix for server pool

- move to a method for nest try and catch
- fixed some typos in comments
- use constant for the same String
- boolean method should be checked
- removed unnecessary exceptions

Issue-ID: POLICY-2616
Change-Id: I647ee095171feedfd44ca6967676f61842c2c91b
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "Checkstyle fixes to drools-pdp"
Ram Krishna Verma [Mon, 6 Jul 2020 20:53:44 +0000 (20:53 +0000)]
Merge "Checkstyle fixes to drools-pdp"

3 years agoMerge "Use apache Triple"
Ram Krishna Verma [Mon, 6 Jul 2020 20:53:31 +0000 (20:53 +0000)]
Merge "Use apache Triple"

3 years agoMerge "sonar fix for TargetLock"
Jorge Hernandez [Mon, 6 Jul 2020 18:17:28 +0000 (18:17 +0000)]
Merge "sonar fix for TargetLock"

3 years agoCheckstyle fixes to drools-pdp 66/109866/2
Jim Hahn [Mon, 6 Jul 2020 17:29:47 +0000 (13:29 -0400)]
Checkstyle fixes to drools-pdp

Issue-ID: POLICY-2696
Change-Id: I7f80737c52e3f16e03803118d92411e4ac39c5fb
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoUse apache Triple 63/109863/4
HAHN III [Mon, 6 Jul 2020 16:10:06 +0000 (12:10 -0400)]
Use apache Triple

Replaced policy-utils/Triple with apache Triple.

Issue-ID: POLICY-2694
Change-Id: I160f90c03f18b7da8dec5d0a00f809bcfb29680b
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agosonar fix for TargetLock 51/109751/3
Taka Cho [Wed, 1 Jul 2020 19:50:15 +0000 (15:50 -0400)]
sonar fix for TargetLock

- duplicating strings to constant
- to not log tainted, user-controlled data.

Issue-ID: POLICY-2616
Change-Id: Iaa9dd9f9ef839cec58ae60d8464b889a02b8ddb5
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agodrools-pdp sonar fix 81/109781/2
Taka Cho [Thu, 2 Jul 2020 15:56:18 +0000 (11:56 -0400)]
drools-pdp sonar fix

most of changes are assert statement

Issue-ID: POLICY-2616
Change-Id: I3bd3076115d28d8cfabcbe0859cc4b21085e1394
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "Updating drools pdp dependencies"
Jorge Hernandez [Thu, 2 Jul 2020 12:43:26 +0000 (12:43 +0000)]
Merge "Updating drools pdp dependencies"

3 years agoUpdating drools pdp dependencies 93/109693/2
RossC [Tue, 30 Jun 2020 14:57:07 +0000 (15:57 +0100)]
Updating drools pdp dependencies

Issue-ID: POLICY-2387
Change-Id: I5fe17c2514aed5c595d4e2a3d95fbb210a6f229b
Signed-off-by: RossC <ross.carter@est.tech>
3 years agosonar fix for feature server pool 07/109707/3
Taka Cho [Tue, 30 Jun 2020 20:54:50 +0000 (16:54 -0400)]
sonar fix for feature server pool

- reduce cognitive complexity
- return a boolean value
- Replace this lambda with a method reference
- use lombok annotation @EqualsAndHashcode
- removed unnecessary exception

Issue-ID: POLICY-2616
Change-Id: Ia0c300c2909bbdd232f2a3c758a5709b70f06d1c
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "feature-eelf: eelf-core from: 1.0.0 -> 2.0.0-oss"
Jim Hahn [Mon, 29 Jun 2020 21:50:11 +0000 (21:50 +0000)]
Merge "feature-eelf: eelf-core from: 1.0.0 -> 2.0.0-oss"

3 years agoMerge "Clean up of Pair classes - drools-pdp"
Jim Hahn [Mon, 29 Jun 2020 20:54:18 +0000 (20:54 +0000)]
Merge "Clean up of Pair classes - drools-pdp"

3 years agofeature-eelf: eelf-core from: 1.0.0 -> 2.0.0-oss 55/109655/2
jhh [Mon, 29 Jun 2020 15:05:10 +0000 (10:05 -0500)]
feature-eelf: eelf-core from: 1.0.0 -> 2.0.0-oss

Issue-ID: POLICY-2387
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I29d4f07d990797a470bce0898ca67741974f1c00
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoMerge "sonar fix - FeatureServerPool"
Jim Hahn [Mon, 29 Jun 2020 16:46:56 +0000 (16:46 +0000)]
Merge "sonar fix - FeatureServerPool"

3 years agoClean up of Pair classes - drools-pdp 62/109362/8
waynedunican [Fri, 19 Jun 2020 14:23:27 +0000 (15:23 +0100)]
Clean up of Pair classes - drools-pdp

Removed Pair class from drools-pdp and replaced with Apache Common Pair
class

Issue-ID: POLICY-2202
Change-Id: Ica2a5b734fb6eebfc0713027c1c4dc3b8d3882c8
Signed-off-by: waynedunican <wayne.dunican@est.tech>
3 years agoMerge "replace an emptyArray and computeIfAbsent instead"
Ram Krishna Verma [Fri, 26 Jun 2020 22:14:17 +0000 (22:14 +0000)]
Merge "replace an emptyArray and computeIfAbsent instead"

3 years agooverride central repo with right repository 13/109613/1
jhh [Fri, 26 Jun 2020 19:23:35 +0000 (14:23 -0500)]
override central repo with right repository

This is to prevent that other poms setting the repository
http://repo2.maven.org, which has been decommissioned.
The repo1.maven.org is the one to be used, only with https.

Issue-ID: POLICY-2677
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I743014ea553f5df829eb0bd7ada2cb3d1fb842bf

3 years agoreplace an emptyArray and computeIfAbsent instead 80/109580/7
Taka Cho [Thu, 25 Jun 2020 16:10:00 +0000 (12:10 -0400)]
replace an emptyArray and computeIfAbsent instead

- some methods should return an empty array.
- avoid the result of a java.util.Map.get()
  against null before proceeding with adding
  or changing the value in the map.
- Declaring a variable only to immediately
  return or throw it is a bad practice.

Issue-ID: POLICY-2616
Change-Id: I21a55c5ea716d8f64dc9155f84cabcfbcf5a22e0
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agosonar fix - FeatureServerPool 30/109530/4
Taka Cho [Wed, 24 Jun 2020 20:24:26 +0000 (16:24 -0400)]
sonar fix - FeatureServerPool

- sonar thinks one block of comments are code,
  so changed some syntax in comments
- not more than one break or continue statement

Issue-ID: POLICY-2616
Change-Id: Ia35b73584f5a8492320c4beaa069ba7f903ce268
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agofeature server Keyword sonar fix 71/109471/4
Taka Cho [Tue, 23 Jun 2020 20:19:35 +0000 (16:19 -0400)]
feature server Keyword sonar fix

- remove unnecessary cast
- A "NullPointerException" could be
  thrown; "last" is nullable here
- regexp method name
- remove curly braces and 'return'

Issue-ID: POLICY-2616
Change-Id: Icd6ab0cf1f77cdc8cf1bffb3ae2781702add9ab5
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "replace Thread sleep with Awaitility"
Jim Hahn [Fri, 26 Jun 2020 12:49:43 +0000 (12:49 +0000)]
Merge "replace Thread sleep with Awaitility"

3 years agoreplace Thread sleep with Awaitility 66/109466/3
Taka Cho [Tue, 23 Jun 2020 19:09:28 +0000 (15:09 -0400)]
replace Thread sleep with Awaitility

- use '{}' for logger msg
- sonar suggest using use libraries
  Awaitility for asynchroneous testing

Issue-ID: POLICY-2616
Change-Id: I09828cdb9467235403f299c6419e8560ca21aefd
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "Upgrade hibernate to clear dom4j sonatype"
Pamela Dragosh [Thu, 25 Jun 2020 16:13:48 +0000 (16:13 +0000)]
Merge "Upgrade hibernate to clear dom4j sonatype"

3 years agoUpgrade hibernate to clear dom4j sonatype 55/109555/1
Pamela Dragosh [Thu, 25 Jun 2020 14:18:07 +0000 (10:18 -0400)]
Upgrade hibernate to clear dom4j sonatype

dom4j 1.3.1 has sonatype issue, 1.3.3 fixed it.

hibernate is the dependency that pulls in dom4j, upgrading
to latest patch will pull in the fixed dom4j.

Issue-ID: POLICY-2675
Change-Id: Ibb80fa7c96df42322bd3dc6c7a1d1d81deb365ab
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agofix sonar issue - feature-server 14/109514/3
Taka Cho [Wed, 24 Jun 2020 14:20:59 +0000 (10:20 -0400)]
fix sonar issue - feature-server

- A field should not duplicate
  the name of its containing class
- Invoke method(s) only conditionally
- add equals and hashcode
- some leftover changes for %n

Issue-ID: POLICY-2616
Change-Id: Icc094c17245e6a163d1158d97890579d76b84aec
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "need Override equals and hashCode method"
Pamela Dragosh [Tue, 23 Jun 2020 20:31:13 +0000 (20:31 +0000)]
Merge "need Override equals and hashCode method"

3 years agoMerge "fix sonar - feature-server"
Pamela Dragosh [Tue, 23 Jun 2020 20:30:57 +0000 (20:30 +0000)]
Merge "fix sonar - feature-server"

3 years agofix sonar - feature-server 59/109459/1
Taka Cho [Tue, 23 Jun 2020 14:15:00 +0000 (10:15 -0400)]
fix sonar - feature-server

%n is portable across platforms \n is not.

Issue-ID: POLICY-2616
Change-Id: I6daa827b93384c8b25dcb58b87fff116d09a2176
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoneed Override equals and hashCode method 33/109433/1
Taka Cho [Mon, 22 Jun 2020 20:17:07 +0000 (16:17 -0400)]
need Override equals and hashCode method

Use eclipse to generate those two
Overrides in order to avoid sonar
issue

Issue-ID: POLICY-2616
Change-Id: If7e887b99fa44dac5ac5fa6f8c8cfe677238576d
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoreduce sonar issue - feature-server 17/109417/1
Taka Cho [Mon, 22 Jun 2020 14:42:34 +0000 (10:42 -0400)]
reduce sonar issue - feature-server

Remove useless curly braces around statement
Rename the method name
change to '<>'

Issue-ID: POLICY-2616
Change-Id: I679ce7e44b1a8c2c30f78820c12f91f18e5aa944
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoremoved unused methods parameter 14/109414/1
Taka Cho [Mon, 22 Jun 2020 13:52:30 +0000 (09:52 -0400)]
removed unused methods parameter

Unused parameters are misleading.
Whatever the values passed to such
parameters, the behavior will be the same.

Issue-ID: POLICY-2616
Change-Id: I9a595dca81ce061846fa53adf8086130ffd31a74
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoRemoving log4j from feature-state-management/pom.xml 90/109390/1
Utkarsh Jauhari [Sun, 21 Jun 2020 20:26:10 +0000 (20:26 +0000)]
Removing log4j from feature-state-management/pom.xml

Issue-ID: POLICY-2623
Signed-off-by: Utkarsh Jauhari <uj426b@att.com>
Change-Id: I5f9e7b67ce39177c4f7211ea0e30d78bc7a95cc3

3 years agoAddress checkstyle version issues in drools-pdp 72/109372/2
Jim Hahn [Fri, 19 Jun 2020 18:32:10 +0000 (14:32 -0400)]
Address checkstyle version issues in drools-pdp

Also added serializationId to several classes to address eclipse warnings.

Issue-ID: POLICY-2188
Change-Id: I3df5e8abaad8da9261c0d5cd19a93ed68dceb870
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "drools-pdp sonar issue fixes"
Ram Krishna Verma [Fri, 19 Jun 2020 16:50:22 +0000 (16:50 +0000)]
Merge "drools-pdp sonar issue fixes"

3 years agodrools-pdp sonar issue fixes 20/109320/2
Taka Cho [Thu, 18 Jun 2020 18:15:16 +0000 (14:15 -0400)]
drools-pdp sonar issue fixes

fix all assert statements to
comply with sonar issue

Issue-ID: POLICY-2616
Change-Id: Ia36e3eab7c74d8dfb1ab3fa1395b1f64b173e09a
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoequals and hashCode should be overridden in pairs 76/109276/2
Taka Cho [Wed, 17 Jun 2020 20:41:57 +0000 (16:41 -0400)]
equals and hashCode should be overridden in pairs

hashCode should be overridden in pairs.
followed by Effective Java:

You must override hashCode() in every class that
overrides equals(). Failure to do so will result
in a violation of the general contract for
Object.hashCode(), which will prevent your class from
functioning properly in conjunction with all
hash-based collections, including HashMap, HashSet, and Hashtable.

Issue-ID: POLICY-2616
Change-Id: I2b29722daab5c520547397aae68d8ebaa71b2c4b
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "reduce sonar issue - 2 rev"
Liam Fallon [Tue, 16 Jun 2020 07:01:36 +0000 (07:01 +0000)]
Merge "reduce sonar issue - 2 rev"

3 years agoreduce sonar issue - 2 rev 80/108980/3
Taka Cho [Tue, 9 Jun 2020 15:21:31 +0000 (11:21 -0400)]
reduce sonar issue - 2 rev

In some conditions for assertTrue, sonarcloud
recommends using assertEquals

Assert.assertTrue(a.equals(b));
Assert.assertTrue(a == b);
Assert.assertTrue(a == null);
Assert.assertTrue(a != null);
Assert.assertFalse(a.equals(b));

Compliant Solution

Assert.assertEquals(a, b);
Assert.assertSame(a, b);
Assert.assertNull(a);
Assert.assertNotNull(a);
Assert.assertNotEquals(a, b);

Issue-ID: POLICY-2616
Change-Id: Ib362573bd865d1b561916bf64640c8ddeaa02546
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "do strict validation before domain conversion"
Pamela Dragosh [Thu, 11 Jun 2020 18:27:56 +0000 (18:27 +0000)]
Merge "do strict validation before domain conversion"

3 years agodo strict validation before domain conversion 94/108994/3
jhh [Tue, 9 Jun 2020 22:11:36 +0000 (17:11 -0500)]
do strict validation before domain conversion

need to perform a validation pass as the validation
combined with putting a domain model object tree
together run into problems when dealing with
integers that are passed as strings.

Issue-ID: POLICY-2577
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I06a2b6e8dc7e0442c2503b6d978deddbf652d830
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoreduce sonar issue - drools-pdp 37/108937/3
Taka Cho [Mon, 8 Jun 2020 19:58:46 +0000 (15:58 -0400)]
reduce sonar issue - drools-pdp

remove unused import
rename the method name

Issue-ID: POLICY-2616
Change-Id: I15845159063ec5fa3cfb34a59b9c433ba3201ccc
Signed-off-by: Taka Cho <takamune.cho@att.com>
4 years agoreduce sonar issue 32/108932/4
Taka Cho [Mon, 8 Jun 2020 16:35:15 +0000 (12:35 -0400)]
reduce sonar issue

In some conditions for assertTrue, sonarcloud
recommends using assertEquals

Assert.assertTrue(a.equals(b));
Assert.assertTrue(a == b);
Assert.assertTrue(a == null);
Assert.assertTrue(a != null);
Assert.assertFalse(a.equals(b));

Compliant Solution

Assert.assertEquals(a, b);
Assert.assertSame(a, b);
Assert.assertNull(a);
Assert.assertNotNull(a);
Assert.assertNotEquals(a, b);

Issue-ID: POLICY-2616
Change-Id: I6a4b0ac76c0816a8d4bf1914dc96210d20cdff03
Signed-off-by: Taka Cho <takamune.cho@att.com>
4 years agoMerge "Change metrics and transactions layout in logback.xml"
Jorge Hernandez [Tue, 9 Jun 2020 15:28:03 +0000 (15:28 +0000)]
Merge "Change metrics and transactions layout in logback.xml"

4 years agoChange metrics and transactions layout in logback.xml 03/108003/21
Joseph Chou [Wed, 20 May 2020 17:32:30 +0000 (13:32 -0400)]
Change metrics and transactions layout in logback.xml

Update logging code to compliant with logging standard

Issue-ID: POLICY-2578
Change-Id: I98decce81eae95c006d6485bf3440ac9119b2bf5
Signed-off-by: Joseph Chou <jc2555@att.com>