policy/models.git
3 years agoSkip preprocessor step in Actors 85/110885/2
Jim Hahn [Tue, 4 Aug 2020 13:09:14 +0000 (09:09 -0400)]
Skip preprocessor step in Actors

Modified Actors to skip the preprocessor step if the "preprocessed" flag
is set to true in the parameters.  Did not add any error checking code
to ensure the data was actually available to the operation - will add
that once the properties are being set by the application code.
Extracted common code in GrpcOperationTest into the setup method.

Issue-ID: POLICY-2746
Change-Id: Id70c31a2c96a7aaa9d73cc70cdf4f55f8a4e087f
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoAdd property lists to Actors 60/110760/4
Jim Hahn [Wed, 29 Jul 2020 17:50:40 +0000 (13:50 -0400)]
Add property lists to Actors

Modified the Actor code to provide a list of properties needed by the
actor to perform a given operation.
Added a build() method to the parameter class so invokers can build an
operation and set its properties prior to starting it.
Added a "preprocessed" field to the parameter class so invokers can
indicate that the Actor need not perform any preprocessing steps.  Will
modify the actors, in a subsequent review, to observe the flag.
Added "properties" to Operation so invokers can set the properties.  Will
modify the actors, in a subsequent review, to use the property values
instead of the event context.
Tweaked a few Actors to get values using the "params" object instead of
reaching inside to the event object that it contains.

Addressed review comment(s):
- add prefix to other property names

Issue-ID: POLICY-2746
Change-Id: I65996aef5cec5afe25e8287c0b2f5f322c532ca5
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoAllocate unique port for dmaap simulator junits 08/110808/2
Jim Hahn [Fri, 31 Jul 2020 11:51:33 +0000 (07:51 -0400)]
Allocate unique port for dmaap simulator junits

The junits for the dmaap simulator were randomly failing, because the
port was already in use.  Modified the junits to allocate their own,
individual ports.

Issue-ID: POLICY-2749
Change-Id: I3f3858091ee8f36ed00346ad9fa002a76d0348ae
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoUpdate INFO.yaml in policy-models 57/110757/1
Taka Cho [Thu, 30 Jul 2020 18:01:07 +0000 (14:01 -0400)]
Update INFO.yaml in policy-models

Verified with Jessica W that the "type" should still be "Addition",
even when updating the PTL.
Updated to Mature, per TSC.

Issue-ID: POLICY-2738
Change-Id: Ibfa990f73e565db4630ff6bc373cea626eb9fc2a
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoAdd Ajith to policy/models info 65/110565/1
Jim Hahn [Fri, 24 Jul 2020 16:59:20 +0000 (12:59 -0400)]
Add Ajith to policy/models info

Issue-ID: POLICY-2738
Change-Id: Ic3e9f9ee6641410356ff27f4d405fd606e6c44ff
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoFix some sonars in policy-models 25/110425/2
Jim Hahn [Tue, 21 Jul 2020 13:55:38 +0000 (09:55 -0400)]
Fix some sonars in policy-models

Fixed the following sonar issues in some of the project directories:
- use assertNull, assertEquals, etc.
- swap assertEquals arguments
- extract a constant
- don't invoke toString() in logger calls
- TODOs
- generic types

Issue-ID: POLICY-2714
Change-Id: Id8803f9bf617ea9fc173a67b8606600709b55bdc
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Support vDNS RainyDay test Case."
Jim Hahn [Fri, 17 Jul 2020 20:20:02 +0000 (20:20 +0000)]
Merge "Support vDNS RainyDay test Case."

3 years agoSupport vDNS RainyDay test Case. 91/110291/7
uj426b [Thu, 16 Jul 2020 18:52:57 +0000 (14:52 -0400)]
Support vDNS RainyDay test Case.

Modifying simulator to handle failure sent from Policy Json.

Change-Id: I52a9f8da4ad06b535262f202418868f79fea4510
Issue-ID: POLICY-2432
Signed-off-by: uj426b <uj426b@att.com>
3 years agopoint to SNAPSHOT version for model 38/110338/2
Taka Cho [Fri, 17 Jul 2020 15:23:08 +0000 (11:23 -0400)]
point to SNAPSHOT version for model

Issue-ID: POLICY-2695
Change-Id: Ife95d9a265646563c2ec2f171a764c6f164edacc
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoRemove legacy actor code from models 26/108826/3
Jim Hahn [Mon, 13 Jul 2020 20:06:57 +0000 (16:06 -0400)]
Remove legacy actor code from models

Deleted legacy actor code.  That includes deleting most of the
XxxManager classes.

