policy/engine.git
4 years agopolicy/engine jdk11 upgrades 39/100439/2
HOCKLA [Fri, 17 Jan 2020 22:20:01 +0000 (16:20 -0600)]
policy/engine jdk11 upgrades

Issue-ID: POLICY-1590
Change-Id: I4da8324a065ac9babe16368e69b76a4cbe9504ef
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoPoint to policy/models release version 25/100225/1
HOCKLA [Fri, 10 Jan 2020 22:01:30 +0000 (16:01 -0600)]
Point to policy/models release version

Issue-ID: POLICY-1592
Change-Id: Ic8f5f5829b757578d0d5b32bf273cc9799faef71
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoAdd and modify jUnits for code coverage (continue admin) 26/100026/2
Peyton Puckett [Fri, 3 Jan 2020 23:35:50 +0000 (17:35 -0600)]
Add and modify jUnits for code coverage (continue admin)

Issue-ID: POLICY-2133
Change-Id: I4848e18c3ff638d6b659464b7c9293228dcc36d5
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoAdd and modify jUnits for code coverage (continue components, admin) 42/99742/2
Peyton Puckett [Tue, 17 Dec 2019 16:23:14 +0000 (10:23 -0600)]
Add and modify jUnits for code coverage (continue components, admin)

Issue-ID: POLICY-2133
Change-Id: I6b308ad8e9dcd54a260312bbee8deeaec3af2cf1
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoAdd and modify jUnits for code coverage (components) 45/99445/2
Peyton Puckett [Tue, 10 Dec 2019 17:45:44 +0000 (11:45 -0600)]
Add and modify jUnits for code coverage (components)

Issue-ID: POLICY-2133
Change-Id: I0ded200797c112c1da4e50bd0721bb87c2d124ac
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoMerge "Add and Modify jUnits for code coverage (model, admin)"
Pamela Dragosh [Fri, 6 Dec 2019 21:55:24 +0000 (21:55 +0000)]
Merge "Add and Modify jUnits for code coverage (model, admin)"

4 years agoPoint to release versions of policy/parent and policy/common 31/99231/5
HOCKLA [Thu, 5 Dec 2019 20:20:46 +0000 (14:20 -0600)]
Point to release versions of policy/parent and policy/common

Issue-ID: POLICY-1583
Change-Id: I6d7ec1ccf00110d0f84998c05492b6d59a12cdf1
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoAdd and Modify jUnits for code coverage (model, admin) 36/99236/1
Peyton Puckett [Wed, 4 Dec 2019 21:55:30 +0000 (15:55 -0600)]
Add and Modify jUnits for code coverage (model, admin)

Add tests to model after viewing sonarcloud coverage
Start adding tests for admin

Issue-ID: POLICY-2133
Change-Id: I690c612357fe3390c7904c6ba4c941dcefcc7640
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoMerge "Add and Modify JUnits for Code Coverage (components, controller)"
Pamela Dragosh [Thu, 5 Dec 2019 16:20:08 +0000 (16:20 +0000)]
Merge "Add and Modify JUnits for Code Coverage (components, controller)"

4 years agoAdd and Modify JUnits for Code Coverage (components, controller) 69/99169/1
Peyton Puckett [Tue, 26 Nov 2019 17:57:57 +0000 (11:57 -0600)]
Add and Modify JUnits for Code Coverage (components, controller)

Issue-ID: POLICY-2133
Change-Id: I9d8cecc7e9b1c280a0296a4e160f42e41264c1b6
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoMerge "Couple of JUnit additions for PAP-REST"
Pamela Dragosh [Wed, 4 Dec 2019 00:38:43 +0000 (00:38 +0000)]
Merge "Couple of JUnit additions for PAP-REST"

4 years agoMerge "Add and Modify JUnits for Code Coverage (daoImpl)"
Jorge Hernandez [Tue, 3 Dec 2019 15:23:37 +0000 (15:23 +0000)]
Merge "Add and Modify JUnits for Code Coverage (daoImpl)"

4 years agoAdd and Modify JUnits for Code Coverage (daoImpl) 23/99023/4
Peyton Puckett [Mon, 25 Nov 2019 17:44:19 +0000 (11:44 -0600)]
Add and Modify JUnits for Code Coverage (daoImpl)

Issue-ID: POLICY-2133
Change-Id: I1b16aa63394da0715dc50b5f0ac037b64d020a41
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoUnit/SONAR/Checkstyle in ONAP-REST 84/98984/2
liamfallon [Sun, 1 Dec 2019 21:44:47 +0000 (21:44 +0000)]
Unit/SONAR/Checkstyle in ONAP-REST

Util package of ONAP-REST, with JUnit added and
SONAR/Checkstyle issues addressed. Coverage increased from 51% to 73% in
large PolicyValidation class.

Issue-ID: POLICY-2131
Change-Id: Iffa90e2dfa155d3e9cac114032fb9ca0df2cbab0
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Unit/SONAR/Checkstyle in ONAP-REST"
Liam Fallon [Sun, 1 Dec 2019 11:33:44 +0000 (11:33 +0000)]
Merge "Unit/SONAR/Checkstyle in ONAP-REST"

