policy/apex-pdp.git
2 years agoFix sonars in apex-pdp #3 69/123769/1
Jim Hahn [Wed, 1 Sep 2021 15:45:05 +0000 (11:45 -0400)]
Fix sonars in apex-pdp #3

Fixed:
- use "var"
- use assertEquals instead of assertTrue(xxx.equals())
- separate assertions

Issue-ID: POLICY-3093
Change-Id: Id4db62626948681cd267e68a56dda65fa355c6f8
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoFix sonar issues in apex-pdp 72/123672/5
Ram Krishna Verma [Fri, 27 Aug 2021 20:53:11 +0000 (16:53 -0400)]
Fix sonar issues in apex-pdp

Issue-ID: POLICY-3077
Change-Id: Id5e7c2ddada2bac3b73fe543f9adade6f9b83e6c
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2 years agoMerge "Fix sonars in apex-pdp #2"
Jim Hahn [Mon, 30 Aug 2021 15:03:16 +0000 (15:03 +0000)]
Merge "Fix sonars in apex-pdp #2"

2 years agoUse latest policy-parent snapshot 89/123689/1
liamfallon [Mon, 30 Aug 2021 13:26:22 +0000 (14:26 +0100)]
Use latest policy-parent snapshot

The parent snapshot enables the latest version of netty.

Issue-ID: POLICY-3590
Change-Id: I273c7e25988f6190d761ba4300eb56c9f02e3cee
Signed-off-by: liamfallon <liam.fallon@est.tech>
2 years agoFix sonars in apex-pdp #2 69/123669/2
Jim Hahn [Fri, 27 Aug 2021 19:24:06 +0000 (15:24 -0400)]
Fix sonars in apex-pdp #2

plugins-events thru plugins-persistence-jpa-eclipselink

Fixed:
- use "var"
- disambiguate method parameter types
- rename parameter

Issue-ID: POLICY-3093
Change-Id: Ife5897015be495403e731754d5862b803a217c87
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoAddress more sonars in apex-pdp 68/123668/2
Jim Hahn [Fri, 27 Aug 2021 18:49:41 +0000 (14:49 -0400)]
Address more sonars in apex-pdp

Fixed services-engine thru utilities.

Fixed:
- use "var"
- use Files.delete()
- only one method call in assert()

Issue-ID: POLICY-3093
Change-Id: I6f62108c770c15e8b84bc51746066fefa409e0fc
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoAddress eclipse warnings in apex-pdp 61/123661/2
Jim Hahn [Fri, 27 Aug 2021 15:14:36 +0000 (11:14 -0400)]
Address eclipse warnings in apex-pdp

Fixed:
- deprecated mockito methods
- unused mocks

Issue-ID: POLICY-3093
Change-Id: I20d9aebb2a6390b2a3c95ae9ccc59b710b9e58ce
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoFix sonar issues 44/123644/1
Ram Krishna Verma [Thu, 26 Aug 2021 20:22:12 +0000 (16:22 -0400)]
Fix sonar issues

Issue-ID: POLICY-3077
Change-Id: I480b97984754ec4b69c6cde6481510fbbf62252e
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2 years agoUse policy/docker image 2.3.0 17/123617/1
Jim Hahn [Thu, 26 Aug 2021 17:38:26 +0000 (13:38 -0400)]
Use policy/docker image 2.3.0

Issue-ID: POLICY-3587
Change-Id: I5beff4d99dc869e85497621f50b6a56d3d95e7db
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoRemove GPLv3 from apex-pdp image 55/123555/2
Jim Hahn [Wed, 25 Aug 2021 15:44:58 +0000 (11:44 -0400)]
Remove GPLv3 from apex-pdp image

The apex-pdp docker image includes libelf, which is GPLv3 and is
therefore disallowed by ONAP.  Appears to be included with "iproute2",
which isn't needed anymore, so just removed it.  Also added code to
update the "apk" repo list.

Issue-ID: POLICY-2845
Change-Id: I7472d584bdd391b7a711c6718f2596b1081c032c
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoUse CompareToBuilder 22/123522/1
Jim Hahn [Tue, 24 Aug 2021 17:20:26 +0000 (13:20 -0400)]
Use CompareToBuilder

Also added lombok to test classes.

Issue-ID: POLICY-3391
Change-Id: I9ecf479f3861a2e5211b037e885029d1719b6a56
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoMore lombok for apex-pdp 82/123482/2
Jim Hahn [Mon, 23 Aug 2021 21:10:00 +0000 (17:10 -0400)]
More lombok for apex-pdp

Added lombok to auth thru context-management, excluding basic-model and
context-model.

