summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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-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>
2021-02-19Refactor timestamp property in policy models to use Instantrameshiyer2723-219/+244
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-18Merge "Remove more duplicate code from models"Ram Krishna Verma6-182/+214
2021-02-18Merge "Use new version of A&AI APIs"Ram Krishna Verma4-195/+11
2021-02-17Add time and date attributes to DecisionRequestPamela Dragosh1-1/+21
These are optional for clients, but may be necessary in configurations where the application enforcing a guard is running in a different time zone. Allows some flexibility instead of always using the time zone that the xacml pdp is running in. Issue-ID: POLICY-2810 Change-Id: I4057e5956e59803cc9505fae0ee4e2f67eaf0358 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2021-02-17Remove more duplicate code from modelsJim Hahn6-182/+214
Addressed sonar "duplicate code" issue by extracting a common ToscaNameVersion class from the XxxIdentifier classes. Also removed junit test for class that no longer exists and renamed another junit to match the renaming of the class being tested. Issue-ID: POLICY-2905 Change-Id: I4a28cd7de2478f2771a864439c0b440ad8310299 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-17Use new version of A&AI APIsJim Hahn4-195/+11
Just changed the version numbers; the APIs appear to be the same otherwise. Also removed unused APIs from the A&AI simulator. Issue-ID: POLICY-2788 Change-Id: I8c0ae11c1e42f487b34286d5dfd4ca536bb2c07b Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-17Fix sonars from removal of duplicate codeJim Hahn5-13/+347
The work to remove duplicate code from models introduced as many new sonars as it eliminated. :-( Addressed the following new issues: - visibility of constructor - use of more specific assertThat() calls Also added two junit test file that were somehow previously left out. Issue-ID: POLICY-2905 Change-Id: I7a0206bd157412d3c6d98bfe21797f106b37ac65 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-17PAP Deployment API changes - change url to uria.sreekumar2-10/+17
Change-Id: I6fa4b001a0c4573a34e1cefe0d32ca969ca5096e Issue-ID: POLICY-2526 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-16Merge "Fix duplicate code in Jpa classes"Pamela Dragosh25-766/+870
2021-02-16Add PfReference Timestamp key in policy-models-base to support timestamprameshiyer272-0/+375
property Issue-ID: POLICY-3011 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I7a9db3a4fb0345e0979952e5c086523cc1d960f9
2021-02-16Merge "Updating PAP deployment API to reflect actual status"Liam Fallon2-0/+70
2021-02-16Fix duplicate code in Jpa classesJim Hahn25-766/+870
Addressed the following issues: - remove duplicate code; extracted a common class containing properties Issue-ID: POLICY-2905 Change-Id: I80c423ab45c0c6823d338a034762d222ec334288 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-16Fix the Naming policy examplesebdet1-2/+2
Change the attribute derived_from of the policy.data.increment-sequence attribute in the Naming policy example. It should inherit from tosca.datatypes.Root Issue-ID: POLICY-3067 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I7a62b8c662b90a8481bb609d6a39e33ab9e7dada
2021-02-15Updating PAP deployment API to reflect actual statusa.sreekumar2-0/+70
Change-Id: I1fb0232d2f5fe37e95e87babb233a824212439ff Issue-ID: POLICY-2526 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-15Merge "Use type adapters from common"Ram Krishna Verma5-168/+34
2021-02-12Merge "More sonars in models"Jim Hahn2-6/+9
2021-02-12Use type adapters from commonJim Hahn5-168/+34
Addressed the following sonar issue: - remove duplicate code by using gson type adapters from common Issue-ID: POLICY-2905 Change-Id: I7a832ce3e15387ed25061caec3e057f150828dad Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-12More sonars in modelsJim Hahn2-6/+9
Addressed the following issues: - change visibility of constructor - assert exception type Issue-ID: POLICY-2905 Change-Id: Iaededb32802e4facbbc776ae51d05d2ef5c60b93 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-12Merge "Alter PDP_UPDATE message to store lists of delpoyed/undeployed policies"Ram Krishna Verma1-0/+12
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-02-11Fix sonars from depeendency upgradeJim Hahn30-140/+116
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner, in most cases. Changed to openMocks() in one case and removed unnecessary stubbings. Issue-ID: POLICY-2905 Change-Id: I9aa098aa7aaebba09f6dcea4cac69ac1e5fbd4d6 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-10More sonars in modelsJim Hahn38-533/+254
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-08Merge "Make filters on TOSCA entities generic"Jim Hahn24-493/+287
2021-02-07Make filters on TOSCA entities genericliamfallon24-493/+287
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-02-05Give better messages than NPE for missing dataJim Hahn20-40/+255
When data is not available to actor operations, an NPE is generally thrown. Modified the code to provide more info about what is missing than simply NPE. Issue-ID: POLICY-2913 Change-Id: I37b6eadd966e0693508a6d552b7db4edf5410018 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-29Merge "Upgrade io.grpc library in CDS actor"Ajith Sreekumar3-14/+6
2021-01-28Upgrade io.grpc library in CDS actorRam Krishna Verma3-14/+6
Upgrading to latest version of io.grpc 1.35.0 to fix security issues. The methods named loadBalancerFactory and nameResolverFactory have been removed in the latest version. After going through the grpc-java codebase found that the one's we were using to initialize those factories are made default. Confirmed my understanding by posting a query on grpc-java github repo. Issue-ID: POLICY-2936 Change-Id: I238700ac3f384ff8e5fdef6c3f2ccfb54bff7005 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-01-28Add copy constructors to conceptsliamfallon4-2/+167
Copy constructors for ToscaServiceTemplate and ToscaTopologyTemplate. Issue-ID: POLICY-2971 Change-Id: Idb4abf8bce40593e0bf18614b8c647688dd5748d Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-01-20Merge "Remove "Jpa" from table name"Ram Krishna Verma1-1/+1
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-19Merge "Convert Model Exception to Runtime Exception"Ram Krishna Verma3-9/+38
2021-01-19Merge "Allow providers other than PolicyModelsProvider"Ram Krishna Verma2-107/+153
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>