4 years agoMerge "Add and Modify JUnits for Code Coverage"
Jorge Hernandez [Sat, 30 Nov 2019 17:58:01 +0000 (17:58 +0000)]
Merge "Add and Modify JUnits for Code Coverage"

4 years agoUnit/SONAR/Checkstyle in ONAP-REST 65/98965/1
liamfallon [Thu, 28 Nov 2019 16:28:27 +0000 (16:28 +0000)]
Unit/SONAR/Checkstyle in ONAP-REST

Util package of ONAP-REST, with JUnit added and
SONAR/Checkstyle issues addressed. Coverage increased from 31% to 51% in
large PolicyValidation class.

Issue-ID: POLICY-2131
Change-Id: Ic88dd0d47bc9c09ed294ea62c37c683297b590c0
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoUnit/SONAR/Checkstyle in ONAP-REST 91/98891/1
liamfallon [Wed, 27 Nov 2019 11:10:04 +0000 (11:10 +0000)]
Unit/SONAR/Checkstyle in ONAP-REST

Util package of ONAP-REST, with JUnit added and
SONAR/Checkstyle issues addressed. Coverage increased from 18% to 31% in
large PolicyValidation class.

Issue-ID: POLICY-2131
Change-Id: Ie059db312918021683fe27cc2aaeed86b04046f2
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoCouple of JUnit additions for PAP-REST 21/98821/4
bobbymander [Mon, 25 Nov 2019 19:56:57 +0000 (14:56 -0500)]
Couple of JUnit additions for PAP-REST

Issue-ID: POLICY-2130
Change-Id: Id7252df4a244e579d599a5d2631c60ddb9ccfab3
Signed-off-by: bobbymander <bobby.mander@att.com>
4 years agoAdd and Modify JUnits for Code Coverage 41/98741/2
Peyton Puckett [Wed, 20 Nov 2019 20:46:28 +0000 (14:46 -0600)]
Add and Modify JUnits for Code Coverage

Modify license

Issue-ID: POLICY-2133
Change-Id: I1b58fcc1636a9bf8d45595480bc5e027d93bb277
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoSonar cleanup and remove duplicate code 26/98726/1
Pamela Dragosh [Thu, 21 Nov 2019 15:50:07 +0000 (10:50 -0500)]
Sonar cleanup and remove duplicate code

Removed some duplicate code and cleaned up some sonar issues.

Issue-ID: POLICY-2242
Change-Id: I374c263516d87bda66442ed65cae9cc056e68e56
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Add ONAP-XACML StdEngine tests"
Pamela Dragosh [Thu, 21 Nov 2019 12:56:04 +0000 (12:56 +0000)]
Merge "Add ONAP-XACML StdEngine tests"

4 years agoAdd ONAP-XACML StdEngine tests 28/98628/5
Pamela Dragosh [Tue, 19 Nov 2019 19:54:11 +0000 (14:54 -0500)]
Add ONAP-XACML StdEngine tests

Re-worked some JUnits to ensure they really are testing correctly.

added coverage to the factory and std engine for easy exception
conditions.

Issue-ID: POLICY-2242
Change-Id: Iff6a390bff871fea2836336b77567f4a35720dfd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Build tar.gz without requiring docker image build"
Pamela Dragosh [Wed, 20 Nov 2019 12:26:08 +0000 (12:26 +0000)]
Merge "Build tar.gz without requiring docker image build"

4 years agoMerge "Unit/SONAR/Checkstyle in ONAP-REST"
Ram Krishna Verma [Wed, 20 Nov 2019 09:54:59 +0000 (09:54 +0000)]
Merge "Unit/SONAR/Checkstyle in ONAP-REST"

4 years agoBuild tar.gz without requiring docker image build 37/98637/1
jhh [Tue, 19 Nov 2019 22:50:31 +0000 (16:50 -0600)]
Build tar.gz without requiring docker image build

This allows the tar.gz to be released by LF jobs.

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

4 years agoUnit/SONAR/Checkstyle in ONAP-REST 11/98611/3
liamfallon [Tue, 19 Nov 2019 12:17:44 +0000 (12:17 +0000)]
Unit/SONAR/Checkstyle in ONAP-REST

Refactor of the PolicyValidationRequestWrapper class to make it
testable and unit tests for the class.

Issue-ID: POLICY-2131
Change-Id: Ie6b0b20aafd6a823fa778bb8070d057f27b28603
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Format ONAP-XACML and add JUnit"
Jorge Hernandez [Tue, 19 Nov 2019 16:37:11 +0000 (16:37 +0000)]
Merge "Format ONAP-XACML and add JUnit"

4 years agoFormat ONAP-XACML and add JUnit 29/98329/6
Pamela Dragosh [Tue, 12 Nov 2019 19:48:30 +0000 (14:48 -0500)]
Format ONAP-XACML and add JUnit

Formatting and sonar issues.

Cleaned up JUnit tests.

Added more JUnit test coverage.

