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"
liamfallon [Mon, 18 Jan 2021 11:34:12 +0000 (11:34 +0000)]
Allow providers other than PolicyModelsProvider
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>
liamfallon [Mon, 18 Jan 2021 11:17:28 +0000 (11:17 +0000)]
Convert Model Exception to Runtime Exception
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>
Pamela Dragosh [Tue, 19 Jan 2021 13:18:06 +0000 (13:18 +0000)]
Merge "Add PfKey translation to ToscaConceptIdentifier"
liamfallon [Mon, 18 Jan 2021 09:25:34 +0000 (09:25 +0000)]
Create ToscaConceptIdentifier from ToscaEntityKey
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>
liamfallon [Sat, 16 Jan 2021 09:11:48 +0000 (09:11 +0000)]
Add PfKey translation to ToscaConceptIdentifier
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>
Liam Fallon [Fri, 15 Jan 2021 18:14:08 +0000 (18:14 +0000)]
Merge "Do not log filter to error log"
Jim Hahn [Fri, 15 Jan 2021 14:58:27 +0000 (14:58 +0000)]
Merge "Add copy constructor to ToscaNodeTemplate"
Jim Hahn [Fri, 15 Jan 2021 14:38:15 +0000 (14:38 +0000)]
Merge "Rename keywords used as column names in API and PAP JPA"
Jim Hahn [Fri, 15 Jan 2021 12:33:45 +0000 (07:33 -0500)]
Do not log filter to error log
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>
liamfallon [Wed, 13 Jan 2021 10:04:43 +0000 (10:04 +0000)]
Add copy constructor to ToscaNodeTemplate
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>
gregory.hayes [Wed, 13 Jan 2021 20:35:46 +0000 (20:35 +0000)]
Rename keywords used as column names in API and PAP JPA
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
Ram Krishna Verma [Wed, 13 Jan 2021 20:24:35 +0000 (15:24 -0500)]
Remove extra logging from cds actor
Issue-ID: POLICY-2885
Change-Id: I5b7cb219f55a25153d50260d62292b92cfe39323
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Tue, 12 Jan 2021 16:52:29 +0000 (11:52 -0500)]
Add more methods to query deployment status
Issue-ID: POLICY-2648
Change-Id: I398fa1332eb5a862dabd97ed409ef6413bb0c202
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 7 Jan 2021 14:07:05 +0000 (09:07 -0500)]
Add PDP-Policy deployment table to DB
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>
Jim Hahn [Tue, 5 Jan 2021 16:11:26 +0000 (11:11 -0500)]
Use annotations on parameterized types
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>
liamfallon [Mon, 4 Jan 2021 12:15:18 +0000 (12:15 +0000)]
Changed identifiers to concept identifiers
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>
Liam Fallon [Wed, 23 Dec 2020 18:28:33 +0000 (18:28 +0000)]
Merge "Add Service Template TOSCA handling"
liamfallon [Thu, 17 Dec 2020 12:10:21 +0000 (12:10 +0000)]
Add Service Template TOSCA handling
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>
Jim Hahn [Tue, 22 Dec 2020 15:10:40 +0000 (10:10 -0500)]
Allow wild-card in supportedPolicyTypes
Changes to the validation code broke the validation check for the
supportedPolicyTypes field in PdpSubGroup - it no longer supports wild-
cards in the name. Modified the validation annotation in
PfSearchableKey to allow wild-card names.
Issue-ID: POLICY-2648
Change-Id: Ibd2853025ce72ed88697dd9a7d6d5eed2b28475e
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Sat, 19 Dec 2020 00:01:52 +0000 (19:01 -0500)]
Use annotations to do validation
Modified models to use annotations instead of function calls for most
field validations. Created a few new validation annotations for use
within models.
Per review comments:
- renamed Key to VerifyKey
- enhanced VerifyKey to imply "@Valid", unless disabled
Issue-ID: POLICY-2648
Change-Id: I2b53f218b0a2ab1ed1f5e278816a3509f1408972
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 17 Dec 2020 17:07:14 +0000 (12:07 -0500)]
Use ValidationResult for models v2.0
Policy models uses PfValidationXxx classes which are totally unrelated
to ValidationResult in policy common. This precludes the use of various
utility methods and annotations for doing validation. Modified policy
models to use ValidationResult instead.
This approach uses function calls, though a future approach could make
use of annotations instead.
Issue-ID: POLICY-2648
Change-Id: I9760f1dc46902ab6bef7f440f3caf5e951660a5d
Signed-off-by: Jim Hahn <jrh3@att.com>
liamfallon [Mon, 7 Dec 2020 16:25:14 +0000 (16:25 +0000)]
JPA concepts for TOSCA
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>
liamfallon [Wed, 9 Dec 2020 11:30:40 +0000 (11:30 +0000)]
Add functional method for mapping maps to PfUtils
Add a functional interface to PfUtils for mapping maps so that more
complex conversions can be handled.
List mapping functional methods added as well.
Issue-ID: POLICY-2900
Change-Id: I4189e09d6d8621638960b5d9f0d19792a7faceb8
Signed-off-by: liamfallon <liam.fallon@est.tech>
krishnaa96 [Mon, 7 Dec 2020 07:03:17 +0000 (12:33 +0530)]
Fix Modify NSSI operation
Update the operation to receive payload
from the onset message
Issue-ID: POLICY-2916
Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com>
Change-Id: If49d41b35c1cd6562146fe4d92799a9a77a46db9
Jim Hahn [Fri, 4 Dec 2020 15:18:09 +0000 (15:18 +0000)]
Merge "Add generic methods to TOSCA providers and utils"
Ajith Sreekumar [Fri, 4 Dec 2020 09:52:25 +0000 (09:52 +0000)]
Merge "Address sonar issues in policy/models"
liamfallon [Thu, 3 Dec 2020 12:40:58 +0000 (12:40 +0000)]
Add generic methods to TOSCA providers and utils
Generic methods for getting ehtire service templates are added to the
TOSCA providers in models-tosca.
These are needed to read service tempaltes containing entities that are
not policy related.
Issue-ID: POLICY-2900
Change-Id: If4c646037f51f8a18b66257426accc330905acf9
Signed-off-by: liamfallon <liam.fallon@est.tech>
Ajith Sreekumar [Thu, 3 Dec 2020 10:02:19 +0000 (10:02 +0000)]
Merge "Remove unused imports"
Jim Hahn [Wed, 2 Dec 2020 19:41:19 +0000 (14:41 -0500)]
Address sonar issues in policy/models
Addressed the following issues:
- unused parameter in method call
- make constructor of abstract class protected instead of public
Issue-ID: POLICY-2905
Change-Id: I1e846b88246796f1ad5cee4a3bd296647732fd24
Signed-off-by: Jim Hahn <jrh3@att.com>
liamfallon [Wed, 2 Dec 2020 16:39:47 +0000 (16:39 +0000)]
Remove unused imports
Issue-ID: POLICY-2900
Change-Id: Iaba37b81473b60d3da15a52ffcccdaa16a5b7091
Signed-off-by: liamfallon <liam.fallon@est.tech>
Pamela Dragosh [Wed, 2 Dec 2020 14:09:03 +0000 (14:09 +0000)]
Merge "Use common LocalDateTimeTypeAdaptor for SO"
Liam Fallon [Wed, 2 Dec 2020 12:54:51 +0000 (12:54 +0000)]
Merge "Add extra authorative TOSCA concepts"
liamfallon [Fri, 20 Nov 2020 10:24:44 +0000 (10:24 +0000)]
Add extra authorative TOSCA concepts
This review brings in extra TOSCA concepts for Node types, nodes, and
capabilities.
The TOSCA handling is also amended to make the handling of equality
consistent. Now, if filtering or ordering is required using an order
rather than natural ordering, a comparator must be supplied by the user.
Issue-ID: POLICY-2900
Change-Id: Ie40e86870b97eb993b1338bdc0666ac116f72f67
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Mon, 30 Nov 2020 19:32:47 +0000 (14:32 -0500)]
Use common LocalDateTimeTypeAdaptor for SO
SO has its own specialized GSON type adapter. Modified it to subclass
from the common type adapter.
Issue-ID: POLICY-2903
Change-Id: I578eecbb1a37b5c95c5c27e6deb5c9f72ca7ae28
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 30 Nov 2020 16:02:31 +0000 (11:02 -0500)]
Remove targetEntity from makeOutcome
The Actor Params class had two flavors of makeOutcome, the second of
which took a "targetEntity" parameter. As the Params no longer deal
directly with the targetEntity, the second flavor was removed.
Issue-ID: POLICY-2804
Change-Id: Ic736dd1c809ce54f6bb7cd37d03bc84cf4a1410c
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 18 Nov 2020 15:44:41 +0000 (10:44 -0500)]
Delete preprocessed flag from actors
Removed the "preprocessed" flag from the Actor parameter class, now
that the actors no longer have a startPreprocess() method.
Also removed targetEntity from Actor parameter class. Created a
makeOutcome method within OperationPartial, which is used to create an
initial outcome whose target field is pre-populated with the
target-entity extracted from the properties. As the meaning of "target"
may be specific to an operation, the makeOutcome method may be
overridden by an operation subclass.
Issue-ID: POLICY-2804
Change-Id: Ifb66de63301d644e69340009593513773ee5672d
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Wed, 18 Nov 2020 15:27:45 +0000 (15:27 +0000)]
Merge "Make Actors event-agnostic"
Pamela Dragosh [Fri, 6 Nov 2020 13:16:56 +0000 (08:16 -0500)]
Fix upcoming checkstyle issues
When we upgrade to oparent, these will fail as oparent upgrades
to 8.37 of puppycrawl which fixes a few bugs that should have
flagged these previously.
Issue-ID: POLICY-2887
Change-Id: Ia0ceab23ff3d5c177f657c5852115ab1b265c698
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Fri, 21 Aug 2020 17:43:08 +0000 (13:43 -0400)]
Make Actors event-agnostic
Removed event and event-context code from the Actor code. Also removed
the preprocessing steps from the Actor code, giving the application
complete control over any preprocessing.
Also fixed a bug wherein the APPC actor was treating the
AAI_RESOURCE_VNF property as a String instead of as a GenericVnf.
Issue-ID: POLICY-2746-actor
Change-Id: Ibc05fe39ffedc0bc461abf10e6a960861ac70119
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 27 Oct 2020 18:16:29 +0000 (14:16 -0400)]
Point to snapshot versions
Issue-ID: POLICY-2875
Change-Id: Ifac2f1e3330f6cf3ce6225bbc960974c257805f5
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 26 Oct 2020 20:53:04 +0000 (16:53 -0400)]
Bump models master to 2.4.0 SNAPSHOT
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>
Jim Hahn [Mon, 19 Oct 2020 20:05:49 +0000 (16:05 -0400)]
Bump models to 2.3.6 snapshot
Issue-ID: POLICY-2869
Change-Id: I98223c20d6d1d6d9bf5bd958d9d3ed4aacdf17e6
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 19 Oct 2020 17:41:14 +0000 (13:41 -0400)]
Release models 2.3.5 artifacts
Issue-ID: POLICY-2869
Change-Id: I920b1da9fb26f3cf12ea23775188aa33d8bc80ed
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Fri, 16 Oct 2020 13:32:46 +0000 (13:32 +0000)]
Merge "Default should be an object on TOSCA properties"
liamfallon [Thu, 24 Sep 2020 15:12:50 +0000 (16:12 +0100)]
Default should be an object on TOSCA properties
Property default value is serialized to the database as Yaml and
deserialized back into an object on a DB read.
Issue-ID: POLICY-2844
Change-Id: I69f2843a93cd5f831359a0965223298b769498d9
Signed-off-by: liamfallon <liam.fallon@est.tech>
a.sreekumar [Mon, 12 Oct 2020 16:22:32 +0000 (17:22 +0100)]
Bug fixes and improvements in CDS Simulator
1) CDS Simulator was not able to run alone. It needed one of the
RestServer simulators to start up to continue running. Providing the cds
simulators parameters alone in the config file was resulting in
termination of the Main process. This is fixed.
2) Response from the CDS Simuator when blueprint and action names are
unknown (in real cases, when a corresponding CBA is not uploaded to CDS) is updated to mimic an actual CDS response instead of always
returning a dummy success response.
Change-Id: I79a6d158addaad31649809006d1e3c1dfdb47a1f
Issue-ID: POLICY-2828
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Jim Hahn [Fri, 9 Oct 2020 22:51:10 +0000 (18:51 -0400)]
Bump models to 2.3.5
Issue-ID: POLICY-2863
Change-Id: Iba0dfe78576a2ad1551c165e3b9f53fa3c55259a
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 9 Oct 2020 22:30:33 +0000 (18:30 -0400)]
Release models 2.3.4 artifacts
Issue-ID: POLICY-2863
Change-Id: I5d523aaed4da8a2e97a2ef520cdac73b2351633a
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 9 Oct 2020 20:55:45 +0000 (16:55 -0400)]
Bump models to 2.3.4 snapshot
Issue-ID: POLICY-2863
Change-Id: I9d764a0cd695aa95a5880fd20b594e465d14c658
Signed-off-by: Jim Hahn <jrh3@att.com>