aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates
AgeCommit message (Collapse)AuthorFilesLines
2018-11-26Rename test classes in drools-applicationsParshad Patel14-128/+128
Make test classes name consitence by adding 'Support' or 'Dummy' at start of util or dummy type of test classes Issue-ID: POLICY-1258 Change-Id: Idea946375ee46f14512d4c4bc29e65adaa4d2b37 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-11-16Remove unused imports in controlpolicykris.jinka10-52/+171
Remove unused imports that got introduced in recent commits Fix issue with compile failure of test class due to dependency in drools-pdp Datamodel classes. Fix test failures due to compile issues Issue-ID: POLICY-1251 Change-Id: Ib8e496ab96aaa5de67e4f84fa8de515b3dc22ea5 Signed-off-by: kris.jinka <kris.jinka@samsung.com>
2018-11-09Close timing loop-hole when YAML updatedJim Hahn11-70/+1122
Noticed when YAML updates are pushed close together that some Params objects are deleted that should not be. Fixed that by eliminating the "active" list concept and only deleting a Params object that has an associated cleaner. If it has no cleaner, then it can't be deleted, regardless of timing with rule updates. Added more tests for rule updates, including cases to check for event objects being retracted, as well as Params objects being retracted when rules are deleted. Change-Id: I6b744b29fca228022f43e9322ea149b16d097675 Issue-ID: POLICY-1248 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-11-06Merge "Cleanup all Param objects when any rules change"Pamela Dragosh20-278/+1139
2018-11-05Cleanup all Param objects when any rules changeJim Hahn20-278/+1139
Fix license date for new junit test. Updated some comments. Ensured different control loop names in different rule sets of new junit test. Used different mechanism for examining facts in new junit test. Fixed typo in comment. Changed the way new junit checks for existence of facts. Fixed another typo in comment. Updated clean-up rules in CLC template and added junit test to verify that Params are cleaned up appropriately. Removed code that retracts $manager objects so that the manager clean-up rule will be used, instead, thus ensuring that all associated objects are deleted when the manager is deleted. This was done for amsterdam, CLC, and casablanca templates. Added an extra fireAllRules() after calls to fireUntilHalt() to enable clean-up rules to fire in junit tests. Address Josh's review comments. Enhance junit test to compare actual object references to ensure that Param objects are as expected. Change-Id: If1fefd3f57e417180c62a3849defbaa6ae83afc1 Issue-ID: POLICY-1248 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-11-02Exclude commons-collectionsPamela Dragosh1-0/+9
This should have been carried over from template.demo. Issue-ID: POLICY-1228 Change-Id: I8148ae98c9a30d4342482bbba688d6d2e8088892 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-11-02Merge "Re-added requestParams to vDNS policy"Pamela Dragosh2-1/+2
2018-11-02Re-added requestParams to vDNS policyJim Hahn2-1/+2
Undo inadvertent change to compiler test. Change-Id: I1973612f4783936271c3fd74fb978a4f263a14a9 Issue-ID: POLICY-1240 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-11-02Merge "Upgrade xacml 1.0.2"Liam Fallon3-5/+5
2018-11-02Upgrade xacml 1.0.2Pamela Dragosh3-5/+5
This version of xacml only has license changes to the java source files. This will clear ONAP license issues. Issue-ID: POLICY-1228 Change-Id: Ieaff4d52c8046fee8357f7ebc907f2643d77322c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-11-01Merge "Added config params to scale-out policy"Pamela Dragosh2-2/+4
2018-10-31Added config params to scale-out policyJim Hahn2-2/+4
Removed requestParameters and reverted name. Change-Id: Ia3470a751b22375206c571204eff8985e630e05f Issue-ID: POLICY-1240 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-31Set new master version for Dublinliamfallon5-15/+10
Issue-ID: POLICY-1232 Change-Id: I6dfd85e9407c4d7400f593f035c627a303f397de Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-10-25Fix refering to snapshot in drools-application1.3.1ramverma5-9/+9
Issue-ID: POLICY-1213 Change-Id: I91e4928e33d4e39286bf340e42602890446d9401 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-10-23Add CCVPN policyVidyashree Rama11-0/+546
CCVPN policy Issue-ID: POLICY-1209 Change-Id: I8adea233f8672c9ff43b4a169b50336d9e43c91d Signed-off-by: Vidyashree Rama <vidyashree.rama@huawei.com>
2018-10-09Add missing SDNC and fix JUnit1.3.0Pamela Dragosh1-6/+7
Identified in prior review, ensure all the new actors are in the appropriate pom.xml and minor fix to JUnit for assertEquals vs assertTrue. Issue-ID: POLICY-1191 Change-Id: I5c7505ad795e6e19c99a3aa9cec7ecf688da8316 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-10-09Add implementation for OOF PCI use caseSaravanan A8-4/+684
Receive DMaaP message from PCI-Handler MS with PCI Config change recommendations through DCAE_CL_OUTPUT topic. Trigger SDN-R (if allowed by policy) by sending DMaaP request through SDNR-CL topic. When the response is received from SDNR through SDNR-CL-RSP topic, just parse and print. Code review comments addressed Added controller changes into amsterdam too. Change-Id: I93e54d3f44b4266092931a5f05b766cc26f2a869 Issue-ID: POLICY-1089 Signed-off-by: Saravanan A<saravanan.a75@wipro.com>
2018-10-05Add new actor SDNC to support CCVPN Closed LoopXin Miao6-0/+216
Issue-ID: POLICY-1183 Change-Id: I1b77b5b9cefca104382d9d84dd00bbd63b20e0f2 Signed-off-by: Xin Miao <xin.miao@huawei.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-28Merge "Add sdnr actor to archetype"Liam Fallon2-8/+18
2018-09-27Add sdnr actor to archetypePamela Dragosh2-8/+18
The casablanca template had the declaration. I made sure the declarations were in the same place. Issue-ID: POLICY-1155 Change-Id: Ie5ab7a04ffc0c3fefbc3edcea9e7a02a062f0dbe Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-27Yet more sonar issues in drools-applicationsJoshua Reich2-14/+13
removed unused imports and variable definitions moved variable declarations above methods refactored deeply nested if/while removed code smell due to unecessary use of static keyword moved string literals to left side of comparator fixed logging of exceptions immediately return expression instead of assigning it to the temporary variable Change-Id: Idfd2a2bdf3c2f3bbfcb54a06b713d57bc867b3ab Issue-ID: POLICY-1129 Signed-off-by: Joshua Reich <jreich@research.att.com>
2018-09-24Fix checkstyle declarationsPamela Dragosh7-353/+434
I fixed what I thought would be tolerable for this release. Same issue as policy/common I had to defined the checkstyle in each repo where the suppressions were needed. Issue-ID: POLICY-1135 Change-Id: I8f30bee7e9cddc692ddad3cf88acedb2e6b4781b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-17Add demo for Control Loop Coordination.Joshua Reich14-1/+3364
New PipEngine and Junit test added to guard. Also bug in existing Junit test fixed. All other code added to new directory template.demo.clc Change-Id: Ida2267528bcb9404dc59ff391d45797b591814cc Issue-ID: POLICY-1109 Signed-off-by: Joshua Reich <jreich@research.att.com>
2018-09-14fix NPE from rule timersJim Hahn2-68/+85
This problem occurs in rules that have "timer(expr)" expressions before the "when" clause. If a working memory element, other than the timer object, appears in the "when" clause and is updated BY ANY RULE, then an NPE is thrown. The solution is to segregate the objects so that rules having "timer(expr)" expressions only refer to one object, the XxxTimer object. In particular, the rule simply sets an "expired" flag in the XxxTimer object and then all other rules check that flag, rather than having their own "timer(expr)" expressions. Corrected comment associated with rule TIMER.FIRED. Change-Id: I9e6c20ee46af99234daee8ece4862edbd41ba714 Issue-ID: POLICY-1106 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-12Add implementation for OOF PCI use caseSaravanan A5-0/+177
Receive DMaaP message from PCI-Handler MS with PCI Config change recommendations through DCAE_CL_OUTPUT topic. Trigger SDN-R (if allowed by policy) by sending DMaaP request through SDNR-CL topic. When the response is received from SDNR through SDNR-CL-RSP topic, just parse and print. Code review comments addressed Change-Id: If340a23ae18367b7f98e31fe79c09a09e645b2ad Issue-ID: POLICY-1089 Signed-off-by: Saravanan A<saravanan.a75@wipro.com>
2018-09-11disable http for drools apps using dmaapJorge Hernandez2-30/+31
per security guidelines .. Change-Id: I1db4468f20c3bd22a9e5f27fefcb76b55a3b6d89 Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1105
2018-08-31pass VF count to guard for scale-outJim Hahn2-4/+12
Also updated license dates. Fixed new checkstyle errors. Change-Id: Ia6153814c4333724185918f76be560aba5a52f96 Issue-ID: POLICY-1084 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-31Add code to store abatement events.Joshua Reich1-0/+4
Stores abatement events in history DB. Change-Id: Ifca6acd42cd9eea85e27765bd268a491028e305a Issue-ID: POLICY-975 Signed-off-by: Joshua Reich <jreich@research.att.com>
2018-08-29Fix remaining checkstylePamela Dragosh10-474/+701
Lots of formatting, missing javadoc, distance from use, imports must be explicit, ordering of methods. Fixed some abbreviation problems in classes and renamed JUnit tests to fix this. Issue-ID: POLICY-883 Change-Id: I8494f63d88d63c0232aca97f7bcc848816228fb1 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-28Remove overriding dependencies warningsPamela Dragosh1-5/+1
With the move to oparent for dependencies, there are still some warnings in the pom's for overriding managed dependencies. Issue-ID: INT-619 Change-Id: I7ea771cc4536d8dfc77b4d1717e59cf6bfcfcda9 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-28use new SO API for scale-outJim Hahn3-3/+9
Updated licenses and serialization IDs. Moved hashCode() and equals() methods to be in same location as in the original code so it can be more easily compared. Changed vDNS yaml timeout and retry to 1200 and 0, respectively, to match the original values. Removed extra newline from yaml, to match original yaml. Reformatted source to wrap lines at 120 characters and removing trailing white space. Change-Id: I3f5e59a1f44750347de49164f587d4ffefdee8b4 Issue-ID: POLICY-962 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-15add prov-status check to AAI queriesJim Hahn13-1/+13
Also had to add prov-status field to AaiGetVnfResponse class. Removed bogus comment from test. Verify response is not null in test. Verify no requery by vnf name in test. Add prov-status to template.demo tests. Add prov-status to sample json for archetype-cl's. Change-Id: I3f36a2bb6de8265ce5b10103690d6d8813c15b1a Issue-ID: POLICY-964 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-06carry forward template changesJim Hahn1-346/+374
Incorporated changes, to clean-up objects that have no associated Param object, from the amsterdam rules template into the casablanca rules template. Also carried forward changes in behavior of PolicyGuard lock requests. Fix typo in comment. Change tabs to spaces and removing trailing spaces. Change-Id: Ifcfda573f4c271d804e526d8cc0bea4b89b16612 Issue-ID: POLICY-955 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-03rename rule template from beijing to casablancaJim Hahn25-5/+5
Changed assertTrue to assertEquals in CasablancaFeatureTest. Change-Id: I3bec009ddde2f10468575b4b7bf9c08c24748aae Issue-ID: POLICY-955 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-07-31https configuration for amsterdam controllerJorge Hernandez1-19/+25
configuration set to false until unblocked by DMAAP-547. Change-Id: I2efdafa8b143725fd73f05ec3d0a6a9ffc3b12c6 Issue-ID: POLICY-941 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-07-30Copy policy-endpoints from drools-pdp to commonmmis7-36/+42
Replaced references to classes deleted from drools-pdp with references to the corresponding in policy-common Issue-ID: POLICY-967 Change-Id: Ia9d2ac704e6b7c434e5a9e7aee6d7dcf9198e4f2 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-07-11Catch exception from missing property in operationJim Hahn1-66/+84
When a new operation is started it will throw an IllegalArgumentException if a property is missing. Modified the rules to catch this exception, indicate the failure, and move on to the next operation. Modified code to catch generic exception. Change-Id: Ie8c24371eb84ee55ff0a0a5fcacda3670483efc5 Issue-ID: POLICY-869 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-07-06Remove Params for deleted rulesJim Hahn1-18/+101
If rules are deleted, then no rule is left to retract the associated Params object. However, we can create more general rules that will fire whenever rules are added, thus causing clean-up of old Params at that time. Implemented the above approach. Change-Id: I207d493cc6924a4b34a8d0fa4915ed499ebc4a6e Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-07-05Clean up objects for deleted rulesJim Hahn1-41/+66
When rules for a closed loop are deleted, associated working memory elements may be left around. Modified the code to retract the various elements. Re-added code to unlock when retracting TargetLock. Add junit tests for new methods. Forgot the junit test for request id. Change-Id: Iec2805adbdb147a643f6163badee05ea353ada88 Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-29Add time limit to local guard locking facilityJim Hahn1-0/+4
Modified the local policy guard locking facility to add a time parameter. Modified the control loop event manager to extend the lock when lockCurrentOperation() is re-invoked. Modified the rules to retract the lock if the lock request was denied. Reorder assertions in junit test. Change-Id: Ic9b77acbb4881a5a516f30eb56664bad1a5c4d7e Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-05Update drools-applications to SNAPSHOT-1.3.0liamfallon4-4/+4
Snapshot updated for Casablanca. Issue-ID: POLICY-875 Change-Id: I0307282c4eabdb9ccd03282f918f4cd727ac4f86 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-05-21Update Drools Applcations to 1.2.3-SNAPSHOTliamfallon4-4/+4
These reviews must be merged in order because of layering. This review should be merged THIRD. Issue-ID: POLICY-844 Change-Id: I61d128f3244cd420abab15ab70c5c0e9d9afa625 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-05-16Merge "Upgrade SNAPSHOT to 1.2.2"v1.2.2Pamela Dragosh4-4/+4
2018-05-16Upgrade SNAPSHOT to 1.2.2liamfallon4-4/+4
These reviews must be merged in order because of layering. This review should be merged FOURTH PLD added version.properties Change-Id: If7af7b3ae37166e88af92c0d1f1c558e5b60ab8e Issue-ID: POLICY-798 Signed-off-by: liamfallon <liam.fallon@ericsson.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-05-16Add prefix to make rule name uniqueJim Hahn1-1/+1
Change-Id: I3b04d6be4939cc2e652a676e7c2e4cb647f1bfec Issue-ID: POLICY-796 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-05-15Add rule to cleanup onsets without ParamsJim Hahn1-0/+20
Change-Id: I0040a3be47d56808e2cda8a5ab2d3c1aa8e9fbb9 Issue-ID: POLICY-796 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-25Fix NullPointException in SO and VFC.RESPONSEJim Hahn2-7/+7
In the rules, the $manager was missing the condition to match the request id of the manager with the request id of the event. As a result, the completed operation was being applied to an unrelated manager. Change-Id: Icb63c0f151788e7f96450e26853270a7368dfcd8 Issue-ID: POLICY-763 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-16Add missing license headersPamela Dragosh25-0/+345
I removed a couple of empty README and added licenses. Issue-ID: POLICY-741 Change-Id: I10aad3536d02b738a1dc606f7311de6b3a2777cd Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-04-13Update to SNAPSHOT 1.2.1Pamela Dragosh4-4/+4
Issue-ID: POLICY-736 Change-Id: I2bc455510e925764d18a1d8e96e072bdadb251c6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-04-02installation enhancementsJorge Hernandez1-2/+2
The following changes aim to have a quicker start of the drools container: 1. For both amsterdam (and the experimental beijing) controllers dependencies are pre-installed, so the loading of 3rd party dependencies are faster. 2. Further enhancements in installation. 3. Make sure that the naming of the generated control loop artifacts have a "control loop" label associated with it, so in the future, if other applications are added (non control loop related) do not conflict and is clear. Change-Id: Iecb84d186fcc34069aa5c4a175a8a4521b38499d Issue-ID: POLICY-534 Signed-off-by: Jorge Hernandez <jh1730@att.com>