summaryrefslogtreecommitdiffstats
path: root/models-pdp
AgeCommit message (Collapse)AuthorFilesLines
2022-09-22Update snapshot and/or references of policy/models to latest snapshotsliamfallon1-1/+1
policy/models updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4343 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I0192824c0bf84e444690020aa33b69467a162052
2022-05-03Set snapshot and/or references of policy/models for new releaseliamfallon1-1/+1
policy/models updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4073 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I0101973870c989f148e76c52c81fda410451d441 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-04-27Update snapshot and/or references of policy/models to latest snapshotsliamfallon1-1/+1
policy/models updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4089 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I5851243a29a820aeab21525f3396752340d41a49
2022-04-12Update snapshot and/or references of policy/models to latest snapshotsliamfallon1-1/+1
policy/models updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4089 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I9017a7f0c84d9981f49baab59744e8f273aa91df
2022-03-10Update snapshot and/or references of policy/models to latest snapshotsliamfallon1-1/+1
policy/models updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-3982 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Ia409ca1501edff6e1014d06a7fdee805befc5e17
2022-02-16Fix issue with GeneratedValue in PfGeneratedIdKeya.sreekumar4-484/+61
PfGeneratedIdKey class (which is used as a composite key in JpaPolicyAudit and JpaPdpStatistics) uses GeneratedValue in a wrong way and not according to the specification. This review fixes it. PfGeneratedIdKey class is removed, and the generatedId is directly specified in the JpaPolicyAudit and JpaPdpStatistics classes. Note: These classes are only used by PAP, so the related methods for db interaction is removed as PAP directly talks to DB using spring repository layer. Also the only end result this change brings is that the 'generatedId' alone will be used as the primary key instead of 'generatedId, name and version' together. Corresponding changes in DB Migrator: https://gerrit.onap.org/r/c/policy/docker/+/127139 PAP: https://gerrit.onap.org/r/c/policy/pap/+/127130 Change-Id: Ib4ea8b60ffe5c2480746569c0354bf474a6b7006 Issue-ID: POLICY-3897 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2022-01-11Fix issues in existing entity classesa.sreekumar1-4/+3
Issues identified in the entity classes are fixed in this review. Some fixes doesn't affect the table structure at all. Tables actually affected by some of these fixes are not really used today, and doesn't contain any data. A separate review is raised for the db-migrator changes. Change-Id: I0efdf2c5f17e12225f1b443b5fe8e27c578229f7 Issue-ID: POLICY-3871 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-11-26Update snapshot of policy/models to 2.6.1-SNAPSHOTliamfallon1-1/+1
*** This commit is generated by a PF release script *** This commit updates the snapshot of the repo to the next patch version. Issue-ID: POLICY-3827 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I7cdc8887455227b8315598add584593188332729
2021-10-14Bump policy/models to Jakarta 2.6.0-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3696 Change-Id: I66ec28e3a51a8f388b56ccbf211f71698cf5e8aa Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-10-13Bump policy/models to 2.5.2-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3696 Change-Id: Idbdbbe56e5daac2ce8ce780d2c8ce5ff54b8e006 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-09-15Bump policy-models to 2.5.1-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3587 Change-Id: Idca2237777c1f7bda3fab89934dc97b9360fbc3d Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-08-20Fix sonars in modelsJim Hahn4-1/+9
Fixed: - use "var" - change constructor to protected - add equals() to subclasses Issue-ID: POLICY-3094 Change-Id: Ia62716b1a740b4475e54e496330f50aa7fb404d7 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-18Add PDP-TOPIC-CHECK messageJim Hahn5-6/+119
Added a new PdpMessage subclass that a PDP can use to verify its ability to send/receive to/from the PDP-PAP topic before it sends its first registration message. Issue-ID: POLICY-3531 Change-Id: Ied61caa805e93e25732385bf91272b4fc248fd69 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-28Add junit test for empty statistics filterJim Hahn2-1/+13
Also removed the version field from the filter, as it is not applicable to the PDP instance name. Issue-ID: POLICY-3511 Change-Id: I17e8d2d6646a27736a827b9e9e17881d6b0a3795 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-23Remove unused statistics methodsJim Hahn2-67/+0
The getPdpStatistics method should be removed as they're functionality has been subsumed by getFilteredPdpStatistics. Issue-ID: POLICY-3511 Change-Id: I98da98ac483705bea46ebaa0619257195be6b518 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-23Limit the number of statistics records returnedJim Hahn3-82/+158
Added limit of MAX records (100). Also, if unspecified, or negative, it defaults to MAX records. Issue-ID: POLICY-3511 Change-Id: I0170951cd79818af5944adf5d29480bad4de815b Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-12Remove unused DAO statistics methodsJim Hahn2-71/+0
The PDP statistics provider had several filter methods, at least one of which has now been subsumed by another and is no longer being used. Issue-ID: POLICY-3405 Change-Id: If603eaf3df36fd4e6e3555376bf1b95144ec8eb1 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-07Update pdp statistics to count deploy/undeploy separately.adheli.tavares4-11/+46
Issue-ID: POLICY-3383 Change-Id: I41e2668bdebd732149db0ccbe160b67b9952a8d9 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-06-28Update policy-models for checkstyle 8.43liamfallon1-6/+6
Issue-ID: POLICY-3209 Change-Id: Ic45f889ab4d0ed24f6c1fc1aaece0601636e7a10 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-06-23Add "source" to PAP-PDP messagesJim Hahn4-4/+18
Added a "source" field to the PdpStateChange and PdpUpdate messages so that PAP can record a unique name in the message, for logging purposes. In a separate review, planning to add a method in policy-common for creating the unique name. Once that has been created, it will be used by PAP, to populate the "source" field, and all PDPs, to populate the "name" field in the PdpStatus messages. Issue-ID: POLICY-3409 Change-Id: I86c97702abe62a5672720330df50b7b106187661 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-22Add timestamp to Pdp recordsJim Hahn7-42/+85
To support the case where multiple PAPs are running, added a timestamp to the PDP records so the PAPs can all be kept in sync as far as when a PDP was last responsive. Issue-ID: POLICY-2898 Change-Id: Ia7e0fd17363ff5827564cbc1537e516156b7f53a Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-21Fix new checkstyle issues in modelsJim Hahn2-2/+2
The new version of checkstyle identified new issues. Fixed those. Issue-ID: POLICY-3094 Change-Id: I85314bc0249cba0020a0aefbc250851a2b646dd9 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-21Use lombok for errors pap, pdp, sim-dmaap, sim-pdpJim Hahn2-14/+4
Issue-ID: POLICY-3396 Change-Id: Ib2c9bc5dc199e15ae9ca077031c0f2cfbc5b6a81 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-14Fix sonars in policy-modelsJim Hahn5-13/+178
Fixed: - too many parameters in method call Fixed it by introducing PfFilterParameters. However, classes having the Builder annotation are not easily subclassed, so introduced an interface, too. Issue-ID: POLICY-3094 Change-Id: Ida99522a542b1296b367c55b7e8f8e83783c2e4f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-27Remove policies field from PdpUpdate messagewaynedunican2-15/+14
Issue-ID: POLICY-3323 Change-Id: I14dafe4a20f95e2ebe4279e5b6ae141e2ee4fc48 Signed-off-by: waynedunican <wayne.dunican@est.tech> Signed-off-by: WayneDunican <wayne.dunican@est.tech>
2021-05-10Fix sonars in policy modelsJim Hahn13-43/+39
Fixed: - use "var" Issue-ID: POLICY-3094 Change-Id: Id5ea7ab049c2018744afa75a55d44e47f216d5bc Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-29Remove GroupValidationResultJim Hahn3-18/+10
Removed GroupValidationResult, replacing it with BeanValidationResult. Modified the ParameterGroup subclasses to use BeanValidator, adding annotations where needed to trigger the validations that had been automatically performed by GroupValidationResult. Issue-ID: POLICY-2059 Change-Id: I245e4a647fcbb718faa63a7543f9f81c85da958c Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-22Add a new key class which uses @GeneratedValue to base classesktimoney5-34/+77
This will provide an alternative unique key. It will be used in place of PfTimestampKey in the PdpStatistics table. We make use of the @GeneratedValue annotation to provide this feature. Added DummyGeneratedIdEntity and unit tests Added PfFilterFactory class Added new filter classes Issue-ID: POLICY-3189 Change-Id: I097eab318d2cb958e1157e35825fd6d35d429a25 Signed-off-by: ktimoney <kevin.timoney@est.tech>
2021-04-08Use distinct names in DB junitsJim Hahn2-3/+3
Junits for models often use the same memory DB name which may leave garbage in the DB from one test to the next. Modified the code to use distinct names for each XxxTest class. Issue-ID: POLICY-3171 Change-Id: I2a4a0b4949d532d6949f5d39396288c54d03688b Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-19Fix write failure on PDP statisticsliamfallon3-7/+16
Due to the precision of time stamps being saved to the nearest second, a millisecond precision timestamp was being compared to a second precision timestamp, causing the write to fail. This change fixes that. A unit test is also added to test for this on the provider. In addition, a USE-MARIADB flag is being introduced, which allows unit tests to be run against a locally installed MariaDB instance so that the unit tests can be verified against MariaDB locally rather than H2, the default in Gerrit. Issue-ID: POLICY-3146 Change-Id: I878f160956e89506743dc074679ee81ac1c48216 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-03-16Fix Sonar Issues in models-pdplapentafd4-14/+127
Tests refactoring to reduce number of assertions Issue-ID: POLICY-3094 Change-Id: I23369c341c43df71b84392501d33739453f7c81f Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-03-10Bump version to 2.5.0 in modelsJim Hahn1-1/+1
Issue-ID: POLICY-3105 Change-Id: I01fe35f16609f9b8d98fb2083c8b18fc7ce3ccf3 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-09Bump models to 2.4.2-SNAPSHOTJim Hahn1-1/+1
Issue-ID: POLICY-3127 Change-Id: Ie37871c54dc5e7eab0ee7d553c6b38ea0e720a29 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-23Bump models to 2.4.1-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-3088 Change-Id: I7f6cc0ab5299200315c78f6e6c79c79349d2608c Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-02-19Refactor timestamp property in policy models to use Instantrameshiyer277-27/+27
Updated JPA classes to use java.sql.TImestamp rather than Instant. Issue-ID: POLICY-3069 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: If5b874ec96931d4b8dd142d46a9980e83a4708fc
2021-02-12Alter PDP_UPDATE message to store lists of delpoyed/undeployed policieswaynedunican1-0/+12
Update the PdpUpdate class to store lists of deployed and undeployed policies while maintaining it's current original full list of policies. This will ensure that the changes to send policy updates only in the PDP_UPDATE message will not effect the PDPs they can support updated policies. Issue-ID: POLICY-2112 Change-Id: I1a6e9d426ed3a8a3b4469a8b72ef57441e50545e Signed-off-by: waynedunican <wayne.dunican@est.tech>
2021-01-19Remove "Jpa" from table nameJim Hahn1-1/+1
The DB table names of the various JpaXxx classes do not include the "Jpa" prefix. Removed it from the new Jpa class. Issue-ID: POLICY-2648 Change-Id: I7f56502d75db05631749780138e989009eb93c83 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-12Add more methods to query deployment statusJim Hahn2-2/+90
Issue-ID: POLICY-2648 Change-Id: I398fa1332eb5a862dabd97ed409ef6413bb0c202 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-08Add PDP-Policy deployment table to DBJim Hahn6-2/+695
Added a table to record the PDP policy deployment status, which is required for making PAP stateless. Issue-ID: POLICY-2648 Change-Id: Ibe40ce00aca7a600051edcac49e55651c1c0164f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-06Use annotations on parameterized typesJim Hahn3-22/+10
Updated the code to place validation annotations directly on the annotated types instead of using the @Items and @Entries annotations. Also added/updated junits for validation code. Issue-ID: POLICY-2648 Change-Id: Ia535da07a38cec77a74c5c3215b5ae784d7a4e1a Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-06Changed identifiers to concept identifiersliamfallon12-114/+111
The policy models tosca classes ToscaPolicyIdentifier and ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA concept, not just TOSCA policies so they are renamed to ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion respectively. The class ToscaPolicyTypeIdentifier is redundant and is replaced by ToscaConceptIdentifier. Issue-ID: POLICY-2900 Change-Id: Id0a37c42ea4e74f07b47e1694c4f8291c35879c9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-12-21Use annotations to do validationJim Hahn5-57/+49
Modified models to use annotations instead of function calls for most field validations. Created a few new validation annotations for use within models. Per review comments: - renamed Key to VerifyKey - enhanced VerifyKey to imply "@Valid", unless disabled Issue-ID: POLICY-2648 Change-Id: I2b53f218b0a2ab1ed1f5e278816a3509f1408972 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-17Use ValidationResult for models v2.0Jim Hahn12-292/+151
Policy models uses PfValidationXxx classes which are totally unrelated to ValidationResult in policy common. This precludes the use of various utility methods and annotations for doing validation. Modified policy models to use ValidationResult instead. This approach uses function calls, though a future approach could make use of annotations instead. Issue-ID: POLICY-2648 Change-Id: I9760f1dc46902ab6bef7f440f3caf5e951660a5d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-27Bump models master to 2.4.0 SNAPSHOTJim Hahn1-1/+1
Bumping minor version now that guilin branch has been created. Issue-ID: POLICY-2875 Change-Id: Iec7868062610a3acca6f883f999615ccc109f850 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-19Bump models to 2.3.6 snapshotJim Hahn1-1/+1
Issue-ID: POLICY-2869 Change-Id: I98223c20d6d1d6d9bf5bd958d9d3ed4aacdf17e6 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-09Bump models to 2.3.5Jim Hahn1-1/+1
Issue-ID: POLICY-2863 Change-Id: Iba0dfe78576a2ad1551c165e3b9f53fa3c55259a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-09Bump models to 2.3.4 snapshotJim Hahn1-1/+1
Issue-ID: POLICY-2863 Change-Id: I9d764a0cd695aa95a5880fd20b594e465d14c658 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-07Bump models to 2.3.3Jim Hahn1-1/+1
Issue-ID: POLICY-2839 Change-Id: Ifd7f45854904545b4f2973e1429cb791ac00b600 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-08Bump models to 2.3.2Jim Hahn1-1/+1
Issue-ID: POLICY-2789 Change-Id: I19b397ecb165bea30059142d9d4c5357ceba9825 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-21Fix some sonars in policy-modelsJim Hahn6-14/+17
Fixed the following sonar issues in some of the project directories: - use assertNull, assertEquals, etc. - swap assertEquals arguments - extract a constant - don't invoke toString() in logger calls - TODOs - generic types Issue-ID: POLICY-2714 Change-Id: Id8803f9bf617ea9fc173a67b8606600709b55bdc Signed-off-by: Jim Hahn <jrh3@att.com>