aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/controller-usecases/src/main
AgeCommit message (Collapse)AuthorFilesLines
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.tavares2-3/+4
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.tavares2-12/+15
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.tavares2-27/+27
Issue-ID: POLICY-4816 Change-Id: I61d5c2c0b8bf2cc08416d91bbd84f27f2ed5c5c1 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2022-02-09transaction records cleanupjhh1-12/+32
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-12/+10
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-05EventManagerServices shouldn't be staticJim Hahn2-4/+30
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 Hahn2-462/+27
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-2/+3
Issue-ID: POLICY-3198 Change-Id: I5b80d35fbb523094ae5464e9c058fd8f2c71ff50 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-05Give better messages than NPE for missing dataJim Hahn1-14/+23
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 Hahn2-2/+1
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-10Allow mixed case in check of prov-statusJim Hahn1-2/+3
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 Hahn2-0/+88
2020-09-02Add guard filter properties to controllerPamela Dragosh2-0/+88
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-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-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 Dragosh3-36/+50
2020-08-27Use ToscaPolicy instead of legacy PolicyJim Hahn3-36/+50
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 Hahn2-0/+1079
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 Hahn1-0/+759
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/+909
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 Hahn3-0/+328
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 Hahn2-1738/+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-02-17tosca compliant op policy support + vcpe testjhh2-4/+6
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 preventionjhh1-3/+3
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-15Removing Named Querypramod.jamkhedkar1-7/+0
Removing all the related files and necessary modifications for removing named query. The code now only supports Custom Query. Issue-ID: POLICY-2125 Change-Id: I2d376eb955d69f45c39ad4d4a1cfacb4d620ca8e Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2019-11-08Fix more sonar issues in drools-applicationsJim Hahn1-1/+0
Addressed the following sonar issues: - unused imports - unused method parameters - superfluous "throws" declaration - fields within a serializable class must also be serializable; this was/will be fixed with a change to AaiCqResponse in policy-models - use logger instead of System.out; turns out that the code that used System.out is no longer needed. In fact, deleted several classes that are no longer needed: ControlLoopLogger and ControlLoopPublisher - cyclomatic complexity and switch/case statements too big; used eclipse to extract chunks of code into separate methods - duplicate code Note: extracted common code and used lambdas to eliminate duplicate code in PolicyGuardYamlToXacml. However, a better approach would be to use object-oriented programming, using mini/nested objects to do the generation. The lambdas would then become abstract methods. Nevertheless, that would entail significantly more re-write of this class than desired at this time Issue-ID: POLICY-2225 Change-Id: Ie503ffd7accbad3e410af602d32b29c0095c3a33 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-11-01upgrade to 7.28.0.Final drools librariesjhh1-0/+1
Issue-ID: POLICY-1407 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ia3cd03719b52e2d4e1fad3662090b7c35e2acf1f
2019-10-29Update APPC LCM Model referencesDaniel Cruz1-8/+4
Updates to all references of APPC LCM model code based on changes in policy models for APPC LCM. Issue-ID: POLICY-2043 Change-Id: I0102eb27f449578636cfc0bf22124fa863f05724 Signed-off-by: Daniel Cruz <dc443y@att.com>
2019-10-22Modify drools-applications to use new Lock APIJim Hahn1-156/+161
Modified code to use new Lock API. Also deleted TargetLock and PolicyGuard, as they are no longer needed. Issue-ID: POLICY-2113 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I5bc9b7732f9cfc6056789b2902d9f6f838b560be
2019-10-16Integrate cds actor service providerBruno Sakoto1-0/+117
* Add request enrichment with aai service instance id and vnf id * Implement cds grpc request * Implement VfwControlLoopCdsTest Issue-ID: POLICY-2088 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: Ib44d447d6a3a70ff800a5760032b676fdfa32d9c
2019-09-04Changes drl filespramod.jamkhedkar1-2/+21
Changes to the DRL file to change the rules to support custom query. Added new VdnsControlLoop test for custom query, and supporting yaml request Issue-ID: POLICY-1858 Change-Id: Ic1b9e771bd36fe0642e9a3439189076a4906a4b8 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2019-08-23remove usecases archetypejhh1-0/+1588
Issue-ID: POLICY-1957 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I90436e2d633bf0e9f6153dd40e164214f309b8dc
2019-04-01Rename "casablanca" controller to "usecases"jhh1-0/+25
Change-Id: I41487becd1705fbe725023798a3ea10f4638a6af Issue-ID: POLICY-1474 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>