policy/models.git
3 years agoAllow wild-card in supportedPolicyTypes 07/116507/1
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>
3 years agoUse annotations to do validation 90/116490/4
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>
3 years agoUse ValidationResult for models v2.0 71/116471/2
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>
3 years agoJPA concepts for TOSCA 80/116180/6
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>
3 years agoAdd functional method for mapping maps to PfUtils 53/116253/3
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>
3 years agoFix Modify NSSI operation 50/116150/1
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

3 years agoMerge "Add generic methods to TOSCA providers and utils"
Jim Hahn [Fri, 4 Dec 2020 15:18:09 +0000 (15:18 +0000)]
Merge "Add generic methods to TOSCA providers and utils"

3 years agoMerge "Address sonar issues in policy/models"
Ajith Sreekumar [Fri, 4 Dec 2020 09:52:25 +0000 (09:52 +0000)]
Merge "Address sonar issues in policy/models"

3 years agoAdd generic methods to TOSCA providers and utils 80/116080/1
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>
3 years agoMerge "Remove unused imports"
Ajith Sreekumar [Thu, 3 Dec 2020 10:02:19 +0000 (10:02 +0000)]
Merge "Remove unused imports"

3 years agoAddress sonar issues in policy/models 45/116045/1
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>
3 years agoRemove unused imports 34/116034/1
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>
3 years agoMerge "Use common LocalDateTimeTypeAdaptor for SO"
Pamela Dragosh [Wed, 2 Dec 2020 14:09:03 +0000 (14:09 +0000)]
Merge "Use common LocalDateTimeTypeAdaptor for SO"

3 years agoMerge "Add extra authorative TOSCA concepts"
Liam Fallon [Wed, 2 Dec 2020 12:54:51 +0000 (12:54 +0000)]
Merge "Add extra authorative TOSCA concepts"

3 years agoAdd extra authorative TOSCA concepts 66/115166/3
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>
3 years agoUse common LocalDateTimeTypeAdaptor for SO 78/115978/1
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>
3 years agoRemove targetEntity from makeOutcome 53/115553/1
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>
3 years agoDelete preprocessed flag from actors 44/115044/4
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>
3 years agoMerge "Make Actors event-agnostic"
Ram Krishna Verma [Wed, 18 Nov 2020 15:27:45 +0000 (15:27 +0000)]
Merge "Make Actors event-agnostic"

3 years agoFix upcoming checkstyle issues 59/114659/2
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>
3 years agoMake Actors event-agnostic 75/111575/3
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>
3 years agoPoint to snapshot versions 94/114294/1
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>
3 years agoBump models master to 2.4.0 SNAPSHOT 86/114286/1
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>
3 years agoBump models to 2.3.6 snapshot 17/114017/1
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>
3 years agoRelease models 2.3.5 artifacts 11/114011/1 7.0.0-ONAP
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>
3 years agoMerge "Default should be an object on TOSCA properties"
Pamela Dragosh [Fri, 16 Oct 2020 13:32:46 +0000 (13:32 +0000)]
Merge "Default should be an object on TOSCA properties"

3 years agoDefault should be an object on TOSCA properties 12/113112/3
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>
3 years agoBug fixes and improvements in CDS Simulator 06/113806/4
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>
3 years agoBump models to 2.3.5 39/113739/1
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>
3 years agoRelease models 2.3.4 artifacts 37/113737/1
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>
3 years agoBump models to 2.3.4 snapshot 33/113733/1
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>
3 years agoRelease models 2.3.3 artifacts 31/113731/1
Jim Hahn [Fri, 9 Oct 2020 19:37:34 +0000 (15:37 -0400)]
Release models 2.3.3 artifacts

Issue-ID: POLICY-2863
Change-Id: I45e1de278f17fd3527cf700113ee0a879f4c90aa
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoSpecify "Accept" header in A&AI requests 25/113725/1
Jim Hahn [Fri, 9 Oct 2020 16:26:14 +0000 (12:26 -0400)]
Specify "Accept" header in A&AI requests