Issue-ID: POLICY-2242
Change-Id: Ife0921971c6eb97de2a64b2f303cd16f992b4bd3
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUnit/SONAR/Checkstyle in ONAP-REST 12/98512/3
liamfallon [Mon, 18 Nov 2019 12:36:28 +0000 (12:36 +0000)]
Unit/SONAR/Checkstyle in ONAP-REST

Util package of ONAP-REST, with JUnit added and
SONAR/Checkstyle issues addressed. In cases where a class name change
caused an update in another package, the license header on files for
those knock on changes are not updated.

Issue-ID: POLICY-2131

Change-Id: Ic134408efe76b9838f5607a07f1735d12bd41032
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Unit/SONAR/Checkstyle in ONAP-REST"
Liam Fallon [Mon, 18 Nov 2019 10:24:15 +0000 (10:24 +0000)]
Merge "Unit/SONAR/Checkstyle in ONAP-REST"

4 years agoMore JUnit additions for PAP-REST 63/98463/1
bobbymander [Fri, 15 Nov 2019 18:59:18 +0000 (13:59 -0500)]
More JUnit additions for PAP-REST

Issue-ID: POLICY-2130
Change-Id: Ia111e5fd6dfba1e03f157ff95f91ef65df293043
Signed-off-by: bobbymander <bobby.mander@att.com>
4 years agoMerge "Cleanup drl files in policy/engine test modules"
Jorge Hernandez [Fri, 15 Nov 2019 15:37:59 +0000 (15:37 +0000)]
Merge "Cleanup drl files in policy/engine test modules"

4 years agoUnit/SONAR/Checkstyle in ONAP-REST 49/98449/4
liamfallon [Fri, 15 Nov 2019 13:35:42 +0000 (13:35 +0000)]
Unit/SONAR/Checkstyle in ONAP-REST

Fifth and final batch of JPA pojos (Q-Z), with JUnit added and
SONAR/Checkstyle issues addressed. In cases where a class name change
caused an update in another package, the license header on files for
those knock on changes are not updated.

Issue-ID: POLICY-2131
Change-Id: I1cc536a5b8a0cd3c6beff068dd72381f7ae10d12
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Unit/SONAR/Checkstyle in ONAP-REST"
Pamela Dragosh [Fri, 15 Nov 2019 13:33:39 +0000 (13:33 +0000)]
Merge "Unit/SONAR/Checkstyle in ONAP-REST"

4 years agoUnit/SONAR/Checkstyle in ONAP-REST 84/98384/3
liamfallon [Wed, 13 Nov 2019 14:08:14 +0000 (14:08 +0000)]
Unit/SONAR/Checkstyle in ONAP-REST

Fourth batch of JPA pojos (N-P), with JUnit added and SONAR/Checkstyle
issues addressed. In cases where a class name change caused an update in
another package, the license header on files for those knock on changes
are not updated.

Issue-ID: POLICY-2131
Change-Id: I9319b514b5c19e6837c34566dde770673d16bca3
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoCleanup drl files in policy/engine test modules 10/98210/4
Rashmi Pujar [Fri, 8 Nov 2019 20:59:08 +0000 (15:59 -0500)]
Cleanup drl files in policy/engine test modules

Issue-ID: POLICY-1895
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: Ice15aadbafd999b20594c3b6488e115063c985ce

4 years agoFew JUnit additions for PAP-REST 69/98369/5
bobbymander [Wed, 13 Nov 2019 15:30:56 +0000 (10:30 -0500)]
Few JUnit additions for PAP-REST

Issue-ID: POLICY-2130
Change-Id: Ie9972bc0014def93acf04c4a2386585fb4accdef
Signed-off-by: bobbymander <bobby.mander@att.com>
4 years agoJUnit/SONAR/Checkstyle in ONAP-REST 93/98193/4
liamfallon [Fri, 8 Nov 2019 16:11:50 +0000 (16:11 +0000)]
JUnit/SONAR/Checkstyle in ONAP-REST

Third batch of JPA pojos (E-M), with JUnit added and SONAR/Checkstyle
issues addressed. In cases where a class name change caused an update in
another package, the license header on files for those knock on changes
are not updated.

Issue-ID: POLICY-2131
Change-Id: I4fee1e9fb9c8a69dd6f2f15d3e3a8844473b857b
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoFix table names for CSIT issue 61/98261/2
Jim Hahn [Mon, 11 Nov 2019 19:32:15 +0000 (14:32 -0500)]
Fix table names for CSIT issue

Changed the table name in multiple files.
Backed out some changes per review comments.

Change-Id: I31f75ebdef4aa70aff841c8a52185f6ab8a4e329
Issue-ID: POLICY-2131
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoDo not hardcode io.fabric8 plugin 07/98207/1
Pamela Dragosh [Fri, 8 Nov 2019 19:54:46 +0000 (14:54 -0500)]
Do not hardcode io.fabric8 plugin

policy/parent now has this plugin defined

Issue-ID: POLICY-2222
Change-Id: I855c7b2bbd65e93695f7bfe5242be6f474f416fc
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "JUnit/SONAR/Checkstyle in ONAP-REST"
Pamela Dragosh [Fri, 8 Nov 2019 12:53:20 +0000 (12:53 +0000)]
Merge "JUnit/SONAR/Checkstyle in ONAP-REST"

