aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/main/resources
AgeCommit message (Collapse)AuthorFilesLines
2023-10-11Remove AAF references from papadheli.tavares1-4/+3
Issue-ID: POLICY-4592 Change-Id: Id0d954f81e48d1464d71b37d853e74fc90b6fbeb Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-09-22Java 17 / Spring 6 / Spring Boot 3 Upgradeadheli.tavares1-2/+3
Issue-ID: POLICY-4671 Change-Id: I664e5f62b1ad23619888af98589c04875b07f4d3 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-08-08Removed db-based statistics featureSuresh Charan2-731/+2
Statistics code cleanup Issue-ID: POLICY-4109 Change-Id: I543080e1ed3ce9c4f16d01df8f13219cba0a9c8c Signed-off-by: Suresh Charan <suresh.charan@bell.ca>
2023-01-30Adding PAP contract testslapentafd1-1/+1
Adding Contract tests, verifying the stubbed implementation. Fixing name in application-stub.yaml Issue-ID: POLICY-4534 Change-Id: I03d8b37ba2f57aa03ee814924b4e52dd0c643772 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2023-01-25Server Stubs PAPlapentafd1-0/+3
Added "stub" profile with simple endpoint implementation Issue-ID: POLICY-4143 Change-Id: I8ad911f314e1d1428d05aa419f1322616d8ef835 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2023-01-17Use generated PAP interface for Swaggerlapentafd2-131/+183
This commit removes the Swagger V2 annotations on the Rest Controllers in policy-pap. The OpeApi annotations (Swagger v3 annotations) are on a generated Java Interface. The code is changed so that the controller implements that interface. There are minimal code changes to the controller and the order of the parameters is switched in some cases. Issue-ID: POLICY-4404 Change-Id: I060709806a8e5bc04d9873c8d212a5c9fe13c4d4 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2022-12-12SLAs for async methodsadheli.tavares1-0/+1
- undeploy policy timing - deploy policy timing - unit tests for actuator endpoints Issue-ID: POLICY-4469 Change-Id: I3298888e59824347b8d2a57fb531c10f2f4ca125 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2022-11-22Merge "Add OpenAPI Swagger 3 spec and API generation"Liam Fallon1-0/+3712
2022-11-17Add OpenAPI Swagger 3 spec and API generationliamfallon1-0/+3712
This commit adds the Policy/API OpenAPI (Swagger) document as a source document under source control. This OpenAPI document was generated from the existing SpringFox annotations in the source code, was uploaded to the online Swagger editor and was converted into OpenAPI 3.0 format. It was then manually edited to correct the return types and to match the input and putput types to our Java classes. The pom.xml is also amended to generate the API interface source doe in the target/generated-sources directory. The generated code does NOT replace the existing API code as yet. Issue-ID: POLICY-4431 Change-Id: Iee1cc6a122deffcd05728e8f34172f8d423ebcef Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-11-17Topic names in PAP should be configurable from application.yamladheli.tavares1-5/+9
- for using Kafka instead of dmaap, topics names need to be lowercase - fix for unit/integration tests using default names and changed names for topics and group - fix for sonar lints found along the way Issue-ID: POLICY-4455 Change-Id: I89e9e6f7dbb07462f1ae497755965cb5a3f223a3 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2022-03-01Fix swagger and improve exception handlinga.sreekumar1-0/+1
1) Swagger was getting generated in a different format due to a serialization isue. It is fixed. 2) Improved exception handling by taking care of any exceptions that could occur in and around database operations. 3) AAF enabling/disabling was done using spring profiles. This is changed to using parameters, as it is more easier to configure in an OOM helm chart deployment Change-Id: If1bee01379ba5c4efac29822662896d8aa883fc8 Issue-ID: POLICY-3975 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2022-02-17Use classes from policy/commonRam Krishna Verma1-1/+1
Use YamlHttpMessageConverter from policy/common. Use CustomImplicitNamingStrategy from policy/common. Fix few sonar issues. Issue-ID: POLICY-3931 Change-Id: I4720761cbf8da464ec57541f9b19f8d124503e17 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2022-02-10Move PAP database provider to spring boot defaulta.sreekumar2-76/+1
This review makes PAP talk to DB directly using the spring repositories instead of going to policy-models-provider. The models-provider methods that were just used by PAP (and not used anymore) will be removed in a different review. Also a bug identified with the usage of GeneratedValue in PfGeneratedIdKey (which is just used by PAP in statistics & audit) will also be fixed in a separate review as part of POLICY-3897. CSIT changes: https://gerrit.onap.org/r/c/policy/docker/+/127033 WIP OOM review: https://gerrit.onap.org/r/c/oom/+/127035 Change-Id: Idb13ba7eb2767cc718672b582a6518fcfc95320f Issue-ID: POLICY-3867 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2022-01-28Create spring repository layer for PAPa.sreekumar1-0/+14
This review adds the spring repository and service layers to PAP. Once this is merged, the next work will be to actually use these spring boot based services to talk to the db directly, and not using policy-models-provider in PAP. Change-Id: Ib086b8b405020cb452e51d6359dd1a69d0000f74 Issue-ID: POLICY-3869 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2022-01-27Remove references to MariaDB from resource fileswaynedunican2-3/+3
Issue-ID: POLICY-2086 Change-Id: I891feb05d2e964ae8d4454d30672ffc77c1da555 Signed-off-by: Wayne Dunican <wayne.dunican@est.tech>
2021-12-14Migrate pap startup & controllers to spring boota.sreekumar1-0/+82
This commit migrates pap config, startup and controllers to spring boot. Change-Id: Icf91d728160a23db614dfba6b40ddccd2f6163a5 Issue-ID: POLICY-3754 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-09-06Decrease eclipselink verbosity to warningjhh1-1/+1
Issue-ID: POLICY-3611 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ia7e2ccba793bf7e0ee686c874b395ff728d68af3
2021-08-17Update Policy Components not to create tablesktimoney1-3/+3
Issue-ID: POLICY-3488 Change-Id: I945a19eb6bd7b943adaedc1ea836ec6030c9b001 Signed-off-by: ktimoney <kevin.timoney@est.tech>
2021-06-25PolicyAudit creation when deploy/undeploy triggered.adheli.tavares1-1/+2
Creates audits for policy when: - deploy - undeploy - undeploy when failure Issue-ID: POLICY-2899 Change-Id: Ib1a7cc4f826b5dceefcd5c7ba5250647f2cc0121 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-01-15Make PAP statelessJim Hahn1-0/+2
Removed old code that tracked the status using a cache. Modified the code to use the status found in the DB instead. Issue-ID: POLICY-2648 Change-Id: I4f1f5201eff7b3352631f50d67c40349ac7f2014 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-17Update persistence.xml with new TOSCA classesliamfallon1-6/+21
Issue-ID: POLICY-2900 Change-Id: I986074f69bef24ca894adc38eaf8b3ca4b4dc5a2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-10-06Remove legacy operational apex policy type from papRam Krishna Verma1-4/+0
The legacy operational policy type for apex has been removed in Guilin release. Removing it fron pdpGroup config in PAP. Issue-ID: POLICY-2857 Change-Id: Iddf2e6b6301dbab3addcbff4c806142f4cf8e6c6 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-08-24Add Match Policy Type to default groupPamela Dragosh1-0/+4
Default group will now have match Policy Type. Issue-ID: POLICY-2596 Change-Id: I53c07b417097dc8250191e6ee8d043488b02562d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-08-17Add new guard filter to defaultGroupPamela Dragosh1-0/+4
New guard filter should be advertised by pap. Issue-ID: POLICY-2590 Change-Id: I7652057d4d759e60c358ee9fad84a8c6a9af6898 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-08-06Remove legacy operational policy from papRam Krishna Verma1-4/+0
Issue-ID: POLICY-2763 Change-Id: I9701a80cca10b9fd49d8060ecb6601097ca5824d Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-04-28point to renamed sdnc naming policy in db configjhh1-1/+1
Issue-ID: POLICY-2525 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iea676911eaa7222949959ed0a7074b1260d8ce87
2020-04-07Preload sdnc naming policy in xacml-pdpRam Krishna Verma1-1/+6
Adding sdnc naming policy to xacml subgroup in defaultGroup so that the policy can be auto deployed to the xacml-pdp after registration with PAP. Issue-ID: POLICY-2476 Change-Id: I355e7b5e56b9a6a7f0fda96a7b2dfd640b7bd930 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-04-06Add 'naming' policy type to defaultGroup tablejhh1-0/+4
Issue-ID: POLICY-2472 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I1b57c9de5f5d2c4f374283487e56393c492110bd
2020-04-01Add optimization.* to xacml subgroupPamela Dragosh1-0/+4
Fix to ensure we support Policy Types for optimization. Issue-ID: POLICY-2460 Change-Id: Ibfd6b7191fb441eb31d8f697ff4f320e2305264d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-12update policy types for droolsjhh1-1/+9
Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I92d0fa515893ddf4182666201367e07e5408ef7a
2020-03-06Modify pap db for new guardPamela Dragosh1-3/+3
New guard policy type Issue-ID: POLICY-2243 Change-Id: Ide419148dda229537f7a736f37299edb891248ba Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-02-12Update PAP for policy DB response changesliamfallon1-1/+6
Policy models now throws an exception with a 404 code when policies are not found. This change amends PAP to cope with this change. Note: This change should be merged directly after the following policy-models patch: https://gerrit.onap.org/r/c/policy/models/+/101544 Issue-ID: POLICY-1402 Change-Id: Id38af4b2ad65797592c077e276861b962bc53ea2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-03Adding Tosca compliant operational policy type to defaultGroup for apex-pdpa.sreekumar1-0/+4
Change-Id: I4b8b66657e84fe1d86ffd7972ff5c183f6ea0f74 Issue-ID: POLICY-2147 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-01-09statistics rest api updatening.xi1-0/+1
Issue-ID: POLICY-1629 Signed-off-by: ning.xi <ning.xi@est.tech> Change-Id: I104fc448d27a282c01e7f54db300f918374b8d07
2020-01-09Changes related to persisiting data type of policy in dba.sreekumar1-4/+5
Change-Id: I09b373a511eaa20603d4d2de71a2a5a6bf652b3b Issue-ID: POLICY-2315 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-12-08Change optimization types due to refactoringPamela Dragosh1-10/+10
Companion review to https://gerrit.onap.org/r/c/policy/models/+/99288 which changes the types for optimization. Issue-ID: POLICY-2066 Change-Id: I754a52a3971f0ad4d4e4118213a13123c44086cf Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-12-06Adding native policy types to defaultGroupramverma1-0/+12
Adding the native policy types for drools, apex & xacml to the supportedPolicyTypes of the individual subGroups in the defaultGroup. So that native policies can be deployed in the pdps belonging to defaultGroup. Issue-ID: POLICY-2279 Change-Id: I8707dfd3a9af055e02d29752386160631d022d08 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-11-14Preload wildcard supported type in PAPJim Hahn1-13/+1
Removed the specific monitoring policy types and added the wild-card flavor to the list of policy types to be pre-loaded into the Default PDP Group. Issue-ID: POLICY-2224 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I108fe72c28bd20495e72bdaa517f7c7f80de3071
2019-05-17Add son handler to xacml pdp groupPamela Dragosh1-0/+4
Need this for the 5G OOF PCI Use Case. Issue-ID: POLICY-1776 Change-Id: I86758174840d376d6003f5200f0deeb72c3e01d9 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-02Changing the PAP initial db dataramverma1-60/+28
Changing PAP initial db data to bring all the xacml supportedPolicyTypes in one PdpGroup. Change-Id: I9a0788c788bab470109b0f09fb631e7fbb90042e Issue-ID: POLICY-1723 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-04-30Adding algorithm for Pdp registrationramverma1-3/+75
1) Adding algorithm for improving Pdp registration. The flow is: When a new Pdp comes for registration, PAP will shortlist a list of PdpGroups based on the supportedPolicyTypes reported by PdpStatus message and the supportedPolicyTypes in the PdpSubGroup. Then PAP will find the PdpGroup which needs the Pdp most in two ways: 1) If there is a subgroup with no Pdp's then that takes the priority. 2) Otherwise the Pdp is allocated to the PdpGroup with highest difference value of desiredInstanceCount - currentInstanceCount. 2) Changing the preconfigured TosaPolicyType for apex to avoid interference with legacy operational policies of drools. Change-Id: I77584c3c030bc27903c11689acaca33148e27e3c Issue-ID: POLICY-1630 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-04-16Add missing fields to initial subgroupsJim Hahn1-4/+8
Some required fields were missing from the subgroups in the inital DB. Also added code to validate what is initially loaded into the DB. Change-Id: Iffa56a5a0dee833691d1bb7859b075c3b4d86595 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-11Adding code for db config & initial group creationramverma2-4/+64
1) Adding code for initial PdpGroup/Subgroup creation. 2) Adding db configuration 3) Updated code as per change in policy/models Change-Id: If37870925001b333e0537e364eecb266c351cf5a Issue-ID: POLICY-1635 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-04-10Adding final dmaap & db configurationsramverma1-0/+46
Change-Id: I547f8a520d84d3593f90256fa91fc964c1d1e83c Issue-ID: POLICY-1443 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-01-31Create basic structure of pap componentramverma1-0/+4
1) Creating the basic code structure of pap component which includes main sub-module having Main, PapActivator, PapCommandLineArguments, PapParameterGroup & PapParameterHandler. Along with few exception classes. Basicalliy the structure follows the pattern developed in policy/distribution component. 2) Created the related unit test cases and required test resources. Change-Id: I67c82f9d072e6c8a306cb983accb693da70e58a2 Issue-ID: POLICY-1476 Signed-off-by: ramverma <ram.krishna.verma@est.tech>