Issue-ID: POLICY-2559
Change-Id: I1ef1b900ca1d23e88da64b2c95a18986feb1b765
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoBump policy/models to 2.3.1-SNAPSHOT 29/110029/1
Ram Krishna Verma [Thu, 9 Jul 2020 19:43:40 +0000 (15:43 -0400)]
Bump policy/models to 2.3.1-SNAPSHOT

Issue-ID: POLICY-2695
Change-Id: I64473cc81ae48942010472f15faac75c13cb0b7d
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoRelease policy/models 2.3.0 26/110026/1
Ram Krishna Verma [Thu, 9 Jul 2020 18:38:38 +0000 (14:38 -0400)]
Release policy/models 2.3.0

Issue-ID: POLICY-2695
Change-Id: Ic801aa2c69c204d4c3bfebbba329c6d254bc3a98
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoRefer to released parent & common in policy/models 22/110022/1
Ram Krishna Verma [Thu, 9 Jul 2020 17:09:05 +0000 (13:09 -0400)]
Refer to released parent & common in policy/models

Issue-ID: POLICY-2695
Change-Id: I4e30b08822095bddbb720e3785b7493bfddff749
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoRename XxxActorServiceProvider to XxxActor 74/109774/3
Jim Hahn [Thu, 2 Jul 2020 13:30:52 +0000 (09:30 -0400)]
Rename XxxActorServiceProvider to XxxActor

Renamed the actors and their test classes.

Addressed review comments:
- some license dates

Issue-ID: POLICY-2684
Change-Id: Ic9d83e146ef36bb305496d541166cb9f80544025
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoFix broken models build due to json upgrade 10/109710/2
Jim Hahn [Tue, 30 Jun 2020 23:08:26 +0000 (19:08 -0400)]
Fix broken models build due to json upgrade

The json dependency was moved to policy-parent and the "version"
property removed which broke the policy-models build.  Removed
the "version" from the pom.
Also removed the jetty-security "version" from the pom, as it is
no longer needed either.
Also added asm dependency, because upgrade of openpojo version
caused breakage in one of the TestPojos.

Issue-ID: POLICY-2387
Change-Id: I3c2315b3cbea05de76b6dfcc289f9323af77745b
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Add CDS simulator to policy-models"
Ram Krishna Verma [Mon, 29 Jun 2020 16:02:12 +0000 (16:02 +0000)]
Merge "Add CDS simulator to policy-models"

3 years agoAdd CDS simulator to policy-models 19/109619/1
Jim Hahn [Fri, 26 Jun 2020 20:59:40 +0000 (16:59 -0400)]
Add CDS simulator to policy-models

Added CDS simulator to policy-models.  Added a test case to the CDS
Actor to verify that it works with the simulator.

Issue-ID: POLICY-2676
Change-Id: I9b10de3bde93c69e82df983f77eecc253de8a1a2
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoClean up of Pair classes - models 61/109361/4
waynedunican [Fri, 19 Jun 2020 14:30:59 +0000 (15:30 +0100)]
Clean up of Pair classes - models

Removed Pair class from policy-models and replaced with Aoache Common
Pair class

Issue-ID: POLICY-2202
Change-Id: I786467ac02ecb2d433dba94deba45785be3dcf23
Signed-off-by: waynedunican <wayne.dunican@est.tech>
3 years agoUpdating models dependencies to latest versions 22/109522/1
RossC [Wed, 24 Jun 2020 09:49:26 +0000 (10:49 +0100)]
Updating models dependencies to latest versions

Issue-ID: POLICY-2387
Change-Id: Id89dac64139490f6d9b83b295cfe99c43ed657cf
Signed-off-by: RossC <ross.carter@est.tech>
3 years agoMerge "Changes for Checkstyle 8.32"
Ram Krishna Verma [Fri, 19 Jun 2020 21:19:30 +0000 (21:19 +0000)]
Merge "Changes for Checkstyle 8.32"

3 years agoMerge "make vDNS example use modelVersion string"
Ram Krishna Verma [Thu, 18 Jun 2020 21:58:58 +0000 (21:58 +0000)]
Merge "make vDNS example use modelVersion string"

3 years agoChanges for Checkstyle 8.32 26/109326/1
liamfallon [Thu, 18 Jun 2020 21:36:23 +0000 (22:36 +0100)]
Changes for Checkstyle 8.32

Issue-ID: POLICY-2188
Change-Id: I6db16763c1d2d80ff934302081a8dfc16afa7d9a
Signed-off-by: liamfallon <liam.fallon@est.tech>
3 years agoReplaced try/catch blocks in policy/models with assertj assertions. 93/109293/4
waynedunican [Thu, 18 Jun 2020 09:46:36 +0000 (10:46 +0100)]
Replaced try/catch blocks in policy/models with assertj assertions.