4 years agoTurn on lombok code coverage for policy-engine 43/98143/1
Jim Hahn [Thu, 7 Nov 2019 14:22:11 +0000 (09:22 -0500)]
Turn on lombok code coverage for policy-engine

If this backfires, we can turn it back off again.

Issue-ID: POLICY-2131
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I7375bf4a3fa63a7791c30b3a73813bff1a69055e

4 years agoJUnit/SONAR/Checkstyle in ONAP-REST 30/98130/2
liamfallon [Thu, 7 Nov 2019 10:38:07 +0000 (10:38 +0000)]
JUnit/SONAR/Checkstyle in ONAP-REST

Second batch of JPA pojos (B-D), with JUnit added and SONAR/Checkstyle
issues addressed. In cases where a class name change caused an update in
another package, the license header on files for those knock on changes
are not updated.

Issue-ID: POLICY-2131
Change-Id: I9466f27ffa606001209ed978be592ae95d1b32c4
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoJUnit/SONAR/Checkstyle in ONAP-REST 47/98047/3
liamfallon [Wed, 6 Nov 2019 12:43:25 +0000 (12:43 +0000)]
JUnit/SONAR/Checkstyle in ONAP-REST

First batch of JPA pojos Lombok'd and some missing coverage updated

I'll be interested to see how Lomboking code shows up in SONAR, I have
not added much JUnit here but I have reduced a good bit of source code,
let's see what happens.

Issue-ID: POLICY-2131
Change-Id: I8f270ef57282f63821c1eb94dd6b50f8ae541028
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "More JUnit additions for PAP-REST"
Pamela Dragosh [Tue, 5 Nov 2019 16:19:17 +0000 (16:19 +0000)]
Merge "More JUnit additions for PAP-REST"

4 years agoMore JUnit additions for PAP-REST 09/97809/8
bobbymander [Thu, 31 Oct 2019 19:08:36 +0000 (15:08 -0400)]
More JUnit additions for PAP-REST

Issue-ID: POLICY-2130
Change-Id: Ia64bdbb377d26ba209b2d3fc51bc95f5769a7729
Signed-off-by: bobbymander <bobby.mander@att.com>
4 years agoMerge "Fixed Sonar issues for Console Logs"
Pamela Dragosh [Tue, 5 Nov 2019 12:22:44 +0000 (12:22 +0000)]
Merge "Fixed Sonar issues for Console Logs"

4 years agoJUnit/SONAR/Checkstyle in ONAP-REST 21/97921/2
liamfallon [Mon, 4 Nov 2019 17:20:37 +0000 (17:20 +0000)]
JUnit/SONAR/Checkstyle in ONAP-REST

Cleanup of the dao-impl package in ONAP-REST

All enclosing try/catch blocks removed.

Issue-ID: POLICY-2131
Change-Id: Iec73fc5a85b891a00ba8c029e9904051c51284c2
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoFixed Sonar issues for Console Logs 66/97866/5
uj426b [Fri, 1 Nov 2019 18:42:28 +0000 (14:42 -0400)]
Fixed Sonar issues for Console Logs

Issue-ID: POLICY-2153
Change-Id: Id21a9dd4910ff0c831e49a1539f130ade1779577
Signed-off-by: utkarshJ <uj426b@att.com>
4 years agoAdd common Jersey version 72/97872/1
liamfallon [Fri, 1 Nov 2019 12:09:52 +0000 (12:09 +0000)]
Add common Jersey version

Add a common version of Jersey for all Policy Framework components.

Issue-ID: POLICY-2209
Change-Id: If376b0d1c1cb11c20a176c4ea9a5b674cb8c66da
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoONAP-REST DAO Sonar/Checkstyle clean and knock-on 39/97839/2
liamfallon [Thu, 31 Oct 2019 16:39:37 +0000 (16:39 +0000)]
ONAP-REST DAO Sonar/Checkstyle clean and knock-on

Clean up the ONAP-REST DAO package and also deal with knock-on chages in
other packages.

Issue-ID: POLICY-2131
Change-Id: I381d514d37ffbddb7a91b8f8a018c7354fc437b3
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoUpgrade to drools 7.28.0.Final 07/97807/2
jhh [Thu, 31 Oct 2019 18:52:31 +0000 (13:52 -0500)]
Upgrade to drools 7.28.0.Final

Issue-ID: POLICY-1407
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ia934906cb9f5b7a3f8aac59bb204d9426e994e1f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Fixed SonarIssues Alerts to Bootstrap Notification"
Pamela Dragosh [Thu, 31 Oct 2019 15:49:29 +0000 (15:49 +0000)]
Merge "Fixed SonarIssues Alerts to Bootstrap Notification"

4 years agoMerge "Fix unit test failure in ONAP-PDP-REST"
Jorge Hernandez [Thu, 31 Oct 2019 15:12:34 +0000 (15:12 +0000)]
Merge "Fix unit test failure in ONAP-PDP-REST"

4 years agoFixed SonarIssues Alerts to Bootstrap Notification 10/97710/5
uj426b [Tue, 29 Oct 2019 21:02:59 +0000 (17:02 -0400)]
Fixed SonarIssues Alerts to Bootstrap Notification

