policy/drools-pdp.git
4 years agorelease 1.6.1 docker image 56/105956/1
jhh [Tue, 14 Apr 2020 20:51:32 +0000 (15:51 -0500)]
release 1.6.1 docker image

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

4 years agorelease 1.6.1 artifacts 54/105954/1
jhh [Tue, 14 Apr 2020 20:06:38 +0000 (15:06 -0500)]
release 1.6.1 artifacts

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

4 years agoMerge "Point to released common/models"
Jorge Hernandez [Tue, 14 Apr 2020 19:32:58 +0000 (19:32 +0000)]
Merge "Point to released common/models"

4 years agoPoint to released common/models 40/105940/1
Pamela Dragosh [Tue, 14 Apr 2020 18:51:58 +0000 (14:51 -0400)]
Point to released common/models

Issue-ID: POLICY-2378
Change-Id: Iba4bac51ab85ba14ac3c28d74b1fa99a49bd8480
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agonative controller generates invalid properties 31/105931/2
jhh [Tue, 14 Apr 2020 17:36:49 +0000 (12:36 -0500)]
native controller generates invalid properties

Additional instrumetation and tests have been added
as well.

Issue-ID: POLICY-2489
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I65df586f3a44acf3d6f825ebfb8bd73107255a1f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoPoint to fix common/models 69/105869/1
Pamela Dragosh [Mon, 13 Apr 2020 20:40:33 +0000 (16:40 -0400)]
Point to fix common/models

Fixed naming policy string and yaml coder string fix

Issue-ID: POLICY-2486
Change-Id: I77dc1593a0d4c744090aa7b89303ea5e76d36ead
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoPoint to released parent, common, models 20/105820/1
Pamela Dragosh [Sat, 11 Apr 2020 19:33:49 +0000 (15:33 -0400)]
Point to released parent, common, models

Issue-ID: POLICY-2378
Change-Id: Ic80fe0334919361f973c7ae7796c5d8868882fcb
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoDisable sonar main args for drools-pdp 79/105679/1
Jim Hahn [Thu, 9 Apr 2020 13:46:07 +0000 (09:46 -0400)]
Disable sonar main args for drools-pdp

Issue-ID: POLICY-2305
Change-Id: If056c7e9179e245fafd6badc70ff9eee78fb23b3
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAddress more sonar issues in drools-pdp 10/105510/1
Jim Hahn [Wed, 8 Apr 2020 14:46:40 +0000 (10:46 -0400)]
Address more sonar issues in drools-pdp

Addressed the following sonar issues:
- use of "synchronized"
- use Files.delete() instead of File.delete()

Issue-ID: POLICY-2305
Change-Id: Id55628fe12d9d764616e57321382a70cb5704ba1
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Address sonar issues in policy-management"
Jim Hahn [Wed, 8 Apr 2020 13:11:20 +0000 (13:11 +0000)]
Merge "Address sonar issues in policy-management"

4 years agoAddress sonar issues in policy-management 44/105344/4
Jim Hahn [Tue, 7 Apr 2020 13:18:12 +0000 (09:18 -0400)]
Address sonar issues in policy-management

Addressed the following sonar issues:
- modified code to specify the correct class name in the
  getLogger() call
- use equals() instead of "==" for string comparison
- remove deprecated code
- use ',' instead of "," in indexOf
- remove code that is commented out; typically bogus, so the comment
  was adjusted to satisfy sonar
- missing assert in junits
- use "{}" instead of concatenation when using logger
- either log or rethrow
- put arguments for assertEquals() in the correct order
- remove "return" statements from the end of void methods
- don't always return the same value; just disabled sonar as
  refactoring would have obfuscated the code
- cognitive complexity; used eclipse auto-refactoring to extract
  out chunks of code into separate methods
- don't pass array of classes to class.getDeclaredMethod(); use
  ellided arguments instead
- fix argument count in logger calls
- remove unnecessary casts
- don't use "volatile"
- make methods "synchronized" to match parent class definitions

Issue-ID: POLICY-2305
Change-Id: Ie96418f696da4ae6c2ca8d4a914371469e695419
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAddress sonar issues in drools-pdp 82/105182/3
Jim Hahn [Mon, 6 Apr 2020 19:33:23 +0000 (15:33 -0400)]
Address sonar issues in drools-pdp