Issue-ID: POLICY-2451
Change-Id: I095beb674196d5ec5c4dd9b93d3a56cca5ee4788
Signed-off-by: waynedunican <wayne.dunican@est.tech>
3 years agomake vDNS example use modelVersion string 82/109282/3
jhh [Thu, 18 Jun 2020 02:57:13 +0000 (21:57 -0500)]
make vDNS example use modelVersion string

Issue-ID: POLICY-2652
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I2b632b8380f32715d1e0b526445f445cae79e90d
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoMerge "Adding 'name' to yamls and json in model"
Pamela Dragosh [Tue, 16 Jun 2020 14:03:02 +0000 (14:03 +0000)]
Merge "Adding 'name' to yamls and json in model"

3 years agoMerge "Moving common polling code into HttpOperation"
Ram Krishna Verma [Mon, 15 Jun 2020 13:43:09 +0000 (13:43 +0000)]
Merge "Moving common polling code into HttpOperation"

3 years agoMoving common polling code into HttpOperation 78/109078/3
Jim Hahn [Thu, 11 Jun 2020 23:00:41 +0000 (19:00 -0400)]
Moving common polling code into HttpOperation

SO and VFC have duplicate code for polling.  Moved it into the
common superclass.

Issue-ID: POLICY-2632
Change-Id: I27128bfb2d54ef522b6b44ff569819a8463f3454
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Change related to log4j removal needed in models"
Ram Krishna Verma [Fri, 12 Jun 2020 22:14:19 +0000 (22:14 +0000)]
Merge "Change related to log4j removal needed in models"

3 years agoAdding 'name' to yamls and json in model 20/109120/1
aditya.puthuparambil [Fri, 12 Jun 2020 15:39:27 +0000 (16:39 +0100)]
Adding 'name' to yamls and json in model

Issue-ID: POLICY-2052
Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech>
Change-Id: I3629a2b6f9e93f6d8166e63862d15dd0198865af

3 years agoRemove logback.xml files bundled as part of jar 93/109093/2
a.sreekumar [Fri, 12 Jun 2020 09:40:23 +0000 (10:40 +0100)]
Remove logback.xml files bundled as part of jar

Change-Id: I4d603ea67eca5d8d75b9df004e1ff4a6be2b2a9e
Issue-ID: POLICY-2627
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoChange related to log4j removal needed in models 71/109071/2
uj426b [Thu, 11 Jun 2020 17:37:13 +0000 (13:37 -0400)]
Change related to log4j removal needed in models

Change-Id: I449aef2c1f83edecc88c379525b8da6c80e9d35f
Issue-ID: POLICY-2623
Signed-off-by: uj426b <uj426b@att.com>
3 years agoMerge "Default ActorImpl should have an "operations" property"
Pamela Dragosh [Thu, 11 Jun 2020 18:28:03 +0000 (18:28 +0000)]
Merge "Default ActorImpl should have an "operations" property"

3 years agoMerge "Fixing issue with Jacoco coverage being stored above project directory"
Pamela Dragosh [Thu, 11 Jun 2020 18:26:01 +0000 (18:26 +0000)]
Merge "Fixing issue with Jacoco coverage being stored above project directory"

3 years agoMerge "Rename GuardOperation to DecisionOperation"
Jorge Hernandez [Thu, 11 Jun 2020 18:04:32 +0000 (18:04 +0000)]
Merge "Rename GuardOperation to DecisionOperation"

3 years agoDefault ActorImpl should have an "operations" property 27/109027/4
Jim Hahn [Wed, 10 Jun 2020 19:44:29 +0000 (15:44 -0400)]
Default ActorImpl should have an "operations" property

Added "operations" level to actor properties.  Also renamed CommonActorParams
to ActorParams, in the process.

Note: This impacts the properties specified in drools-apps.

Issue-ID: POLICY-2629
Change-Id: I155bcb6ced73cb54e656d34e0b184fb2ed6250d1
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoFixing issue with Jacoco coverage being stored above project directory 65/109065/3
RossC [Thu, 11 Jun 2020 14:11:53 +0000 (15:11 +0100)]
Fixing issue with Jacoco coverage being stored above project directory

Issue-ID: POLICY-2497
Change-Id: Ia0df647c9adc25dea51d4e5baab0191daa1c877e
Signed-off-by: RossC <ross.carter@est.tech>
3 years agoMerge "Flesh out junits for SDNR and VFC actors"
Ram Krishna Verma [Wed, 10 Jun 2020 19:40:40 +0000 (19:40 +0000)]
Merge "Flesh out junits for SDNR and VFC actors"

3 years agoRename GuardOperation to DecisionOperation 26/109026/1
Jim Hahn [Wed, 10 Jun 2020 18:14:40 +0000 (14:14 -0400)]
Rename GuardOperation to DecisionOperation