Issue-ID: POLICY-2153
Change-Id: I0778ac8a35cc4677e86f93319818d0980fec365b
Signed-off-by: utkarshJ <uj426b@att.com>
4 years agoJUnit additions for PAP-REST, checkstyle fixes 02/97702/5
bobbymander [Tue, 29 Oct 2019 18:25:50 +0000 (14:25 -0400)]
JUnit additions for PAP-REST, checkstyle fixes

Issue-ID: POLICY-2130
Change-Id: Ia9fb294090a27ee86321249bc6b1cbdf20f33d06
Signed-off-by: bobbymander <bobby.mander@att.com>
4 years agoFix unit test failure in ONAP-PDP-REST 00/97700/2
liamfallon [Tue, 29 Oct 2019 17:46:54 +0000 (17:46 +0000)]
Fix unit test failure in ONAP-PDP-REST

Unit test parameters were cleared by earlier tests, test setup changed
to initiate paramters required by the test.

Issue-ID: POLICY-2205
Change-Id: Ia460226ae5fb6e0c42ba9840bd4fe3952dbd1a13
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoFix knock on tabs/SONAR/Checkstyle issues 85/97685/1
liamfallon [Tue, 29 Oct 2019 15:07:40 +0000 (15:07 +0000)]
Fix knock on tabs/SONAR/Checkstyle issues

Changes in the last ONAP-REST review caused knock on changes in
ONAP-PDP-REST. Those changes identified issues in two classes with tabs.
While changing the tabs to spaces, some other easy to fix
SONAR/Checkstyle issues were addressed.

Issue-ID: POLICY-2132
Change-Id: I4e32089ada7b5095da0751993458cf7173cef064
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "CHeckstyle and JUnit for base package in ONAP-REST"
Liam Fallon [Tue, 29 Oct 2019 09:25:54 +0000 (09:25 +0000)]
Merge "CHeckstyle and JUnit for base package in ONAP-REST"

4 years agojunit addition and update for PAP. 27/97427/4
bobbymander [Tue, 22 Oct 2019 14:40:09 +0000 (10:40 -0400)]
junit addition and update for PAP.

Issue-ID: POLICY-2130
Change-Id: I33f25588c34fe72b12855a2486ba892afc04693c
Signed-off-by: bobbymander <bobby.mander@att.com>
4 years agoCHeckstyle and JUnit for base package in ONAP-REST 96/97596/1
liamfallon [Fri, 25 Oct 2019 01:33:45 +0000 (21:33 -0400)]
CHeckstyle and JUnit for base package in ONAP-REST

Added unit tests and fixed checkstyle and SONAR issues in the base
package of ONAPE-REST

There was a lot of knock-on automatic changes done by Eclipse when I
renamed the class XACMLRestProperties to XacmlRestProperties so ignore
the changes in all but the ONAP-REST package. I also didn't update the
licenses on files on those classes because the changes were automatic.

Issue-ID: POLICY-2131
Change-Id: I28823c844b5192f8d56de76a727996b13e7ea4a6
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Fixed the Policy GUI Editor tab right click issue."
Liam Fallon [Thu, 24 Oct 2019 20:37:43 +0000 (20:37 +0000)]
Merge "Fixed the Policy GUI Editor tab right click issue."

4 years agoFixed the Policy GUI Editor tab right click issue. 94/97494/5
uj426b [Wed, 23 Oct 2019 04:33:06 +0000 (00:33 -0400)]
Fixed the Policy GUI Editor tab right click issue.

Issue-ID: POLICY-2159
Change-Id: Id659c56167613beb1dd28bcfd71d478209091647
Signed-off-by: utkarshJ <uj426b@att.com>
4 years agoConsolidate PolicyRestAdapter setup 19/97419/3
Pamela Dragosh [Tue, 22 Oct 2019 11:53:44 +0000 (07:53 -0400)]
Consolidate PolicyRestAdapter setup

Put common code into PolicyEngineUtils that the controllers use to
populate the PolicyRestController.

Also some more sonar cleanup and formatting of XML files.

Shortened 120 line characters. Removed some trailing spaces
from comments.

Fixed up one JUnit.

Licenses.

Issue-ID: POLICY-2133
Change-Id: Id7d8ac3ab60331535f048ec0f26aeb17a099414e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRemove useless imports and vars 18/97418/1
Pamela Dragosh [Tue, 22 Oct 2019 11:51:12 +0000 (07:51 -0400)]
Remove useless imports and vars

Some formatting and javadoc cleanup also.

Issue-ID: POLICY-2133
Change-Id: Icb0f76c7e69df87918b4bc5a02a013f9d2bfae89
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoFormat source code PolicyEngineClient 14/97314/3
Pamela Dragosh [Fri, 18 Oct 2019 13:25:01 +0000 (09:25 -0400)]
Format source code PolicyEngineClient

Formatting and sonar issues.

Looks like this is all code used for demonstrating how to call
the API's. Uses all main so actually no JUnit is being called.