Addressed the following sonar issues:
- add "final" to public static fields
- commented code; some were bogus - just updated the comments
  so sonar is happy
- use "{}" instead of string concatenation
- junit should assert something
- when using logger, invoke compute-intensive tasks conditionally
- use superclass name instead of subclass name to access static fields
- don't always return the same value
- remove "transient" from fields of classes that aren't Serializable
- don't nest try/catch blocks
- use appropriate class name in Logger.getLogger()
- use Predicate<T> instead of Function<T,Boolean>
- remove unused parameters from private methods
- either log or throw
- remove duplicate methods
- use remove() TLS instead of set(null)
- null check is implicit in instanceof check
- do something with return value
- don't use volatile
- don't return "null" list; used Optional instead
- add no-arg constructor to non-Serializable superclass
- add callSuper=true for EqualsAndHashCode
- don't declare "throws XXX" where XXX is a subclass of RuntimeException
- remove serialVersionUID field if the class isn't Serializable

Also addressed some eclipse warnings:
- unused fields
- suppress generic typic cast warnings

Issue-ID: POLICY-2305
Change-Id: I906d5bf71c1f86531423e23b3667a585cdba45e1
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoSync controller capabilities as controllers bounce 61/104861/4
jhh [Wed, 1 Apr 2020 02:05:14 +0000 (21:05 -0500)]
Sync controller capabilities as controllers bounce

As native policies introduce temporality in policy types
supported as they are removed and added, the associated
policy types that can be honored at a a given time, may
need to adjust.

A significan portion of this review is dedicated to multi-policy
junits and telemetry instrumentation.

Issue-ID: POLICY-2459
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I62bbc03411446849eaa55c9b1524220dc13c2cb0
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Point to latest snapshots"
Pamela Dragosh [Fri, 27 Mar 2020 18:48:08 +0000 (18:48 +0000)]
Merge "Point to latest snapshots"

4 years agoPoint to latest snapshots 90/104590/1
Pamela Dragosh [Fri, 27 Mar 2020 16:58:04 +0000 (12:58 -0400)]
Point to latest snapshots

Issue-ID: POLICY-2378
Change-Id: I20672bed90931ff9d3cac5f63c238248f8b39406
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "native policy use engine for top-down processing"
Jorge Hernandez [Fri, 27 Mar 2020 12:51:28 +0000 (12:51 +0000)]
Merge "native policy use engine for top-down processing"

4 years agonative policy use engine for top-down processing 55/104455/6
jhh [Thu, 26 Mar 2020 00:37:20 +0000 (19:37 -0500)]
native policy use engine for top-down processing

This will ensure proper invocation of all feature hooks.

Issue-ID: POLICY-2388
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I8d1666bb5e9526faa588e4f613674e080181d4ba
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Upgrade jar version to resolve security risk"
Jim Hahn [Thu, 26 Mar 2020 20:40:26 +0000 (20:40 +0000)]
Merge "Upgrade jar version to resolve security risk"

4 years agoPoint to models 2.2.2 49/104449/1
Pamela Dragosh [Wed, 25 Mar 2020 23:59:55 +0000 (19:59 -0400)]
Point to models 2.2.2

Issue-ID: POLICY-2378
Change-Id: Ie8671969f79fc1e2ce767cd4ab9a426eddea5d55
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpgrade jar version to resolve security risk 38/104438/1
Joseph Chou [Wed, 25 Mar 2020 22:12:12 +0000 (18:12 -0400)]
Upgrade jar version to resolve security risk

Upgrade ant, hibernate-core and commons-configuration

Issue-ID: POLICY-2439
Change-Id: I6c22e634e81850ed97c6214ffc202eb68007b8b3
Signed-off-by: Joseph Chou <jc2555@att.com>
4 years agoremove temp. sudo access 82/104382/1
jhh [Wed, 25 Mar 2020 15:40:26 +0000 (10:40 -0500)]
remove temp. sudo access

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

4 years agoBump drools-pdp to 1.6.1-SNAPSHOT 91/104291/1
Peyton Puckett [Tue, 24 Mar 2020 18:55:15 +0000 (13:55 -0500)]
Bump drools-pdp to 1.6.1-SNAPSHOT