Modified the A&AI superclass to specify application/json for the Accept
header.  Removed the header from the subclasses.

Issue-ID: POLICY-2863
Change-Id: I90974e305cb36ee2fa01999be4d79225a510e55b
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoBump models to 2.3.3 36/113636/2
Jim Hahn [Wed, 7 Oct 2020 19:32:22 +0000 (15:32 -0400)]
Bump models to 2.3.3

Issue-ID: POLICY-2839
Change-Id: Ifd7f45854904545b4f2973e1429cb791ac00b600
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRelease models 2.3.2 artifacts 26/113626/1
Jim Hahn [Wed, 7 Oct 2020 18:39:27 +0000 (14:39 -0400)]
Release models 2.3.2 artifacts

Issue-ID: POLICY-2839
Change-Id: Ib17668226d28bd966ddab5c583278e66bd61e321
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoFix parent package name in models simulator 19/113619/1
Jim Hahn [Wed, 7 Oct 2020 16:33:02 +0000 (12:33 -0400)]
Fix parent package name in models simulator

Stage release failed saying:
  Non-resolvable parent POM for
    org.onap.policy.models.sim:models-simulator-tarball

Fixed the name of the parent artifact in the package poms.

Issue-ID: POLICY-2839
Change-Id: I61c81133095d9dadd51d77d73ecfd1ef11695419
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "fix orphan module issue"
Jorge Hernandez [Wed, 7 Oct 2020 14:12:37 +0000 (14:12 +0000)]
Merge "fix orphan module issue"

3 years agoMerge "Adding basic logging to CDS Simulator"
Jorge Hernandez [Wed, 7 Oct 2020 14:10:40 +0000 (14:10 +0000)]
Merge "Adding basic logging to CDS Simulator"

3 years agoMerge "rename controller.controllerName to controller.name"
Jorge Hernandez [Wed, 7 Oct 2020 14:09:33 +0000 (14:09 +0000)]
Merge "rename controller.controllerName to controller.name"

3 years agoAdding basic logging to CDS Simulator 07/113607/2
a.sreekumar [Wed, 7 Oct 2020 10:26:37 +0000 (11:26 +0100)]
Adding basic logging to CDS Simulator

1) Adding log statements to capture actions taken by CDS Simulator.
2) Fixing the way CDSRequest input is read from a String. StandardCoder
decode method cannot directly decode from a String to protobuf type.

Change-Id: I597c64ffb095f6a518b0b6c67c1617ca789ad7d6
Issue-ID: POLICY-2828
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoMerge "Don't always validate restServerParameters"
Jorge Hernandez [Tue, 6 Oct 2020 21:37:03 +0000 (21:37 +0000)]
Merge "Don't always validate restServerParameters"

3 years agofix orphan module issue 78/113578/3
Taka Cho [Tue, 6 Oct 2020 16:30:37 +0000 (12:30 -0400)]
fix orphan module issue

when running sonar:sonar
models-simulator-tarball" module
gets orphan module error

Issue-ID: POLICY-2859
Change-Id: I1d08a7ffadb7446c04fb62460e33ba3d2abffe6e
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agorename controller.controllerName to controller.name 80/113580/2
jhh [Tue, 6 Oct 2020 17:52:08 +0000 (12:52 -0500)]
rename controller.controllerName to controller.name

Issue-ID: POLICY-2860
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I097e15f5e6343b26bfb1afe69c530ce3142e18ec
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoFix random failures in CdsSimulatorTest 86/113586/2
Jim Hahn [Tue, 6 Oct 2020 18:46:08 +0000 (14:46 -0400)]
Fix random failures in CdsSimulatorTest

Modified CdsSimulatorTest to allocate a unique server port for each
test.