Unfortunately there are no associated test files for it. Would be
interesting to see if adding a JUnit to call it with some test
code would help to improve overall coverage. Future work.

Issue-ID: POLICY-2145
Change-Id: I0d0f6d8898076a92d342553f45f70a56fd9d49f6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoJUnit addition for PAP-REST 17/97317/2
bobbymander [Fri, 18 Oct 2019 14:32:17 +0000 (10:32 -0400)]
JUnit addition for PAP-REST

Issue-ID: POLICY-2130
Change-Id: I8b35a83b3eeb2760a99c3893604afba1bc5eafd7
Signed-off-by: bobbymander <bobby.mander@att.com>
4 years agoRe-format source code 64/97264/6
Pamela Dragosh [Thu, 17 Oct 2019 14:26:58 +0000 (10:26 -0400)]
Re-format source code

No longer need the onap-java-formatter.xml in the repo - just
use command line to set path to it as this process is done
manually anyway.

Fixed missing javadoc, curly braces and variables names.

One minor fix to remove redundant jump and then unnecessary
lambda expression.

Distance from usage - moved code.

Fixed compilation error in PeCryptoUtils due to policy/common
change.

Fixed some test sources with consecutive capital letter in
names.

Updated licenses.

Added some trivial code coverage.

Issue-ID: POLICY-2145
Change-Id: I6c36650554e4fe31a3e71538d898535bc77e7e74
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Adding simple, missing junit"
Jorge Hernandez [Thu, 17 Oct 2019 00:09:11 +0000 (00:09 +0000)]
Merge "Adding simple, missing junit"

4 years agoAdding simple, missing junit 41/96941/6
bobbymander [Fri, 11 Oct 2019 13:52:10 +0000 (09:52 -0400)]
Adding simple, missing junit

Issue-ID: POLICY-2130
Change-Id: I6bc88b7bf720e672bfaa97029453e8d39a706aae
Signed-off-by: bobbymander <bobby.mander@att.com>
4 years agoSonar cleanup in controllers etc 68/97068/3
Pamela Dragosh [Mon, 14 Oct 2019 15:39:45 +0000 (11:39 -0400)]
Sonar cleanup in controllers etc

Variable renaming of consecutive capital letters.
Adding Javadoc
Missing curly braces
Re-writing some methods to reduce cyclomatic complexity
Combining while's into a simple for statement.
Addressing previous review comments

No real effort on code coverage in this one.

Issue-ID: POLICY-2133
Change-Id: I4afb3030203e1dbc743507e037ca3d57faf41f1d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoAdd coverage to a few Controllers 64/96964/4
Pamela Dragosh [Fri, 11 Oct 2019 18:03:19 +0000 (14:03 -0400)]
Add coverage to a few Controllers

Cleaned up parts of the code that were useless.

The coverage for 2 classes are now over 80%. The
CreatePolicyController coverage is now 100%

I have no idea what kind of policy the ActionPolicyController
is expecting, seems bizarre so will have to leave it alone
and move on.

Issue-ID: POLICY-2133
Change-Id: I80629d3b6f2aba301483f3fa8c3cad16cc01ffbe
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMore sonar cleanup and line consolidation 34/96934/2
Pamela Dragosh [Fri, 11 Oct 2019 12:56:16 +0000 (08:56 -0400)]
More sonar cleanup and line consolidation

Missing javadoc and some variable naming to remove consecutive
capitlization of letters.

120 line width reduction
Missing curly braces
Moving variables due to distance requirements
Add missing rawtype suppression or useless ones
There are some null return statements that are useless

Started doing some combining of lines at the risk of making the
code even more unreadable than it already is.

Started addressing some nested if's.

I see opportunity for a lot of common code to be combined or
put into a base controller or utility method.

Issue-ID: POLICY-2133
Change-Id: I6d4d9618bea685cf1d02899e3a9d4a43919a2a96
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoCheckstyle and some coverage 66/96866/2
Pamela Dragosh [Thu, 10 Oct 2019 13:58:54 +0000 (09:58 -0400)]
Checkstyle and some coverage

Address some trailing space from previous review. Mostly this
was checkstyle issues of naming methods and variables, distance
from usage, missing javadoc, 120 character spacing.

Did add a few trivial code coverage tests.

Issue-ID: POLICY-2133
Change-Id: I159d1b27429b6bef046092ea3a4045fbd3a1071c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoCleanup POLICY-SDK-APP CheckPDP 47/96747/2
Pamela Dragosh [Tue, 8 Oct 2019 14:01:23 +0000 (10:01 -0400)]
Cleanup POLICY-SDK-APP CheckPDP

Fixed sonar issues and added a small amount of code coverage.

CheckPDP was renamed to comply with 2 consecutive capital letters. Various
sonar issues done.
Very difficult to get coverage on remaining area - over 82% anyway.

RESTfulPAPEngine was updated to use the new renamed class and methods.
Sonar issues were taken care of for the most part and added some coverage
by consolidating the JUnit tests.

Added in assertj as we will utilize that more throughout the repo.