Issue-ID: POLICY-2628
Change-Id: I94eec317ff91f37add417f70f33c2d23fa0f3026
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoChanging toString on ToscaPolicyXXXIdentifiers 70/108970/4
RossC [Tue, 9 Jun 2020 13:35:41 +0000 (14:35 +0100)]
Changing toString on ToscaPolicyXXXIdentifiers

Issue-ID: POLICY-2078
Change-Id: I0e8aae118a52aaef7e372293396802b85782a22c
Signed-off-by: RossC <ross.carter@est.tech>
3 years agoFlesh out junits for SDNR and VFC actors 25/108925/2
Jim Hahn [Mon, 8 Jun 2020 14:49:39 +0000 (10:49 -0400)]
Flesh out junits for SDNR and VFC actors

Issue-ID: POLICY-2619
Change-Id: Ic0096a25dbcb40dc00f4b97cfafa57d162c7bdfd
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoFix VFC Restart operation name 22/108922/1
Jim Hahn [Mon, 8 Jun 2020 14:23:18 +0000 (10:23 -0400)]
Fix VFC Restart operation name

The VFC Restart operation has the name "VF Module Create", which is
incorrect.  Changed it to "Restart".

Issue-ID: POLICY-2407
Change-Id: Ic11d1dd25755d0d9e478ab4534cce71bec44c78b
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Use plain HashMap instead of IdentityHashMap"
Pamela Dragosh [Wed, 3 Jun 2020 16:09:33 +0000 (16:09 +0000)]
Merge "Use plain HashMap instead of IdentityHashMap"

3 years agoUse plain HashMap instead of IdentityHashMap 11/108711/3
Jim Hahn [Tue, 2 Jun 2020 21:17:20 +0000 (17:17 -0400)]
Use plain HashMap instead of IdentityHashMap

The javadocs say not to use IdentityHashMap except in special cases.
Modified the Actor code to use HashMap instead.

Issue-ID: POLICY-2604
Change-Id: Idcae4fe2e1e600fbb01cdcd09b1caddf2820740a
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoChange Actor makeCoder() to getCoder() 07/108707/2
Jim Hahn [Tue, 2 Jun 2020 20:46:47 +0000 (16:46 -0400)]
Change Actor makeCoder() to getCoder()

Issue-ID: POLICY-2603
Change-Id: I29d5c73f4b8b129bfdd6d0c9fb6d766b260e27c4
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Copy Dbao from drools-apps to models"
Pamela Dragosh [Mon, 1 Jun 2020 11:22:45 +0000 (11:22 +0000)]
Merge "Copy Dbao from drools-apps to models"

3 years agoMerge "Use "coder" to serialize Actor requests"
Pamela Dragosh [Mon, 1 Jun 2020 11:21:58 +0000 (11:21 +0000)]
Merge "Use "coder" to serialize Actor requests"

3 years agoMerge "Made Actor names public"
Ram Krishna Verma [Sun, 31 May 2020 01:35:16 +0000 (01:35 +0000)]
Merge "Made Actor names public"

3 years agoMade Actor names public 93/108593/1
Jim Hahn [Fri, 29 May 2020 21:05:20 +0000 (17:05 -0400)]
Made Actor names public

Some of the XxxActor.NAME constants were private.  Made them public
so drools-applications can reference them instead of hard-coding the
text.

Issue-ID: POLICY-1242
Change-Id: I849c979a3e209430db5132e6ff574ec73f1e3769
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoUse "coder" to serialize Actor requests 92/108592/2
Jim Hahn [Fri, 29 May 2020 20:32:57 +0000 (16:32 -0400)]
Use "coder" to serialize Actor requests

Modified the Actors to use the "coder" to serialize requests
instead of defaulting to the HttpClient serialization provider.
Decided to just pretty-print the requests since that can be used for
both logging and transmission, which avoids serializing the request twice.

Issue-ID: POLICY-2601
Change-Id: I190ed19dd852a1aa66156b358cbc97c3b121af1f
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoUse default serialization provider 91/108591/1
Jim Hahn [Fri, 29 May 2020 18:31:29 +0000 (14:31 -0400)]
Use default serialization provider

The default provider has been changed to gson, so the provider property
no longer has to be set.

Issue-ID: POLICY-1527
Change-Id: I3c829e2070617f85d998a56c0f58127d7f22b467
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoCopy Dbao from drools-apps to models 79/108579/4
Jim Hahn [Fri, 29 May 2020 14:17:24 +0000 (10:17 -0400)]
Copy Dbao from drools-apps to models

Drools-apps and xacml-pdp each have their own copy of Dbao.  Made
a copy of it in models as a first step toward eliminating the other
copies.  Also changed its package name be consistent with the other
interface package names and renamed it to OperationsHistory.
Also reordered the modules in the pom to make it alphabetical.