Issue-ID: POLICY-2862
Change-Id: I4a7ed299c7458dade7444c6c8f2b476e24500dd4
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoDon't always validate restServerParameters 81/113581/3
Jim Hahn [Tue, 6 Oct 2020 17:50:36 +0000 (13:50 -0400)]
Don't always validate restServerParameters

Restored original validation code to DmaapSimParameterGroup so it works
as it originally worked (i.e., required "restServerParameters").
However, modified SimulatorParameters to validate the relevant fields
directly, rather than relying on DmaapSimParameterGroup.validate(), thus
eliminating all checks on "restServerParameters" when used within
SimulatorParameters.

Issue-ID: POLICY-2858
Change-Id: I9a09431ce3056a874bf2dba1c5bd6c418f37f69b
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Make simulator parameters optional"
Ajith Sreekumar [Tue, 6 Oct 2020 08:57:06 +0000 (08:57 +0000)]
Merge "Make simulator parameters optional"

3 years agoMake simulator parameters optional 40/113540/1
Jim Hahn [Mon, 5 Oct 2020 15:31:40 +0000 (11:31 -0400)]
Make simulator parameters optional

Modified the simulator to make the DMaaP and GRPC parameters optional so
that a simulator can be started without them.  Also added parameter
validation, as that was not being performed on the DMaaP or GRPC
parameters.  Also modified the validation so-as not to require the rest
server parameter field contained within the DMaaP parameter class.

Issue-ID: POLICY-2858
Change-Id: I85dde93c7baf863eca2cb10eab37806f3e08a087
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Log simulator output at INFO level"
Ram Krishna Verma [Mon, 5 Oct 2020 15:15:50 +0000 (15:15 +0000)]
Merge "Log simulator output at INFO level"

3 years agoLog simulator output at INFO level 98/113498/2
Jim Hahn [Fri, 2 Oct 2020 17:27:31 +0000 (13:27 -0400)]
Log simulator output at INFO level

The simulator is defaulting to DEBUG log level which generates too much
output to wade through.  Changing to INFO level and sending to stdout
for easier use in docker & kubernetes environments.

Issue-ID: POLICY-2742
Change-Id: I078a406d539068e25747a59955214c35fc31510e
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoFix eclipse/sonar warnings in models 95/113495/1
Jim Hahn [Fri, 2 Oct 2020 16:56:47 +0000 (12:56 -0400)]
Fix eclipse/sonar warnings in models

Addressed the following eclipse/sonar warnings:
- unused imports
- unchanged type
- unreachable "catch" block
- reinterrupt

Issue-ID: POLICY-2714
Change-Id: I2fe6011ec74b7fab8889050e5c83647ab034ea25
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Enhance gRPC Simulator:"
Ajith Sreekumar [Thu, 1 Oct 2020 11:44:39 +0000 (11:44 +0000)]
Merge "Enhance gRPC Simulator:"

3 years agoRemove Entity annotation from PfConceptContainer 89/113389/1
liamfallon [Wed, 30 Sep 2020 16:39:21 +0000 (17:39 +0100)]
Remove Entity annotation from PfConceptContainer

The PfConceptContainer class uses incompatible JPA anotations
@MappedSuperClass and @Entity are incompatible as a MappedSuperClass
cannot be an entity.

Eclipselink silently tolerates this incompatibility but Hibernate (used
in CLAMP) throws a build error on this class.

Issue-ID: POLICY-2851
Change-Id: I2fd3d9217dc00717f8f2471e4848d254e7726b11
Signed-off-by: liamfallon <liam.fallon@est.tech>
3 years agoEnhance gRPC Simulator: 54/113054/13
puthuparambil.aditya [Wed, 23 Sep 2020 11:39:46 +0000 (12:39 +0100)]
Enhance gRPC Simulator:

