aboutsummaryrefslogtreecommitdiffstats
path: root/PolicyEngineUtils/src
AgeCommit message (Collapse)AuthorFilesLines
2019-10-23Consolidate PolicyRestAdapter setupPamela Dragosh4-41/+70
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-17Re-format source codePamela Dragosh36-1051/+1097
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>
2019-06-19Improved tests performanceKrysiak Adam2-98/+110
* used mock instead of waiting till dmaap client fails * creating in memory DB only once Issue-ID: POLICY-1671 Change-Id: Ia1b6ce7ddad1bce0d17c2dbf14f3d82dd237673b Signed-off-by: Krysiak Adam <adam.krysiak@nokia.com>
2019-04-30Fix test files created during executionpa834y1-151/+173
Change-Id: Idaeaabfb523ca9206077827895c695a122f62101 Issue-ID: POLICY-1706 Signed-off-by: pa834y <pa834y@att.com>
2019-03-31Enhancement to use the common CryptoUtilspa834y4-384/+166
Change-Id: I06718526382b424eab991f39a7dac1b5cf4f1b74 Issue-ID: POLICY-1422 Signed-off-by: pa834y <pa834y@att.com>
2018-12-27Rename test classes in policy/engineParshad Patel2-11/+11
Make test classes name consitence by adding 'Test' at end of junit test classes and adding 'Support' or 'Dummy' at start of util or dummy type of test classes Issue-ID: POLICY-1281 Change-Id: I5fa65d0cfc95edc8f2fe0ca678a43d2011a39670 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-11-26Fix various errors in test logsJim Hahn1-19/+19
Changed license comment style in ddl files from C-style to SQL-style. Added value for NOTIFICATION_DELAY. Don't overwrite property and pom updates from previous commit. Change-Id: I8c9fd50343c3503c797cb4165bbff5809e4d0740 Issue-ID: POLICY-1285 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-11-06Update dmaap 1.1.9 changesPamela Dragosh3-10/+6
Upgrading policy/parent to v1.1.9 requires these code changes to occur. Issue-ID: POLICY-1229 Change-Id: I16f4bbd9ba2d46cdc3b94feba1f2e7f20d837dad Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-25CADI AAF changes for policy/engineMichael Mokry1-87/+71
Added cadi properties and modified policy aaf client code. Fixed issue with namespace and modified code to reverse it for structuring the username sent in AAF API call Added properties for keystore and keystore password after getting error response from AAF when setting up the connection to AAF Missed a fix for one of Jorge's comments in last patch, here it is. Change-Id: Ic164ade8aa34da95a560c1592656e0caf990a595 Issue-ID: POLICY-913 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-09-18Fixes for oparent upgradePamela Dragosh1-1/+1
Clean up mariadb so that it is consistent, allow jetty to be defined by oparent, and fixes to fully support google guava upgrade. Issue-ID: POLICY-1126 Change-Id: Ic0c2fba5f6f5f1a41e53770b95861606a5b4bbe6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-18Remove override of parent aaf versionPamela Dragosh1-1/+5
policy/parent now declares the aaf dependency so consistency is maintained in all the repositories. Removing the version declaration in order to pull in the declared version. The constructor changes to add a namespace. A null value is still possible to be used. If we are given a namespace then we will have to add that in. Preferrably via a properties file. I also noticed there is a hard-coded URL in here in the setupAAF() method on line 212. That should be moved to a property file. Issue-ID: POLICY-1119 Change-Id: I97dcd7d669d3d05db7c6597be6f3038183fa4e17 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-07-28Fix Sonar issues in utils PDP ParseLog reworkKrishnajinka1-129/+143
Fix Major Sonar issues in ParseLog BackupMonitor and ONAP-PDP component. Issues related to nested control statements. Rework2 based on review comments Issue-ID: POLICY-1013 Change-Id: I10edb242b45a649df902a4e7c1aba0a285b8b7fb Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-26Refactor code for nested stmts in policy stdKrishnajinka1-173/+197
Refactor code for nested control statements in PolicyEngineAPI policy.std package. These issues are flagged by Sonar as Major issues. Rework based on review comments Issue-ID: POLICY-1012 Change-Id: I6925dd5d56b653ef4cefe5ae64686a49f9741125 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-25Fix sonar issue about nested stmtsKrishnajinka1-169/+172
Refactor code to not nest more than 3 condition or loop stmts in policy PolicyEngineUtils. Rework based on review comments Issue-ID: POLICY-1003 Change-Id: I95fcfa0f99c517c02357c85ca39cd2f934e8da4d Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-06-08Decryption messages should not be errorsJim Hahn1-2/+2
Modified code to generate INFO messages when decryption fails, instead of ERROR or WARN. Also modified some of the text in the afforementioned messages. Change-Id: I895967cf16b0e5667e1797bc16ea1ede81d6dd7a Issue-ID: POLICY-785 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-05-10Change error to warningJim Hahn1-2/+2
Changed ERROR about decryption to WARNING. Added POLICY_LOGS to base.conf (for non-docker). Change-Id: If32965f1c37b36102c12371e739e1a155bb255f0 Issue-ID: POLICY-758 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-19Add license to policy-engine filesJim Hahn1-0/+20
Added license to various files. Updated XACMLPolicyScanner to work even when license comment is added to the Policy.xml file. Moved DOCTYPE before license in html files. Removed license from css files, as many are generated or come from third-party software. Removed license from other generated files. Change-Id: I9d98ca9f552a6eae17e80ef27fc7045cc4f27b8e Issue-ID: POLICY-741 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-10Modified DB Upgrade script for OptimizationModelsMichael Mokry1-6/+8
Changed the incorrect column 'dataorder' to 'dataorderinfo' Made changes to pom and AAF client code per AAF API changes in new depedency. Change-Id: Ic9bf0edec8282cc0f96d6fedd62fa9253d52070f Issue-ID: POLICY-731 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-03-27JUnit additions and powermock pom fixesbobbymander1-0/+52
Issue-ID: POLICY-602 Change-Id: I2484b47cc52a07413de69c1022a056fd0cf2d7d7 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-26New Optimization PolicyMichael Mokry1-0/+15
This is the new Optimization Policy to support the Integration of the OOF Policy Model into the Policy Platform. Added changes from Frank Wang to fix the following issues with existing Model Parser: 1. TOSCA Rendering issues 2. Matching Attributes support 3. ImportModelAPI to support TOSCA model upload via REST API Running local Sonar tonight to start fixing Sonar issues Added changes per review comments and fixed Sonar issues Change-Id: Ia8ce09c28a718ce4460475e76a750caef774bd6b Issue-ID: POLICY-622 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-03-21JUnit additions for PAP-REST,REST,Utilsbobbymander1-0/+55
Issue-ID: POLICY-600 Change-Id: I9a432f9e8af43184d116d5eeb2fbbac65472564e Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-09Use org.onap.aaf dependenciesPamela Dragosh2-84/+15
Move from github version to the onap version. Issue-ID: POLICY-568 Change-Id: I30f91b07cb690e50e829c14725c1bf05a1f4200b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-03-05Remove auto generated rule to the drlpa834y1-2/+2
Issue-ID: POLICY-488 Change-Id: Id6915407a6f030b77ae2d18ad3665af9d0feb34b Signed-off-by: pa834y <pa834y@att.com>
2018-02-23Fix Fortify Issue - External Entity Injectionguangxingwang1-2/+5
Fix Fortify Issue by setting secure process of factory as true Issue-ID: POLICY-551 Change-Id: I46890d2664d0ae9ed9540ba830d0f4b27136a6e9 Signed-off-by: guangxingwang <gw1218@att.com>
2018-02-05Merge "Technical debt and fix JUnit test"Jorge Hernandez2-2/+4
2018-02-05Technical debt and fix JUnit testPamela Dragosh2-2/+4
* One statement per line * private constructor for class with statics * Fix silly JUnit test Issue-ID: POLICY-474 Change-Id: Ie760826879febbbc4db4f03079ae1f847f2194dd Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-02-05Implement Encryption on Passwordsguangxingwang2-0/+384
Fix Fortify scan issue - hardcoded password Issue-ID: POLICY-542 Change-Id: I722b9143fbddc48b67592bb35a44f36ed8b38aad Signed-off-by: guangxingwang <gw1218@att.com>
2018-02-02Resolved Fortify System Information Leak issuesrb71471-2/+0
Issue-ID: POLICY-550 Change-Id: I2145ecb6de43b69d6faf44c6395b119134a9904f Signed-off-by: rb7147 <rb7147@att.com>
2018-02-01Included Policy GUI Enhancements and validationsrb71471-2/+5
Added hover messages for all policy templates. Resolved few sonar issues. Added fixes for Policy GUI Validations. Issue-ID: POLICY-597 Change-Id: I74abb92dd6ac8722d7869b6a316fad1d8db11d9c Signed-off-by: rb7147 <rb7147@att.com>
2017-12-21Sonar cleanup for PolicyEngineUtilsMagnusen, Drew (dm741q)13-33/+60
Changes to resolve some sonar "major" issues in the PolicyEngineUtils module. Patch 2: Updated the NotificationStoreTest junit to account for the return of a "Collections.emptyList()" rather than "null" in StdPDPNotification class. Patch 3: Updated the StdPDPNotificationTest junit to account for the return of a "Collections.emptyList()" rather than "null" in StdPDPNotifaction class. Issue-ID: POLICY-474 Change-Id: I925774ac181fd38d1206637f47ab27ba499629ef Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-10-10Fixing the BRMS rule generation issueTej, Tarun1-1/+1
Fixing the rule params section to look for PapParams istead of Params. This will be a temporary solution for now. Issue-Id: POLICY-302 Change-Id: I4b6b415b3eacf121be374d2dfd50303049c35aba Signed-off-by: Tej, Tarun <tt3868@att.com>
2017-09-21Merge "Added Junits for POLICY-SDK-APP"Pamela Dragosh1-12/+12
2017-09-21Added Junits for POLICY-SDK-APPrb71471-12/+12
Issue-Id: POLICY-52 Change-Id: I439c95736f50fe9140e71cad5a598c5b5239161b Signed-off-by: rb7147 <rb7147@att.com>
2017-09-21Redundant code removal and hadrcoded stringsBharat saraswal11-479/+469
Issue-Id:POLICY-252 Change-Id: Ifeadfe6dfd0d428a0580c627eeca1fc19b58c856 Signed-off-by: Bharat saraswal <bharat.saraswal@huawei.com>
2017-09-20Merge "Fix for Sonar major issues"Pamela Dragosh1-0/+1
2017-09-20Fix for Sonar major issuesrama-huawei1-0/+1
Change includes: 1) Add the "@Override" annotation for overriding methods 2) Move the string literal on the left side of the actual string comparison. Issue-ID: POLICY-239 Change-Id: I83b0cf41d630ef80f08eda35c9c37ae591332f74 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-20mysql connector to mariadb changesTej, Tarun1-2/+2
changes to mysql connector to mariadb connector along with additional Junits Issue-Id: POLICY-219 Change-Id: I26ee1cf733d49d10fccbcd159fe8fc380120efbf Signed-off-by: Tej, Tarun <tt3868@att.com>
2017-09-18Adding JUnits for additional coverageTej, Tarun2-21/+95
PolicyEngine Utils and BRMSGW Junit Issue-Id: POLICY-52 Change-Id: I8e18e8bd6dc5eec0874b9ffe3aebf8e399ff3326 Signed-off-by: Tej, Tarun <tt3868@att.com>
2017-09-15Adding Junits for policy engineTej, Tarun19-325/+1179
Adding Junits to Policy Engine Utils project, removed duplicates, fixed few defects along the way and fixes to projects. Issue-Id: POLICY-52 Change-Id: Ia0598300f9bd60f5372b9ef7d8984657478a1611 Signed-off-by: Tej, Tarun <tt3868@att.com>
2017-08-23Fixes for sonar critical issuesTej, Tarun5-363/+484
Fixes for critical and blocker issues reported in sonar. Issue-Id: POLICY-113 Change-Id: I50969fe93a94b0497f3fb30864a6c45e63208fe6 Signed-off-by: Tej, Tarun <tt3868@att.com>
2017-07-31[POLICY-73] replace openecomp for policy-engineGuo Ruijing26-63/+63
Change-Id: I54072f6bcd388c0e05562614ee89b4ae7ad67004 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-07-25[Policy-52, Policy-92, Policy-93] Policy Enhancements and bugfixesTarun Tej Velaga1-28/+35
Change-Id: I5675cf4527e17963b3142cf7184c0df31a766197 Signed-off-by: Tarun Tej Velaga <tt3868@att.com>
2017-06-07Fixed the Policy API issues and BugfixesRavindra Bakkamanthala2-31/+55
Change-Id: I6e8b54442421b6ebd0ff88426fc6e5f3a36b0690 Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
2017-05-31[Policy-17] Removed the sql scripts from sdk appRavindra Bakkamanthala3-28/+64
Change-Id: I5b017aad569014c7f12eab35e1dbd1c215f90ebe Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
2017-05-23Commit includes ControlLoopPolicy API and bugfixesRavindra Bakkamanthala4-12/+12
Change-Id: I3e18bb8b4c31a0d908bb0cff4c85e2a3fb450a63 Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
2017-05-03Policy 1707 commit to LFITSERVICES\rb71478-309/+808
Change-Id: Ibe6f01d92f9a434c040abb05d5386e89d675ae65 Signed-off-by: ITSERVICES\rb7147 <rb7147@att.com>
2017-02-14Initial OpenECOMP policy/engine commitPamela Dragosh21-0/+1976
Change-Id: I7dbff37733b661643dd4d1caefa3d7dccc361b6e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>