Jim Hahn [Thu, 17 Jun 2021 20:05:25 +0000 (16:05 -0400)]
Use lombok annotations for tosca, rest, sdnc
Issue-ID: POLICY-3396
Change-Id: I3c9e5ee7ea6da2bab4fe37504d39f7ce63868887
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 17 Jun 2021 19:39:34 +0000 (15:39 -0400)]
Use lombok annotations for sdnr, simulators
Issue-ID: POLICY-3396
Change-Id: I16787f72b0529417c58b9e83a21880baaba92a3d
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 17 Jun 2021 19:26:35 +0000 (15:26 -0400)]
Use lombok annotations for so, vfc
Issue-ID: POLICY-3396
Change-Id: I33781c72dd1c0b9a7a525c23e81c4259fa32384f
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Wed, 16 Jun 2021 22:04:16 +0000 (18:04 -0400)]
Add example for policy chaining
Adding example for policy chaining in drools-pdp.
This will be later referenced in the documents in upcoming review.
Issue-ID: POLICY-3382
Change-Id: If2189422cb7e9ac35fb93e0fd9ae44f1cd412686
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Tue, 15 Jun 2021 18:33:56 +0000 (14:33 -0400)]
Replace method parameters with filter parameters
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>
Ram Krishna Verma [Fri, 11 Jun 2021 14:13:17 +0000 (10:13 -0400)]
Fix sonar in policy/models
use "var" for local variables
Issue-ID: POLICY-3077
Change-Id: Ia1ea62e03c016d336c9b11b07b0ea941ba905497
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Thu, 10 Jun 2021 21:38:58 +0000 (17:38 -0400)]
Fix sonars in policy-models
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>
Liam Fallon [Thu, 3 Jun 2021 21:09:07 +0000 (21:09 +0000)]
Merge "Exposing the Audit provider through Models provider."
Jim Hahn [Tue, 1 Jun 2021 15:07:44 +0000 (11:07 -0400)]
Fix junits for new bean validation field names
Issue-ID: POLICY-3333
Change-Id: I339024677a2d090f61cc55d1b056b832c87d231a
Signed-off-by: Jim Hahn <jrh3@att.com>
adheli.tavares [Thu, 3 Jun 2021 09:37:35 +0000 (10:37 +0100)]
Exposing the Audit provider through Models provider.
Change-Id: I4a3a28b6dbbfbad533a69cf46c545ece7e0b147e
Issue-ID: POLICY-2899
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Liam Fallon [Thu, 3 Jun 2021 10:42:50 +0000 (10:42 +0000)]
Merge "Upgrade CDS dependency"
Jim Hahn [Wed, 2 Jun 2021 14:35:48 +0000 (14:35 +0000)]
Merge "Handling Policy deploy/undeploy audit models"
Rashmi Pujar [Tue, 1 Jun 2021 21:35:56 +0000 (17:35 -0400)]
Upgrade CDS dependency
CDS client libraries are exposed by a different
maven module making is much more cleaner to use.
The only drawback is we need to go back to older
version of grpc-testing artifact due to conflicts.
Issue-ID: POLICY-3338
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: I98c79de7f12feefbae7c42c4c8f26357801b44f9
Ram Krishna Verma [Fri, 28 May 2021 18:36:58 +0000 (18:36 +0000)]
Merge "No-sonar on the wrong line"
Jim Hahn [Fri, 28 May 2021 18:33:22 +0000 (18:33 +0000)]
Merge "Remove policies field from PdpUpdate message"
Jim Hahn [Fri, 28 May 2021 14:59:36 +0000 (10:59 -0400)]
No-sonar on the wrong line
Tried putting NOSONAR comment at the end of the statement, because it
seems like checkstyle/sonar doesn't like comments in the middle of a
statement. Nonetheless, sonar still reports an issue on the line with
the "SELECT" statement, so I guess there's no choice but to move NOSONAR
to the end of that line.
Issue-ID: POLICY-3094
Change-Id: If26ad0b1e7dcc9c7aa963da10a9c5160a8fe272d
Signed-off-by: Jim Hahn <jrh3@att.com>
adheli.tavares [Tue, 11 May 2021 13:35:20 +0000 (14:35 +0100)]
Handling Policy deploy/undeploy audit models
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>
Jim Hahn [Thu, 27 May 2021 21:48:22 +0000 (17:48 -0400)]
Fix more sonars in models
Fixed sonars:
- SQL injection
- use re2j instead of regex
Issue-ID: POLICY-3094
Change-Id: I553bd6aa5832d71a5ac33320e2d0d022f9a00e98
Signed-off-by: Jim Hahn <jrh3@att.com>
waynedunican [Thu, 27 May 2021 08:12:05 +0000 (09:12 +0100)]
Remove policies field from PdpUpdate message
Issue-ID: POLICY-3323
Change-Id: I14dafe4a20f95e2ebe4279e5b6ae141e2ee4fc48
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Signed-off-by: WayneDunican <wayne.dunican@est.tech>
Jim Hahn [Mon, 24 May 2021 15:39:42 +0000 (11:39 -0400)]
Adjust indexes for Op History table
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>
Jim Hahn [Wed, 12 May 2021 17:25:06 +0000 (13:25 -0400)]
Fix sonars in policy models
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>
Liam Fallon [Tue, 11 May 2021 12:28:31 +0000 (12:28 +0000)]
Merge "Fix sonars in policy models"
Liam Fallon [Tue, 11 May 2021 12:28:17 +0000 (12:28 +0000)]
Merge "Fix sonars in policy-models impls & simulators"
Jim Hahn [Mon, 10 May 2021 15:39:27 +0000 (11:39 -0400)]
Fix sonars in policy models
Fixed:
- use "var"
Issue-ID: POLICY-3094
Change-Id: Id5ea7ab049c2018744afa75a55d44e47f216d5bc
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 10 May 2021 13:53:23 +0000 (09:53 -0400)]
Fix sonars in policy-models impls & simulators
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>
Jim Hahn [Fri, 7 May 2021 22:07:09 +0000 (18:07 -0400)]
Fix sonars in policy-models actors
Fixed:
- use "var"
- don't throw generic Exception
Issue-ID: POLICY-3094
Change-Id: I020addb9511fd665b5fed48e7d40719e27039224
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 3 May 2021 17:00:16 +0000 (17:00 +0000)]
Merge "Remove GroupValidationResult"
Jim Hahn [Mon, 26 Apr 2021 22:16:36 +0000 (18:16 -0400)]
Remove GroupValidationResult
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>
ktimoney [Tue, 27 Apr 2021 10:26:09 +0000 (11:26 +0100)]
Add correct filter type prefix to query
Added unit tests
Issue-ID: POLICY-3247
Change-Id: I27474948619b7256a1e504611531eecac15c27c1
Signed-off-by: ktimoney <kevin.timoney@est.tech>
Pamela Dragosh [Mon, 26 Apr 2021 12:55:35 +0000 (12:55 +0000)]
Merge "Add a new key class which uses @GeneratedValue to base classes"
ktimoney [Tue, 13 Apr 2021 13:40:06 +0000 (14:40 +0100)]
Add a new key class which uses @GeneratedValue to base classes
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>
adheli.tavares [Thu, 15 Apr 2021 09:35:00 +0000 (10:35 +0100)]
Refactor CommandLineArguments classes
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>
Jim Hahn [Fri, 9 Apr 2021 13:49:48 +0000 (09:49 -0400)]
Close DB in junits
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>
Jim Hahn [Thu, 8 Apr 2021 21:26:18 +0000 (17:26 -0400)]
Use distinct names in DB junits
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>
Jim Hahn [Fri, 26 Mar 2021 19:18:01 +0000 (19:18 +0000)]
Merge "Fix Sonar Issues models-tosca-simple"
lapentafd [Tue, 23 Mar 2021 17:46:41 +0000 (17:46 +0000)]
Fix Sonar Issues models-tosca-simple
Tests refactoring to reduce number of assertions
Issue-ID: POLICY-3094
Change-Id: I8a9a02100e5d103f574cf2cb89d2e924d0f56507
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
Jim Hahn [Wed, 24 Mar 2021 12:41:04 +0000 (12:41 +0000)]
Merge "Fix sonar issues for tests in policy-models"
Ram Krishna Verma [Mon, 22 Mar 2021 21:45:40 +0000 (21:45 +0000)]
Merge "Delete keystores from models"
liamfallon [Fri, 19 Mar 2021 18:18:10 +0000 (18:18 +0000)]
Fix write failure on PDP statistics
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>
Jim Hahn [Fri, 19 Mar 2021 17:08:02 +0000 (13:08 -0400)]
Delete keystores from models
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>
lapentafd [Thu, 18 Mar 2021 12:06:14 +0000 (12:06 +0000)]
Fix sonar issues for tests in policy-models
Tests refactoring to reduce number of assertions
Issue-ID: POLICY-3094
Change-Id: I445462f0ec5d49474b10c1940c7fa12e687636de
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
Pamela Dragosh [Thu, 18 Mar 2021 12:59:09 +0000 (12:59 +0000)]
Merge "Fix Sonar Issues in models-pdp"
jhh [Tue, 16 Mar 2021 15:34:48 +0000 (10:34 -0500)]
Update policy-keystore with newer certificates
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>
lapentafd [Fri, 12 Mar 2021 13:48:03 +0000 (13:48 +0000)]
Fix Sonar Issues in models-pdp
Tests refactoring to reduce number of assertions
Issue-ID: POLICY-3094
Change-Id: I23369c341c43df71b84392501d33739453f7c81f
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
Jim Hahn [Mon, 15 Mar 2021 16:39:21 +0000 (16:39 +0000)]
Merge "Fix Sonar Issues on policy-models-tosca"
lapentafd [Tue, 9 Mar 2021 15:13:05 +0000 (15:13 +0000)]
Fix Sonar Issues on policy-models-tosca
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>
Jim Hahn [Fri, 12 Mar 2021 22:24:33 +0000 (17:24 -0500)]
Remove more unnecessary plugins from models
Issue-ID: POLICY-3126
Change-Id: If93ce1a3412cd7342a78e478ea2684ff9bf6dd97
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 12 Mar 2021 14:39:42 +0000 (09:39 -0500)]
Address plugin-not-found issues
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>
Jim Hahn [Wed, 10 Mar 2021 19:53:36 +0000 (14:53 -0500)]
Bump version to 2.5.0 in models
Issue-ID: POLICY-3105
Change-Id: I01fe35f16609f9b8d98fb2083c8b18fc7ce3ccf3
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 10 Mar 2021 16:42:35 +0000 (16:42 +0000)]
Merge "Add support for localName based filtering in PfReferenceTimestamp key."
Jim Hahn [Tue, 9 Mar 2021 16:56:51 +0000 (11:56 -0500)]
Bump models to 2.4.2-SNAPSHOT
Issue-ID: POLICY-3127
Change-Id: Ie37871c54dc5e7eab0ee7d553c6b38ea0e720a29
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 9 Mar 2021 14:37:54 +0000 (09:37 -0500)]
Release models 2.4.1 artifacts
Issue-ID: POLICY-3127
Change-Id: I2350bed3a5679ac5edb87544c732c4c094b7c028
Signed-off-by: Jim Hahn <jrh3@att.com>
rameshiyer27 [Tue, 9 Mar 2021 12:49:39 +0000 (12:49 +0000)]
Add support for localName based filtering in PfReferenceTimestamp key.
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
Jim Hahn [Mon, 8 Mar 2021 21:07:40 +0000 (21:07 +0000)]
Merge "Use Date instead of Timestamp"
Jim Hahn [Fri, 5 Mar 2021 20:50:47 +0000 (15:50 -0500)]
Use Date instead of Timestamp
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>
lapentafd [Fri, 5 Mar 2021 09:53:05 +0000 (09:53 +0000)]
Fix 4 newly added Sonar bugs
Added casting for 4 asserts in policy/models/base
Issue-ID: POLICY-3094
Change-Id: Ibc97be3eca366a7e9b8b9611bc284f2473acff6e
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
Liam Fallon [Thu, 4 Mar 2021 16:13:36 +0000 (16:13 +0000)]
Merge "Refactor models for common type handling"
Jim Hahn [Thu, 4 Mar 2021 14:13:06 +0000 (14:13 +0000)]
Merge "Fix sonar issues on policy-models"
liamfallon [Tue, 2 Mar 2021 10:55:31 +0000 (10:55 +0000)]
Refactor models for common type handling
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>
lapentafd [Mon, 1 Mar 2021 17:09:28 +0000 (17:09 +0000)]
Fix sonar issues on policy-models
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>
rameshiyer27 [Mon, 1 Mar 2021 18:46:33 +0000 (18:46 +0000)]
Fix Reference Key columns persistence issue in db
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
Liam Fallon [Thu, 25 Feb 2021 16:36:11 +0000 (16:36 +0000)]
Merge "Fix Null key issue in PfReferenceTimestampKey"
rameshiyer27 [Tue, 23 Feb 2021 15:10:39 +0000 (15:10 +0000)]
Fix Null key issue in PfReferenceTimestampKey
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
Ram Krishna Verma [Wed, 24 Feb 2021 14:54:18 +0000 (09:54 -0500)]
Update info.yaml in models
Issue-ID: POLICY-3028
Change-Id: I9e3038fed7b4322cbf050fa56ffe77ee01e50a20
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ram Krishna Verma [Tue, 23 Feb 2021 16:31:06 +0000 (11:31 -0500)]
Bump models to 2.4.1-SNAPSHOT
Issue-ID: POLICY-3088
Change-Id: I7f6cc0ab5299200315c78f6e6c79c79349d2608c
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ram Krishna Verma [Tue, 23 Feb 2021 14:43:29 +0000 (09:43 -0500)]
Release models 2.4.0 version
Issue-ID: POLICY-3088
Change-Id: I19c9020011dc4145894f726c1327670d409a7d78
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Tue, 23 Feb 2021 13:19:13 +0000 (08:19 -0500)]
Point to non-snapshots in models
Issue-ID: POLICY-3088
Change-Id: I2789f3435514de5ef2be3f07f8419434bda89d6d
Signed-off-by: Jim Hahn <jrh3@att.com>
rameshiyer27 [Tue, 16 Feb 2021 16:25:18 +0000 (16:25 +0000)]
Refactor timestamp property in policy models to use Instant
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
Ram Krishna Verma [Thu, 18 Feb 2021 16:34:29 +0000 (16:34 +0000)]
Merge "Remove more duplicate code from models"
Ram Krishna Verma [Thu, 18 Feb 2021 16:24:17 +0000 (16:24 +0000)]
Merge "Use new version of A&AI APIs"
Pamela Dragosh [Wed, 17 Feb 2021 21:43:43 +0000 (15:43 -0600)]
Add time and date attributes to DecisionRequest
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>
Jim Hahn [Wed, 17 Feb 2021 19:27:03 +0000 (14:27 -0500)]
Remove more duplicate code from models
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>
Jim Hahn [Fri, 20 Nov 2020 21:44:12 +0000 (16:44 -0500)]
Use new version of A&AI APIs
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>
Jim Hahn [Wed, 17 Feb 2021 15:10:39 +0000 (10:10 -0500)]
Fix sonars from removal of duplicate code
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>
a.sreekumar [Tue, 16 Feb 2021 16:56:47 +0000 (16:56 +0000)]
PAP Deployment API changes - change url to uri
Change-Id: I6fa4b001a0c4573a34e1cefe0d32ca969ca5096e
Issue-ID: POLICY-2526
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Pamela Dragosh [Tue, 16 Feb 2021 21:38:02 +0000 (21:38 +0000)]
Merge "Fix duplicate code in Jpa classes"
rameshiyer27 [Thu, 11 Feb 2021 07:33:34 +0000 (07:33 +0000)]
Add PfReference Timestamp key in policy-models-base to support timestamp
property
Issue-ID: POLICY-3011
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I7a9db3a4fb0345e0979952e5c086523cc1d960f9
Liam Fallon [Tue, 16 Feb 2021 14:40:11 +0000 (14:40 +0000)]
Merge "Updating PAP deployment API to reflect actual status"
Jim Hahn [Fri, 12 Feb 2021 18:55:31 +0000 (13:55 -0500)]
Fix duplicate code in Jpa classes
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>
sebdet [Mon, 15 Feb 2021 09:49:17 +0000 (10:49 +0100)]
Fix the Naming policy example
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
a.sreekumar [Fri, 12 Feb 2021 16:57:58 +0000 (16:57 +0000)]
Updating PAP deployment API to reflect actual status
Change-Id: I1fb0232d2f5fe37e95e87babb233a824212439ff
Issue-ID: POLICY-2526
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Ram Krishna Verma [Mon, 15 Feb 2021 17:39:48 +0000 (17:39 +0000)]
Merge "Use type adapters from common"
Jim Hahn [Fri, 12 Feb 2021 22:33:23 +0000 (22:33 +0000)]
Merge "More sonars in models"
Jim Hahn [Fri, 12 Feb 2021 15:11:53 +0000 (10:11 -0500)]
Use type adapters from common
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>
Jim Hahn [Fri, 12 Feb 2021 14:26:24 +0000 (09:26 -0500)]
More sonars in models
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>
Ram Krishna Verma [Fri, 12 Feb 2021 14:37:42 +0000 (14:37 +0000)]
Merge "Alter PDP_UPDATE message to store lists of delpoyed/undeployed policies"
waynedunican [Thu, 11 Feb 2021 16:31:38 +0000 (16:31 +0000)]
Alter PDP_UPDATE message to store lists of delpoyed/undeployed policies
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>
Jim Hahn [Thu, 11 Feb 2021 22:06:38 +0000 (17:06 -0500)]
Fix sonars from depeendency upgrade
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>
Jim Hahn [Wed, 10 Feb 2021 21:17:10 +0000 (16:17 -0500)]
More sonars in models
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>
Jim Hahn [Fri, 5 Feb 2021 16:03:41 +0000 (11:03 -0500)]
Set target-database property
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>
Jim Hahn [Mon, 8 Feb 2021 18:31:06 +0000 (18:31 +0000)]
Merge "Make filters on TOSCA entities generic"
liamfallon [Sun, 7 Feb 2021 14:51:45 +0000 (14:51 +0000)]
Make filters on TOSCA entities generic
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>
Jim Hahn [Fri, 5 Feb 2021 16:13:31 +0000 (11:13 -0500)]
Give better messages than NPE for missing data
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>
Ajith Sreekumar [Fri, 29 Jan 2021 14:36:21 +0000 (14:36 +0000)]
Merge "Upgrade io.grpc library in CDS actor"
Ram Krishna Verma [Wed, 27 Jan 2021 21:31:45 +0000 (16:31 -0500)]
Upgrade io.grpc library in CDS actor
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>
liamfallon [Thu, 28 Jan 2021 10:42:12 +0000 (10:42 +0000)]
Add copy constructors to concepts
Copy constructors for ToscaServiceTemplate and ToscaTopologyTemplate.
Issue-ID: POLICY-2971
Change-Id: Idb4abf8bce40593e0bf18614b8c647688dd5748d
Signed-off-by: liamfallon <liam.fallon@est.tech>
Ram Krishna Verma [Wed, 20 Jan 2021 19:05:01 +0000 (19:05 +0000)]
Merge "Remove "Jpa" from table name"
Jim Hahn [Tue, 19 Jan 2021 22:24:40 +0000 (17:24 -0500)]
Remove "Jpa" from table name
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>
Ram Krishna Verma [Tue, 19 Jan 2021 22:23:10 +0000 (22:23 +0000)]
Merge "Convert Model Exception to Runtime Exception"
Ram Krishna Verma [Tue, 19 Jan 2021 22:21:53 +0000 (22:21 +0000)]
Merge "Allow providers other than PolicyModelsProvider"