1.Make gRPC Simulator respond to different actions by generating the response on the basis of received request.
2.Include CDS Simulator in policy-models-simulator
3.Introduce a packages module in models-sim to package the docker image of policy-models-simulator which includes all the simulators(pdp-simulator to be added in future) in models.
4.The Jenkins job changes to push this newly created Docker image may be taken in the next release.

Issue-ID: POLICY-2828
Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca>
Change-Id: Ic1663bbe8205c64a8133ea0b0c28152f21d0732a

3 years agoMerge "Add DCAE policy types"
Liam Fallon [Mon, 28 Sep 2020 10:20:14 +0000 (10:20 +0000)]
Merge "Add DCAE policy types"

3 years agoupdate default keystores 25/113125/1
jhh [Thu, 24 Sep 2020 19:43:05 +0000 (14:43 -0500)]
update default keystores

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

3 years agoAdd DCAE policy types 06/113106/1
Pamela Dragosh [Thu, 24 Sep 2020 13:27:41 +0000 (09:27 -0400)]
Add DCAE policy types

These policy types were removed from SDC and added into policy.
They are legacy and will be determined later if they should be
permanently deleted or moved into use case code.

The default fields need to be changed because our TOSCA code
expects a string and does not recognize list.

Issue-ID: SDC-3229
Change-Id: I36a03032134d6d320d1a459cfe1d56ce6a702d5d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoUse latest alpine base image 71/112771/1
Jim Hahn [Wed, 16 Sep 2020 21:40:09 +0000 (17:40 -0400)]
Use latest alpine base image

Simulators are only used while testing, thus the version of the alpine
image need not be specified.  Removing the version from the Dockerfile
eliminates the need to update the Dockerfile every time the version
changes.

Issue-ID: POLICY-2819
Change-Id: Ie81079f4734b369eaf865c58d319b8244427207a
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRemove base64 encoding of password from models 49/112749/3
Ram Krishna Verma [Wed, 16 Sep 2020 14:21:36 +0000 (10:21 -0400)]
Remove base64 encoding of password from models

Remove base64 encoding of db password from models.
This will have impact on the defaultConfig of API & PAP component.
Seperate reviews are raised for those repos.

Issue-ID: POLICY-2550
Change-Id: I258f76d01c21893bb40b4095a82e56ed51bd1377
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoBump models to 2.3.2 20/112320/1
Jim Hahn [Tue, 8 Sep 2020 18:28:58 +0000 (14:28 -0400)]
Bump models to 2.3.2

Issue-ID: POLICY-2789
Change-Id: I19b397ecb165bea30059142d9d4c5357ceba9825
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRelease 2.3.1 models 89/112289/1
Jim Hahn [Tue, 8 Sep 2020 17:40:08 +0000 (13:40 -0400)]
Release 2.3.1 models

Issue-ID: POLICY-2789
Change-Id: I2199abef6ff9e34f3bdcc0103c59e3d5a761df6c
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoUse released versions 83/112283/1
Jim Hahn [Tue, 8 Sep 2020 15:03:36 +0000 (11:03 -0400)]
Use released versions

Issue-ID: POLICY-2789
Change-Id: I94e3a329499365465db9e5c81461570506f86620
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRevert "point to 2.1.0 policy-alpine base - model-sim" 00/112000/1
Jim Hahn [Fri, 4 Sep 2020 21:45:57 +0000 (21:45 +0000)]
Revert "point to 2.1.0 policy-alpine base - model-sim"

This reverts commit e46f74d64fe69d33d5038704b64993aa9cab59fc.

Reason for revert: some CSITs broken because the can't find the image

Issue-ID: POLICY-2789
Change-Id: Id6355c21789281a3f25467b3bd6e2e48d22533f5
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agopoint to 2.1.0 policy-alpine base - model-sim 69/112169/3
Taka Cho [Fri, 4 Sep 2020 12:58:25 +0000 (08:58 -0400)]
point to 2.1.0 policy-alpine base - model-sim

In G-rel, using 2.1.0 base.