Issue-ID: POLICY-2378
Change-Id: I59fb1860178cc7960f7aa553557d83d60b686ac6
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoRelease 1.6.0 drools-pdp docker image 84/104284/3
Peyton Puckett [Tue, 24 Mar 2020 18:10:48 +0000 (13:10 -0500)]
Release 1.6.0 drools-pdp docker image

Issue-ID: POLICY-2378
Change-Id: I0408fbf5ff5883a7661329ba28420a773b475f49
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoRelease 1.6.0 drools-pdp artifacts 81/104281/1
Peyton Puckett [Tue, 24 Mar 2020 17:39:49 +0000 (12:39 -0500)]
Release 1.6.0 drools-pdp artifacts

Issue-ID: POLICY-2378
Change-Id: I510fec491f1952e2312e4a018a22d4d3bd2db53c
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoRemove hardcoded version for policy.common.version 64/104264/2
Peyton Puckett [Tue, 24 Mar 2020 15:36:43 +0000 (10:36 -0500)]
Remove hardcoded version for policy.common.version

Issue-ID: POLICY-2378
Change-Id: Ibe9073fd7cd1b741e197040e32f2de3927b05658
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoMerge "Point to released artifacts"
Pamela Dragosh [Tue, 24 Mar 2020 01:04:53 +0000 (01:04 +0000)]
Merge "Point to released artifacts"

4 years agoPoint to released artifacts 95/104195/1
Pamela Dragosh [Mon, 23 Mar 2020 23:47:20 +0000 (19:47 -0400)]
Point to released artifacts

Issue-ID: POLICY-2378
Change-Id: I9186874a4a4253105f3bff602c5c5b01b7f1d1c3
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agomake policy-id optional 80/104180/1
jhh [Mon, 23 Mar 2020 19:37:27 +0000 (14:37 -0500)]
make policy-id optional

for legacy operational policies, PAP does not populate the
metadata.policy-id field.   The metadata structure is empty.

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

4 years agoFix op policies distribution to controllers 25/104125/3
jhh [Mon, 23 Mar 2020 00:37:21 +0000 (19:37 -0500)]
Fix op policies distribution to controllers

Fix a bug when distributing a policy to the right
controller plus additional junits to catch similar
issues.

Issue-ID: POLICY-2356
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I25fefa64ad54c55e6516ae18c6895b6de9407419
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "ONAP server pool code update"
Pamela Dragosh [Wed, 18 Mar 2020 19:56:01 +0000 (19:56 +0000)]
Merge "ONAP server pool code update"

4 years agorenew policy certs till 03/17/2021 29/103829/1
jhh [Wed, 18 Mar 2020 00:47:53 +0000 (19:47 -0500)]
renew policy certs till 03/17/2021

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

4 years agoONAP server pool code update 91/103691/5
Joseph Chou [Fri, 13 Mar 2020 18:15:35 +0000 (14:15 -0400)]
ONAP server pool code update

Fix server-pool junit hang due to hardcoded IP

Issue-ID: POLICY-2425
Change-Id: Icaf54c0bbd81fa755a031df91ee6cf5cdee98f27
Signed-off-by: Joseph Chou <jc2555@att.com>
4 years agopolicy routing and reorg into policy-domains 13/103213/5
jhh [Fri, 6 Mar 2020 04:32:58 +0000 (22:32 -0600)]
policy routing and reorg into policy-domains

- Native Drools Controller Policy support.
- Move domain policies into the policy-domains project.
- Route legacy/compliant operational policies to one or
  all controller supporting the policy's policy type.
- Enhancements to scripts to invoke commands external
  to the container.

Issue-ID: POLICY-2388
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Id41f04d10a28d2ea86bdd41334e499c28d0438ae
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoAdd feature-server-pool to the ONAP drools-pdp repository. 86/103286/2
Chou, Joseph (jc2555) [Fri, 6 Mar 2020 15:26:56 +0000 (10:26 -0500)]
Add feature-server-pool to the ONAP drools-pdp repository.

Update timeout value in testcase and add logback-test.xml