Issue-ID: POLICY-3391
Change-Id: I1c3a69d52d3bc65a99126ad44126e5a97424c66f
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoFix junits broken by change in is-alive type 72/123472/1
Jim Hahn [Mon, 23 Aug 2021 19:16:13 +0000 (15:16 -0400)]
Fix junits broken by change in is-alive type

Issue-ID: POLICY-3531
Change-Id: I1460333fdd2ebeb96aaa3b5d3186d2bd1eda2d71
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoEnable prometheus by default in apex-pdp 53/123453/2
a.sreekumar [Mon, 23 Aug 2021 13:52:17 +0000 (14:52 +0100)]
Enable prometheus by default in apex-pdp

Change-Id: I0f0742474a5b242ebe71c0e5ab62bc2b1d0de1b9
Issue-ID: POLICY-3538
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2 years agoUse common RestServer in apex-pdp 50/123350/1
a.sreekumar [Wed, 18 Aug 2021 13:47:08 +0000 (14:47 +0100)]
Use common RestServer in apex-pdp

Change-Id: I8e0089cdd16f8e5f8db70db9c678fb598521158b
Issue-ID: POLICY-3539
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2 years agouse url resource for docker-tag -- apex 02/123202/1
Taka Cho [Mon, 9 Aug 2021 20:12:04 +0000 (16:12 -0400)]
use url resource for docker-tag -- apex

use groovy url resource from docker repo
to identify the tag for docker

Issue-ID: POLICY-3378
Change-Id: I73be74f19d0d39912676d839c99f918fdfcf2078
Signed-off-by: Taka Cho <takamune.cho@att.com>
2 years agoUse lombok for apex-pdp #7 76/123076/2
Jim Hahn [Tue, 3 Aug 2021 18:08:09 +0000 (14:08 -0400)]
Use lombok for apex-pdp #7

Updated thru core-protocols.

Issue-ID: POLICY-3391
Change-Id: I2226fee16b276eba5c7f3fd1921a6cef36654f07
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoUse lombok in apex-pdp #5 72/123072/3
Jim Hahn [Mon, 2 Aug 2021 20:36:26 +0000 (16:36 -0400)]
Use lombok in apex-pdp #5

Updated examples thru integration-executor-test.

Issue-ID: POLICY-3391
Change-Id: Idc707146a646d05720675a787761c199484048e9
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoUse lombok in apex-pdp #4 45/123045/3
Jim Hahn [Mon, 2 Aug 2021 19:56:00 +0000 (15:56 -0400)]
Use lombok in apex-pdp #4

Updated model, testsuites, and tools.

Issue-ID: POLICY-3391
Change-Id: I187d84380661f5d4222967c1c5f004c318d65982
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoUse lombok in apex-pdp #3 43/123043/2
Jim Hahn [Mon, 2 Aug 2021 19:28:00 +0000 (15:28 -0400)]
Use lombok in apex-pdp #3

Updated plugins thru plugins-persistence-jpa-eclipselink.

Issue-ID: POLICY-3391
Change-Id: Id7a5aeca8bb45c7a089f0b9d49c9ecd4bc8a7178
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoUse lombok in apex-pdp #2 09/123109/6
Jim Hahn [Wed, 4 Aug 2021 14:41:51 +0000 (10:41 -0400)]
Use lombok in apex-pdp #2

Updated context to use lombok.

Issue-ID: POLICY-3391
Change-Id: I349e0202fffad161cac08cebaea4a9571db58bda
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoUse lombok annotations in apex-pdp 22/123022/2
Jim Hahn [Fri, 30 Jul 2021 20:06:49 +0000 (16:06 -0400)]
Use lombok annotations in apex-pdp

Updated projects: services-engine through utilities

Issue-ID: POLICY-3391
Change-Id: I35ebb40d86e9bda360f7819516290b3fea88335c
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoImprove APEX logging for irrelevant events 31/122931/3
a.sreekumar [Wed, 28 Jul 2021 16:21:35 +0000 (17:21 +0100)]
Improve APEX logging for irrelevant events

When multiple policies are expecting event on the same topic/endpoint,
a lot of event parsing failure log messages are generated
unnecessarily. With this change, only a 1 line message will
be printed if an event cannot be parsed, and the detailed messages
will be available at debug level.

Change-Id: If1e7460ef5ed86fd470396f1e2ed8cc3c8af70c4
Issue-ID: POLICY-3499
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2 years agoUse docker registry properties in apex-pdp 47/122747/1
Jim Hahn [Mon, 19 Jul 2021 18:48:59 +0000 (14:48 -0400)]
Use docker registry properties in apex-pdp

Issue-ID: POLICY-3374
Change-Id: I7d9cfecdea244db6215f2c594f61b2d9b6cf96e0
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoUpdate pdp statistics to count deploy/undeploy separately. 27/122527/2
adheli.tavares [Thu, 8 Jul 2021 14:36:25 +0000 (15:36 +0100)]
Update pdp statistics to count deploy/undeploy separately.