Issue-ID: POLICY-2789
Change-Id: I165debaf20267c0b1c3141bff805a29595f1eccf
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoAdd new method to retrieve vnf-id 16/112016/4
Pamela Dragosh [Tue, 1 Sep 2020 20:38:15 +0000 (16:38 -0400)]
Add new method to retrieve vnf-id

For guard filters, once the vnf-id is found. Then this convenience
method helps to retrieve the correct vnf information.

Issue-ID: POLICY-2590
Change-Id: I0b55b15582ddc58bbc5b2c0c2c2b130f3cdc88c3
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Signed-off-by: Jim Hahn <jrh3@att.com>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoMerge "Add Modify NSSI operation in SO actor"
Jim Hahn [Tue, 1 Sep 2020 16:15:55 +0000 (16:15 +0000)]
Merge "Add Modify NSSI operation in SO actor"

3 years agoAdd Modify NSSI operation in SO actor 35/111735/11
krishnaa96 [Wed, 26 Aug 2020 09:29:04 +0000 (14:59 +0530)]
Add Modify NSSI operation in SO actor

Issue-ID: POLICY-2586
Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com>
Change-Id: I6ac184a6e731767f06401a0ac984c6b448c5d82f

3 years agoDefault policies to usecases controller 51/111851/1
Jim Hahn [Fri, 28 Aug 2020 19:26:04 +0000 (15:26 -0400)]
Default policies to usecases controller

The example operation policies specify the "frankfurt" controller.
Modified them to specify the "usecases" controller instead.

Issue-ID: POLICY-2748
Change-Id: I468b43a80e09dd054ba3b8fa8dbc47c8d7efd548
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Remove commons-io dependency from models"
Jim Hahn [Fri, 28 Aug 2020 12:29:16 +0000 (12:29 +0000)]
Merge "Remove commons-io dependency from models"

3 years agoMerge "Remove Target and TargetType"
Jim Hahn [Fri, 28 Aug 2020 12:28:06 +0000 (12:28 +0000)]
Merge "Remove Target and TargetType"

3 years agoRemove commons-io dependency from models 15/111815/2
Jim Hahn [Thu, 27 Aug 2020 21:39:06 +0000 (17:39 -0400)]
Remove commons-io dependency from models

Issue-ID: POLICY-2798-commons-io
Change-Id: I2b2593b5f00aa73ea80fba6438c836e70f6ee45c
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRemove Target and TargetType 97/111797/5
Pamela Dragosh [Thu, 27 Aug 2020 12:44:12 +0000 (08:44 -0400)]
Remove Target and TargetType

The dependency should have been removed in the last review to
remove SDC and policy-yaml legacy code.

It was revealed that usage of TargetType and Type were spread out over the
actor code. Those fields are represented differently in the new
TOSCA Operational Policy Type, so fields were created to capture
those values to be used by actor code.

Issue-ID: POLICY-2428
Change-Id: Ib783526a518ca7942ae9e38019bd343639f4dd98
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoFix random failures in dmaap-sim 91/111791/1
Jim Hahn [Thu, 27 Aug 2020 11:59:19 +0000 (07:59 -0400)]
Fix random failures in dmaap-sim

Modified the code to use a separate topic for the format tests, as well
as a separate consumer name for each test.

Issue-ID: POLICY-2749
Change-Id: Ia93f17109b761e98a4f676066024b51dd9024dc0
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Address more sonar issues in policy-models"
Pamela Dragosh [Wed, 26 Aug 2020 11:13:19 +0000 (11:13 +0000)]
Merge "Address more sonar issues in policy-models"

3 years agoMerge "update keystore cert"
Jorge Hernandez [Tue, 25 Aug 2020 23:32:27 +0000 (23:32 +0000)]
Merge "update keystore cert"

3 years agoupdate keystore cert 21/111721/1
Taka Cho [Tue, 25 Aug 2020 23:15:10 +0000 (19:15 -0400)]
update keystore cert

