aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/controller-usecases/src/test/java/org/onap
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>
2024-01-12Fix topic lower case for kafka compabilityadheli.tavares1-1/+1
Issue-ID: POLICY-4402 Change-Id: I0598bc83b5f4d46c79d7c5c897fd1e6e253b9238 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-09-22Upgrade Java 17 in policy-drools-appsadheli.tavares11-396/+315
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
2022-02-09transaction records cleanupjhh1-7/+13
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-23Use new xacml actor in drools-appsJim Hahn2-6/+6
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-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 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-28Merge "Use ToscaPolicy instead of legacy Policy"Pamela Dragosh4-99/+61
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-26Move java code to rulesJim Hahn1-0/+119
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 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>
2020-07-14Remove usecases and legacy actor codeJim Hahn1-120/+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-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 Hahn5-1068/+120
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 supportjhh4-39/+84
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 vFirewalljhh1-14/+28
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 testjhh2-18/+36
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-01-17DCAE Onset flood preventionjhh1-3/+24
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>
2020-01-09Add ControlLoopParams from models repo.jhh1-2/+2
This class is only useful under drools applications and eventually will be deprecated to accommodate the new Operational Policy Types. Issue-ID: POLICY-2146 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I68927cb144a33fac6fe330be15fe60aee32b15a1
2019-11-20use case junit testsjhh4-0/+970
added vcpe support added scale out support addressed some review comments added vfw support Issue-ID: POLICY-2249 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I245f8fc8d520cd2511080c9aee61bf7a0c0a1499 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>