Issue-ID: POLICY-2351
Change-Id: Idccf87144e137d7a0d18112a5e1442c4b04a0ac2
Signed-off-by: Joseph Chou <jc2555@att.com>
4 years agoAdd feature-server-pool to the ONAP drools-pdp repository. 98/101098/18
Straubs, Ralph (rs8887) [Tue, 4 Feb 2020 09:26:30 +0000 (03:26 -0600)]
Add feature-server-pool to the ONAP drools-pdp repository.

Issue-ID: POLICY-2351
Change-Id: I8ddde547a73a51c04c8dd9f1d66232e8281599a9
Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
4 years agoMerge "Undeploy support for drools policies."
Jim Hahn [Tue, 3 Mar 2020 16:42:25 +0000 (16:42 +0000)]
Merge "Undeploy support for drools policies."

4 years agoMerge "http server/client management"
Jorge Hernandez [Tue, 3 Mar 2020 15:36:20 +0000 (15:36 +0000)]
Merge "http server/client management"

4 years agoUndeploy support for drools policies. 81/102781/5
jhh [Mon, 2 Mar 2020 21:26:22 +0000 (15:26 -0600)]
Undeploy support for drools policies.

Issue-ID: POLICY-2388
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I4c5ed6752a32c9c2391cf03dd56cb2f1abc32dfd
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agouse policy/parent awaitility 58/102858/1
Pamela Dragosh [Tue, 3 Mar 2020 13:33:10 +0000 (08:33 -0500)]
use policy/parent awaitility

This upgrades the version, but seems to work fine.

Issue-ID: POLICY-2381
Change-Id: I1f9b930b28c4fdce67921fd31269724a29c26fd6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agohttp server/client management 06/102806/1
jhh [Tue, 3 Mar 2020 03:45:18 +0000 (21:45 -0600)]
http server/client management

This is to support the new actor architecture configuration.

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

4 years agoPoint to docker 2.0.1 80/102680/1
Pamela Dragosh [Sun, 1 Mar 2020 21:40:53 +0000 (16:40 -0500)]
Point to docker 2.0.1

policy/docker is released.

Issue-ID: POLICY-2378
Change-Id: I71cb892b988f7cd534fc37c0329f3a0502e73874
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUndeploy support for native rules PDP-D policies. 30/102530/1
jhh [Fri, 28 Feb 2020 01:20:39 +0000 (19:20 -0600)]
Undeploy support for native rules PDP-D policies.

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

4 years agoMerge "Undeploy support for native rules PDP-D policies."
Jim Hahn [Thu, 27 Feb 2020 18:50:27 +0000 (18:50 +0000)]
Merge "Undeploy support for native rules PDP-D policies."

4 years agoUndeploy support for native rules PDP-D policies. 52/102452/1
jhh [Thu, 27 Feb 2020 00:30:18 +0000 (18:30 -0600)]
Undeploy support for native rules PDP-D policies.

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

4 years agoMerge "Add DroolsExecutor for DroolsRunnable"
Pamela Dragosh [Wed, 26 Feb 2020 19:07:58 +0000 (19:07 +0000)]
Merge "Add DroolsExecutor for DroolsRunnable"

4 years agoMerge "narrow rest server data response for lifecycle"
Jorge Hernandez [Wed, 26 Feb 2020 16:43:04 +0000 (16:43 +0000)]
Merge "narrow rest server data response for lifecycle"

4 years agonarrow rest server data response for lifecycle 23/102423/1
jhh [Wed, 26 Feb 2020 15:59:43 +0000 (09:59 -0600)]
narrow rest server data response for lifecycle

There may be a potential for getting stuck between gson utils, jetty
and fsm data.

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

4 years agoReapply SQL output feature-state-mgt 63/102363/2
Jim Hahn [Wed, 26 Feb 2020 05:46:09 +0000 (00:46 -0500)]
Reapply SQL output feature-state-mgt

Just need to keep the memory DB open until the test completes.

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

4 years agoRevert "Cleanup SQL output feature-state-mgt" 59/102359/1
Pamela Dragosh [Wed, 26 Feb 2020 04:34:41 +0000 (04:34 +0000)]
Revert "Cleanup SQL output feature-state-mgt"

This reverts commit 4de095c769c28f3f304d99f132a845993bf58dfa.

