aboutsummaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src
AgeCommit message (Collapse)AuthorFilesLines
2020-05-14Fix Junit to clean up file/directoryuj426b1-0/+11
Change-Id: Ib29b3b708bd28e333822d4c2b9db44e33f8e395f Issue-ID: POLICY-2496 Signed-off-by: uj426b <uj426b@att.com>
2020-05-08Fix Policy import/export on guiuj426b5-58/+67
Issue-ID: POLICY-2545 Change-Id: I25fe8c415a0c9a9b15c97feb93c2ce3e9c975ed2 Signed-off-by: uj426b <uj426b@att.com>
2020-04-29Fix for MS Policy Tosca Model and other itemsuj426b3-113/+141
Issue-ID: POLICY-2520 Change-Id: I35fac9e7d157aa4a137cd9dd5a30830eaf63f586 Signed-off-by: uj426b <uj426b@att.com>
2020-04-22Fix for Push/Unpush Policy On GUIuj426b3-10/+11
Issue-ID: POLICY-2518 Change-Id: Ie70fc5049f87b55384731900373884d8b25803bb Signed-off-by: uj426b <uj426b@att.com>
2020-04-16Fix for blank onapName and partial dictionaryuj426b1-1/+1
Issue-ID: POLICY-2492 Change-Id: I329f6ab38d68887139f1d198a6777917fbd0fb28 Signed-off-by: uj426b <uj426b@att.com>
2020-04-16Merge "Fix policy engine JUnit that hung on ubuntu 18.04"Jim Hahn2-45/+86
2020-04-16Fix policy engine JUnit that hung on ubuntu 18.04uj426b2-45/+86
Replaced powermock with overridable methods. Review comments: - license data Issue-ID: POLICY-2444 Change-Id: I60916a720569a293e6c91e8278cda41b93c3c843 Signed-off-by: uj426b <uj426b@att.com> Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-14Fix for Policy editor GUI issue.uj426b1-1/+2
Issue-ID: POLICY-2492 Change-Id: Ic436a72d321c9aeed1a7eeec57c6dfc44819d6cc Signed-off-by: uj426b <uj426b@att.com>
2020-03-24Ignore JUnit that fails intermittentlyPamela Dragosh1-0/+5
Issue-ID: POLICY-2378 Change-Id: Iaa2e804af63d4ce1232326bd2dcca96083e5f087 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-24Bump patch 1.6.1 to fix JUnit issuePamela Dragosh1-30/+32
The docker stage job is not succeeded, nor is the sonar job. Logging doesn't produce anything useful, so the best bet is to fix the order of the tests and hope that fixes the problem. Regardless must bump the patch to release it again. Issue-ID: POLICY-2378 Change-Id: I01ff47c8deb124e9fd6ffcb37407dc580ecd6b03 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-02-21Add pom.xml dependencies and exclusions needed for policy-engine guiPeyton Puckett2-3/+3
Update powermockignore annotation to fix junit failure Issue-ID: POLICY-1590 Change-Id: Iadd0855565c05d02af034a5ad02ea7b8e386fadc Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2020-01-20policy/engine jdk11 upgradesHOCKLA8-22/+34
Issue-ID: POLICY-1590 Change-Id: I4da8324a065ac9babe16368e69b76a4cbe9504ef Signed-off-by: HOCKLA <ah999m@att.com>
2020-01-07Add and modify jUnits for code coverage (continue admin)Peyton Puckett3-11/+413
Issue-ID: POLICY-2133 Change-Id: I4848e18c3ff638d6b659464b7c9293228dcc36d5 Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2019-12-18Add and modify jUnits for code coverage (continue components, admin)Peyton Puckett2-4/+259
Issue-ID: POLICY-2133 Change-Id: I6b308ad8e9dcd54a260312bbee8deeaec3af2cf1 Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2019-12-11Add and modify jUnits for code coverage (components)Peyton Puckett1-27/+404
Issue-ID: POLICY-2133 Change-Id: I0ded200797c112c1da4e50bd0721bb87c2d124ac Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2019-12-05Add and Modify jUnits for code coverage (model, admin)Peyton Puckett3-6/+184
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>
2019-12-04Add and Modify JUnits for Code Coverage (components, controller)Peyton Puckett3-14/+368
Issue-ID: POLICY-2133 Change-Id: I9d8cecc7e9b1c280a0296a4e160f42e41264c1b6 Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2019-12-02Add and Modify JUnits for Code Coverage (daoImpl)Peyton Puckett2-15/+159
Issue-ID: POLICY-2133 Change-Id: I1b16aa63394da0715dc50b5f0ac037b64d020a41 Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2019-11-22Add and Modify JUnits for Code CoveragePeyton Puckett2-9/+94
Modify license Issue-ID: POLICY-2133 Change-Id: I1b58fcc1636a9bf8d45595480bc5e027d93bb277 Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2019-11-18Unit/SONAR/Checkstyle in ONAP-RESTliamfallon3-23/+23
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>
2019-11-15Unit/SONAR/Checkstyle in ONAP-RESTliamfallon7-34/+34
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>
2019-11-13Unit/SONAR/Checkstyle in ONAP-RESTliamfallon3-9/+9
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>
2019-11-12JUnit/SONAR/Checkstyle in ONAP-RESTliamfallon2-6/+6
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>
2019-11-07JUnit/SONAR/Checkstyle in ONAP-RESTliamfallon2-5/+5
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>
2019-11-04Fixed Sonar issues for Console Logsuj426b15-2498/+2083
Issue-ID: POLICY-2153 Change-Id: Id21a9dd4910ff0c831e49a1539f130ade1779577 Signed-off-by: utkarshJ <uj426b@att.com>
2019-10-30Fixed SonarIssues Alerts to Bootstrap Notificationuj426b56-3378/+3388
Issue-ID: POLICY-2153 Change-Id: I0778ac8a35cc4677e86f93319818d0980fec365b Signed-off-by: utkarshJ <uj426b@att.com>
2019-10-24CHeckstyle and JUnit for base package in ONAP-RESTliamfallon8-26/+26
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>
2019-10-24Merge "Fixed the Policy GUI Editor tab right click issue."Liam Fallon2-5/+346
2019-10-24Fixed the Policy GUI Editor tab right click issue.uj426b2-5/+346
Issue-ID: POLICY-2159 Change-Id: Id659c56167613beb1dd28bcfd71d478209091647 Signed-off-by: utkarshJ <uj426b@att.com>
2019-10-23Consolidate PolicyRestAdapter setupPamela Dragosh27-311/+196
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>
2019-10-14Sonar cleanup in controllers etcPamela Dragosh23-947/+964
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>
2019-10-11Add coverage to a few ControllersPamela Dragosh7-67/+427
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>
2019-10-11More sonar cleanup and line consolidationPamela Dragosh23-753/+911
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>
2019-10-10Checkstyle and some coveragePamela Dragosh9-126/+251
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>
2019-10-08Cleanup POLICY-SDK-APP CheckPDPPamela Dragosh5-249/+259
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>
2019-10-07Use lombok for data objectsPamela Dragosh7-328/+47
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>
2019-10-07Merge "Format java POLICY-SDK-APP"Pamela Dragosh56-2923/+2954
2019-10-07Format java POLICY-SDK-APPPamela Dragosh56-2923/+2954
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>
2019-10-04Remove unused vars and methodsPamela Dragosh16-141/+47
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>
2019-09-03Merge "Change AlertSeverity to Severity in policy/engine"Pamela Dragosh1-62/+62
2019-08-29Change AlertSeverity to Severity in policy/engineJim Hahn1-62/+62
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>
2019-08-29Additional Changes for Portal SDK 2.6.0 upgradeMichael Mokry1-263/+263
- 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>
2019-08-23Fix license on updated engine filesJim Hahn3-10/+9
Address review comment about license date on updated junits. Change-Id: I5dd6e47be243d6f0d5a001cb5cfb45e7ac31f9c8 Issue-ID: POLICY-1937 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-22Remove powermock to increase coverageJim Hahn3-18/+42
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>
2019-08-12Fix issue for policies not loading on GUI push tabMichael Mokry1-1/+9
- 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>
2019-04-09Merge "Add Additional Junit and fix Sonar new bug."Pamela Dragosh1-4/+4
2019-04-09Merge "Fix Sonar issues in org.onap.policy.controller pkg"Pamela Dragosh4-1070/+1056
2019-04-09Add Additional Junit and fix Sonar new bug.uj426b1-4/+4
Issue-ID: POLICY-1416 Signed-off-by: uj426b <uj426b@att.com> Change-Id: Ie4e6e91d555be448caa290bce36eb58075046619 Signed-off-by: uj426b <uj426b@att.com>
2019-04-09Fix Sonar issues in org.onap.policy.controller pkgRashmi Pujar4-1070/+1056
Issue-ID: POLICY-1615 Change-Id: I3f7c6d754084d7c740876e817bf963a6cc8c194b Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
2019-04-08CLAMP Model policy creation supportuj426b13-1139/+1892
Change-Id: Ia69f061c078e4f6ed4b4d2cd12f03f58514f2123 Issue-ID: POLICY-1416 Signed-off-by: uj426b <uj426b@att.com>