Issue-ID: POLICY-2133
Change-Id: Id0a9b050ebe373e155878699366d78df71bd0554
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUse lombok for data objects 93/96693/3
Pamela Dragosh [Mon, 7 Oct 2019 19:26:08 +0000 (15:26 -0400)]
Use lombok for data objects

Removing lines to see if this will bump coverage. Some sonar
for Junit tests and missing coverage.

My next task will be to re-use some of this duplicate code
for these object types and the controllers.

Trailing spaces for patch #3.

Issue-ID: POLICY-2133
Change-Id: Iaee123c6be4b63bd831172340709fe7597feaa78
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Format java POLICY-SDK-APP"
Pamela Dragosh [Mon, 7 Oct 2019 16:14:01 +0000 (16:14 +0000)]
Merge "Format java POLICY-SDK-APP"

4 years agoFormat java POLICY-SDK-APP 42/96642/2
Pamela Dragosh [Fri, 4 Oct 2019 21:03:28 +0000 (17:03 -0400)]
Format java POLICY-SDK-APP

As a result of doing command maven reformat, these files are
now changed.

Updated licenses.

Issue-ID: POLICY-2133
Change-Id: I19a8dd70eb10c0d879b97635f7780ab7f92a1753
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRemove unused vars and methods 36/96636/3
Pamela Dragosh [Fri, 4 Oct 2019 19:45:03 +0000 (15:45 -0400)]
Remove unused vars and methods

Removed unused variables and unused methods.
Removed empty ';' statements.
Combined if's that had no content.

Not doing any formatting for javascript right now.

Licenses.

Issue-ID: POLICY-2134
Change-Id: Ib5ec178bd34154281509f57ed15f704e26101f05
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpdate standalone legacy policy UI recipe 32/96532/1
jhh [Thu, 3 Oct 2019 03:35:40 +0000 (22:35 -0500)]
Update standalone legacy policy UI recipe

Issue-ID: PORTAL-760
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I02c96873768660403b86db736cb3762d0ff8f5ff
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoUse snapshot version of models in policy/engine 33/96033/1
Jim Hahn [Thu, 19 Sep 2019 19:30:46 +0000 (15:30 -0400)]
Use snapshot version of models in policy/engine

Change-Id: I7c8ba1ed700a6a0c9e9017a19ab80ef510719bf4
Issue-ID: POLICY-2065
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoBump versions in policy/engine master 29/95829/2
Jim Hahn [Tue, 17 Sep 2019 16:14:50 +0000 (12:14 -0400)]
Bump versions in policy/engine master

Also added default branch to .gitreview to facilitate branching in
the future.
Switched internal properties to use snapshot versions of other
repos per review comment.

Change-Id: I23d71e67051d88cfaa07adc15e2d143289269027
Issue-ID: POLICY-2045
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoRelease policy/engine 1.5.2 72/95672/1 5.0.0-ONAP
Pamela Dragosh [Fri, 13 Sep 2019 19:56:29 +0000 (15:56 -0400)]
Release policy/engine 1.5.2

Official El Alto release 1.5.2

Issue-ID: POLICY-2045
Change-Id: I29e5b47530fe6a8e02891b0c5b1f15a09e1d332f
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpgrade to portal 2.6.0 release 65/95665/1
Pamela Dragosh [Fri, 13 Sep 2019 18:05:29 +0000 (14:05 -0400)]
Upgrade to portal 2.6.0 release

Portal released 2.6.0

Issue-ID: POLICY-2045
Change-Id: I36537fca916be71a76e36f87ede0757397883b4b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpgrade to released artifacts 86/95286/2
Pamela Dragosh [Mon, 9 Sep 2019 23:56:22 +0000 (19:56 -0400)]
Upgrade to released artifacts

Released parent, common and models

Issue-ID: POLICY-2045
Change-Id: If26bd3e22f43396e61a53626b72d0d3e9d6bf5fb
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Change AlertSeverity to Severity in policy/engine"
Pamela Dragosh [Tue, 3 Sep 2019 11:52:03 +0000 (11:52 +0000)]
Merge "Change AlertSeverity to Severity in policy/engine"

4 years agoMerge "Documentation: Legacy APIs"
Pamela Dragosh [Fri, 30 Aug 2019 21:33:32 +0000 (21:33 +0000)]
Merge "Documentation: Legacy APIs"

4 years agoDocumentation: Legacy APIs 52/94652/2
Saryu Shah [Fri, 30 Aug 2019 04:03:33 +0000 (04:03 +0000)]
Documentation: Legacy APIs

Identified the offered apis under platform as legacy

Issue-ID: POLICY-1984

Change-Id: Iee46ded3e506a91181b1c18e1618d4509b8f8f90
Signed-off-by: Saryu Shah <ss3917@att.com>
4 years agoChange AlertSeverity to Severity in policy/engine 43/94643/4
Jim Hahn [Thu, 29 Aug 2019 22:02:17 +0000 (18:02 -0400)]
Change AlertSeverity to Severity in policy/engine

Updated logback xml files, replacing AlertSeverity with Severity.
Also fixed some spacing issues.

