summaryrefslogtreecommitdiffstats
path: root/models-pdp
AgeCommit message (Collapse)AuthorFilesLines
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>
2020-07-09Bump policy/models to 2.3.1-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2695 Change-Id: I64473cc81ae48942010472f15faac75c13cb0b7d Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-06-18Changes for Checkstyle 8.32liamfallon10-14/+1
Issue-ID: POLICY-2188 Change-Id: I6db16763c1d2d80ff934302081a8dfc16afa7d9a Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-05-19Bump models master to 2.3.0-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2514 Change-Id: I6a3d4e588a0ff0d15fccf49de66c51ea7d709b4b Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-05-19Bump models to 2.2.7-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2514 Change-Id: Ie482926a56a5250be5d78a97aa7c1c19311a292c Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-04-24Bump models patch 2.2.6-SNAPSHOTPamela Dragosh1-1/+1
Also point to parent, common snapshots Issue-ID: POLICY-2510 Change-Id: Iad79c341bcfb8cb6bb828ee71e199ba3bb9a838b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-14Bump models to 2.2.5-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2378 Change-Id: I5461bafd3c2d19f4f457da0816bba117a2d8b550 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-04-11Bump models patch 2.2.4-SNAPSHOTPamela Dragosh1-1/+1
Issue-ID: POLICY-2378 Change-Id: I51c6c57bdcc0299c25b5ee05f47c20f4542bc02d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-07Address sonar issues in modelsJim Hahn2-16/+15
Addressed the following sonar issues: - use RE2 instead of java.util Pattern for "+" and "*" - don't use deprecated methods - for Date(long), sonar appeared not to parse the argument's type correctly. Modified the code slightly to make sonar happy - duplicate blocks of code - either log or throw - missing assert in junit - for SDNR & VFC, eliminated threads, as they are unnecessary - duplicate code block in different branches - useless assignments - redeclaring abstract methods - cyclomatic complexity - used lombok in some cases (e.g., EqualsAndHashCode) - assert argument order - actually deleted ControlLoopTargetType, because it is not needed and sonar complains regardless of which order is used - add private constructor to utility classes - use StandardCharsets instead of literals Also: - added logback-test.xml to SO to eliminate the voluminous output from the junit test Issue-ID: POLICY-2305 Change-Id: I586c331781bedbd54a115a71847d04d293689445 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-03Models junits are failing locallyJim Hahn6-128/+129
Junits were failing in my local eclipse environment. Fixed the following: - more cases of "is marked @NonNull but is null" (I thought Liam had already fixed all of these, but I'm still seeing errors, so fixed some more) - comparing "Instant" values in event time stamps assumes that the times will be different, but may not be, if the JVM is fast enough. Modified the test to set the times of the new events to Instant+1, to ensure that they are different from the original Issue-ID: POLICY-2305 Change-Id: Ic05bc6a58b559ba589583ce887711ee01f76691c Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-25Bump models 2.2.3-SNAPSHOTPamela Dragosh1-1/+1
Released 2.2.2 Issue-ID: POLICY-2378 Change-Id: I829f0dfc88aeaf1f9b7efad91c983628f2a5d706 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>