summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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>
2021-01-19Convert Model Exception to Runtime Exceptionliamfallon3-9/+38
Sometimes the exception thrown by the database providers has to be converted to a runtime exception, especiall if the database provider is running in a thread (called by the rum() method that does not return exceptions). It is convenient to have a constructor on the PfModelRuntimeException class that takes a PfModelException class as its argument, thus creating the runtime exception. Also the mapMap method in pfUtils is updated to allow the key of the map to be templated. By doing this, the utility can be used for maps that are keyed with types other than String (such as UUID). Issue-ID: POLICY-2971 Change-Id: Ib0b3678de531fd383753a1cd0ce47a06f4079ec0 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-01-19Merge "Add PfKey translation to ToscaConceptIdentifier"Pamela Dragosh3-4/+36
2021-01-18Create ToscaConceptIdentifier from ToscaEntityKeyliamfallon2-1/+6
THis change adds a method to create a ToscaConceptIdentifer from a ToscaEntityKey class. This method reduces the code vloume when translating between these identifiers. Issue-ID: POLICY-2971 Change-Id: Idd62339935d2ba78e6c60b40ee95fedac0642bef Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-01-16Add PfKey translation to ToscaConceptIdentifierliamfallon3-4/+36
Concenience constructor to create a TosaConceptIdentifier from a PfKey and a method to create a PfConceptKey from a ToscaConceptIdentifier. Issue-ID: POLICY-2971 Change-Id: I402b2e12cc11976cd7e98436eb46486c35fdaa31 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-01-15Merge "Do not log filter to error log"Liam Fallon1-1/+1
2021-01-15Merge "Add copy constructor to ToscaNodeTemplate"Jim Hahn2-1/+69
2021-01-15Merge "Rename keywords used as column names in API and PAP JPA"Jim Hahn2-5/+5
2021-01-15Do not log filter to error logJim Hahn1-1/+1
The DAO code was logging the query filter to the error log. Modified to log it to the debug log. Issue-ID: POLICY-2648 Change-Id: I372c77cb4fa1e5c4cb645d82b26ab0bba4a00826 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-14Add copy constructor to ToscaNodeTemplateliamfallon2-1/+69
In order to support serialization and deserialization of ToscaNodeTemplate objects onto DMaaP, we need a copy constructor on the ToscaNodeTemplate object. Issue-ID: POLICY-2971 Change-Id: If6dc6c54d5673cef46734a88d0a91ae868c11dcb Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-01-14Rename keywords used as column names in API and PAP JPAgregory.hayes2-5/+5
Using keywords as column names in JPA models is causing syntax errors during auto generation of DDL The errors are visible in the policy api and pap docker logs on startup This review renames the relevant columns Issue-ID: POLICY-2670 Signed-off-by: gregory.hayes <gregory.hayes@est.tech> Change-Id: I52a3156461940465c3945841c69a04fcb2f90117
2021-01-13Remove extra logging from cds actorRam Krishna Verma1-7/+1
Issue-ID: POLICY-2885 Change-Id: I5b7cb219f55a25153d50260d62292b92cfe39323 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-01-12Add more methods to query deployment statusJim Hahn10-4/+191
Issue-ID: POLICY-2648 Change-Id: I398fa1332eb5a862dabd97ed409ef6413bb0c202 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-08Add PDP-Policy deployment table to DBJim Hahn13-7/+780
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 Hahn25-827/+336
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>