summaryrefslogtreecommitdiffstats
path: root/policy-management/src/main
AgeCommit message (Collapse)AuthorFilesLines
2019-02-15Merge "Decouple nexus reconfiguration from installation"Pamela Dragosh1-1/+6
2019-02-14Remove jackson from policy codersJim Hahn6-378/+74
Coders came in pairs, one for GSON and one for Jackson. Replaced the pairs with a single coder for GSON. Simplified list copy. Removed multipleToolsetRetries flag. Removed additional jackson code. It had been removed, but the changes were somehow lost. Simplified another list copy. Updated license dates. Note: the date in PolicyEngineTest will be updated via a different review (mgmt-gson). Change-Id: Id3c7688c2389d194f66afcefa14303cf403ada16 Issue-ID: POLICY-1431 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-14Decouple nexus reconfiguration from installationJorge Hernandez1-1/+6
This allows for nexus to be reconfigured dynamically. Change-Id: I103707ab7525ddb29663d7785739a34dff538605 Issue-ID: POLICY-1518 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2019-02-04Report KieBase names in rules artifacts.Jorge Hernandez3-7/+24
The rule writer at design time can embed the domain base model(s) supported at design time. This information can be extracted at runtime to match a controller with the domain/model functionality that it can support. Change-Id: I7f7f1320d7d601d50949d0cd09bc48982c222333 Issue-ID: POLICY-1500 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2019-01-04Add tooling for drools policy developersJorge Hernandez7-28/+489
This commit adds tooling to better support development activities for drools developers. 1. deploy artifacts to nexus or to local file repository on demand. It also allows to test on a single drools instance without the dependency on a nexus repo. 2. make installation configuration files conform to same convention (all upper case). Change-Id: Ia0a2fc25db2ef21b774a9eee4ed51d4b876a1993 Issue-ID: POLICY-1367 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2018-12-04Fix sonar issue in droolspdfKrishnakumar Jinka3-51/+30
Modify protocol coder to fix sonar issue about method params too many. Using existing builder. Address review comments, replace modified with modification Issue-ID: POLICY-1251 Change-Id: I67bd753f346108865404b733e7cf6008c2012766 Signed-off-by: krisjinka <kris.jinka@samsung.com>
2018-11-29Merge "Remove Factory from various drools-pdp classes"Jorge Hernandez1-46/+37
2018-11-29Fix sonar issue in event protocol coderkrishnajinka1-297/+310
Add method in Eventprotocolcoder uses more params than allowed causing sonar issue, use builder object instead Modify javadoc and tostring methods based on review comments Issue-ID: POLICY-1251 Change-Id: I6f283135560bfa61ca9d9512f5c971d118d7e071 Signed-off-by: kris.jinka <kris.jinka@samsung.com>
2018-11-29Remove Factory from various drools-pdp classesJim Hahn1-46/+37
Also merged changes from 'Rename test classes in drools-pdp'. Change-Id: I4d0a3a1b0b5523eadf38d1edb5aa86c404b69d19 Issue-ID: POLICY-1288 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-11-16Modify decoder to use param objkris.jinka2-35/+32
Modify decoder to use param object for sonar issue fix Issue-ID: POLICY-1251 Change-Id: Iae68ba276f02be51058037b56d901a131b25838e Signed-off-by: kris.jinka <kris.jinka@samsung.com>
2018-11-15Modify event (en)coder to use param objskris.jinka3-31/+181
Use builder object to send params to event protocol coder and encoder methods to fix sonar issue Issue-ID: POLICY-1251 Change-Id: I6ca5823e1aa35d9aa3a05eb23ac159947efdde23 Signed-off-by: kris.jinka <kris.jinka@samsung.com>
2018-10-26Enable Authorization AAF Filter programmatically3.0.0-ONAPJorge Hernandez2-2/+11
The intent is to reduce configuration options and automatically set up the authorization filter (that will complement the authentication filter that the policy-endpoints common framework automatically provides). Previously to enable the AAF authorization filter, it will need the configuration had to kept track of AAF flag, and the "filterClasses" property configuration, make a bit more difficult to keep them sync, and easily turn on/off AAF. Change-Id: I3d59de6fa83986c5dcb6b3d38077278b8e75689a Issue-ID: POLICY-1216 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2018-10-05Add junit coverage to PolicyEngine classJim Hahn1-91/+156
Also fixed a typo in a test comment. Change-Id: I4ad72cc7c103014e6f5920f912c862560af5a331 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-03Add coverage for policy-managementJim Hahn2-41/+69
Added coverage for PolicyControllerFactory and AggregatedPolicyController. Fixed some typos in comments. Reformatted some code. Change-Id: I33aea8e1e7dde29bd51218d0ecad7b34047b33e5 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-01Set drools-pdp checkstyle configPamela Dragosh18-1514/+2092
Fixed last remaining checkstyle issues along with setting the pom.xml to the correct path setting. Fixed forbidden summary fragments, not allowed to prepend summary with "This method returns" Issue-ID: POLICY-1153 Change-Id: I267842080494132a7b5507731e14f027a3f6fe44 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-19AAF Configuration in PDP-DJorge Hernandez11-10/+142
AAF is disabled by default until pairwise testing is completed. Change-Id: Ica83873a2605742689ed0c2e06dfade20bef8bf0 Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1043 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-09-13Fix checkstyle in policy-managementPamela Dragosh11-3386/+3610
The submodule policy-management checkstyle fixes. There may be one or two sonar fixes in there. Issue-ID: POLICY-882 Change-Id: I9cb43c573c6811dd058943650ba1ea5f6dc880aa Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-10disabling http for configuration servicesJorge Hernandez2-30/+21
per security recommendations. Change-Id: Ic195f8270c2270239408e33e27f87436878e28b4 Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1104
2018-08-29handle null drools object in configurationJim Hahn2-4/+4
Modified code to explicitly check for missing drools object, and to not throw an exception during MDC setup. Change-Id: Iac16f2fc46e2ffff03195985383b09b814fa4008 Issue-ID: POLICY-1082 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-20https certs with aaf+pdpd containers compatibilityJorge Hernandez2-6/+22
Updated license date (jrh3). Change-Id: I1bc244da64f4a1e683f8c6a1be53157474f46ee9 Issue-ID: POLICY-1026 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-08-06Fix basic Java issue in pdp drools sys compkrishnajinka4-574/+556
Modify pdp drools system component files to fix basic Java warnings from analysis tools. Possibly flagged by Sonar tool as well.Rework based on comments Issue-ID: POLICY-1017 Change-Id: I1f2a5d727d2673cade5f69a07f708e16754c78e4 Signed-off-by: krisjinka <kris.jinka@samsung.com>
2018-07-30Copy policy-endpoints from drools-pdp to commonmmis3-70/+45
Issue-ID: POLICY-967 Change-Id: Ib19d3a89ffa328c39f7871bff59efb3dd1617f7a Signed-off-by: mmis <michael.morris@ericsson.com>
2018-07-25Copy policy-endpoints from drools-pdp to commonmmis11-4632/+4515
Removed policy-endpoints, and 3 classes from policy-core. Replaced refenences to the deleted classes with references to the corresponding classes in policy-common Issue-ID: POLICY-967 Change-Id: I547cde4894424b8f40b7ddd4e2342ebb729cb588 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-05-14automatic upgrade/downgrade features dbJorge Hernandez1-2/+2
add enable and disable scripts to the feature-distributed-locking to upgrade/downgrade their databases when these features are enabled or disabled. Change-Id: Iff9368c915f6da7f7c75d9a5a20ffe27e290e7d3 Issue-ID: POLICY-788 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-04-25cook policy-keystore into drools imageJorge Hernandez1-1/+1
OOM team reported issues with ONAP installation in terms of config map sizes. After discussion with OOM team, one solution is to cook it in the docker image itself. This will solve the size issue on the OOM side. Change-Id: I6848370f119cabdae450a1153a88ebd8c0f6b392 Issue-ID: POLICY-747 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-04-19Sonar cleanupMagnusen, Drew (dm741q)1-1/+1
More sonar cleanup. Resolved some of the simpler issues. Issue-ID: POLICY-728 Change-Id: If9c4718f10c6d3524239d2a05c09badb791ef2f0 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2018-04-18support for AAF provided trustoreJorge Hernandez1-4/+2
Change-Id: I20c5136636f922ee31a773b462e5c2318b2f222f Issue-ID: POLICY-747 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-04-16strip timestamped versions in feature installsJorge Hernandez1-1/+1
This is to satisfy CSIT tests that contains a mix of SNAPSHOT and timestamped versions while running tests Change-Id: I1fe426dcca9250d0fe2c9c5264f1acb1ffbde57b Issue-ID: POLICY-745 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-04-03disable problematic private keystoreJorge Hernandez1-4/+4
it causes bad interactions fetching dependencies with nexus libraries, it has been disabled (at least for the short term) and rely on the JVM one instead. Change-Id: Ie9d1ae7fe304c06807e457c5bfcf34d07e8d83b8 Issue-ID: POLICY-720 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-03-26l2 management maturity pdp-dJorge Hernandez5-62/+141
configurable log location metric/audit log for transaction metrics conforming to new field definition. support metrics/audits records with custom logback filters so they are not intrusive with developer log testing. Change-Id: I7a4dcc6790b85539e613ad8705e731e7298ce106 Issue-ID: POLICY-533 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-02-21Merge "interception of facts before injection"Pamela Dragosh2-15/+91
2018-02-20Sonar fixes to drools-pdpJim Hahn21-468/+429
Fixed most of the instances of the following sonar issues: Moved array designator Used diamond operator Changed System.out/err to use a logger Changed several Thread.sleep() in test code to a single sleep() Useless assignments Replaced comparison with "" to string.isEmpty() Merged if's Replaced ArrayList with List in method returns Reordered type modifiers Reordered constructor methods Defined constants for literals, or replaced them with method calls Removed "throws Xxx" for subclasses of RuntimeException Combined identical "catch" blocks Re-interrupted the current thread after catching an InterruptedException Removed tests against the literal "false" Fix indentation of new makeTopicOperError() method. Fix exception variable name in new methods, logNoUebEncoder() and logNoDmaapEncoder(). Change-Id: Iddae5210553662f733b67333b372dec8c3fe2c94 Issue-ID: POLICY-336 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-02-19interception of facts before injectionJorge Hernandez2-15/+91
Added interceptor to drools controller, post-decoding and pre/after injection into kie sessions. The decoded object is passed as is. The set of hooks will be expanded in the future. This is added in the context of logging for POLICY-558 to track control loop transactions, per logging requirements. The idea is that VirtualControlLoopNotifications on the drools-applications area will use it to track control loop transactions, times, etc .. to satisfy logging requirements. This approach also reliefs the drools applications logic, (.drl) for dealing with this. The logic therefore will be isolated into a single feature. Change-Id: Idf840c528e6175be4aaee3bf114091c203b37bc8 Issue-ID: POLICY-558 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-02-07expose immutable list of filters to its usersJorge Hernandez3-103/+149
+ additional related junits Change-Id: I00293cd9aa911dfb3d658cad4ee0441ad3410e9c Issue-ID: POLICY-164 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-01-31junits+utils to generate/test rules applicationsJorge Hernandez1-1/+1
1. utilities to generate rules applications and installing in local maven repository programmatically. 2. using these utilities, use policy abstractions, ie. controllers, containers, .. to junit test it. Change-Id: I13c35e631a1120fad503feef2593d32a99e3358f Issue-ID: POLICY-583 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-12-19Reduce tech debt in policy-managementMagnusen, Drew (dm741q)11-118/+189
Changes to reduce tech debt in the policy-management module. Issue-ID: POLICY-463 Change-Id: I41f6b66d25a805706e5c9ed2cef2eda256153a37 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-11-30make volatile access to alive and locked flagsJorge Hernandez1-4/+4
instead of synchronized read access Change-Id: I3f4457f798d6f4d4a013bf023ed2d9c1b75d4f1f Issue-ID: POLICY-487 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-10-25shutdown to guarantee terminationJorge Hernandez1-32/+43
This method will ensure that once the shutdown sequence is started, it terminates either gracefully or forcefully after the grace time period expiration. It has been occassionally observed that the shutdown sequence gets stuck in the shutdown sequence of a subcomponent, such as a drools applications. This will guarantee that the shutdown completes regardless. Change-Id: I8379eea5f0b80fe6a5aed6da2f2bfbfcb1f24bc0 Issue-ID: POLICY-386 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-10-19fix migration when iterating through DBsJorge Hernandez1-2/+4
Change-Id: Ib243572c2395c9e122af3bff24d1fd8b89300166 Issue-ID: POLICY-357 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-10-09Register a gson type adapter for InstantCharles Cole1-2/+4
Added a type adapter to the encoder used without a custom encoder so that it properly serializes Instant types. Issue-ID: POLICY-101 Change-Id: Ic1517505d50b81abc840a1591c7fb4a75f80a126 Signed-off-by: Charles Cole <cc847m@att.com>
2017-10-09send messages directly through topicJorge Hernandez3-623/+620
This work is needed for consolidating the amsterdam templates used both for junits and the official one from the archetype into one, so junits can run in the official one. This work revisits the functionality of when a drools controller cannot be found to check state before delivering a message from the drools application, it will use a standalone enconder (previously configured to do so). This was intended to work like this originally, but never tested nor used as all deliveries are send through the controllers so locked/alive state is checked (but there may ocassions where we want to take this default action). Change-Id: Ie23e4e13323f3ab9fd207f8a396c1af6564b7edf Issue-ID: POLICY-101 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-28policy-engine.properties to be honored if existsJorge Hernandez1-1/+1
Change-Id: I9c8c7d56a1087a0514f4d53be293e287a26ae1bf Issue-ID: POLICY-265 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-22Merge "Removed useless parentheses"Pamela Dragosh1-4/+4
2017-09-22Merge "Added @Override method"Pamela Dragosh3-19/+20
2017-09-21Log exceptionPamela Dragosh1-0/+1
Logging as trace since it is an acceptable exception. Change-Id: Ie93e60aeb95ece9b142c87f20eeb21ef56507dc4 Issue-ID: POLICY-261 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-09-21Removed useless parenthesesrama-huawei1-4/+4
Added diamond symbol on RHS Issue-ID: POLICY-239 Change-Id: I24c138703047308c2e28fef2180a0bb64400c1c9 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-21Added @Override methodrama-huawei3-19/+20
Added diamond symbol on RHS Removed useless parentheses Issue-ID: POLICY-239 Change-Id: Ie20319a5a7298c70a18cc3773ec47f235dbdae41 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-20load config files in ascending order by nameJorge Hernandez1-2/+12
adding predictibility for environment and controller files loading Change-Id: Id02ddca75dd0dc8da658b64b84e77bef9e82b37c Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-19Adding JUnits for Configuration ClassesPamela Dragosh3-19/+22
Also fixed some Sonar Major issues to help clean that up. Issue-ID: POLICY-109 Change-Id: Ic8a0b8d97f2be1cc1f8e8e4e8b319c6117b231a4 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-09-15Fix sonar related to persistence-featurePamela Dragosh2-1/+2
Sonar blocker for catchable: I am not sure why this is wrapped with an exception. Changing try-catch to use Exception | LinkageError per Jorge/Ralph. Sonar critical for logging exceptions. Sonar critical for casting to Long and reinterrupting thread. Change-Id: I44d46f005d9aa30c434c22e479034107055277ce Issue-ID: POLICY-195 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>