aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools
AgeCommit message (Collapse)AuthorFilesLines
2024-02-09Remove deprecated DMAAP dependencyadheli.tavares1-1/+3
Issue-ID: POLICY-4402 Change-Id: Id3bf1f5833b7d6086345b3747505e2f57036d4ea Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-09-22Upgrade Java 17 in policy-drools-appsadheli.tavares10-384/+303
Issue-ID: POLICY-4816 Change-Id: I61d5c2c0b8bf2cc08416d91bbd84f27f2ed5c5c1 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-01-26Updating tests to account for Drools upgradeisaac1-3/+3
Issue-ID: POLICY-4498 Signed-off-by: isaac <isaac.adorno@att.com> Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I8e0fcb2905bbc9f8254ec8af6044b5b5a720f65a
2021-07-23Use new xacml actor in drools-appsJim Hahn1-4/+4
Modified drools-apps to use actor.xacml instead of actor.guard. This included updating property files. Issue-ID: POLICY-3503 Change-Id: I25c5586c59a2adaae9f4f0f5ca66e14b12b0c18a Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-05EventManagerServices shouldn't be staticJim Hahn1-34/+26
Currently, the event manager uses a static EventManagerServices object, which precludes the possibility of configuring the actors, for each rule set, from using different properties. Modified the code to allow the rules to specify the event services to use on a per manager basis. Issue-ID: POLICY-3260 Change-Id: If493ae1b55cb752f11e0b2f72dced9c4f3883e34 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-04Refactor common code from UsecasesEventManagerJim Hahn1-402/+8
Created ClEventManagerWithSteps, as a subclass of ControlLoopEventManager. It contains the "Steps" to be performed and also deals with outcomes. Created ClEventManagerWithEvent, as a subclass of that. It contains a VirtualControlLoopEvent object, and uses that to populate data used by the superclass. Updates per review comments: - made loadPolicy() protected - refactored another level to manage operation outcomes Issue-ID: POLICY-3262 Change-Id: Ibf5dd114746ae26e04fe37d562273fc81dd8cfbe Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-13Make op history classes work with generic eventsJim Hahn1-5/+5
Issue-ID: POLICY-3198 Change-Id: I5b80d35fbb523094ae5464e9c058fd8f2c71ff50 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-12Fix sonars from dependency upgradeJim Hahn10-59/+39
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner. Issue-ID: POLICY-2910 Change-Id: I257b74626f4393aa89d2bf1b7502478422213b71 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-05Give better messages than NPE for missing dataJim Hahn1-1/+73
When data is not available to actor operations, an NPE is generally thrown. Modified the code to provide more info about what is missing than simply NPE. Issue-ID: POLICY-2913 Change-Id: Ic56376ef5fdd0f2e46c2996405fff9aafa3692b9 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-18Delete preprocessed flag from actorsJim Hahn5-6/+4
Removed the "preprocessed" flag from the Actor parameters, now that the actors no longer have a startPreprocess() method. Also removed targetEntity from the parameters. Issue-ID: POLICY-2804 Change-Id: I13bc80e1b6bb22d8d21b176796ca062109ce6658 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-16Make drools-apps event agnosticJim Hahn3-44/+30
Removed tdjam and frankfurt controllers, which use event-specific actors. Issue-ID: POLICY-2804 Change-Id: Ica05f80bf72d039d9c4903591af7fb3793a81159 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-10Allow mixed case in check of prov-statusJim Hahn1-0/+26
Apparently SO/AAI in Frankfurt are setting the prov-status to "active" instead of "ACTIVE". Modified the code to ignore case when comparing. Issue-ID: POLICY-2890-prov-status2 Change-Id: I9e868d320dadcb3ac51570718d10f33d0011ae47 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-02Add guard filter properties to controllerPamela Dragosh1-6/+123
Adding new properties to guard Decision call. Issue-ID: POLICY-2590 Change-Id: Ie4a37990e062c76ac4d6dd1b904ad354736fd27a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com> Signed-off-by: Jim Hahn <jrh3@att.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-08-28Add tdjam-controllerStraubs, Ralph (rs8887)1-10/+11
the details is on wiki: https://wiki.onap.org/display/DW/tdjam+Feature+for+Tosca-Driven+Control+Loops Fixed some eclipse warnings. Revised the interaction between a manager and its SerialWorkQueue to address some threading issues. The original code started processing the event as soon as the manager was created, WHILE it was still being added to the map. During junit tests, the event responses came back, within the same thread, which then attempted to remove the manager from the map. This resulted in a ConcurrentHashMap exception. Issue-ID: POLICY-2415 Change-Id: I94a4152637be76e5b2aea2d869afd84dfb413a0e Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com> Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Signed-off-by: Taka Cho <takamune.cho@att.com> Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-27Use ToscaPolicy instead of legacy PolicyJim Hahn4-99/+61
Removed usage of policy-yaml and old targetType definition. Switched to using TOSCA operational policy classes and new definitions for Target type enum. Issue-ID: POLICY-2428 Change-Id: I25d1c5219764df27bdae7f2cbeb7ada7bcef4e1e Signed-off-by: Jim Hahn <jrh3@att.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-08-25Add Usecases-specific event managerJim Hahn2-3/+1080
Created new "usecases" event manager. Also fixed a couple of sonar issues in the new code. Issue-ID: POLICY-2748 Change-Id: I17a2c41bbf4f4e8158adbd8aa5e32ef570daa9d3 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-24Add Step classes for usecases controllerJim Hahn7-0/+1326
Add usecases-specific classes for managing preprocessor steps. Issue-ID: POLICY-2748 Change-Id: I62a2bf8fbeb656a5017531a3f3de6a6dbad5a004 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-21Add "special" Operation classes for new usecasesJim Hahn2-0/+469
Created place-holder for new "usecases" controller. Note: as of yet, this is still just a normal java project; it will be turned into a full-fledged kie-based controller in a later review. Added some Operation and a few other support classes that will be needed. Note: the detmTarget() method and it's various supporting methods, detmXxx(), found in GetTargetEntityOperation2 were cloned from the pre-existing ControlLoopOperationManager2 class, and modified to fit the strategy of the new controller. Likewise for the junit tests of those methods. Issue-ID: POLICY-2748 Change-Id: Idffa135a11a56bd6afdd2728706fd40168e80912 Signed-off-by: Jim Hahn <jrh3@att.com>