Issue-ID: POLICY-3383
Change-Id: Ie9c5c7178c4c4302a0ba63ab42732f7157d302f8
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2 years agoFix Sonar in apex examples aadm bbs 25/122525/1
lapentafd [Wed, 30 Jun 2021 12:10:42 +0000 (13:10 +0100)]
Fix Sonar in apex examples aadm bbs

Replacing local-variable type inference

Issue-ID: POLICY-3093
Change-Id: I84bc2d182256f6a4aa24d9c1e020e934190bd623
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2 years agoMerge "Cleanup input & outputFields from Task definition"
Ajith Sreekumar [Tue, 6 Jul 2021 13:33:46 +0000 (13:33 +0000)]
Merge "Cleanup input & outputFields from Task definition"

2 years agoMerge "Fix Sonar Issues in apex examples-adaptive"
Liam Fallon [Mon, 5 Jul 2021 07:36:38 +0000 (07:36 +0000)]
Merge "Fix Sonar Issues in apex examples-adaptive"

2 years agoCleanup input & outputFields from Task definition 87/122387/7
a.sreekumar [Tue, 29 Jun 2021 12:57:14 +0000 (13:57 +0100)]
Cleanup input & outputFields from Task definition

1) Remove the usage of inputField and outputField from Task definition.
2) Fix issues around populating events to task in case of State
   Finalizer Logic.

Change-Id: Ief17f400729410b83c6b7c665980d443e0cf6f28
Issue-ID: POLICY-3336
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2 years agoFix Sonar Issues in apex examples-adaptive 94/122394/2
lapentafd [Tue, 29 Jun 2021 10:31:34 +0000 (11:31 +0100)]
Fix Sonar Issues in apex examples-adaptive

Replacing local-variable type inference

Replaced EqualsAndHashCode ToString
methods with lombok annotation in AutoLearn class

Issue-ID: POLICY-3093
Change-Id: I3f3911222f0e34ad3c7687d7a1e1aad218448303
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2 years agoMerge "Use unique name in apex-pdp messages"
Jim Hahn [Wed, 30 Jun 2021 03:36:29 +0000 (03:36 +0000)]
Merge "Use unique name in apex-pdp messages"

2 years agoFixing checkstyle issue in APEX 38/122338/1
a.sreekumar [Tue, 29 Jun 2021 13:47:03 +0000 (14:47 +0100)]
Fixing checkstyle issue in APEX

Change-Id: I6b88d59a54617cb9f14a5aaa2638f87a6c1ef3e9
Issue-ID: POLICY-3209
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2 years agoMerge "Changes to support multiple outputs from a state"
Jim Hahn [Tue, 29 Jun 2021 12:33:33 +0000 (12:33 +0000)]
Merge "Changes to support multiple outputs from a state"

2 years agoMerge "Fix sonar issues in apex plugins and testsuites"
Liam Fallon [Tue, 29 Jun 2021 07:56:19 +0000 (07:56 +0000)]
Merge "Fix sonar issues in apex plugins and testsuites"

2 years agoUse unique name in apex-pdp messages 42/122342/1
Jim Hahn [Mon, 28 Jun 2021 20:01:47 +0000 (16:01 -0400)]
Use unique name in apex-pdp messages

Used name generator for apex-pdp instance id.

Issue-ID: POLICY-3410
Change-Id: Ifcb216d45fba7d6b10043f39fcb299daffe86b69
Signed-off-by: Jim Hahn <jrh3@att.com>
2 years agoChanges to support multiple outputs from a state 07/122107/8
a.sreekumar [Tue, 22 Jun 2021 14:55:46 +0000 (15:55 +0100)]
Changes to support multiple outputs from a state

This review addresses two main changes:
1) inputFields and outputFields are not tied to task definition anymore.
   Instead inputEvent and outputEvents associated to a task is populated
   as part of the policy state definition, as the state definition have
   the information anyway.
   - Clean up of the usage of inputFields and outputFields in task
     definition will happen in a future review
   - inputFields and outputFields defined in task definition in
     policies until honolulu will not make the policy invalid as the
     changes are done in backward compatible way.
2) Multiple output events can come out of a final state now.
   - Define another policy state output with the relevant eventName in
     the command file
   - In the task logic, create a map to store the fields of the relevant
     outputEvent, and then just call
     "executor.addFieldsToOutput(<the_map_of_fields>)"
     These 2 steps are enough to send multiple events to relevant
     components as per the apex configuration.

Change-Id: Id88ca402704106404f529e595e1a76f6bf167876
Issue-ID: POLICY-3336
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2 years agoMerge "Update policy-apex-pdp for checkstyle 8.43"
Ajith Sreekumar [Mon, 28 Jun 2021 09:35:23 +0000 (09:35 +0000)]
Merge "Update policy-apex-pdp for checkstyle 8.43"

