summaryrefslogtreecommitdiffstats
path: root/ONAP-REST/src
AgeCommit message (Collapse)AuthorFilesLines
2019-06-19Improved tests performanceKrysiak Adam1-15/+34
* 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-08CLAMP Model policy creation supportuj426b10-369/+688
Change-Id: Ia69f061c078e4f6ed4b4d2cd12f03f58514f2123 Issue-ID: POLICY-1416 Signed-off-by: uj426b <uj426b@att.com>
2019-04-04Auditing User Operations Push or Delete Policies.uj426b2-0/+138
Change-Id: I39d5fc01e68e9d711c5dd09790dc34beb68783c3 Issue-ID: POLICY-1421 Signed-off-by: uj426b <uj426b@att.com>
2019-03-31Enhancement to use the common CryptoUtilspa834y1-4/+9
Change-Id: I06718526382b424eab991f39a7dac1b5cf4f1b74 Issue-ID: POLICY-1422 Signed-off-by: pa834y <pa834y@att.com>
2019-03-20use hibernate and breakup dbdao and papservletpa834y10-70/+91
Change-Id: Ifa655d56bda0ab4c748f188767122e7bd927155b Issue-ID: POLICY-1417 Signed-off-by: pa834y <pa834y@att.com>
2018-11-06Removed Objective From keyword check in parserMichael Mokry1-3/+1
Modified the Model parser code to allow "objective" as a field name in yaml. Change-Id: Ia3667ebc84a0bbdbbb3723bdcf0237a8f35313ee Issue-ID: POLICY-1244 Signed-off-by: Michael Mokry <michael.mokry@att.com> (cherry picked from commit 51842453b199a7c3a6785f4ab047612d50eab3b9)
2018-10-23Made change to validation to reduce complexityMichael Mokry1-99/+100
I had this change before Jorge merged the my previous commit for fixing optimization policy validation and was planning to amend but Jorge was quicker on the draw :) Thanks Pam for pointing this out.. a simple way to reduce complexity that I will use going forward. Change-Id: I3ab8ae36591c7c69629f36d84261f95c559d0f42 Issue-ID: POLICY-1205 Signed-off-by: Michael Mokry <michael.mokry@att.com>
2018-10-22Fixed Optimization Policy validationMichael Mokry1-152/+136
Modified the code to validate keys with empty array. Change-Id: I8046d051f5bf7407a6e890f1ba3eca6baf6ac9eb Issue-ID: POLICY-1205 Signed-off-by: Michael Mokry <michael.mokry@att.com>
2018-09-18Fixing issue with validation errorsMichael Mokry2-500/+736
I found this change internally that was committed to fix an issue with validating required fields when creating some Config MS policies. This should fix the CSIT tests and the pre-loaded policies for SDNC Naming policies Change-Id: I04406b8efbef173a6ab967a32cfbd86e17b7c59e Issue-ID: POLICY-983 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-09-11New min/max Guard PolicyMichael Mokry3-21/+70
Made changes to support Guard policy create/update and other policy manager functions including deletePolicy and pushPolicy. Includes changes for new Guard policy support using GUI and API (Rest and Java Client) Made changes to address Jim's comments Made changes to address Liam's comments Change-Id: I133fe1fd9287ea77ea41a2788de90c7642c36b6a Issue-ID: POLICY-1038 Signed-off-by: Mike Mokry <mm117s@att.com>
2018-09-10Resolved XACML Platform Sonar issuesrb71472-42/+33
Issue-ID: POLICY-902 Change-Id: If22627dfe7df993b5c725ddf3a66c10ebbaa73ca Signed-off-by: rb7147 <rb7147@att.com>
2018-09-06Merge "XACML Platform Enhancements"Jorge Hernandez1-52/+269
2018-09-05XACML Platform Enhancementsrb71471-52/+269
To Support Raw Policy Creation from GUI and API. GetDecision on combining algorithim with Policy Set. Issue-ID: POLICY-902 Change-Id: Ie3189f8ded2e03366bc7d65d15b95b88c89b0acd Signed-off-by: rb7147 <rb7147@att.com>
2018-08-30TOSCA model enhancementsWang,Frank(gw1218)1-369/+415
Add those features below to existing TOSCA Policy model: 1. Set default value to HTML element 2. Set description of a property as a tooltip 3. Support Boolean type 4. User defined object can be re-used by different properties in the same yaml file Issue-ID: POLICY-900 Change-Id: I337107828ce8130b9a68a2ba000ee719bbcb923e Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
2018-08-23Enhancement on DashboardWang,Frank(gw1218)1-57/+116
Enhancement on dashboard by including more info related to CRUD actions on policies and also providing an advanced search feature. Issue-ID: POLICY-1042 Change-Id: I987e0ca13824413f90299a366fb4464fca7de06a Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
2018-07-31Convert tabs to spaces basic refactoringKrishnajinka141-14589/+14589
Change tabs into spaces for checkstyle fixes in ONAP REST module of policy engine. These changes come in way for review. Hence doing them before refactoring is better. Issue-ID: POLICY-1014 Change-Id: I31a372ae527946927157bc23b576f3066679b0ae Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-26Merge "Fix nested stmts issue of Sonar"Jorge Hernandez1-1333/+1335
2018-07-26Fix nested stmts issue of SonarKrishnajinka1-1333/+1335
Policy rest util MSModeUtils have Sonar flagged issues about nesting more than 3 control stmts. Fix these. Also a minor change from prev commit about BrmsPush.java. Rework based on review Issue-ID: POLICY-1009 Change-Id: Ibd3cebcdebf9cf26233e810033793a5315b93272 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-26Merge "Fix issues reported by sonar"Liam Fallon2-334/+338
2018-07-25Fix issues reported by sonarKrishnajinka2-334/+338
Fix issues related to unused method variables, extract constants, not nest more than 3 control stmts, use try with res in policy engine project. Rework for comments Issue-ID: POLICY-1008 Change-Id: If0953de9e802110df14862707f3b525652cdf112 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-24Decision BlackList Guard Enhancementsrb71474-14/+132
While creating a decision Bl Guard Policy we are allowing to add Blacklist entries through file upload for bulk from GUI. Issue-ID: POLICY-901 Change-Id: I4031fd4a96937b9facc330cecf72777d701d4678 Signed-off-by: rb7147 <rb7147@att.com>
2018-06-08Fixed Model Content Validation for APIMichael Mokry1-2/+3
This fixes the validation of the content of the model to include validating parent nodes that are required based on the yaml. Prior to this we were only validating required child nodes and in some cases this was causing failures to create a policy. Change-Id: I2bbef4a671cfc7af8b55b3b3c6454b8cea3a88c9 Issue-ID: POLICY-799 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-05-25Sonar fixes for TOSCA ParserMichael Mokry1-6/+10
I fixed the sonar blocker in regards to nullPointerException and few other majors that I found and were easy to fix. I ran my local sonar and the blocker was removed after the changes. Change-Id: I7dcd7584fc955e1b520235a8e1376cf871761d21 Issue-ID: POLICY-776 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-05-23Fix Issues in TOSCA ParserWang,Frank(gw1218)3-10/+65
Fixed a bug and added some new validations in TOSCA Parser Issue-ID: POLICY-776 Change-Id: I2dc1b5b38cd137efc5c24ccf55b19de9f47c44da Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
2018-05-01Fix Test fail with variable length memory addressliamfallon1-1/+2
The unit test class PIPConfigurationTest.java has a test that checks a configuration string for length. However, the length of the "piptype" field in that string can vary, causing the test to intermittently fail. Field that passes: piptype=org.onap.policy.rest.jpa.PIPType@71b3bc45 Field that fails: piptype=org.onap.policy.rest.jpa.PIPType@a8c1f44 This fix removes the memory address from the "piptype" field, so that the configuration string will now always be 323 characters in length. Change-Id: Ib3640ec6f69ac7d691dcc989c44a7822bcc9b7f7 Issue-ID: POLICY-765 Signed-off-by: liamfallon <liam.fallon@ericsson.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-12Fix Wrong Data NamesWang,Frank(gw1218)1-2/+7
Fix wrong data names due to reponse changes Issue-ID: POLICY-740 Change-Id: I28db745f88ccecd67f3daa30adf70cc69645b496 Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
2018-04-03Add More Validations on TOSCA Model FormatWang,Frank(gw1218)1-3/+93
Add more validations on TOSCA MS model file name and content format Issue-ID: POLICY-721 Change-Id: Ic3dfe1887791be1e11bca5695866a77909334536 Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
2018-04-02Support CSIT tests for OOF PolicyMichael Mokry2-2/+150
I added an INSERT to the sql upgrade file and some sonar fixes and Junits Change-Id: I37139d5a8ad78d9d46ee01f81c2edd052672712e Issue-ID: POLICY-639 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-03-29JUnit additions for ONAP-RESTbobbymander4-0/+311
Issue-ID: POLICY-603 Change-Id: Ic8a20fc758927afb9200547d5919fcf70f15852b Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-26New Optimization PolicyMichael Mokry8-106/+1300
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-23JUnit additions for PAP-REST,RESTbobbymander3-0/+151
Issue-ID: POLICY-603 Change-Id: Id7d2c1a835d028e88337db67d55f139aa1764826 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-21JUnit additions for PDP-REST,REST,SDK-APPbobbymander1-5/+5
Issue-ID: POLICY-584 Change-Id: I3b16e2a957e67ecfe5c28d2afaa09771ae891216 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-21JUnit additions for PAP-REST,REST,Utilsbobbymander2-59/+160
Issue-ID: POLICY-600 Change-Id: I9a432f9e8af43184d116d5eeb2fbbac65472564e Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-13Fixed the SDK Junits and cleaned unused coderb71472-51/+0
Moved file tmp object from try resources block. due to not closing the stream the inputstream read by xacmlpolicyscanner ended with premature file error. Cleaned unused code. Issue-ID: POLICY-584 Change-Id: I92c4d000d94a144736d9ac46db384785a7512593 Signed-off-by: rb7147 <rb7147@att.com>
2018-03-01JUnit additions for PAP-REST,REST,XACMLbobbymander3-1/+29
Issue-ID: POLICY-603 Change-Id: I78c5e302c474613cbb22a80e0d931b4f47dd3b63 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-02-27JUnit additions for XACML,REST,POLICY-SDKbobbymander1-0/+32
Issue-ID: POLICY-584 Change-Id: I4bb91b18122c7f61bb71b1a9e39d51cd65af70bd Signed-off-by: bobbymander <bobby.mander@att.com>
2018-02-26JUnit additions for BRMS,PDP-REST,RESTbobbymander1-1/+7
Issue-ID: POLICY-598 Change-Id: I397ed925bdb43a4b2f7a94cc4692b6506f650ede Signed-off-by: bobbymander <bobby.mander@att.com>
2018-02-20Added Junits for Policy PAP-RESTrb71475-117/+649
Clenaed the unsued code. Cleaned the duplication of code and moved to ONAP-REST. Added Junits for PAP-REST Issue-ID: POLICY-600 Change-Id: I56e6e8f2f547def9eaf8624a9e0dd52dc05ad136 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-16Added Junis for Policy ONAP-RESTrb714735-687/+1227
Cleaned the unused constructors. Cleaned the unused code. Added Junits for all JPAS. Renamed the Junit class names on removing classes. Issue-ID: POLICY-603 Change-Id: I0709ccecd7a2f3ec49367ff85f5a6d273479493e Signed-off-by: rb7147 <rb7147@att.com>
2018-02-13Added Junits for Policy PAP-RESTrb714736-634/+1291
Cleaned the unnecessary constructors and methods in onap-rest. Added Junits for JPA Classes in ONAP-REST. Issue-ID: POLICY-338 Change-Id: I7e4f928342315475db96d89e9ad3adac5cb7eb00 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-12Added Junits for Policy PAP-RESTrb71472-11/+160
Resolved the sonar issues. Added JUnits for ONAP-PAP-REST and ONAP-REST Component. Issue-ID: POLICY-338 Change-Id: Ibec2613f4f61e9ed426583af17c2a9d5b8c8d85d Signed-off-by: rb7147 <rb7147@att.com>
2018-02-09Added Junits for ONAP-PAP-RESTrb71474-324/+1
Cleaned up unused imports. Cleaned up unused code. Added Junits for Dictionary controllers. Issue-ID: POLICY-338 Change-Id: If29b934e95fdaf60dcf82300a95a23ac3c980419 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-09Added JUNITS for ONAP-REST Componentrb71476-20/+762
Added JUnits for all Pojo classes. Issue-ID: POLICY-338 Change-Id: I0142903899f0793a8e147a01aeea83d467e49981 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-08MS Model Input ValidationMichael Mokry3-56/+151
- Provides validation for MS policy input content body that matches the GUI validations when create/update MS policy from API - Added changes to satisfy review comments and updated copywright headers for modified and new files Change-Id: I02bfa639bffb48520badd0e4fa34eb36418547ae Issue-ID: POLICY-377 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-02-07Fixed the sonar issues in ONAP-REST.Ankitkumar Patel8-36/+31
Minor Sonar issues are fixed in the ONAP_REST module. The copyright headers of the changed files are also updated. Issue-ID: POLICY-476 Change-Id: I920d8bcdd7b855e3e1660a002fb0e4e8d1674e44 Signed-off-by: Ankitkumar Patel <ankit@research.att.com>
2018-02-01Resolve LF license header issuePamela Dragosh4-44/+0
These were simple, we just forgot to remove the old license headers. Also needed to add a missed fix for a JUnit test. Not sure how this made it past verify. Issue-ID: POLICY-552 Change-Id: I30610ba4f8440ee16d0a5c372985f50429d60a34 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-02-01Included Policy GUI Enhancements and validationsrb71477-107/+511
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>
2018-01-31Fixed the Sonar technical debt.Ankitkumar Patel87-455/+385
Fixed the sonar technical dept primarily for the POLICY-REST module, and accordingly updated the other policy-engine modules for successful built. Issue-ID: POLICY-476 Change-Id: I0e9bd7209a7f9af247fa409a1682683082f92698 Signed-off-by: Ankitkumar Patel <ankit@research.att.com>
2018-01-29Addressing Technical Debt for ONAP-XACMLGao, Chenfei (cg287m)1-3/+3
Follow the list of acceptable fixes in POLICY-336 description Issue-ID: POLICY-475 Change-Id: I45cfb55c571d32601049beb8e5be8676216dcf5c Signed-off-by: Gao, Chenfei (cg287m) <cgao@research.att.com>