Reason for revert: Failing to merge

Issue-ID: POLICY-2381
Change-Id: Icbb4d75a3876a44f8207fa84410c4d565da34f98
signed-off-by: Pamela Dragosh <pdragosh@research.att.com>

4 years agoAdd DroolsExecutor for DroolsRunnable 56/102356/3
Jim Hahn [Tue, 25 Feb 2020 22:49:06 +0000 (17:49 -0500)]
Add DroolsExecutor for DroolsRunnable

Added DroolsExecutor, which is an Executor that works by injecting
its commands into drools working memory via DroolsRunnable objects.

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

4 years agoCleanup SQL output feature-state-mgt 08/102308/1
Pamela Dragosh [Tue, 25 Feb 2020 11:15:10 +0000 (06:15 -0500)]
Cleanup SQL output feature-state-mgt

use an in-memory database and not store temp files in
the development directory.

Upgrading to H2 1.4.200 seemed to expose the database
issues. mvn clean does NOT remove the sql directory
which makes it hard to figure out what is going on.

Issue-ID: POLICY-2381
Change-Id: Icab5d9b6f62ed0f9c4e5be91c2b518ab2b442167
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMinor change to pass operational schema validation. 04/102104/2
jhh [Fri, 21 Feb 2020 00:15:40 +0000 (18:15 -0600)]
Minor change to pass operational schema validation.

The junit contains a test case for vcpe.

Issue-ID: POLICY-2375
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I9d1039e033bf4374d5b6bd5f78bd5ee5a502e3f2
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agopip should point to pip3 in docker 28/101928/1
jhh [Tue, 18 Feb 2020 18:33:42 +0000 (12:33 -0600)]
pip should point to pip3 in docker

This causes a problem building the drools-pdp
image, failing the actual merge operation and
pushing a new image.

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

4 years agoIgnore fsm field in policies for serialization 17/101917/2
jhh [Tue, 18 Feb 2020 16:10:19 +0000 (10:10 -0600)]
Ignore fsm field in policies for serialization

When printing lifecycle fsm state information with
telemetry, fsm causes a stack overflow, because of
the pointer back to the fsm parent object.   This
will correct this situation.

Issue-ID: POLICY-2345
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: If4e11f37a74fcc763517bc08c4a8e13c1a6561df
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoAdd netcat package to Dockefile 60/101860/1
jhh [Tue, 18 Feb 2020 00:22:47 +0000 (18:22 -0600)]
Add netcat package to Dockefile

PDP-D as it comes up checks if database is available with nc.

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

4 years agoNative policies support in docker 02/101802/1
jhh [Mon, 17 Feb 2020 01:23:31 +0000 (19:23 -0600)]
Native policies support in docker

Depends on https://gerrit.onap.org/r/#/c/policy/docker/+/101758/
for package cleanup.

The work is needed to run the PDP-D with no applications, native
policies may exercise this set up.   This work provides a functional
image with a precooked installation.

This work will allow fixing and cleaning up of CSITs specific to
this repo which maintenance is problematic.

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

4 years agoUpdate package before installing 69/101569/1
Bruno Sakoto [Tue, 11 Feb 2020 23:19:10 +0000 (18:19 -0500)]
Update package before installing

Issue-ID: POLICY-2362
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: I14326db9db4f9adb4d19fb1aa6ee5b682e892d51

4 years agoMove model base classes outside feature-lifecycle 35/101535/1
jhh [Tue, 11 Feb 2020 13:59:26 +0000 (07:59 -0600)]
Move model base classes outside feature-lifecycle

So, it can be used in drools-application without
a feature dependency.

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

4 years agoMinor changes in Operational schemas 85/101285/1
jhh [Thu, 6 Feb 2020 21:17:20 +0000 (15:17 -0600)]
Minor changes in Operational schemas

Moved as test resources, these schemas will go together with
its control loop application in the drools-applications
repo, to keep separation between control loop apps and core
drools.

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

4 years agoMerge "Store DomainMaker in PolicyEngine."
Jorge Hernandez [Thu, 6 Feb 2020 21:05:24 +0000 (21:05 +0000)]
Merge "Store DomainMaker in PolicyEngine."