2 years agoUpdate policy-apex-pdp for checkstyle 8.43 64/122264/1
liamfallon [Mon, 28 Jun 2021 09:15:14 +0000 (10:15 +0100)]
Update policy-apex-pdp for checkstyle 8.43

Issue-ID: POLICY-3209
Change-Id: I0cb6fc8f5693fe03b4d68af2fde5116e9e248115
Signed-off-by: liamfallon <liam.fallon@est.tech>
2 years agoMerge "Update apex-pdp for checkstyle 8.43"
Ajith Sreekumar [Mon, 28 Jun 2021 08:49:09 +0000 (08:49 +0000)]
Merge "Update apex-pdp for checkstyle 8.43"

2 years agoFix sonar issues in apex plugins and testsuites 71/122271/1
lapentafd [Fri, 25 Jun 2021 13:52:51 +0000 (14:52 +0100)]
Fix sonar issues in apex plugins and testsuites

Replacing local-variable type inference

Issue-ID: POLICY-3093
Change-Id: I715231d6cf71d13c87b260b9f903910f9a5c434f
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2 years agoUpdate apex-pdp for checkstyle 8.43 86/122186/1
liamfallon [Thu, 24 Jun 2021 16:01:11 +0000 (17:01 +0100)]
Update apex-pdp for checkstyle 8.43

Issue-ID: POLICY-3206
Change-Id: I3873c85aab577e85a9ae6b610c3871ee4de6ea53
Signed-off-by: liamfallon <liam.fallon@est.tech>
2 years agoSonar Issues in Apex plugins-context 57/122157/1
lapentafd [Tue, 22 Jun 2021 11:29:11 +0000 (12:29 +0100)]
Sonar Issues in Apex plugins-context

Replacing local-variable type inference, and checkstyle fix

Refactor lambda expression to have one invocation to throw exception

Issue-ID: POLICY-3093
Change-Id: I6f89793a3652c50897d7f8e0fda35fffba903acc
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2 years agoFix Sonar Issues in apex-pdp-services-engine 14/122014/2
lapentafd [Wed, 16 Jun 2021 11:23:23 +0000 (12:23 +0100)]
Fix Sonar Issues in apex-pdp-services-engine

Test refactoring and local-variable type inference replaced

Issue-ID: POLICY-3093
Change-Id: I0c5506f27ea53da7740acce87a25060ba2bce7f4
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2 years agoFix Sonar issues in apex-pdp 31/121931/1
lapentafd [Tue, 15 Jun 2021 10:09:52 +0000 (11:09 +0100)]
Fix Sonar issues in apex-pdp

Issue-ID: POLICY-3093
Change-Id: I4def597b054a9ab2f3cc9a4665df04dd1d515ebf
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2 years agoFix Rebase Issue on Sonar Issues apex-pdp-model 75/121875/1
lapentafd [Thu, 10 Jun 2021 15:38:21 +0000 (16:38 +0100)]
Fix Rebase Issue on Sonar Issues apex-pdp-model

Deleting a duplicate method inserted in two different reviews

Issue-ID: POLICY-3093
Change-Id: Ie7c06c17ad1df380ebcd7129c218f5784152ff0e
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2 years agoMerge "Fix Sonar Issues in apex-pdp-basic-model"
Pamela Dragosh [Thu, 10 Jun 2021 13:30:35 +0000 (13:30 +0000)]
Merge "Fix Sonar Issues in apex-pdp-basic-model"

2 years agoMerge "Fix Sonar Issues in apex-pdp-model"
Ram Krishna Verma [Wed, 9 Jun 2021 18:20:27 +0000 (18:20 +0000)]
Merge "Fix Sonar Issues in apex-pdp-model"

2 years agoFix Sonar Issues in apex-pdp-basic-model 71/121771/2
lapentafd [Tue, 8 Jun 2021 12:20:41 +0000 (13:20 +0100)]
Fix Sonar Issues in apex-pdp-basic-model

Test refactoring and use of Local-Variable Type Inference

Issue-ID: POLICY-3093
Change-Id: If19c9ec96ba440a58eff679f276e4b53a26ce1ab
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2 years agoFix Sonar Issues in apex-pdp-model 84/121684/5
lapentafd [Wed, 2 Jun 2021 11:02:46 +0000 (12:02 +0100)]
Fix Sonar Issues in apex-pdp-model

Changes made into model/basic-model

Renamed test classes to match the others

Issue-ID: POLICY-3093
Change-Id: I7a0d6046ead42a9165aaf96b89511dd8d064d109
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
3 years agoMerge "Fix Sonar Issues on Apex-pdp"
Ajith Sreekumar [Wed, 2 Jun 2021 11:44:06 +0000 (11:44 +0000)]
Merge "Fix Sonar Issues on Apex-pdp"