new expiration date is
3/17/2021

Issue-ID: POLICY-2795
Change-Id: I6c4b636b48ca2aef8165c1f4fd19067b242aedb4
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoAddress more sonar issues in policy-models 00/111700/2
Jim Hahn [Tue, 25 Aug 2020 16:30:29 +0000 (12:30 -0400)]
Address more sonar issues in policy-models

Addressed sonar issues:
- diamond operator
Also removed a number of the "NOSONAR" comments now that we know how to
address them without disabling sonar.

Issue-ID: POLICY-2714
Change-Id: I440f4fa955968fd911616c2b6ee61b4b4d013821
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Add new match Policy Type"
Ram Krishna Verma [Tue, 25 Aug 2020 18:20:26 +0000 (18:20 +0000)]
Merge "Add new match Policy Type"

3 years agoAdd new match Policy Type 61/111661/1
Pamela Dragosh [Mon, 24 Aug 2020 19:55:29 +0000 (15:55 -0400)]
Add new match Policy Type

Allows Policy Designers to design their own matchable Policy Type
out-of-the-box with ONAP.

Issue-ID: POLICY-2596
Change-Id: I632201f50b565d5a558f8a773bf658407bedbfe6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoMerge "Remove legacy operational policy from models"
Jim Hahn [Mon, 24 Aug 2020 15:05:04 +0000 (15:05 +0000)]
Merge "Remove legacy operational policy from models"

3 years agoRemove deprecated SDC and Model-yaml 35/111635/1
Pamela Dragosh [Mon, 24 Aug 2020 12:05:15 +0000 (08:05 -0400)]
Remove deprecated SDC and Model-yaml

Deprecated as we now use TOSCA and the SDC catalog objects
isn't useful for control loop design and implementation.

Issue-ID: POLICY-2428
Change-Id: Ib4adfbf25ba70c3cad47a8494333a1f20a5c4e23
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoSonar Fixes policy/models, removing model-yaml 16/110816/15
uj426b [Fri, 31 Jul 2020 16:06:01 +0000 (12:06 -0400)]
Sonar Fixes policy/models, removing model-yaml

Change-Id: Icd82ea1aef90e4d638b13958519aac5ed5a53f73
Issue-ID: POLICY-2714
Signed-off-by: uj426b <uj426b@att.com>
3 years agoMerge "Upgrade new tcagen2 policy type"
Jim Hahn [Wed, 19 Aug 2020 19:13:23 +0000 (19:13 +0000)]
Merge "Upgrade new tcagen2 policy type"

3 years agoUpgrade new tcagen2 policy type 27/111427/1
Pamela Dragosh [Wed, 19 Aug 2020 15:18:39 +0000 (11:18 -0400)]
Upgrade new tcagen2 policy type

The old cdap policy type is deprecated by DCAE. Thus,
we are simply replacing with the new tcagen2 policy type.

Issue-ID: POLICY-2772
Change-Id: I1442340729b5f820f2e265b9b86f6f6f84f49bca
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoMake targetEntity a property 84/111384/2
Jim Hahn [Tue, 18 Aug 2020 13:39:19 +0000 (09:39 -0400)]
Make targetEntity a property

The target entity is not always known when an Operation is first
constructed, thus it should be treated as an Operation property instead
of being included within the ControlLoopParams.  Started the process of
moving it from the Params to the properties.
Also fixed a bug in custom query - it was setting the outcome response
to the String response instead of setting it to the AaiCqResponse
object.
Also added logging when an Operation's properties are set.

Issue-ID: POLICY-2746
Change-Id: I56c0cd90985f6140363548b0b8d031471b586e88
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Remove event context from Operation post processor"
Ram Krishna Verma [Tue, 18 Aug 2020 19:59:14 +0000 (19:59 +0000)]
Merge "Remove event context from Operation post processor"

