aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common
AgeCommit message (Collapse)AuthorFilesLines
2020-03-09Bug fixes to new rulesJim Hahn12-18/+686
Also added VdnsTest, VfwTest, and VcpeTest. Fixed a number of issues with notifications: - event data (e.g., AAI) was missing - notification was missing for the start of an operation - "message" and "history" fields should contain Target object, target entity - "message" field was missing various details (e.g., start time) Still missing subRequestId - that will require enhancements to the actors. Issue-ID: POLICY-2385 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I7fc33ebcd5939d2f33a9d209ac6119e390e0836d
2020-03-06Add frankfurt rules for Actor redesignJim Hahn66-13/+7857
Note: VcpeTest and VfwTest are not included, as they depend on updates to the APPC and APPC-LCM Actors. Added feature-controlloop-frankfurt. Added HTTP client property files to feature-controlloop-management. Updates per review comments: - pom changes - simplify FrankfurtBase - rename event-svc-http.properties - change "usescases" to "frankfurt" - use blanks for CDS property defaults - trailing spaces in http-client files - add https property to http-client files Added newlines to config files that appear to be missing them (based on feedback from gerrit). Issue-ID: POLICY-2385 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ib4a4d75461c734ae47309e41dc9d099e8815d55d
2020-03-04Merge "decouple topics from controllers"Jorge Hernandez9-27/+188
2020-03-03decouple topics from controllersjhh9-27/+188
native policies will require topics configured at installation (there's no policy to add them). This configuration style also cleans the installation tidier (topics can be overriden or new ones added when being placed in the mounted config directory). Issue-ID: POLICY-2181 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I87fd6889c651147e9229b3487db8c95b34516dfd
2020-03-03use policy/parent awaitilityPamela Dragosh11-115/+0
Also cleaned up a bunch of these pom's, they do not all need to declare JUnit, assertjr, mockito testing classes. Can use more cleanup in some other common dependencies, but we'll defer. Issue-ID: POLICY-2381 Change-Id: Ib1149a0cd0215d1a38d5b625634440413cf79089 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-01Use apache Pair not Sdnr custom PairPamela Dragosh1-7/+7
Companion review to https://gerrit.onap.org/r/c/policy/models/+/102162 in which use of Pair from apache vs creating our own. Removed an unused import. Issue-ID: POLICY-2382 Change-Id: Id3cf9a170480c7a621dddf93540d61f993f3553a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-02-29Tosca policies missing "final_xxx" fieldsJim Hahn1-12/+27
The code that makes Tosca policies backward compatible was not copying the final_xxx fields (e.g., final_failure_retries). Added code to copy the fields. Issue-ID: POLICY-2376 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I05d746ee9c8ace263c7b33a245221c5eb71b612c
2020-02-24vDNS tosca compliant policies supportjhh10-128/+197
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 vFirewalljhh11-47/+173
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 testjhh33-510/+1656
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-09Merge "Updating module names to resolve conflicts"Jim Hahn12-14/+24
2020-02-07activate refactoring in ControlLoopEventManagerjhh1-62/+69
This is to support backwards compatible implementation of Tosca Compliant Operational Policies. Issue-ID: POLICY-2360 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I0e8b96b19375c58e4b62e0dcd1da5c508091ea2f Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-02-07Updating module names to resolve conflictsRam Krishna Verma12-14/+24
Issue-ID: POLICY-2355 Change-Id: If13badaf332f5e4341e23b9dcf22e177e9b67ff2 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-02-06Use CanonicalOnset in usecases.drljhh2-23/+16
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>
2020-01-16policy/drools-apps jdk11 upgradesHockla, Ali (ah999m)13-46/+35
Issue-ID: POLICY-1587 Change-Id: I02bef6c829f2f24954ae73fb0c540ab7198775ce Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2020-01-09Add ControlLoopParams from models repo.jhh9-14/+169
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-12-09moved proto-definition dependencyjhh1-0/+4
It shows in the /tmp/policy-install directory in the docker image. It does not need to be applied to all the drools-applications subprojects. Issue-ID: POLICY-2191 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ia2048b6e21068a7cd5e36439af368cf024975f01
2019-11-22Merge "Use dependency management for cds proto-definition artifact"Jim Hahn1-4/+0
2019-11-21Use dependency management for cds proto-definition artifactRashmi Pujar1-4/+0
Refer to: https://gerrit.onap.org/r/#/c/policy/parent/+/98733/ Issue-ID: POLICY-2254 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ia7fe2f294187f5c108781c8798890045445ab825
2019-11-20use case junit testsjhh17-0/+1275
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>
2019-11-15Removing Named Querypramod.jamkhedkar8-1198/+260
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 Hahn12-348/+99
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-06Update drools-application due to ↵Rashmi Pujar2-7/+7
https://gerrit.onap.org/r/#/c/policy/models/+/97989/ Issue-ID: POLICY-1896 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: I6125a1c83f58411f08bb143ff21ccd66d4db4977
2019-11-04PNF support changes for drools-applicationRashmi Pujar4-24/+129
Conditional checks for enrichment and validation by target-types PNF specific AAI enrichment Fixed Unit Tests Issue-ID: POLICY-1187 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: I78bf73e454828253ca69695f9196047449b4d9d6
2019-11-01upgrade to 7.28.0.Final drools librariesjhh4-22/+1
Issue-ID: POLICY-1407 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ia3cd03719b52e2d4e1fad3662090b7c35e2acf1f
2019-10-29Update APPC LCM Model referencesDaniel Cruz7-74/+82
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 Hahn14-1164/+581
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 Sakoto10-12/+385
* 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-10Bump versions for drools-apps masterJim Hahn12-12/+12
Change-Id: Ia94e1ba31d0e8b6a980d891df9b26fb6977acc95 Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-10Upgrade drools-apps - JUnit op.pomPamela Dragosh1-1/+1
This should have been updated to released version of drools-pdp. Issue-ID: POLICY-2045 Change-Id: I81032a8da5ff83b43e84671ba7766edb16914e79 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-09-05Merge "Changes drl files"Pamela Dragosh2-379/+3595
2019-09-04Changes drl filespramod.jamkhedkar2-379/+3595
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-09-04correction when overriding with external truststorejhh1-3/+0
Issue-ID: POLICY-1371 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ief22f9d99acbd9c3d7335e59045d45c64296f783
2019-08-23remove usecases archetypejhh5-582/+1588
Issue-ID: POLICY-1957 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I90436e2d633bf0e9f6153dd40e164214f309b8dc
2019-08-15Modify to work with new drools-pdpJim Hahn14-124/+134
Due to sonar fixes, drools-pdp changed in a way that requires changes to drools-applications. In the case of template.demo, lots of test cases had to be modified, so they were refactored to extract common setup and tear down code. Fixed checkstyle issues. Fixed license date. Change-Id: Ie9e0239b95916ae7ef8c1b669987f7bb07d841b9 Issue-ID: POLICY-1968 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-13Fix sonar issues in drools-applicationsJim Hahn8-180/+194
Addressed sonar issue, "Move constants to a class or enum.", by moving the "manager" object from the ControlLoopMetrics interface into a utility class, ControlLoopMetricsManager. Addressed sonar issue, "duplicated blocks of code must be removed.", by refactoring PolicyGuardYamlToXacml, extracing common functions. Addressed sonar issue, "Remove this unused import", in RestControlLoopManager. Addressed sonar issue, "Refactor this method to throw at most one checked exception", in event manager. Fixed likely new sonar issue with assigning to a parameter. Moved logging line to more appropriate place. Addressed reviewer comment: Use "replace" instead of "replaceAll", thus avoiding escaping Change-Id: I47db957c83c1b3e2bd2330474e261987c6f0aac6 Issue-ID: POLICY-1967 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-07Bump version of drools-applicationsJim Hahn12-14/+14
Change-Id: I79d59efc93e33f7f234092b34cab0ae935d5ab7b Issue-ID: POLICY-1965 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-01Add AAI test tooling to telemetry.jhh4-24/+142
Issue-ID: POLICY-1956 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Icceab57db9c19364afbedbf63ecc8e52c1572cba Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-07-18change json path to delete regex matchingjhh2-4/+4
This is necessary as the explicit "match-all" regular expressions causes events to be accepted in error, even when the json field is not present in the document. Change-Id: Idf4b408850514f49ebe8375d2870e116e793a935 Issue-ID: POLICY-1830 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-07-18Rename XxxAPI to XxxApi in drools-applicationsJim Hahn11-25/+24
Now that feature APIs have been renamed to XxxApi in drools-pdp, the same must be done with the META-INF files in drools-applications. Also updated references to XxxApi class names within java code. Change-Id: I7ccc09c36f9b903327b5e92189d0bf2956da6cea Issue-ID: POLICY-1074 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-09Fix drools-applications due to sonar changes in commonJim Hahn8-37/+32
Fixed breakages due to changes made in policy/common to satisfy sonar. Repointed op.pom to correct parent, which allowed the other version to be dropped and properties used in the rest of the pom. Change-Id: Ib19c228c38b7f27fb9e9f508e5cf2566a8939cdd Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-01Bump drools-apps to 1.5.1-SNAPSHOTPamela Dragosh11-11/+11
Released 1.5.0 Issue-ID: POLICY-1737 Change-Id: I41b9af7672985a681bf4e6ce4ceddc8798caf281 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-06-28Remove sleep() from junit testsJim Hahn3-12/+21
Replaced sleep() calls with awaitability.await(). Also shortened the timeout, for the test, from 10s to 2s. Change-Id: I5d9cb84b405782f174b6230294e5d6a47938c4b8 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-27Fix some sonar issues in drools-applicationsJim Hahn30-1349/+1232
Added coverage to: - feature-controlloop-management Fixed sonar issues, but didn't add coverage to: - feature-controlloop-trans - eventmanager - guard Change-Id: I12f09c4a533e838c6fb9762ba56194e51ce864eb Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-26Fix sonar issues in drools-applications databaseJim Hahn10-194/+782
Refactored to eliminate duplicate code blocks. Added coverage tests. Change-Id: I99d2b6f68fee38a1dbbf038ad29d1dfe87fb4ae7 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-20Set timeout to CL timeout if zeroJim Hahn4-1/+129
Modified the rules to set the operational timeout to the overall CL timeout if the operational timeout is zero. Added code to check for zero timeout for the overall CL, too. Change-Id: I28d41632f59e9bc2fce953267883d567abc92a49 Issue-ID: POLICY-1859 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-18Fix build issues in drools-applications due to changes in policy/models repoRashmi Pujar2-32/+32
Issue-ID: POLICY-1791 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ife7cbb07c3bb674257bb1979d80f4f8a7ddfc3a5
2019-06-17Change getCanonicalName() to getName() in drools-appsJim Hahn4-6/+8
Per javadocs, getName() should generally be used instead of Class.getCanonicalName(). This change only applies to classes; it does not apply to File objects. Change-Id: Ie402ab9239b2d5149c420d495f16bb82417d2d25 Issue-ID: POLICY-1646 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-13Fix fieldname for guardPamela Dragosh1-1/+1
Should be clname Issue-ID: POLICY-1855 Change-Id: I17d59f33e761386bad9a30a07ec505ac66c6215a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com> (cherry picked from commit 5eaecb6bb0c0cfca4cf48f23b3b6b32dc8213d0b) Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>