Issue-ID: POLICY-2581
Change-Id: I45afa680c6344eeac6b2d35c9e4f04a5ba7af431
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoDo not generate notification in SDNR Actor 68/108568/1
Jim Hahn [Fri, 29 May 2020 13:25:04 +0000 (09:25 -0400)]
Do not generate notification in SDNR Actor

Now that the SDNR Actor populates the operation outcome with the
SDNR response, it no longer needs to populate the notification
structure, as the application (e.g., drools-apps) can now generate
the notification, itself, using the response.

Issue-ID: POLICY-2593
Change-Id: Ie9bed0e59ca750211f17782fa7a2833c2087ac23
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Point to parent SNAPSHOT"
Ram Krishna Verma [Thu, 28 May 2020 20:13:44 +0000 (20:13 +0000)]
Merge "Point to parent SNAPSHOT"

3 years agoPoint to parent SNAPSHOT 31/108431/1
Pamela Dragosh [Thu, 28 May 2020 18:32:34 +0000 (14:32 -0400)]
Point to parent SNAPSHOT

Issue-ID: POLICY-2391
Change-Id: Iad31008a83e781cf1bfc76272d8f1127fa495f02
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoInclude response in OperationOutcome 43/108343/3
Jim Hahn [Wed, 27 May 2020 14:49:39 +0000 (10:49 -0400)]
Include response in OperationOutcome

Added the response field and modified the actors to populate it.

Issue-ID: POLICY-2592
Change-Id: I24487b6fbc23b69bde4a95acd470864d8231c49d
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoUse snapshot versions 26/108326/1
Jim Hahn [Wed, 27 May 2020 14:26:49 +0000 (10:26 -0400)]
Use snapshot versions

Issue-ID: POLICY-1526
Change-Id: I00f95b5375ef3d92482630bdf6cb32d8581a45df
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoBump models master to 2.3.0-SNAPSHOT 11/107911/1
Ram Krishna Verma [Tue, 19 May 2020 19:16:54 +0000 (15:16 -0400)]
Bump models master to 2.3.0-SNAPSHOT

Issue-ID: POLICY-2514
Change-Id: I6a3d4e588a0ff0d15fccf49de66c51ea7d709b4b
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoBump models to 2.2.7-SNAPSHOT 96/107896/2
Ram Krishna Verma [Tue, 19 May 2020 16:39:05 +0000 (12:39 -0400)]
Bump models to 2.2.7-SNAPSHOT

Issue-ID: POLICY-2514
Change-Id: Ie482926a56a5250be5d78a97aa7c1c19311a292c
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoRelease models 2.2.6 artifacts 78/107878/1 6.0.0-ONAP
Ram Krishna Verma [Tue, 19 May 2020 14:29:46 +0000 (10:29 -0400)]
Release models 2.2.6 artifacts

Issue-ID: POLICY-2514
Change-Id: Ie9892bfcd16d96cc93534c7540921f54f09fdf9e
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoCannot parse finishTime in legacy SO responses 56/107756/2
Jim Hahn [Fri, 15 May 2020 18:46:15 +0000 (14:46 -0400)]
Cannot parse finishTime in legacy SO responses

Adding the actual sample responses to the SO simulator broke the
drools-apps junit for usecases.  Fixed (in theory) by updating the
legacy SO actor to properly decode the finishTime.  Refactored the
new SO actor, extracting the type adapter into its own class file
so it could be shared between the new and legacy actors.

Issue-ID: POLICY-2570
Change-Id: I061b603172440b1a91da16d09b4f2a0d289dfc41
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoCannot parse finishTime in SO responses 50/107750/2
Jim Hahn [Fri, 15 May 2020 13:52:35 +0000 (09:52 -0400)]
Cannot parse finishTime in SO responses

The timestamp in SO responses appears to follow RFC-1123/RFC-822
format instead of ISO format.
Added a type adapter for SO.  In Guilin, we may want to consider
combining the two type adapters for LocalDateTime so that either format
is accepted.
Also modified the SO simulator to return responses that are actual
samples from SO.
As part of that work, discovered that the legacy SO actor is not able
to parse these timestamps either.  However, as that code is now
deprecated, left it as is.

Issue-ID: POLICY-2570
Change-Id: I322318d1007e36eef47bb8867fd8ed01cb60223a
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoSO poll should not require request ID 15/107715/3
Jim Hahn [Thu, 14 May 2020 23:08:02 +0000 (19:08 -0400)]
SO poll should not require request ID

When SO is polled for the result of a previous request, it
does not necessarily include the originally returned request
ID in the response.  This causes the SO actor to generate a
"missing request ID in response" exception.
Modified the actor to only extract the request ID from the
first response and cache it for subsequeent responses.
Testing this required the SO simulator to be modified so that
it would return an INCOMPLETE on the initial request, forcing
the actor to poll until it returns a COMPLETE.  Made this a
settable flag so that it could be enabled just to test the
SO actor without impacting other components (e.g., drools-apps,
CSITs).
Also fixed a couple of checkstyle issues in the simulators.