Change-Id: I3e4b9163d5d897fe4402028b69c741f497aecfc5
Issue-ID: POLICY-1989
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdditional Changes for Portal SDK 2.6.0 upgrade 31/94631/2
Michael Mokry [Thu, 29 Aug 2019 19:20:19 +0000 (14:20 -0500)]
Additional Changes for Portal SDK 2.6.0 upgrade

- Modified policyEditor.html to upgrade the angular version to
1.4.13 which is compatible with 2.6.0 SDK
- Created new sql script file for Portal db table upgrades in
2.5.0 and 2.6.0
- Modified top level pom to upgrade springframework version to
4.3.24

Change-Id: I5f6e719a2f57891a1b2b76312f446211b6b60abd
Issue-ID: POLICY-1539
Signed-off-by: Michael Mokry <michael.mokry@att.com>
4 years agoPortal SDK upgrade to 2.6.0 in policy engine 41/94241/2
Michael Mokry [Fri, 23 Aug 2019 20:41:33 +0000 (15:41 -0500)]
Portal SDK upgrade to 2.6.0 in policy engine

- Modified poms to upgrade epsdk dependency from 2.4.0 to
2.6.0-SNAPSHOT
        - Work in progress, still needs to be tested in the lab

Change-Id: I5c7df08ed84ef12824d4fdc2ef6f578d6dce7488
Issue-ID: POLICY-1539
Signed-off-by: Michael Mokry <michael.mokry@att.com>
4 years agoFix license on updated engine files 17/94217/1
Jim Hahn [Fri, 23 Aug 2019 13:06:56 +0000 (09:06 -0400)]
Fix license on updated engine files

Address review comment about license date on updated junits.

Change-Id: I5dd6e47be243d6f0d5a001cb5cfb45e7ac31f9c8
Issue-ID: POLICY-1937
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Remove powermock to increase coverage"
Pamela Dragosh [Fri, 23 Aug 2019 12:55:45 +0000 (12:55 +0000)]
Merge "Remove powermock to increase coverage"

4 years agoupdate keystore 79/94179/1
jhh [Fri, 23 Aug 2019 03:39:35 +0000 (22:39 -0500)]
update keystore

Issue-ID: POLICY-1988
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Icb0b5af7aa63516f82917245083834cacd8caed4
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoRemove powermock to increase coverage 53/94153/8
Jim Hahn [Thu, 22 Aug 2019 18:21:14 +0000 (14:21 -0400)]
Remove powermock to increase coverage

Removed powermock from the junit tests of these classes to increase
reported sonar coverage:
  RESTfulPAPEngine
  BrmsGateway

Typically added override methods to the classes under test, to replace
the overrides originally provided by powermock.

Also needed to add code to RESTfulPAPEngineTest to clear the XACML
properties before the test ran.  Modified to use the existing
XACMLProperties.reloadProperties() method.

Also modified PolicyNotificationMailTest to use a host/port that
has no listener so that the test runs faster.

Fixed some newly introduced sonar issues.

Change-Id: I65e36b01e9506987032eb21baac808ed3dfd4f47
Issue-ID: POLICY-1937
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoUpgrade elastic search to 6.8.2 22/94122/1
Pamela Dragosh [Thu, 22 Aug 2019 13:24:01 +0000 (09:24 -0400)]
Upgrade elastic search to 6.8.2

Clearing security issues - there are no workarounds.

Issue-ID: POLICY-2005
Change-Id: I4deb0c1a42c507e1af6d99f24f4f973ab40217a1
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpdated policy/engine GUI springframework 46/93446/1
Michael Mokry [Tue, 13 Aug 2019 16:45:41 +0000 (11:45 -0500)]
Updated policy/engine GUI springframework

- Modified springframework dependencies version in poms to 4.3.24.RELEASE in ONAP-SDK-APP and POLICY-SDK-APP

Change-Id: I149ed2454e7a899b929f179bf46b80190b3bc80c
Issue-ID: POLICY-1539
Signed-off-by: Michael Mokry <michael.mokry@att.com>
4 years agoMerge "Fix issue for policies not loading on GUI push tab"
Jorge Hernandez [Tue, 13 Aug 2019 13:53:49 +0000 (13:53 +0000)]
Merge "Fix issue for policies not loading on GUI push tab"

4 years agoFix issue for policies not loading on GUI push tab 03/93103/5
Michael Mokry [Thu, 8 Aug 2019 14:59:03 +0000 (09:59 -0500)]
Fix issue for policies not loading on GUI push tab

- found the problem to be with a line of code to add all the
scopes from the role to a Set of scopes.  when the scopes
attribute in the role object is null it logs an exception and
fails to load policies.  I added a new method to check the value
of the roles.getScopes() for null and only attempt to add the
scope to the set if it is not null

- I created a separate method to do this in order to avoid an
increase in technical debt as it would have added to the
complexity if I kept it in the same method.

- PATCH 4: Added scopes to the method arguments in order to
avoid overwriting scopes that are added in prevous interations
of the loop.

- PATCH 5: removed redundant scopes assignment per Jorge's
review.

Change-Id: Ifcc8775d3db8ecc722ee6806310a58ecb4e15856
Issue-ID: POLICY-1981
Signed-off-by: Michael Mokry <michael.mokry@att.com>