3 years agoRemove event context from Operation post processor 52/111352/1
Jim Hahn [Mon, 17 Aug 2020 22:45:58 +0000 (18:45 -0400)]
Remove event context from Operation post processor

Some operations, notably A&AI, post-process data by putting it into the
event context.  However, with the new strategy, the event context may
not be populated.  Modified the code to see if the context exists before
putting the data into it.

Issue-ID: POLICY-2746
Change-Id: Ie3b1bd13b4ac5ee59629daaebc05a62e6ef3c804
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoAdd new guard filter policy type 43/111343/2
Pamela Dragosh [Mon, 17 Aug 2020 20:42:55 +0000 (16:42 -0400)]
Add new guard filter policy type

New policy type for testing and preloading.

Issue-ID: POLICY-2590
Change-Id: Ic542c61bd402387870306fce9a1977b169052ef9
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoRemove legacy operational policy from models 82/111282/2
Ram Krishna Verma [Fri, 14 Aug 2020 15:11:36 +0000 (11:11 -0400)]
Remove legacy operational policy from models

Removing all the legacy operational policy related
concepts, providers, examples etc from models repo.

Issue-ID: POLICY-2764
Change-Id: Ie820271381674ccc4eaef0bd6379f673f67701e7
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoMerge "Do not require context in ControlLoopOperationParams"
Ram Krishna Verma [Fri, 14 Aug 2020 21:20:47 +0000 (21:20 +0000)]
Merge "Do not require context in ControlLoopOperationParams"

3 years agoRemove annotations from dmaap common test class 89/111289/3
Jim Hahn [Fri, 14 Aug 2020 19:25:35 +0000 (15:25 -0400)]
Remove annotations from dmaap common test class

Jenkins builds are randomly failing in the junits for the dmaap simulator.
From the console output, it appears that the simulator is being shut down
before all of the test methods have executed.  Moved the code for
managing the "Main" object from the common superclass to the only
subclass that needed it.

Issue-ID: POLICY-2749
Change-Id: I2615bbef9b790dbb633ed7f123aeb3f880826862
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoDo not require context in ControlLoopOperationParams 49/111249/1
Jim Hahn [Thu, 13 Aug 2020 15:15:29 +0000 (11:15 -0400)]
Do not require context in ControlLoopOperationParams

Modified ControlLoopOperationParams so that the request ID can
be provided instead of the context.  However, if the request ID
is not provided, then it still requires a context.  (This requirement
should be lifted in a subsequent review).

Issue-ID: POLICY-2746
Change-Id: Ib00f46f2fe56430d700ee2edfba12f2c1a106a3f
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Modify Actors to use properties when provided"
Pamela Dragosh [Fri, 7 Aug 2020 22:02:24 +0000 (22:02 +0000)]
Merge "Modify Actors to use properties when provided"

3 years agoModify Actors to use properties when provided 00/110900/5
Jim Hahn [Tue, 4 Aug 2020 20:27:18 +0000 (16:27 -0400)]
Modify Actors to use properties when provided

Modified the Actors to use properties when the application provides them
instead of going to the event context for the data.  This sometimes entailed
moving code out of the Operation subclass constructor that used or validated
the context data.
Combined some property names and renamed others.
Changed VF Count from AtomicInteger to Integer.

Issue-ID: POLICY-2746
Change-Id: Ib8730538309bb77d2f4f6161e9a20a49362d8972
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoExclude javaparser due to license issue 90/110990/1
Jim Hahn [Thu, 6 Aug 2020 15:47:40 +0000 (11:47 -0400)]
Exclude javaparser due to license issue

javaparser is included indirectly by aai-schema jar.  Modified the
pom to excluded javaparser when including aai-schema jar.  Verified
that models aai code still works and that drools-apps use case tests
still work.

Issue-ID: POLICY-2736
Change-Id: Iba137cf7ee4be6f2e35e3053413a4a9068860823
Signed-off-by: Jim Hahn <jrh3@att.com>
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>