summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP
AgeCommit message (Collapse)AuthorFilesLines
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-17Bump versions in policy/engine masterJim Hahn1-1/+1
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>
2019-09-13Upgrade to portal 2.6.0 releasePamela Dragosh1-1/+1
Portal released 2.6.0 Issue-ID: POLICY-2045 Change-Id: I36537fca916be71a76e36f87ede0757397883b4b 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-23Portal SDK upgrade to 2.6.0 in policy engineMichael Mokry1-1/+1
- 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>
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-13Updated policy/engine GUI springframeworkMichael Mokry1-1/+1
- 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>
2019-08-13Merge "Fix issue for policies not loading on GUI push tab"Jorge Hernandez1-1/+9
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-08-08Review maven dependency for snakeyamlBruno Sakoto1-1/+0
Remove explicit version for snakeyaml maven dependency and inherit it from integration parent artifact. Upgrade snakeyaml to latest 1.24 version. Issue-ID: POLICY-1603 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I93978f963dc37260e0fc4d153c92c7da8db0005d
2019-08-07Bump version of policy/engineJim Hahn1-1/+1
Change-Id: I77e7483bcecbc19d9a5a93087fd4c674aa898b52 Issue-ID: POLICY-1965 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-22Javascript now required for code coveragePamela Dragosh1-3/+1
For El Alto, it is now required to pull coverage of Javascript code. Issue-ID: POLICY-1928 Change-Id: If1c0c2ba795b7a8f5faf69ab32ffbb953c411f78 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-07-01Bump engine 1.5.1-SNAPSHOTPamela Dragosh1-1/+1
Released 1.5.0 Fixed compilation issue related with version upgrade of policy/common. Issue-ID: POLICY-1737 Change-Id: Ib2f56e8ffcb4b399dbe4a5453b70da10b0f87985 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com> Signed-off-by: Jim Hahn <jrh3@att.com>
2019-05-31Bump engine to version 1.5.0Jim Hahn1-1/+1
Fixed license date. Change-Id: I711fb4e91afdb3813bc04b16265f584d80ac8e5d Issue-ID: POLICY-1747 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-05-23Bump to 1.4.2-SNAPSHOTPamela Dragosh1-1/+1
Released 1.4.1 Issue-ID: POLICY-1700 Change-Id: Ied6d06664155ff6e44ede90f1c081ec5bd2ef679 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-16Step snapshot version of policy engineliamfallon1-1/+1
Issue-ID: POLICY-1630 Change-Id: Iefcaaf1811535e22904367b8d11346a02f5851c1 Signed-off-by: liamfallon <liam.fallon@est.tech>
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>
2019-04-04Auditing User Operations Push or Delete Policies.uj426b3-443/+474
Change-Id: I39d5fc01e68e9d711c5dd09790dc34beb68783c3 Issue-ID: POLICY-1421 Signed-off-by: uj426b <uj426b@att.com>
2019-03-31Enhancement to use the common CryptoUtilspa834y5-142/+164
Change-Id: I06718526382b424eab991f39a7dac1b5cf4f1b74 Issue-ID: POLICY-1422 Signed-off-by: pa834y <pa834y@att.com>
2019-03-29Merge "FIx Sonar Issues reported on ActionPolicyController"Jorge Hernandez4-247/+251
2019-03-29Merge "Fix Sonar Issues policy/engine POLICY-SDK-APP module"Jorge Hernandez9-465/+383
2019-03-28Merge "Fix sonar new bugs and vulnerabilities"Jorge Hernandez1-61/+82
2019-03-28FIx Sonar Issues reported on ActionPolicyControllerRashmi Pujar4-247/+251
- code cleanup, reduce cognitive complexity, extract constants etc Issue-ID: POLICY-1615 Change-Id: Ie0f634b1848076bba4c3ea3cbf9252b9faba0f8f Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
2019-03-28Fix Sonar Issues policy/engine POLICY-SDK-APP moduleRashmi Pujar9-465/+383
- Code cleanup & formatting, attempts to reduce cognitive complexity Issue-ID: POLICY-1615 Change-Id: I340fcaee185c1bc84d954863c413896120a51cb0 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
2019-03-27Fix sonar new bugs and vulnerabilitiespa834y1-61/+82
Change-Id: I7fbfe70e856d48f40ad831a6d0451e46024bf6de Issue-ID: POLICY-1417 Signed-off-by: pa834y <pa834y@att.com>
2019-03-27Merge "Model enhancement to support embedded JSON"Jorge Hernandez1-1379/+1536
2019-03-26Add capability for multi-role supportPolina Volodina10-1105/+1515
Changes ported from ECOMP into ONAP for multi-role functionality in Policy Editor GUI Issue-ID: POLICY-1419 Change-Id: I438c074e935c28b014be44ae2eab1d49b45e11e2 Signed-off-by: Polina Volodina <pv789v@att.com>
2019-03-21Model enhancement to support embedded JSONuj426b1-1379/+1536
Change-Id: Ic7796d0800f320e9543b59a4eabf0570ca080f09 Issue-ID: POLICY-1420 Signed-off-by: uj426b <uj426b@att.com>
2019-02-20Remove javascript from sonarPamela Dragosh1-1/+3
Per Catherine, Dublin will not require javascript for sonar coverage statistics. We'll add this back in for El Alto if we determine this repo still needs development. If LF turns off javascript in the Sonar application then I'll change this back. But I need to determine if policy/engine has 55% coverage for tomorrow M2. Issue-ID: POLICY-1536 Change-Id: Ie091e231e1150da3217e10eb28fdbcd7e2ed8320 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-02-20Fix sonar.exclusion for bowerPamela Dragosh1-1/+1
The lib folder no longer exists so excluding the lib.bower to ensure that isn't included in. Issue-ID: POLICY-1536 Change-Id: I2cf0ecd156b710e5bed98b9ee3dd3184d620a1b0 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-02-15Reformat POLICY-SDK-APP test caseskaihlavi19-2593/+2767
Reformat test cases to follow ONAP style https://wiki.onap.org/display/DW/Java+code+style Format changes mainly consist of conversions of tabs to 4 spaces Samsung modifications copyrights added Change-Id: I60b666d879960c80c80f8b1c41fc98fd0703f4d4 Issue-ID: POLICY-1506 Signed-off-by: kaihlavi <l.kaihlavirt@partner.samsung.com>
2019-01-22Merge "Improved snar issues"Pamela Dragosh1-4/+7
2019-01-21Improved snar issuesburdziak1-4/+7
Change-Id: Iaaf16a8e7e30174509cfb40702185c9b2fc2961a Issue-ID: POLICY-1432 Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
2019-01-21Sonar issues improvedburdziak1-27/+33
Change-Id: I8b2ea531c1cfa6620a2240c3ae029c3c284f5cd7 Issue-ID: POLICY-1432 Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
2019-01-17Small sonar issuesburdziak1-14/+17
Change-Id: Ifae0a81b6bfbbf08a68deb84b1514b88f2d19dea Issue-ID: POLICY-1432 Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>