3 years agoFix Sonar Issues on Apex-pdp 70/121570/3
lapentafd [Thu, 27 May 2021 09:18:49 +0000 (10:18 +0100)]
Fix Sonar Issues on Apex-pdp

Changes made into cli-codegen, cli-editor, and core-engine

Renamed one test class to match other test classes

Issue-ID: POLICY-3093
Change-Id: Ib2d947782021590ffc08d426e7a1607a8c33f98a
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
3 years agoFixing issues around policy deployment in APEX 85/121585/4
a.sreekumar [Fri, 28 May 2021 10:40:37 +0000 (11:40 +0100)]
Fixing issues around policy deployment in APEX

Following items are fixed.
1) When in PASSIVE state, any policiesToBeUndeployed received
   in PDP_UPDATE message are not handled.

2) APEX policy deployment fails when policiesToBeUndeployed
   and policiesToBeDeployed come together in PDP_UPDATE message from PAP.

3) Improve response messages after deployment/undeployment.

Change-Id: I8f9c802db4b19c43881c734570b65ad66b3867d5
Issue-ID: POLICY-3332
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoRemove csit folder from policy/apex-pdp 47/121347/3
Ram Krishna Verma [Thu, 13 May 2021 19:31:07 +0000 (15:31 -0400)]
Remove csit folder from policy/apex-pdp

The csit test files for all repos have been consolidated in policy/docker to maintain them at single place and allow us to trigger verify jobs in gerrit reviews.

Issue-ID: POLICY-3257
Change-Id: I26d281b75d91e7bf1250e97b22d0e7a303815ed6
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoFix issue where apex-pdp test is failing in gitlab 92/121292/1
a.sreekumar [Wed, 12 May 2021 16:32:01 +0000 (17:32 +0100)]
Fix issue where apex-pdp test is failing in gitlab

One of the testcases in APEX-PDP is failing only in gitlab,
but not failing in jenkins or local builds.
The reason is "/I/Dont/Exist*" is an invlaid path in jenkins etc,
but it is valid in gitlab somehow.

Changing this to "/I/Dont/Exist\0" so that the path is invalid
irrespective of the build platform.

Change-Id: I42bbc9ae21f0d827082f446f8dd416dcc10349e2
Issue-ID: POLICY-3306
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoMerge "Support ':' in Apex Event Avro schema fieldnames"
Pamela Dragosh [Tue, 11 May 2021 19:09:55 +0000 (19:09 +0000)]
Merge "Support ':' in Apex Event Avro schema fieldnames"

3 years agoUpdate the default logback.xml in APEX to log to STDOUT 53/121253/1
a.sreekumar [Tue, 11 May 2021 11:27:42 +0000 (12:27 +0100)]
Update the default logback.xml in APEX to log to STDOUT

Update the default logback.xml to log to STDOUT,
so that while running in standalone mode, logs can be seen easily.

Change-Id: Ie0ccdbe11672c33723c920767ce14d1b26fa9762
Issue-ID: POLICY-3303
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoSupport ':' in Apex Event Avro schema fieldnames 27/121227/4
JohnKeeney [Mon, 10 May 2021 12:19:46 +0000 (13:19 +0100)]
Support ':' in Apex Event Avro schema fieldnames

Similar to '.' (_DoT_) and '-' (_Dash_), the ':' (_ColoN_) character
can now be used in Apex Event Field names specified using Avro Schema

Change-Id: I320058441a1a1a544b9f1619e45c96e71e5aa9e3
Signed-off-by: JohnKeeney <john.keeney@est.tech>
Issue-ID: POLICY-3301
Signed-off-by: JohnKeeney <john.keeney@est.tech>
3 years agoMerge "Code coverage for Service Engine Event"
Jim Hahn [Fri, 7 May 2021 22:19:15 +0000 (22:19 +0000)]
Merge "Code coverage for Service Engine Event"

3 years agoCode coverage for Service Engine Event 54/121154/3
arkadiusz.adamski [Tue, 27 Apr 2021 08:17:47 +0000 (09:17 +0100)]
Code coverage for Service Engine Event

- Increase code coverage for service engine events

Issue-ID: POLICY-3092
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: I40bda05fc53168d86ec4ac1c72b69a1badb02b38

3 years agoCode coverage for File Carrier Plugin 24/120924/8
arkadiusz.adamski [Thu, 22 Apr 2021 11:24:48 +0000 (12:24 +0100)]
Code coverage for File Carrier Plugin

- Increase code coverage for file carrier plugin in service engine

Issue-ID: POLICY-3092
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: I8c08ee55c9d31792e35a1acc79330c8eef42af56