Issue-ID: POLICY-2568
Change-Id: Ifad8b3c0c2c0b03cb82da693c2cf5ced44ede105
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix race condition in AaiCqResponse 79/107579/3
Jim Hahn [Tue, 12 May 2020 16:11:14 +0000 (12:11 -0400)]
Fix race condition in AaiCqResponse

The JAXB unmarshaller used by AaiCqResponse is not thread safe.  As a
result, if two responses are decoded at the same time, it will generate
exceptions.

Issue-ID: POLICY-2556
Change-Id: I5e81d5f3c39b9ba321c146dc6f4f73e558aaca3e
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Policy DB contents removed on DB deadlock"
Pamela Dragosh [Mon, 11 May 2020 13:26:40 +0000 (13:26 +0000)]
Merge "Policy DB contents removed on DB deadlock"

4 years agoPolicy DB contents removed on DB deadlock 22/107422/2
liamfallon [Sun, 10 May 2020 14:53:46 +0000 (15:53 +0100)]
Policy DB contents removed on DB deadlock

When a DB deadlock occurs, the DB contents can sometimes be deleted
becasue the DB removes the Service Template object and recreates a new
one in two separate DB transactions.

This change makes sure that the object remove and re-create is in a
sngle DB transaction, so the operation will either happen or not happen
so the DB will not be cleared.

Legacy policy handling must also use the SimpleToscaProvider rather than
accessing the DB directly, as SimpleToscaProvider keeps the DB structure
correct.

Issue-ID: POLICY-2548
Change-Id: I263a41cd1d8bec5d7b421045b3b14aad6e6c66d3
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Add another blacklist entry for testing"
Liam Fallon [Sun, 10 May 2020 15:08:25 +0000 (15:08 +0000)]
Merge "Add another blacklist entry for testing"

4 years agoAdd another blacklist entry for testing 11/107411/1
Pamela Dragosh [Fri, 8 May 2020 20:43:03 +0000 (16:43 -0400)]
Add another blacklist entry for testing

So I can adequately test blacklist.

Issue-ID: POLICY-2490
Change-Id: I60c9a0fb0d597c1517a756b96dfcc32fcd39dd37
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoAdd missing payload section in vFW examples 01/107401/1
jhh [Fri, 8 May 2020 18:45:57 +0000 (13:45 -0500)]
Add missing payload section in vFW examples

Issue-ID: POLICY-2552
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I7acc7a7771ded3bc76c3fe420c93c077d84f0d31

4 years agoFix simultaneous get access to policy provider 07/107307/1
liamfallon [Thu, 7 May 2020 09:57:38 +0000 (10:57 +0100)]
Fix simultaneous get access to policy provider

When a "get" is executed while a "create" or "delete" is underway, the
DB sessions overlp and data is lost in the database. "get" requests must
also be synchronized.

Issue-ID: POLICY-2533
Change-Id: Idbe155568e5d793fe82b7cc3aad5ef121e8209b9
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMake type and type_version mandatory on policies 50/107250/1
liamfallon [Wed, 6 May 2020 15:19:38 +0000 (16:19 +0100)]
Make type and type_version mandatory on policies

Up until now, the "type" and "type_version" fields defaulted to "NULL"
and "0.0.0" respectively when they were not specified because the
"type_version" field was not always specified on policies in previous
releases. In cases where the "type_version" field was not specified, it
was assumend that a "0.0.0" version of the policy type existed. In
parallel, if the version field was not specified on the policy type, the
version was stored as 0.0.0.

This behaviour is now changed and the "type" and "type_version" fields
are now always mandatory.

Issue-ID: POLICY-2538
Change-Id: I4279adfa86f531205879dbb87986453604624032
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoPoint to released parent,common 66/107166/1
Pamela Dragosh [Tue, 5 May 2020 18:27:20 +0000 (14:27 -0400)]
Point to released parent,common

Issue-ID: POLICY-2514
Change-Id: Ib7bb52f147c30e9a4c588d29cb13495905ee1ac6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoPolicy delete should only return deleted policy 09/107109/1
liamfallon [Tue, 5 May 2020 12:05:11 +0000 (13:05 +0100)]
Policy delete should only return deleted policy

The policy type delete and policy delete now only return what is deleted
in the service template.

Issue-ID: POLICY-2534
Change-Id: I1b8d10c22d4392b0bbb655aa6876ac900ebc81df
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoFix simultaneous write access to policy provider 01/107001/2
liamfallon [Sat, 2 May 2020 00:35:07 +0000 (01:35 +0100)]
Fix simultaneous write access to policy provider

