aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/controller-usecases/src
AgeCommit message (Collapse)AuthorFilesLines
2024-04-24Fix topic configurations.adheli.tavares1-3/+3
- adjust kafka configurations - remove any reference to dmaap or UEB Issue-ID: POLICY-4955 Change-Id: I8a5499d8145e6e02416d10a1da4cb96961ed3e0b Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-03-15Make drools-pdp work with drools and java versions compatibleadheli.tavares3-12/+16
with current DRL rules files syntax. Issue-ID: POLICY-4857 Change-Id: I40889288828da9aea757087e2c74004008336e41 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-02-09Remove deprecated DMAAP dependencyadheli.tavares4-7/+10
Issue-ID: POLICY-4402 Change-Id: Id3bf1f5833b7d6086345b3747505e2f57036d4ea Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2024-01-12Fix topic lower case for kafka compabilityadheli.tavares5-50/+54
Issue-ID: POLICY-4402 Change-Id: I0598bc83b5f4d46c79d7c5c897fd1e6e253b9238 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-10-04Java 17 and sonar fixes.adheli.tavares1-10/+6
- change on maven.compiler to new resource property targeting java 17 version - sonar bugs on try-resource and some code smells Issue-ID: POLICY-4677 Issue-ID: POLICY-4837 Change-Id: I50a2170db80619c2ac95131ab5c91a6f767a5c30 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-09-22Upgrade Java 17 in policy-drools-appsadheli.tavares13-423/+342
Issue-ID: POLICY-4816 Change-Id: I61d5c2c0b8bf2cc08416d91bbd84f27f2ed5c5c1 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-02-02Replace Eclipselink with Hibernateliamfallon1-0/+3
Issue-ID: POLICY-4533 Change-Id: Ica9b02be76ba45461e615e806d779b0799681680 Signed-off-by: liamfallon <liam.fallon@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
2022-11-04Support A1 PMS Actor for SON use casejhh2-4/+12
Issue-ID: POLICY-4444 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I1811b79513616aab813b6d97823d6c1d2bbbee47 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2022-02-09transaction records cleanupjhh2-19/+45
Issue-ID: POLICY-3761 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id842d8ca5773d0c1104ae387519375fb914bdf4f Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-07-26Still fixing drools-apps CSITJim Hahn1-0/+1
No easy way to test this without merging it, as the docker build always pulls drools-apps from the remote maven. :-( Issue-ID: POLICY-3503 Change-Id: I5d5bcfc3bb28d6ef3d4050f4e7d013acbc31f583 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-23Use new xacml actor in drools-appsJim Hahn6-32/+30
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-06-17Use lombok in drools-appsJim Hahn1-6/+6
Issue-ID: POLICY-3398 Change-Id: I2afedc900bc268dc83f689624b4daabdb64a09f9 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-07Fix sonars in drools-appsJim Hahn3-33/+16
Fixed: - use "var" - add @Override annotation - change constructor to "protected" - use Xxx.class::isIstance Issue-ID: POLICY-3290 Change-Id: I7f0795af306ea5afb46d12a4fe0b22adcbce683a Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-07Fix build error in drools-apps related to servicesJim Hahn1-1/+2
Apparently, creating the event services in the rule file has broken the junit test of the rules. It appears that the http clients are not yet loaded into the drools-pdp engine by the time the first rule fires, thus the event manager is unable to initialize all of its actors. Modified the junit to not start the rules until after the http clients have been started. Issue-ID: POLICY-3260 Change-Id: I83fe4ea9fa7ca24396019c18f0d77352fbe86db4 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-05EventManagerServices shouldn't be staticJim Hahn3-38/+56
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 Hahn3-864/+35
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 Hahn2-7/+8
Issue-ID: POLICY-3198 Change-Id: I5b80d35fbb523094ae5464e9c058fd8f2c71ff50 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-17Use new version of A&AI APIsJim Hahn1-4/+4
Just changed the version numbers; the APIs appear to be the same otherwise. Issue-ID: POLICY-2788 Change-Id: I842d88184a816c7fd24d935488875ba1337a1754 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 Hahn2-15/+96
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-20Use Params makeOutcome() without targetEntityJim Hahn1-1/+1
Planning to remove the second flavor of makeOutcome() from the Params, so modifying the drools-apps code to work with the first flavor. Issue-ID: POLICY-2804 Change-Id: Iddb288f7cf53e93919e77aca8afe3869fadb0d37 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-18Delete preprocessed flag from actorsJim Hahn7-8/+5
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 Hahn2-2/+29
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-03Merge "Add guard filter properties to controller"Jim Hahn3-6/+211
2020-09-02Add guard filter properties to controllerPamela Dragosh3-6/+211
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-09-02Merge "Allow guards to be dynamically enabled/disabled"Ram Krishna Verma1-1/+15
2020-08-31Allow guards to be dynamically enabled/disabledJim Hahn1-1/+15
Modified drools-apps so that guards can be dynamically enabled and disabled. Due to the current design, there are two properties that control this: - an actor-level property: when enabled, the DB connection is created, otherwise a stub connection is created. This property is NOT dynamic - an engine-level property: when enabled, the connection created by the actor is used, otherwise a stub connection is used. This property IS dynamic Issue-ID: POLICY-2748 Change-Id: I2a5baf908ce274f2eb46a6a3f01df1b3532038ff Signed-off-by: Jim Hahn <jrh3@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-28Remove legacy policy from rulesJim Hahn1-25/+24
Issue-ID: POLICY-2428 Change-Id: I87b66758c8984febcd5fb6e724fac3493f5d4cdf Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-28Merge "Use ToscaPolicy instead of legacy Policy"Pamela Dragosh7-135/+111
2020-08-27Use ToscaPolicy instead of legacy PolicyJim Hahn7-135/+111
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-26Move java code to rulesJim Hahn4-0/+1228
Added new usecases rules and feature. Updates per review comments: - kmodule.xml(s) Issue-ID: POLICY-2748 Change-Id: I2f5cb05a4269f98a3b0a778730434955f0919b4a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-25Add Usecases-specific event managerJim Hahn3-3/+1839
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 Hahn14-0/+2235
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 Hahn8-0/+995
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>
2020-07-14Remove usecases and legacy actor codeJim Hahn8-2083/+0
Made the following changes to remove usescase and legacy actor code: - deleted the usecases controller and feature - deleted code associated with legacy actors, with the exception of AaiManager, which is needed by RestControlLoopManager - moved the contents of the "guard" project into the m2/guard project, as that is the only thing that still needs it - modified the m2/GuardContext to get the name of its persistence unit from the properties so it could be overridden by junit tests - used eclipselink constants Also fixed a bug in the properties for the VFC actor. Addressed review comment: - removed usecases from Dockerfile Issue-ID: POLICY-2558 Change-Id: I677d68c9efed9247c3d55773abdcc736b577a6b4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-02Use new Actor names in drools-appsJim Hahn1-6/+6
Modified drools-apps to use XxxActor instead of XxxActorServiceProvider. This is the second step of the rename. Issue-ID: POLICY-2684 Change-Id: Iea60e92f914b7719ac765b086650479be9192d98 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-29Fix build breakage in drools-apps due to pairJim Hahn1-7/+8
The Pair changes made in drools-pdp also broke drools-apps builds. Replaced usage of drools.utils.Pair with apache Pair. Issue-ID: POLICY-2202 Change-Id: I50aaad47c243637688602ae6cb680a929fe3edd9 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-01Use OperationsHistory from modelsJim Hahn1-43/+43
Deleted Dbao and replaced it with the shared class in policy-models. Also had to update the queries and the persistence.xml accordingly. Note: with this change, the "database" project is no longer needed, so it was deleted. Issue-ID: POLICY-2581 Change-Id: Idfde68b28b3a27f2ee794fa477d15e0f12717373 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-25Fix db exception in usecases junitJim Hahn1-0/+43
Issue-ID: POLICY-2441 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I1233d985f3e6fc6260912e4ad00d46e7c3e58430 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-23Enable guards in junit testsJim Hahn1-2/+2
Flipped the flag(s) to enable guard checks in the various junit tests for the Usecases and Frankfurt controllers. Note: the guard checks use the guard simulator. Modified new actor code to not include operation history on first "guard denied" report (i.e., make it work like usecases does). Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I2897da4a0c8fb76fa00cb0f6cf8562c0703005d3
2020-03-18Add rainyDayTest for VFWPeyton Puckett1-1/+1
Added less restrictive filter condition to consider discarded messages Issue-ID: POLICY-2431 Change-Id: I0bc5e34636699094c97bd7e5669f66df875cd6ae Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2020-03-12Retool rules testsJim Hahn19-1344/+126
Extracted common code from various XxxBaseTest classes into: - Topics class to manage messages for test topics - HttpClients class to manage HttpClient objects for tests - Simulators class to manage simulators for tests - Rules class to manage start up and shutdown of rules Merged remaining code from XxxBaseTest classes into a single class. Modified the Frankfurt and Usescases tests to subclass from this new class and specify just the relevant tests to be executed. Issue-ID: POLICY-2385 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Iaf83c9d2b205a4c343e0dde23ec86508f5773693
2020-02-24vDNS tosca compliant policies supportjhh5-39/+132
Issue-ID: POLICY-2383 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I5d5d864b2853f6e7e0c7e1096cb17746500f2495 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-02-21Tosca compliant vFirewalljhh3-15/+69
Issue-ID: POLICY-2376 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I362ebbd941c400a6ffc3e952e66ca2d624afbfdd Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-02-17tosca compliant op policy support + vcpe testjhh6-22/+79
Tosca Compliant and Toscal Legacy Operational policies are both supported for backwards compatibility. vCPE usecase junits to support 2 equivalent policies, one tosca compliant and the other one legacy. Issue-ID: POLICY-2360 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iafbfc92bbec42e6a3fe4ceb4a9a17c85e636ea14 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-02-06Use CanonicalOnset in usecases.drljhh1-21/+13
Issue-ID: POLICY-2323 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ic1258e17c08eacbf8d3a57a6562ba470420e615f
2020-01-17DCAE Onset flood preventionjhh6-9/+64
Issue-ID: POLICY-2323 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I08cd55b442ccce3e0eaaa63c1ebd4422c1e0a0d5 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>