4 years agoMerge "Updating module names to resolve conflicts"
Pamela Dragosh [Thu, 6 Feb 2020 20:38:28 +0000 (20:38 +0000)]
Merge "Updating module names to resolve conflicts"

4 years agoStore DomainMaker in PolicyEngine. 79/101279/1
jhh [Thu, 6 Feb 2020 20:10:52 +0000 (14:10 -0600)]
Store DomainMaker in PolicyEngine.

Since this is going to be used in drools-applications, better
to have it globally, reusing underlying "schema resources"  rather
than maintaining one or more instances in drools-applications.

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

4 years agoUpdating module names to resolve conflicts 04/101204/2
Ram Krishna Verma [Wed, 5 Feb 2020 21:51:06 +0000 (16:51 -0500)]
Updating module names to resolve conflicts

Issue-ID: POLICY-2355
Change-Id: I64b6cd06186152a08df9b8bd11c21c154067fab1
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agolifecycle routing policy types to controllers. 05/101205/1
jhh [Wed, 5 Feb 2020 22:33:53 +0000 (16:33 -0600)]
lifecycle routing policy types to controllers.

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

4 years agotackle few comments from DomainMaker review 46/101146/1
jhh [Wed, 5 Feb 2020 01:24:26 +0000 (19:24 -0600)]
tackle few comments from DomainMaker review

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

4 years agoMerge "domain native and operational policies support"
Jorge Hernandez [Tue, 4 Feb 2020 16:08:43 +0000 (16:08 +0000)]
Merge "domain native and operational policies support"

4 years agodomain native and operational policies support 68/100968/4
jhh [Fri, 31 Jan 2020 00:57:13 +0000 (18:57 -0600)]
domain native and operational policies support

- moved DomainMaker to policy-utils/ project.
- support for native drools and controller drools policy types.

Issue-ID: POLICY-2345
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I46b9816eadceb7ef280e0e6789f07b4d4ca51519
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoDouble quote local variables in drools tooling script 84/100984/1
Rashmi Pujar [Fri, 31 Jan 2020 15:33:13 +0000 (10:33 -0500)]
Double quote local variables in drools tooling script

Addressing the last minor comment from Jorge on
https://gerrit.onap.org/r/#/c/policy/drools-pdp/+/100774/.
Tested OK with and without proxy settings.

Issue-ID: POLICY-2330
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: Ied9e0324b0f64684ccdefd20d8bed958f468bb72

4 years agoParameterize mvn repo urls and proxy settings 74/100774/5
Rashmi Pujar [Fri, 24 Jan 2020 20:34:04 +0000 (15:34 -0500)]
Parameterize mvn repo urls and proxy settings

This allows the users to build the docker images for drools-pdp
and drools-application using their own CI pipelines if needed.

Issue-ID: POLICY-2330
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: I9ea0161b45d504be4e65a21c95e48dee4a78de3a

4 years agoComment from 100393 review 35/100435/2
jhh [Fri, 17 Jan 2020 21:43:58 +0000 (15:43 -0600)]
Comment from 100393 review

Missed 2020 year update in license of docker-install.sh:
https://gerrit.onap.org/r/#/c/policy/drools-pdp/+/100393

Issue-ID: POLICY-1586
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I1b2e67a5444597a71f2402638dd5784e72b64137
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoRemove java 1.8 check 93/100393/1
jhh [Thu, 16 Jan 2020 20:43:34 +0000 (14:43 -0600)]
Remove java 1.8 check

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

4 years agoMerge "Update sonar config"
Ram Krishna Verma [Thu, 16 Jan 2020 12:42:26 +0000 (12:42 +0000)]
Merge "Update sonar config"

4 years agoUpdate drools-pdp for java11 docker 55/100355/1
Jim Hahn [Wed, 15 Jan 2020 22:58:19 +0000 (17:58 -0500)]
Update drools-pdp for java11 docker

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

4 years agoUpdate sonar config 23/100323/1
Pamela Dragosh [Wed, 15 Jan 2020 15:07:10 +0000 (10:07 -0500)]
Update sonar config

Use parent configuration - exclude non-code sub-modules.