This change serializes write access to the policy database via the
AUthorative TOSCA provider by making sure that only one request is
executed at a time. His change should be repolaced by proper session
handling in the next release of the Policy Framework project.

Issue-ID: POLICY-2533
Change-Id: I5fe4c0f2846981a66eb2f4e1da936fe3c9490ae5
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agomodifications in example sdnc naming policy 40/106740/9
jhh [Tue, 28 Apr 2020 12:10:13 +0000 (07:10 -0500)]
modifications in example sdnc naming policy

Issue-ID: POLICY-2525
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I7c6880b63b3ff8f986fb0de27656eda8f6e596a2
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoRemove provided scope for endpoints in model-impl/cds 93/106693/1
a.sreekumar [Mon, 27 Apr 2020 15:45:50 +0000 (16:45 +0100)]
Remove provided scope for endpoints in model-impl/cds

Change-Id: Ic3571df8ed874267fb803d1f384ec5cb02fb80bb
Issue-ID: POLICY-2524
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
4 years agoBump models patch 2.2.6-SNAPSHOT 05/106605/1
Pamela Dragosh [Fri, 24 Apr 2020 16:26:14 +0000 (12:26 -0400)]
Bump models patch 2.2.6-SNAPSHOT

Also point to parent, common snapshots

Issue-ID: POLICY-2510
Change-Id: Iad79c341bcfb8cb6bb828ee71e199ba3bb9a838b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRelease 2.2.5 models artifacts 99/106599/1
Pamela Dragosh [Fri, 24 Apr 2020 15:02:05 +0000 (11:02 -0400)]
Release 2.2.5 models artifacts

Issue-ID: POLICY-2510
Change-Id: I224eb922ff4efe61a6826e8d6a61160645ea3ed2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Test latest policy version is returned"
Jim Hahn [Mon, 20 Apr 2020 16:29:48 +0000 (16:29 +0000)]
Merge "Test latest policy version is returned"

4 years agoMerge "Update monitoring policies to match DCAE"
Pamela Dragosh [Mon, 20 Apr 2020 11:20:50 +0000 (11:20 +0000)]
Merge "Update monitoring policies to match DCAE"

4 years agoTest latest policy version is returned 50/106250/1
liamfallon [Mon, 20 Apr 2020 08:43:36 +0000 (09:43 +0100)]
Test latest policy version is returned

Load 21 versions of the same policy and make sure that the latest
version is returned when the LATEST policy is set on the version filter.

Issue-ID: POLICY-2352
Change-Id: Iddee33ae53096e18ed2ec67b0c3e837d1d7410a9
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Add PNF support to new CDS actor"
Ram Krishna Verma [Sun, 19 Apr 2020 20:22:50 +0000 (20:22 +0000)]
Merge "Add PNF support to new CDS actor"

4 years agoAdd PNF support to new CDS actor 22/106222/2
Jim Hahn [Fri, 17 Apr 2020 19:09:21 +0000 (15:09 -0400)]
Add PNF support to new CDS actor

Made the following updates:
- added new A&AI get-PNF Operation by refactoring AaiGetOperation,
  separating out Tenant and PNF operations
- added PNF support to the CDS actor
- added logging to the CDS Handler
- added get-pnf to the A&AI simulator

Issue-ID: POLICY-2505
Change-Id: Iff140e7c864f762790d8e2ecaba62c161c859e6e
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoUpdate monitoring policies to match DCAE 15/106215/1
Pamela Dragosh [Fri, 17 Apr 2020 19:38:24 +0000 (15:38 -0400)]
Update monitoring policies to match DCAE

From testing last Wednesday 4/15. Update our policies to match
what DCAE is loading and is used for Integration E2E testing.

https://git.onap.org/dcaegen2/platform/blueprints/tree/blueprints/k8s-tca.yaml

Issue-ID: POLICY-2507
Change-Id: I2492e214625099884113ac0bc76e26181f992f0e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpdating pdp-simulator as per recent changes to send PdpGroup in status 81/106181/1
a.sreekumar [Fri, 17 Apr 2020 09:25:23 +0000 (10:25 +0100)]
Updating pdp-simulator as per recent changes to send PdpGroup in status

Change-Id: Ic2ad6bd7f65633eef73d6432f244be77d7c760f9
Issue-ID: POLICY-2499
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoCDS Operator should be generic 66/106166/1
Jim Hahn [Thu, 16 Apr 2020 22:51:40 +0000 (18:51 -0400)]
CDS Operator should be generic

Like the SDNR Operator, the CDS Operator should work regardless
of the operation name.

Issue-ID: POLICY-2504
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I9a77838462bc5b91e2d95e7dcf1f8822bd45f04c

