summaryrefslogtreecommitdiffstats
path: root/models-provider
AgeCommit message (Collapse)AuthorFilesLines
2023-04-25Update snapshot and/or references of policy/models to latest snapshotsrameshiyer271-1/+1
policy/models updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4648 Signed-off-by: rameshiyer27 <ramesh.murugan.iyer@est.tech> Change-Id: Icb311d1eb36c3263e3e9fe996f49771124e68289
2023-02-28Update snapshot and/or references of policy/models to latest snapshotssaul.gill1-1/+1
policy/models updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4570 Signed-off-by: saul.gill <saul.gill@est.tech> Change-Id: Ie25a8dc3903b0f3536defa87570b5cb65120e8b7
2023-02-07Replace Eclipselink with Hibernateliamfallon6-54/+48
Issue-ID: POLICY-4533 Change-Id: I77a6c44c96013963e141265758629cae83e49876 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-12-15Update 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-4484 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I89001c25b23e41b2d53adaa7b405f6cf5d124cb1
2022-10-21Set 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-4408 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Ie62a24c34694977b9bbbab9554bce5b54648afb7
2022-10-21Update 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-4408 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Icc6e8bf7de2a207946fbba5eb3bdbabd0a347c49
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-09-16Remove unused imports in modelsliamfallon4-4/+0
Issue-ID: POLICY-4045 Change-Id: Iae24996aa0b1047e993c1e08ae1265152a598ece Signed-off-by: liamfallon <liam.fallon@est.tech>
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 return type of get node templates providerrameshiyer274-8/+4
The return type for fetching node templates can be just a List of ToscaNodetemplates. Removing the map with node template keys as it provides redundant keys in the output. Issue-ID: POLICY-3832 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I43d357fc24af9fd4d127cce139b6d21c53cc98d1
2022-02-16Fix issue with GeneratedValue in PfGeneratedIdKeya.sreekumar8-417/+7
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-02-10Add policy metadataSet handling as node templatesrameshiyer2710-5/+293
Each metadataSet is represented as a 'node_template' in Tosca mapped to a specific node type. Support added for db operations of node templates as independent entities. Detailed documentation available here : https://wiki.onap.org/display/DW/Enable+Handling+of+Policy+Type+Metadata Issue-ID: POLICY-3832 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I6c189142b1778ba858aae27cd92d4f136d950208
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-11-03Fix Db connection issues in TOSCA control loopFrancescoFioraEst6-348/+550
Issue-ID: POLICY-3153 Change-Id: I28a7962027a9cb383238a6d3765a46a905f8e58b Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
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-07-23Remove unused statistics methodsJim Hahn6-29/+6
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-06-15Replace method parameters with filter parametersJim Hahn6-74/+61
Added more methods taking filter parameters instead of individual method parameters. Removed the old methods. Added genOrderClause(). Issue-ID: POLICY-3094 Change-Id: Ie9d8c13a8d4a7f81e284f07fce3d96a35918a114 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-03Exposing the Audit provider through Models provider.adheli.tavares8-0/+101
Change-Id: I4a3a28b6dbbfbad533a69cf46c545ece7e0b147e Issue-ID: POLICY-2899 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-05-10Fix sonars in policy modelsJim Hahn4-8/+8
Fixed: - use "var" Issue-ID: POLICY-3094 Change-Id: Id5ea7ab049c2018744afa75a55d44e47f216d5bc Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-29Remove GroupValidationResultJim Hahn2-29/+14
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-12Close DB in junitsJim Hahn3-36/+57
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 Hahn5-6/+10
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-24Merge "Fix sonar issues for tests in policy-models"Jim Hahn3-103/+107
2021-03-19Fix write failure on PDP statisticsliamfallon4-6/+108
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-19Fix sonar issues for tests in policy-modelslapentafd3-103/+107
Tests refactoring to reduce number of assertions Issue-ID: POLICY-3094 Change-Id: I445462f0ec5d49474b10c1940c7fa12e687636de 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 Instantrameshiyer276-46/+54
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-10More sonars in modelsJim Hahn1-2/+2
Addressed the following: - make constructors protected - check exception type - too many assertions - remove annotation lists - use "<>" - reduce cognitive complexity - extract constant - multiple method calls in one assert - don't use eq() in verify() - indentation Issue-ID: POLICY-2905 Change-Id: I25bb3951f781250e9cdfe8f5f3b80cb63e129184 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-08Set target-database propertyJim Hahn2-1/+5
The new version of eclipselink doesn't recognize mariaDB by default. Added an optional property, databaseType, to the DB parameter class, which defaults to "MySQL" if not set. ("MySQL" is what web discussions indicated should be used for mariaDB.) Issue-ID: POLICY-3005 Change-Id: I7af9b65a53e0090944af6ce40d5cffa13a4123d7 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-07Make filters on TOSCA entities genericliamfallon7-106/+119
The classes PolicyTypeFilter and PolicyFilter only work on Policy types and policies. However they just filter on name/version/type/typeversion so there is no reason that the filters could not be applied to other entities. This commit adapts the PolicyTypeFilter to EntityFilter and PolicyFilter to TypedEntityFilter, so the filters can be applied to collections of any ToscaEntity class. Issue-ID: POLICY-2995 Change-Id: I8fcf76ee8c8497836b3286b35f928b0c341dac34 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-01-19Allow providers other than PolicyModelsProviderliamfallon2-107/+153
This change separates the database initiation and close functions of the DatabasePolicyModelsProviderImpl class into an abstract class that does the database DAO initiation and closing, and a domain specific part, that does the manipulation of the policy models in the database. This means that other providers, that wish to manipulate other objects in the database, can specialize the AbstractModelsProvider class and use its common DAO initiation and clsoing functionality, but can have their own domain specific code. The abstract class also now supports the Closeable interface. Note that the exiting JUnit tests provide 100% coverage on AbstractModelsProvider. Issue-ID: POLICY-2971 Change-Id: Ibe59c02ab127ddbd9355d892b94a5d315507a8e6 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-01-12Add more methods to query deployment statusJim Hahn6-1/+69
Issue-ID: POLICY-2648 Change-Id: I398fa1332eb5a862dabd97ed409ef6413bb0c202 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-08Add PDP-Policy deployment table to DBJim Hahn7-5/+85
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-06Changed identifiers to concept identifiersliamfallon2-54/+52
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-23Add Service Template TOSCA handlingliamfallon4-2/+156
Today we can only handle a single service template in the database. We should be able to handle multiple service templates and assign arbitrary policy types and policies to maned and versioned service templates. This review brings in the Java API in models provider for handling service templates in this way and uses a simplistic single-teplate implementation in models-tosca, that will work but still only handles a single service template under the hood. Issue-ID: POLICY-2900 Change-Id: Ia02dea8abe44b7f407e685090a4b8e0360889653 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-12-14JPA concepts for TOSCAliamfallon1-7/+20
Implement the Database persistence parts for the new TOSCA concepts so that those concepts can be written to and read from the database. First batch of comment fixes Issue-ID: POLICY-2900 Change-Id: I45191c1ff57cf1ea8563399db6cc8e51b2724813 Signed-off-by: liamfallon <liam.fallon@est.tech>
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-16Remove base64 encoding of password from modelsRam Krishna Verma6-21/+12
Remove base64 encoding of db password from models. This will have impact on the defaultConfig of API & PAP component. Seperate reviews are raised for those repos. Issue-ID: POLICY-2550 Change-Id: I258f76d01c21893bb40b4095a82e56ed51bd1377 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
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>