Issue-ID: POLICY-2321
Change-Id: If0219d492761f34341d41815684ff91b81064263
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agopolicy/drools-pdp jdk11 upgrades 64/100264/1
Hockla, Ali (ah999m) [Mon, 13 Jan 2020 20:11:46 +0000 (14:11 -0600)]
policy/drools-pdp jdk11 upgrades

Issue-ID: POLICY-1589
Change-Id: I0ed05c6e471a7da6658e02a4ba3115d3a117cedd
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
4 years agoPoint to policy/models release version 19/100219/1
Hockla, Ali (ah999m) [Fri, 10 Jan 2020 21:31:03 +0000 (15:31 -0600)]
Point to policy/models release version

Issue-ID: POLICY-1592
Change-Id: Ic38a7a8b29caefcdc162bd595e866cf91692101a
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
4 years agoPrepare drools-pdp for java 11 95/100195/3
Jim Hahn [Fri, 10 Jan 2020 15:32:17 +0000 (10:32 -0500)]
Prepare drools-pdp for java 11

The Observer class has been deprecated.  Changed the code to use
StateChangeNotifier, instead, in anticipation of a corresponding
change in policy/common.
Also fixed new issue with missing getSupportedPolicyTypes() method.

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

4 years agofeature-lifecycle sonar cleanup 51/100151/1
jhh [Thu, 9 Jan 2020 20:13:47 +0000 (14:13 -0600)]
feature-lifecycle sonar cleanup

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

4 years agoMerge "Enabling logback file to be loaded using oom configmap"
Jim Hahn [Thu, 9 Jan 2020 13:43:45 +0000 (13:43 +0000)]
Merge "Enabling logback file to be loaded using oom configmap"

4 years agoEnabling logback file to be loaded using oom configmap 86/100086/2
a.sreekumar [Wed, 8 Jan 2020 13:00:13 +0000 (13:00 +0000)]
Enabling logback file to be loaded using oom configmap

Change-Id: I4828559ff62ffc3ee41f89448a6f7e9914a2a0ba
Issue-ID: POLICY-2308
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoRemove supported policy types from status message 62/100062/3
jhh [Tue, 7 Jan 2020 18:09:47 +0000 (12:09 -0600)]
Remove supported policy types from status message

Issue-ID: POLICY-2233
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I2168b9616d35ee3b9aa491aaa5d363b8609adb84
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agobase changes to support offline pdpd 69/99369/2
jhh [Tue, 10 Dec 2019 00:11:13 +0000 (18:11 -0600)]
base changes to support offline pdpd

Issue-ID: POLICY-2191
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I6f8029c1c771905357971331988a9b8408a93f10
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoPoint release versions of policy/parent and policy/common 23/99223/4
Hockla, Ali (ah999m) [Thu, 5 Dec 2019 18:21:48 +0000 (12:21 -0600)]
Point release versions of policy/parent and policy/common

Issue-ID: POLICY-1583
Change-Id: I7d621b33fd78a5277592e0129c3a13c7108d235a
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
4 years agoAdd PdpGroup to drools sample base.conf 67/99167/1
Jim Hahn [Wed, 4 Dec 2019 18:36:53 +0000 (13:36 -0500)]
Add PdpGroup to drools sample base.conf

When PDPs register with PAP, they now have to specify their PDP
group.  Added the default group to the config file.

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

4 years agoOcasional race condition in upgrade junits 60/98760/1
jhh [Fri, 22 Nov 2019 15:08:30 +0000 (09:08 -0600)]
Ocasional race condition in upgrade junits

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

4 years agoBuild tar.gz without requiring docker image build 27/98627/1
jhh [Tue, 19 Nov 2019 19:29:41 +0000 (13:29 -0600)]
Build tar.gz without requiring docker image build

This allows the tar.gz to be released by LF jobs.

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

4 years agoSet drools-pdp Pdp Group from the property file 55/98455/2
Jim Hahn [Fri, 15 Nov 2019 15:58:03 +0000 (10:58 -0500)]
Set drools-pdp Pdp Group from the property file

Modified drools-pdp to get its Pdp Group from a property file instead
of getting it from the PDP-UPDATE or PDP-STATE-CHANGE requests.
Modified property files to use envd, per review comment.

