summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-05-28Handling Policy deploy/undeploy audit modelsadheli.tavares10-8/+842
Added a new Entity to store information when a Pdp Policy is deployed or undeployed and its create/retrieve methods. Change-Id: I35b3608c878bbfbbee0a99a124d100a48fe08131 Issue-ID: POLICY-2899 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-05-27Fix more sonars in modelsJim Hahn2-2/+9
Fixed sonars: - SQL injection - use re2j instead of regex Issue-ID: POLICY-3094 Change-Id: I553bd6aa5832d71a5ac33320e2d0d022f9a00e98 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-24Adjust indexes for Op History tableJim Hahn1-4/+4
Reordered one index to put requestId first, as that should significantly reduce the number of index entries to be examined. Added endtime to another index, which should also reduce the number of index entries to be examined for look-ups by time. Issue-ID: POLICY-2874 Change-Id: I29c10fb9cabb22b3520ed1b14d7fe3fd9db40a15 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-12Fix sonars in policy modelsJim Hahn14-79/+71
Fixed: - a few other "var" cases - use re2j instead of java.util.regex - use correct class for constants - remove unused constants Issue-ID: POLICY-3094 Change-Id: Ifcb2b0623e8df0527f0a279e666d062422978ded Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-11Merge "Fix sonars in policy models"Liam Fallon38-99/+95
2021-05-11Merge "Fix sonars in policy-models impls & simulators"Liam Fallon36-160/+153
2021-05-10Fix sonars in policy modelsJim Hahn38-99/+95
Fixed: - use "var" Issue-ID: POLICY-3094 Change-Id: Id5ea7ab049c2018744afa75a55d44e47f216d5bc Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-10Fix sonars in policy-models impls & simulatorsJim Hahn36-160/+153
Fixed: - use "var" Issue-ID: POLICY-3094 Change-Id: I65da54cae5a58966f21f981c6cea1259bfdf4239 Signed-off-by: Jim Hahn <jrh3@att.com> simulators Change-Id: I1144568485e62e0c72194caaf21ebf1ba88a6fef Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-07Fix sonars in policy-models actorsJim Hahn29-127/+116
Fixed: - use "var" - don't throw generic Exception Issue-ID: POLICY-3094 Change-Id: I020addb9511fd665b5fed48e7d40719e27039224 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-03Merge "Remove GroupValidationResult"Jim Hahn23-161/+96
2021-04-29Remove GroupValidationResultJim Hahn23-161/+96
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-27Add correct filter type prefix to queryktimoney7-1/+217
Added unit tests Issue-ID: POLICY-3247 Change-Id: I27474948619b7256a1e504611531eecac15c27c1 Signed-off-by: ktimoney <kevin.timoney@est.tech>
2021-04-26Merge "Add a new key class which uses @GeneratedValue to base classes"Pamela Dragosh17-115/+1031
2021-04-22Add a new key class which uses @GeneratedValue to base classesktimoney17-115/+1031
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-19Refactor CommandLineArguments classesadheli.tavares7-433/+61
All CMD Args simulator classes to extend from CMD class on Common. Fix all unit tests accordingly. Issue-ID: POLICY-3129 Change-Id: If69e432679772df15b06ce7e316c7c876b69773d Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-04-12Close DB in junitsJim Hahn4-42/+70
Modified some of the junits to close the DB. In addition, one of the junits was apparently dependent on a previous test method adding records to the DB, thus the test methods were actually order dependent, even though no annotations were used to enforce the order. Modified that method to insert the data, itself, so the test methods are no longer order dependent. Issue-ID: POLICY-3171 Change-Id: I778c12796340f2a665b4ba00588c823c925c078c Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-08Use distinct names in DB junitsJim Hahn13-21/+30
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-26Merge "Fix Sonar Issues models-tosca-simple"Jim Hahn9-16/+203
2021-03-26Fix Sonar Issues models-tosca-simplelapentafd9-16/+203
Tests refactoring to reduce number of assertions Issue-ID: POLICY-3094 Change-Id: I8a9a02100e5d103f574cf2cb89d2e924d0f56507 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-03-24Merge "Fix sonar issues for tests in policy-models"Jim Hahn5-116/+141
2021-03-22Merge "Delete keystores from models"Ram Krishna Verma6-5/+10
2021-03-19Fix write failure on PDP statisticsliamfallon16-34/+169
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-19Delete keystores from modelsJim Hahn6-5/+10
The Keystores are no longer needed in the tarballs, as they are supplied externally by the CSITs and Helm charts. Deleted those files. Also modified the junits to use utils-test to generate keystores at runtime, thus deleted the junit keystore file, too. Issue-ID: POLICY-3143 Change-Id: Idd24b735a908476765d40bdcb5c741257edc7bb6 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-19Fix sonar issues for tests in policy-modelslapentafd5-116/+141
Tests refactoring to reduce number of assertions Issue-ID: POLICY-3094 Change-Id: I445462f0ec5d49474b10c1940c7fa12e687636de Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-03-18Merge "Fix Sonar Issues in models-pdp"Pamela Dragosh4-14/+127
2021-03-16Update policy-keystore with newer certificatesjhh4-0/+0
Issue-ID: POLICY-3139 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id4a882b40ef142d0414518c5d5ab90367f0bbb73 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
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-15Merge "Fix Sonar Issues on policy-models-tosca"Jim Hahn8-35/+93
2021-03-15Fix Sonar Issues on policy-models-toscalapentafd8-35/+93
Tests refactoring to reduce number of assertions Removed lines 167-169 in PfKeyImplTest Issue-ID: POLICY-3094 Change-Id: I94ef11068811c81108b0fbf3e5b878d02ab25306 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-03-12Remove more unnecessary plugins from modelsJim Hahn3-130/+9
Issue-ID: POLICY-3126 Change-Id: If93ce1a3412cd7342a78e478ea2684ff9bf6dd97 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-12Address plugin-not-found issuesJim Hahn1-32/+1
Removed references to archetype-packaging and lifecycle-mapping, where unnecessary due to pom inheritance. Issue-ID: POLICY-3126 Change-Id: Ia1124da66239b57d6a05cdbdcce7866a38f59120 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-10Bump version to 2.5.0 in modelsJim Hahn44-47/+47
Issue-ID: POLICY-3105 Change-Id: I01fe35f16609f9b8d98fb2083c8b18fc7ce3ccf3 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-10Merge "Add support for localName based filtering in PfReferenceTimestamp key."Jim Hahn1-3/+8
2021-03-09Bump models to 2.4.2-SNAPSHOTJim Hahn44-44/+44
Issue-ID: POLICY-3127 Change-Id: Ie37871c54dc5e7eab0ee7d553c6b38ea0e720a29 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-09Release models 2.4.1 artifactsJim Hahn1-0/+4
Issue-ID: POLICY-3127 Change-Id: I2350bed3a5679ac5edb87544c732c4c094b7c028 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-09Add support for localName based filtering in PfReferenceTimestamp key.rameshiyer271-3/+8
Issue : Currently we have a requirement to filter control loop statistics based on the UUID of the element which is "localName" of the PfREferenceTimestamp key. Adding UUID as part of filterMap in getFiltered() method which also requires this minor change in buildFilter. Issue-ID: POLICY-3051 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: Idb9f4fc47c439f84bf8fc784bd9e228a2e05d8e9
2021-03-08Merge "Use Date instead of Timestamp"Jim Hahn4-29/+37
2021-03-08Use Date instead of TimestampJim Hahn4-29/+37
Use of Timestamp in JPA classes appears to cause EntityNotFoundException. Changed from Timestamp back to Date. Issue-ID: POLICY-3125 Change-Id: I3ee29675849e3feda2641e9b240207c96fd975d4 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-05Fix 4 newly added Sonar bugslapentafd2-4/+4
Added casting for 4 asserts in policy/models/base Issue-ID: POLICY-3094 Change-Id: Ibc97be3eca366a7e9b8b9611bc284f2473acff6e Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-03-04Merge "Refactor models for common type handling"Liam Fallon16-180/+247
2021-03-04Merge "Fix sonar issues on policy-models"Jim Hahn8-152/+251
2021-03-03Refactor models for common type handlingliamfallon16-180/+247
Currently we have handling for "type" and "type_version" on TOSCA Policy class. However, the concept of a "type" and "type_version" also exists on the ToscaCapabilityAssignment, the ToscaNodeTemplate, and the ToscaRequriement classes. This review makes the type handling on Policy generic, thus extending it to the other three types. Issue-ID: POLICY-2983 Change-Id: Ia20e3a8c485f4841257075df08e0784eac415770 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-03-03Fix sonar issues on policy-modelslapentafd8-152/+251
Tests refactoring to reduce number of assertions to less then 25 Issue-ID: POLICY-3094 Change-Id: Icd3d83c7f8168dd81df13a584229eab36c646f37 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-03-03Fix Reference Key columns persistence issue in dbrameshiyer274-64/+181
Problem: When PfReferenceTimestamp Key is persisted in db, the parent class fields are ignored which causes inconsistent data while saving and fetching in db. Fix: JPA is not supporting inheritance in @Embeddable classes. Hence included the super class as @Embedded property in PfReferenceTimestamp key. @Embedded properties are unable to be queried directly. Slightly modified Dao methods to support querying @embedded fields. Issue-ID: POLICY-3049 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I5c2e03a5ae98525764a64dd6cce1a1298c5f9816
2021-02-25Merge "Fix Null key issue in PfReferenceTimestampKey"Liam Fallon2-3/+8
2021-02-25Fix Null key issue in PfReferenceTimestampKeyrameshiyer272-3/+8
isNUllKey check for PfReferenceTimestamp key is always returning false as the parent class is validating the child object in its method which has additional parameters (timestamp). Fixing the issue by validating only the fields of parent class. Issue-ID: POLICY-3069 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: Ie22d09552c9d0cedb7535bda359df0d70e1ebe77
2021-02-24Update info.yaml in modelsRam Krishna Verma1-2/+2
Issue-ID: POLICY-3028 Change-Id: I9e3038fed7b4322cbf050fa56ffe77ee01e50a20 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-02-23Bump models to 2.4.1-SNAPSHOTRam Krishna Verma44-44/+44
Issue-ID: POLICY-3088 Change-Id: I7f6cc0ab5299200315c78f6e6c79c79349d2608c Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-02-23Release models 2.4.0 versionRam Krishna Verma1-0/+4
Issue-ID: POLICY-3088 Change-Id: I19c9020011dc4145894f726c1327670d409a7d78 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-02-23Point to non-snapshots in modelsJim Hahn1-2/+2
Issue-ID: POLICY-3088 Change-Id: I2789f3435514de5ef2be3f07f8419434bda89d6d Signed-off-by: Jim Hahn <jrh3@att.com>