4 years agoMerge "Add version to example yaml files"
Pamela Dragosh [Thu, 16 Apr 2020 18:42:05 +0000 (18:42 +0000)]
Merge "Add version to example yaml files"

4 years agoMerge "CDS actor was not registered"
Jorge Hernandez [Thu, 16 Apr 2020 18:04:49 +0000 (18:04 +0000)]
Merge "CDS actor was not registered"

4 years agoCDS actor was not registered 13/106113/2
Jim Hahn [Thu, 16 Apr 2020 16:34:52 +0000 (12:34 -0400)]
CDS actor was not registered

Moved the spi file to register the actor and added a test to
ensure that the registration worked.
Also removed some deprecated code from the CDS junits.

Issue-ID: POLICY-2501
Change-Id: I06f50ea8f074cdb7a89c7e387f9f31ea7cffa7e2
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdd version to example yaml files 03/106103/3
Jim Hahn [Thu, 16 Apr 2020 14:21:15 +0000 (10:21 -0400)]
Add version to example yaml files

Determined that some of the yaml files were not suitable for use
in the CSITs, because they were missing the "version" property.
Added it where needed.  Also added type_version where it was missing,
as well.

Issue-ID: POLICY-2491
Change-Id: I47bf0ec2b99d29580390a6e90512dfd903b042d6
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Fixing minor bug in policy-models/pdp-simulator script"
Ram Krishna Verma [Thu, 16 Apr 2020 13:55:23 +0000 (13:55 +0000)]
Merge "Fixing minor bug in policy-models/pdp-simulator script"

4 years agoFixing minor bug in policy-models/pdp-simulator script 83/106083/1
a.sreekumar [Thu, 16 Apr 2020 09:15:41 +0000 (10:15 +0100)]
Fixing minor bug in policy-models/pdp-simulator script

Change-Id: I3b7bdfdd2fdd73b38cf7996457f6bea735752d46
Issue-ID: POLICY-2499
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoAdd example drools native artifact policies 42/106042/2
jhh [Wed, 15 Apr 2020 19:28:45 +0000 (14:28 -0500)]
Add example drools native artifact policies

Issue-ID: POLICY-2378
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iab36c4b3214bef90dfe4a6f00ff68df04e3de203
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoBump models to 2.2.5-SNAPSHOT 44/105944/1
Ram Krishna Verma [Tue, 14 Apr 2020 19:03:24 +0000 (15:03 -0400)]
Bump models to 2.2.5-SNAPSHOT

Issue-ID: POLICY-2378
Change-Id: I5461bafd3c2d19f4f457da0816bba117a2d8b550
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoRelease models 2.2.4 35/105935/1
Ram Krishna Verma [Tue, 14 Apr 2020 18:23:13 +0000 (14:23 -0400)]
Release models 2.2.4

Issue-ID: POLICY-2378
Change-Id: Ia31590fe8dc76cc8c6bea66b1bab6ba1bb96cb14
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoPoint to released common 27/105927/1
Ram Krishna Verma [Tue, 14 Apr 2020 17:01:45 +0000 (13:01 -0400)]
Point to released common

Issue-ID: POLICY-2378
Change-Id: Ib956135eb681e8f9d9a7da9ecebc9c8d4fd615e6
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoMerge "Example usecases as controller native policy"
Ram Krishna Verma [Tue, 14 Apr 2020 17:00:57 +0000 (17:00 +0000)]
Merge "Example usecases as controller native policy"

4 years agoExample usecases as controller native policy 25/105925/1
jhh [Tue, 14 Apr 2020 16:32:47 +0000 (11:32 -0500)]
Example usecases as controller native policy

Issue-ID: POLICY-2489
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I94f8761982a6f257081a06667fccf9e089a9640e

4 years agoChange length to a string 09/105909/2
Pamela Dragosh [Tue, 14 Apr 2020 12:20:51 +0000 (08:20 -0400)]
Change length to a string

This field is now a string.

Issue-ID: POLICY-2486
Change-Id: Ie6707e29f2b069e3938897b62bd0591fd023016e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoFix strings in naming policy 61/105861/1
Pamela Dragosh [Mon, 13 Apr 2020 19:52:16 +0000 (15:52 -0400)]
Fix strings in naming policy

Issue-ID: POLICY-2486
Change-Id: I89b2bfd2ac00c407aa90c34e898e9701cca54925
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoBump models patch 2.2.4-SNAPSHOT 17/105817/1
Pamela Dragosh [Sat, 11 Apr 2020 19:13:35 +0000 (15:13 -0400)]
Bump models patch 2.2.4-SNAPSHOT

Issue-ID: POLICY-2378
Change-Id: I51c6c57bdcc0299c25b5ee05f47c20f4542bc02d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>