Issue-ID: POLICY-2232
Change-Id: Ibf024a476b2216074819dda7a66dcbfba811e278
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoInvoke lock callback in session thread 30/98430/2
Jim Hahn [Thu, 14 Nov 2019 20:16:13 +0000 (15:16 -0500)]
Invoke lock callback in session thread

Injects the callback as a DroolsRunnable into the session, if
there is one.  Otherwise, it invokes it via the engine's
thread pool.

Issue-ID: POLICY-2246
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I214480ae675d89e7335dde4eb4abe2684f7ef8ab
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Add 'DroolsRunnable' class"
Jorge Hernandez [Thu, 14 Nov 2019 16:22:15 +0000 (16:22 +0000)]
Merge "Add 'DroolsRunnable' class"

4 years agoAdd 'DroolsRunnable' class 53/98253/5
Straubs, Ralph (rs8887) [Mon, 11 Nov 2019 17:28:47 +0000 (11:28 -0600)]
Add 'DroolsRunnable' class

This provides a simple way to run arbitrary Java code within the
Drools thread. This change also includes a general way to specify
Drools rules that are automatically added to every Drools session.

Change-Id: I5ddcca4c807dc552fbcbd4a19dce311a4d358279
Issue-ID: POLICY-1948
Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
4 years agoDispose drools controllers in junit tests 33/98333/1
jhh [Tue, 12 Nov 2019 20:36:19 +0000 (14:36 -0600)]
Dispose drools controllers in junit tests

Issue-ID: POLICY-1407
Change-Id: I4db3489c242a6cdd39444de19c9c8da83559bee4
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoAdd drools factory clean up statements to junits 65/98265/3
jhh [Mon, 11 Nov 2019 22:18:27 +0000 (16:18 -0600)]
Add drools factory clean up statements to junits

An attempt to tackle some intermittent junit errors
experienced by team mates.

Issue-ID: POLICY-1407
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I68a90dc50fe2fa5bfc7214aa26e2e5f78f1e6c23
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Miscellaneous code clean up"
Jim Hahn [Mon, 11 Nov 2019 20:03:18 +0000 (20:03 +0000)]
Merge "Miscellaneous code clean up"

4 years agoMerge "Do not hardcode io.fabric8 plugin"
Pamela Dragosh [Mon, 11 Nov 2019 16:21:41 +0000 (16:21 +0000)]
Merge "Do not hardcode io.fabric8 plugin"

4 years agoMerge "Detemine number of nexus repos to support"
Jorge Hernandez [Mon, 11 Nov 2019 14:58:06 +0000 (14:58 +0000)]
Merge "Detemine number of nexus repos to support"

4 years agoMiscellaneous code clean up 86/98186/5
jhh [Fri, 8 Nov 2019 14:42:55 +0000 (08:42 -0600)]
Miscellaneous code clean up

Issue-ID: POLICY-2203
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I5731d4636bd2aaecbc486406298bcba1b19e8f4d
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoDo not hardcode io.fabric8 plugin 04/98204/1
Pamela Dragosh [Fri, 8 Nov 2019 19:51:59 +0000 (14:51 -0500)]
Do not hardcode io.fabric8 plugin

policy/parent now has this plugin defined

Issue-ID: POLICY-2222
Change-Id: I35942b21ff4863c844023400d55be1a6177acb76
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoDetemine number of nexus repos to support 68/98068/7
Peyton Puckett [Wed, 6 Nov 2019 17:47:31 +0000 (11:47 -0600)]
Detemine number of nexus repos to support

Modify RepositoryAudit.java to determine number of
additional reposities to support as defined in the
feature-state-management.properties file

Issue-ID: POLICY-2035
Change-Id: I31edae42025a8167e242535da6eb41c15228bac8
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoMerge "Fix new sonar issues in RestManager"
Pamela Dragosh [Fri, 8 Nov 2019 12:54:46 +0000 (12:54 +0000)]
Merge "Fix new sonar issues in RestManager"

4 years agoFix new sonar issues in RestManager 78/98078/1
Jim Hahn [Wed, 6 Nov 2019 21:38:19 +0000 (16:38 -0500)]
Fix new sonar issues in RestManager

Eliminated duplicate code issues.  Unfortunately, introduced new
sonar issues with lambda expressions.

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