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>
Jim Hahn [Tue, 3 Mar 2020 16:42:25 +0000 (16:42 +0000)]
Merge "Undeploy support for drools policies."
Jorge Hernandez [Tue, 3 Mar 2020 15:36:20 +0000 (15:36 +0000)]
Merge "http server/client management"
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>
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>
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
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>
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
Jim Hahn [Thu, 27 Feb 2020 18:50:27 +0000 (18:50 +0000)]
Merge "Undeploy support for native rules PDP-D policies."
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
Pamela Dragosh [Wed, 26 Feb 2020 19:07:58 +0000 (19:07 +0000)]
Merge "Add DroolsExecutor for DroolsRunnable"
Jorge Hernandez [Wed, 26 Feb 2020 16:43:04 +0000 (16:43 +0000)]
Merge "narrow rest server data response for lifecycle"
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
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
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>
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
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>
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>
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
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>
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
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
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
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
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
Jorge Hernandez [Thu, 6 Feb 2020 21:05:24 +0000 (21:05 +0000)]
Merge "Store DomainMaker in PolicyEngine."
Pamela Dragosh [Thu, 6 Feb 2020 20:38:28 +0000 (20:38 +0000)]
Merge "Updating module names to resolve conflicts"
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
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>
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
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
Jorge Hernandez [Tue, 4 Feb 2020 16:08:43 +0000 (16:08 +0000)]
Merge "domain native and operational policies support"
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>
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
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
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>
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
Ram Krishna Verma [Thu, 16 Jan 2020 12:42:26 +0000 (12:42 +0000)]
Merge "Update sonar config"
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
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>
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>
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>
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
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
Jim Hahn [Thu, 9 Jan 2020 13:43:45 +0000 (13:43 +0000)]
Merge "Enabling logback file to be loaded using oom configmap"
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>
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>
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>
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>
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
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
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
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>
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>
Jorge Hernandez [Thu, 14 Nov 2019 16:22:15 +0000 (16:22 +0000)]
Merge "Add 'DroolsRunnable' class"
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>
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>
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>
Jim Hahn [Mon, 11 Nov 2019 20:03:18 +0000 (20:03 +0000)]
Merge "Miscellaneous code clean up"
Pamela Dragosh [Mon, 11 Nov 2019 16:21:41 +0000 (16:21 +0000)]
Merge "Do not hardcode io.fabric8 plugin"
Jorge Hernandez [Mon, 11 Nov 2019 14:58:06 +0000 (14:58 +0000)]
Merge "Detemine number of nexus repos to support"
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>
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>
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>
Pamela Dragosh [Fri, 8 Nov 2019 12:54:46 +0000 (12:54 +0000)]
Merge "Fix new sonar issues in RestManager"
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
jhh [Wed, 6 Nov 2019 19:38:31 +0000 (13:38 -0600)]
Drools Controller upgrades Tests
Issue-ID: POLICY-1407
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I6963fced5608b62a41b73fef5070c21cf45d6fbe
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Liam Fallon [Wed, 6 Nov 2019 17:47:53 +0000 (17:47 +0000)]
Merge "Fix duplicate code in drools-pdp RestManager"
Jim Hahn [Wed, 6 Nov 2019 11:57:50 +0000 (06:57 -0500)]
Address drools-pdp sonar issues
Addressed more sonar issues in drools-pdp:
- unwrap multiple instances of the same annotation (NamedQuery)
- use lambda instead of anonymous class
- duplicate code; addressed by using annotation instead of toString.
This still leaves other duplicate code.
Issue-ID: POLICY-2203
Change-Id: I8c6ff6562820af638044f134eb8a6725a5f05e8e
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 6 Nov 2019 13:28:36 +0000 (08:28 -0500)]
Fix duplicate code in drools-pdp RestManager
Change-Id: I22821a5027d01f0965c54b60389d3988ac53ed5c
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 5 Nov 2019 19:47:08 +0000 (14:47 -0500)]
Fix syntax error in DistributedLock "DELETE"
Changed the "DELETE" to "DELETE FROM" to fix this error:
You have an error in your SQL syntax; check the manual that corresponds
to your MariaDB server version for the right syntax to use
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I10a398c13dc3da547d2b3ea47564ab0d5761a2ee
liamfallon [Mon, 4 Nov 2019 14:35:34 +0000 (14:35 +0000)]
Use jersey dependencies from policy-endpoints
There is no need to ahve Jersey dependencies in the PDP POMs as they are
inherited fromt he policy-endpoints POM.
Issue-ID: POLICY-2209
Change-Id: Iaa51995864eec0bf5b4134719c32e956295084a1
Signed-off-by: liamfallon <liam.fallon@est.tech>
liamfallon [Fri, 1 Nov 2019 12:01:13 +0000 (12:01 +0000)]
Add common Jersey version
Add a common version of Jersey for all Policy Framework components.
Issue-ID: POLICY-2209
Change-Id: Iab5a62475eb73b5e4db8a02cfa029002a7f5f8ea
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jorge Hernandez [Fri, 1 Nov 2019 13:21:07 +0000 (13:21 +0000)]
Merge "Refactor duplicate code from lock managers"
Jim Hahn [Wed, 30 Oct 2019 20:28:55 +0000 (16:28 -0400)]
Refactor duplicate code from lock managers
Change-Id: I8910a1a4267d824f064b52c6ad08945590bd9617
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
jhh [Thu, 31 Oct 2019 16:36:17 +0000 (11:36 -0500)]
upgrade to 7.28.0.Final drools libraries
commons-lang does not seem to be packaged anymore
(commons-lang3 still does, which is the desired one).
There are some @SupressWarning that seem to have no effect
that were removed.
Some libraries that were explicitly added are transitively
used now in the latest version of drools, hence some rework
in the dependency and exclude sections. We will need to
generate a clm report to verify.
Issue-ID: POLICY-1407
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I44e09183caca72f5f33bdec0b8fa88b0b4793055
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Liam Fallon [Thu, 31 Oct 2019 16:23:30 +0000 (16:23 +0000)]
Merge "Provide a way to trigger Drools rules when an update occurs"
Straubs, Ralph (rs8887) [Mon, 28 Oct 2019 12:49:56 +0000 (07:49 -0500)]
Provide a way to trigger Drools rules when an update occurs
An instance of 'DroolsInitFeature.Init' is inserted into a Drools
session when it is initialized, updated, or restored from
persistent data. This provides an opportunity to catch more
initialization scenarios than you can with an empty 'when' clause.
Updates:
1) Change 'DroolsInitFeature' to use Policy Engine scheduled executor
2) Add new test to 'DroolsInitFeatureTest' to verify that the 'Init'
object is inserted into and deleted from Drools memory
3) Remove trailing spaces
Issue-ID: POLICY-1948
Change-Id: I4748c2415c4563e98b4a53d573c9ebe1e96e8e34
Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
Jim Hahn [Wed, 30 Oct 2019 18:47:54 +0000 (14:47 -0400)]
Fix more sonar issues in drools-pdp
Sonar issue fixed:
- log or rethrow exception
- empty code block; moved the comment inside the empty "synchronized" block
Change-Id: I55ca87a321b3a1e4079dae6d5a4d44b651cb3086
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 29 Oct 2019 19:12:39 +0000 (15:12 -0400)]
Fix new sonar issues in drools-pdp
Did not address duplicate code issues.
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I304a02dbe9b1425df38abae815df0cff8faa0692
Jim Hahn [Tue, 29 Oct 2019 16:37:37 +0000 (12:37 -0400)]
Cleanup eclipse warnings in drools-pdp
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I3e854b1ea1986cd4992dc2ff84d799e970e443a9
Jorge Hernandez [Fri, 25 Oct 2019 15:34:59 +0000 (15:34 +0000)]
Merge "Allow encrypted property values"
jhh [Thu, 24 Oct 2019 21:19:09 +0000 (16:19 -0500)]
Symmetric Key configuration
Issue-ID: POLICY-1945
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I58de93f031bd6482f928be70fc7114ad0a04f0a5
Jim Hahn [Thu, 24 Oct 2019 14:17:07 +0000 (10:17 -0400)]
Handle DB error codes in distributed locking
The commons library wraps the SQLExceptions within its own SQLException,
so changed the code to simply look for a cause that's SQLTransientException,
eliminating the need to check specific error codes. Deleted the error
code property now that it is no longer needed.
Also updated the distributed locking properties to include examples.
Issue-ID: POLICY-2113
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: If46e85a81cfc952e561174fea670df81efb8309a
jhh [Thu, 17 Oct 2019 02:30:26 +0000 (21:30 -0500)]
Allow encrypted property values
Issue-ID: POLICY-1945
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I0317a6de838d99b579638252859e42fc49cedfa8
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Jim Hahn [Tue, 24 Sep 2019 14:51:21 +0000 (10:51 -0400)]
Reimplement Lock API using Lock objects
Modified PolicyResourceLockManager to just return a feature, deferring
the lock() call/method to the feature, itself. The manager was also
modified so that, if it can't find an enabled provider, it will return
a default provider, whose lock() methods always fail. Once a feature
has been identified, the manager will cache it for use thereafter.
Modified the feature API to return lock objects and simplified the
interface to remove the beforeXxx and afterXxx methods.
Moved the unlock and refresh methods from the feature API into the
lock class, renaming them to free and extend, respectively.
Added a separate, feature-simple-locking project, which implements
a simple version of the locking feature, over a single JVM.
Extensively revised the distributed locking feature to fit in with
the new API.
Added support for persistence so that the various LockImpl classes
can be serialized and still function correctly when they are
deserialized back into new feature instances
Added default implementations of free & extend to LockImpl.
Modified API to take the ownerKey string, instead of the owner object.
Removed Extractor as unneeded - may add via another review, if still useful.
Updates per review comments:
- Updated licenses in feature-simple-locking
- Added beforeCreateLock & afterCreateLock to feature API
- Moved SimpleLockingFeature into policy-management so that it's
always available
- Moved the executor service, "exsvc", into PolicyEngine
- Moved Extrator into policy-utils
- Changed Extractor logging level for exceptions
- Fixed feature sequence numbers
- Fixed mixing of seconds and milliseconds
- Renamed exsvc
- Modified to use property method with default value
- Configured scheduled executor
- Added suffix to Extractor.register()
- Eliminated Feature Api and tied lock manager into engine
- Added non-null checks to LockImpl parameters
- Added non-null checks to createLock() parameters
- Checked that lockManager is initialized
Change-Id: Iddba38157ddc5f7277656979c0e679e5489eb7b1
Issue-ID: POLICY-2113
Signed-off-by: Jim Hahn <jrh3@att.com>
Jorge Hernandez [Tue, 15 Oct 2019 16:19:01 +0000 (16:19 +0000)]
Merge "Add 'PolicySession.insertDrools' method"
Straubs, Ralph (rs8887) [Thu, 10 Oct 2019 12:48:14 +0000 (07:48 -0500)]
Add 'PolicySession.insertDrools' method
This change includes feature hooks, so a "smart insert" could forward
the object to a remote host, and do the insert there. The methods 'insert'
and 'insertAll' in 'PolicyContainer' now make use of this smart insert.
Change-Id: I69f0e874b6fda09d1f457e4353e4b30d63696210
Issue-ID: POLICY-2160
Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
Bruno Sakoto [Thu, 10 Oct 2019 14:02:21 +0000 (10:02 -0400)]
Replace protobuf-java 2.6.0 dependency with 3.6.1
This change fixes protobuf-java library conflict when running policy
because of presence of 2.6.0 and 3.6.1 librairies in pdp docker
container.
Issue-ID: POLICY-2088
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: Ifcebf2207dc54543083d080151e0685d51792be5
Peyton Puckett [Thu, 3 Oct 2019 15:47:09 +0000 (10:47 -0500)]
Modify property files in active-standby-management
Remove ${env:} and update property syntax
Add new property failure.threshold
Add new property interval_sec
Update: change property syntax back to using ${env:}
Update: add 2019 to copyright information
Issue-ID: POLICY-2031
Change-Id: I6db10700189197a1306c3b8fa23dff26518be0f3
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
Peyton Puckett [Mon, 30 Sep 2019 19:28:14 +0000 (14:28 -0500)]
Add encoding declaration to pom.xml
Small pom change to add encoding declaration
Remove two trailing spaces
Update: remove additional trailing spaces
Issue-ID: POLICY-2036
Change-Id: I326e2cae576c53ee14150a28d6826d675f470578
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
Peyton Puckett [Wed, 2 Oct 2019 13:29:51 +0000 (08:29 -0500)]
Remove windows carriage return
Remove windows CR from code in feature-controller-logging/
Remove windows CR from code in feature-mdc-filters/
Issue-ID: POLICY-2032
Change-Id: I9779f6907fb5a50ab6129969081c2228ce91d3a7
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
Jim Hahn [Thu, 19 Sep 2019 21:58:19 +0000 (17:58 -0400)]
Address junit failure in active-standby
In testLocking1(), the sleep() call after the final demote() was
allowing the background FPManager thread to re-promote the PDP before
the next test in the test case. Removed the sleep() call, thus
preventing it from being re-promoted before the test. As that's
the last test in that particular test case, it shouldn't cause a
problem.
In the process of diagnosing and fixing the problem, made the
additional changes below.
Made each junit runnable independently so that background threads
could be terminated and started afresh with each test.
Decreased the maximum "real" wait time of the tests, as the
main thread only needs to wait an instant for the other threads
to fire.
Modified code to use common entity manager factories rather than
creating them for each test.
Deleted unnecessary sleeps at the end of tests.
Deleted unnecessary db clean-ups at the start of tests (already
done by the @Before method.
Change-Id: Ia9f1053be564d85f1b29e47379ab184ffdbac235
Issue-ID: POLICY-2080
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 13 Sep 2019 21:31:46 +0000 (17:31 -0400)]
Add YAML support to drools-pdp rest servlets
Drools-pdp depends on some of the GsonJackson annotations that cannot
be easily worked around via standard gson. Consequently, this continues
to use the JacksonHandler for json-encoding, thus it uses the
YamlJacksonHandler for yaml-encoding.
Added YAML to swagger "consumes" list.
Change-Id: Ic70c68bb274222db571b3515cbf1ab22d9ff2366
Issue-ID: POLICY-2081
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 10 Sep 2019 15:22:40 +0000 (11:22 -0400)]
Bump versions for drools-pdp master
Change-Id: I9882ab12334dc4b548de527ab2d7dbfc22177113
Issue-ID: POLICY-2045
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Tue, 10 Sep 2019 00:49:52 +0000 (20:49 -0400)]
Releasing drools-pdp 1.5.2
Releaseing 1.5.2 of drools-pdp
Issue-ID: POLICY-2045
Change-Id: I874b50d95ec94f784ebe5348f90cc23460f2114d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Mon, 9 Sep 2019 23:45:41 +0000 (19:45 -0400)]
Upgrade to released artifacts
Released artifacts are parent, common and models
Issue-ID: POLICY-2045
Change-Id: I8cc38806d25887c8af1a1c7580e50741e968e4f1
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
jhh [Thu, 5 Sep 2019 02:26:56 +0000 (21:26 -0500)]
Split Engine start method into "start" and "open"
"open" meaning to open external configuration interfaces
to external provisioning systems.
Issue-ID: POLICY-2055
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ic984f0ebccd088503b6b13620c3b80ed8e640899
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Jorge Hernandez [Fri, 30 Aug 2019 12:37:14 +0000 (12:37 +0000)]
Merge "Remove AlertSeverity from logback in drools-pdp"
Jim Hahn [Tue, 27 Aug 2019 18:37:50 +0000 (14:37 -0400)]
Remove AlertSeverity from logback in drools-pdp
Merged severity and AlertSeverity in the MDC, and updated the
logback xml files accordingly.
The logback patterns for the metrics log had a place for
both Severity and AlertSeverity; the latter was replaced with an
empty place-holder so-as to maintain the same position for
the other fields.
Change-Id: Ic0977e1133cc4219394f2d71ca8ebae080620e0b
Issue-ID: POLICY-1989
Signed-off-by: Jim Hahn <jrh3@att.com>