3 years agoMerge "Add testcases for policy status and pdp statistics"
Pamela Dragosh [Thu, 6 May 2021 12:35:29 +0000 (12:35 +0000)]
Merge "Add testcases for policy status and pdp statistics"

3 years agoUpdating APEX base image from policy-jre-alpine to policy-jdk-alpine 01/121101/3
a.sreekumar [Wed, 5 May 2021 10:45:51 +0000 (11:45 +0100)]
Updating APEX base image from policy-jre-alpine to policy-jdk-alpine

The stackoverflow issue is happening only in standalone mode when
RestManager class is called from APEX Javascript logic to post a
JSON body, that too 6-7 out of 10 times.
To identify the exact root cause may need more investigation,
but changing the base image from policy-jre-alpine to policy-jdk-alpine
seems to have fixed the issue during local testing.
(Issue didn't happen 10 out of 10 times)

Change-Id: Ibe718294ff9ab04c70349b3bc52c3c66619f2093
Issue-ID: POLICY-3066
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoAdd testcases for policy status and pdp statistics 88/121088/1
Ram Krishna Verma [Tue, 4 May 2021 20:30:16 +0000 (16:30 -0400)]
Add testcases for policy status and pdp statistics

Adding testcases to validate policy status and pdp statistics api's.

Issue-ID: POLICY-3257
Change-Id: I730451c4abb19bab6ddf10cba58f63ab5ca3a11a
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoMerge "Remove GroupValidationResult"
Jim Hahn [Tue, 4 May 2021 11:56:38 +0000 (11:56 +0000)]
Merge "Remove GroupValidationResult"

3 years agoRemove GroupValidationResult 84/120984/5
Jim Hahn [Wed, 28 Apr 2021 19:45:22 +0000 (15:45 -0400)]
Remove GroupValidationResult

Removed GroupValidationResult, replacing it with BeanValidationResult.
Modified the ParameterGroup subclasses to use BeanValidator, adding
annotations where needed to trigger the validations that had been
automatically performed by GroupValidationResult.

Issue-ID: POLICY-2059
Change-Id: I2c0c01fac355e6cde4d8d6998dc42f8a2e2ebb65
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Changes to retain executionProperties per event flow for better context handling"
Ram Krishna Verma [Fri, 30 Apr 2021 17:07:29 +0000 (17:07 +0000)]
Merge "Changes to retain executionProperties per event flow for better context handling"

3 years agoMerge "Support delta policies in apex-pdp"
Ram Krishna Verma [Wed, 28 Apr 2021 16:51:38 +0000 (16:51 +0000)]
Merge "Support delta policies in apex-pdp"

3 years agoChanges to retain executionProperties per event flow for better context handling 65/120965/1
a.sreekumar [Wed, 28 Apr 2021 10:51:23 +0000 (11:51 +0100)]
Changes to retain executionProperties per event flow for better context handling

Change-Id: I11668e9222dd9c61cc3096fa5c754c8702a781bf
Issue-ID: POLICY-3227
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoSupport delta policies in apex-pdp 36/120536/6
waynedunican [Wed, 14 Apr 2021 12:19:35 +0000 (13:19 +0100)]
Support delta policies in apex-pdp

Remove scanning of policy list from apex engine. Use the
policiesToBeDeployed and policiesToBeUndeployed lists from PDP_UPDATE
message instead.

Issue-ID: POLICY-3170
Change-Id: Icdde66ef87d9feab83ccb1cf99a64d7870bcaaaa
Signed-off-by: waynedunican <wayne.dunican@est.tech>
3 years agoMerge "Changes to support Kafka over SSL in APEX"
Ram Krishna Verma [Thu, 22 Apr 2021 14:13:17 +0000 (14:13 +0000)]
Merge "Changes to support Kafka over SSL in APEX"

3 years agoMerge "Refactor of command line classes"
Ram Krishna Verma [Thu, 22 Apr 2021 14:12:28 +0000 (14:12 +0000)]
Merge "Refactor of command line classes"

3 years agoMerge "Fix name of target-database property in persistence.xml files"
Liam Fallon [Thu, 22 Apr 2021 13:15:45 +0000 (13:15 +0000)]
Merge "Fix name of target-database property in persistence.xml files"

3 years agoRefactor of command line classes 65/120765/3
adheli.tavares [Tue, 13 Apr 2021 13:51:44 +0000 (14:51 +0100)]
Refactor of command line classes

ApexCommandLineArguments class to have parse() overriden to keep
remainingArgs taking the tosca file without -p.

Issue-ID: POLICY-3129
Change-Id: Ib067bf4c32992c4477cb6751f65269c103513d10
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
3 years agoChanges to support Kafka over SSL in APEX 81/120781/3
a.sreekumar [Wed, 21 Apr 2021 14:01:30 +0000 (15:01 +0100)]
Changes to support Kafka over SSL in APEX

The Kafka plugin in APEX-PDP already has a field "kafkaProperties" that
can take in any properties required for the Kafka client. This is apt to
store the SSL related properties as they could change based on the
server implementation.

To make the communication possible, the only change required in APEX is
to allow a property to have an empty value.
For e.g., to disable the server host name verification, ssl.endpoint.identification.algorithm must to be explicitly set to an empty string on the client.

Change-Id: If3adaeaf11e5fbbd2aff582b5d4ba7824017ea8a
Issue-ID: POLICY-3194
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoMerge "Code coverage for plugins jms event carrier"
Liam Fallon [Wed, 21 Apr 2021 12:41:44 +0000 (12:41 +0000)]
Merge "Code coverage for plugins jms event carrier"

3 years agoCode coverage for plugins jms event carrier 88/120688/2
arkadiusz.adamski [Mon, 12 Apr 2021 08:52:25 +0000 (09:52 +0100)]
Code coverage for plugins jms event carrier

- Increase code coverage for plugins jms event carrier

Issue-ID: POLICY-3109
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: I28dd8c5b32eb91f8f5047916e8899439d4c62374

3 years agoFix name of target-database property in persistence.xml files 66/120766/1
ktimoney [Wed, 14 Apr 2021 11:56:13 +0000 (12:56 +0100)]
Fix name of target-database property in persistence.xml files

Updated property javax.persistence.target-database to eclipselink.target-database
Removed tools/tools-common/testing.txt
Added Modifications Copyright to headers
Updated Postgres references to MySQL
Updated user information

Issue-ID: POLICY-3059
Change-Id: I42ad294458809c0a3dca4d3ce9dd1ae5a7daa417
Signed-off-by: ktimoney <kevin.timoney@est.tech>
3 years agoMerge "Update jMeter test files"
Jorge Hernandez [Mon, 19 Apr 2021 13:30:41 +0000 (13:30 +0000)]
Merge "Update jMeter test files"

3 years agoCode coverage for service engine event package 94/120394/5
arkadiusz.adamski [Thu, 1 Apr 2021 11:43:14 +0000 (12:43 +0100)]
Code coverage for service engine event package

- Increase code coverage for service engine event package

Issue-ID: POLICY-3092
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: Iaed5fc31f242a47dd1dc46f5d5c74c43c720e9ee

3 years agoMerge "Code coverage for jms protocol event plugin"
Ajith Sreekumar [Thu, 15 Apr 2021 15:44:26 +0000 (15:44 +0000)]
Merge "Code coverage for jms protocol event plugin"

3 years agoUpdate jMeter test files 90/120490/2
arkadiusz.adamski [Fri, 9 Apr 2021 14:23:46 +0000 (15:23 +0100)]
Update jMeter test files

- Update performance test file
- Update stability test file

Issue-ID: POLICY-3109
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: Ibcab9cd012ed9ea50cb389f45ae7d8149b850a2d

3 years agoCode coverage for jms protocol event plugin 89/120489/4
arkadiusz.adamski [Tue, 6 Apr 2021 08:56:55 +0000 (09:56 +0100)]
Code coverage for jms protocol event plugin

- Increase code coverage for jms protocol event plugin

Issue-ID: POLICY-3092
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: I615d56736b548b3d5f552ae1becac771d445b477

3 years agoAPEX-PDP incorrectly reports successful policy deployment to PAP 10/120310/1
a.sreekumar [Thu, 8 Apr 2021 10:06:14 +0000 (11:06 +0100)]
APEX-PDP incorrectly reports successful policy deployment to PAP

Change-Id: I2fbf0303805b4c5feead522ad78fd4ef518659af
Issue-ID: POLICY-3173
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoMerge "Use sh instead of ash in apex-pdp"
Pamela Dragosh [Wed, 7 Apr 2021 15:34:57 +0000 (15:34 +0000)]
Merge "Use sh instead of ash in apex-pdp"

3 years agoUse sh instead of ash in apex-pdp 39/120239/3
Jim Hahn [Tue, 6 Apr 2021 19:42:08 +0000 (15:42 -0400)]
Use sh instead of ash in apex-pdp

Issue-ID: POLICY-3160
Change-Id: Ic48de952b5717e4f33d0eac47b41c41a2a97b883
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoUpdate jMeter test file 74/120074/1
arkadiusz.adamski [Wed, 31 Mar 2021 11:23:35 +0000 (12:23 +0100)]
Update jMeter test file

Issue-ID: POLICY-3093
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: If9600785d46bed5596847991690fe1631b97bbf3

3 years agoFix sonar issues 90/119890/3
arkadiusz.adamski [Wed, 24 Mar 2021 16:24:22 +0000 (16:24 +0000)]
Fix sonar issues

- reduce methods Cognitive Complexity from 19 to the 15 allowed in CommandLineParser
- iteration replaced with bulk 'Collection.addAll' call
- remove redundant initializers
- replace try with try-with-resources

Issue-ID: POLICY-3093
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: Ia727b3145ef8f63bcfc07723191c85e1ec8c923c

3 years agoMerge "Fix sonar issues"
Jim Hahn [Fri, 26 Mar 2021 19:17:39 +0000 (19:17 +0000)]
Merge "Fix sonar issues"

3 years agoMerge "Fix sonar issues"
Jorge Hernandez [Thu, 25 Mar 2021 13:29:02 +0000 (13:29 +0000)]
Merge "Fix sonar issues"

3 years agoFix sonar issues 91/119891/1
arkadiusz.adamski [Wed, 24 Mar 2021 16:55:39 +0000 (16:55 +0000)]
Fix sonar issues

- change test method name to avoid triggering SQ warning

Issue-ID: POLICY-3093
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: Id2997319e9986582a85f383c1f737340f4b4ea2c

3 years agoOverride to default entry point in apex-pdp 49/119649/2
Ram Krishna Verma [Tue, 23 Mar 2021 17:03:52 +0000 (13:03 -0400)]
Override to default entry point in apex-pdp

Overriding to default entry point (/bin/sh) in apex-pdp docker file to support stand alone installations of docker image.

Issue-ID: POLICY-3062
Change-Id: I100674cedf78f7221128bc87dd562835f297e0dd
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoFix sonar issues 47/119747/1
arkadiusz.adamski [Tue, 23 Mar 2021 18:29:25 +0000 (18:29 +0000)]
Fix sonar issues

- fix method name on ApexModel

Issue-ID: POLICY-3093
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: I853de0f48bbe683249b4c60c4189fb053c5c12a2

3 years agoMerge "Fixing issues around deploying APEX policies with duplicate concepts"
Jim Hahn [Tue, 23 Mar 2021 14:19:55 +0000 (14:19 +0000)]
Merge "Fixing issues around deploying APEX policies with duplicate concepts"

3 years agoMerge "Delete keystores from apex"
Ram Krishna Verma [Mon, 22 Mar 2021 21:45:22 +0000 (21:45 +0000)]
Merge "Delete keystores from apex"

3 years agoFixing issues around deploying APEX policies with duplicate concepts 59/119559/2
a.sreekumar [Fri, 19 Mar 2021 17:49:07 +0000 (17:49 +0000)]
Fixing issues around deploying APEX policies with duplicate concepts

Deploying invalid APEX policies with duplicate concepts resulting in
corrupting all the policies in memory. This is fixed here.
This entire functionality handling multiple policies will be
revisited as part of https://jira.onap.org/browse/POLICY-3018

Change-Id: I751102d5dddcb92cdcede8222855e2f467bb724d
Issue-ID: POLICY-3141
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoDelete keystores from apex 56/119556/1
Jim Hahn [Fri, 19 Mar 2021 16:51:26 +0000 (12:51 -0400)]
Delete keystores from apex

The Keystore is no longer needed in the tarball, as it is supplied
externally by the CSITs and Helm charts.  Deleted that file.
Also modified the junits to use utils-test to generates keystores at
runtime, thus deleted the junit keystore file, too.

Issue-ID: POLICY-3143
Change-Id: I9bb53fcb5887e73d661ec4c4083970630c61e5c1
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoFixing parallel event execution problem in APEX-PDP REST layer 00/119500/7
a.sreekumar [Thu, 18 Mar 2021 12:39:46 +0000 (12:39 +0000)]
Fixing parallel event execution problem in APEX-PDP REST layer

Parallel event execution in APEX was resulting in incorrect dynamic REST url. This issue is fixed in this review.

Change-Id: Id8a28c001a7fd7915df1f5909109bb369667ab40
Issue-ID: POLICY-3019
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
3 years agoMerge "Bump policy references to latest snapshot versions"
Jim Hahn [Thu, 18 Mar 2021 16:39:01 +0000 (16:39 +0000)]
Merge "Bump policy references to latest snapshot versions"

3 years agoBump policy references to latest snapshot versions 15/119515/1
liamfallon [Thu, 18 Mar 2021 15:46:21 +0000 (15:46 +0000)]
Bump policy references to latest snapshot versions

Issue-ID: POLICY-3105
Change-Id: I59daab64c4e36fc382d3c1c6a9f4ffe805ddc252
Signed-off-by: liamfallon <liam.fallon@est.tech>
3 years agoMerge "Increase code coverage"
Liam Fallon [Thu, 18 Mar 2021 14:29:12 +0000 (14:29 +0000)]
Merge "Increase code coverage"