summaryrefslogtreecommitdiffstats
path: root/controlloop/templates/archetype-cl-amsterdam
AgeCommit message (Collapse)AuthorFilesLines
2018-11-09Close timing loop-hole when YAML updatedJim Hahn1-35/+58
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-05Cleanup all Param objects when any rules changeJim Hahn1-65/+56
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-10-31Set new master version for Dublinliamfallon1-3/+2
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.1ramverma1-1/+1
Issue-ID: POLICY-1213 Change-Id: I91e4928e33d4e39286bf340e42602890446d9401 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-10-23Add CCVPN policyVidyashree Rama3-0/+62
CCVPN policy Issue-ID: POLICY-1209 Change-Id: I8adea233f8672c9ff43b4a169b50336d9e43c91d Signed-off-by: Vidyashree Rama <vidyashree.rama@huawei.com>
2018-10-09Add implementation for OOF PCI use caseSaravanan A6-4/+226
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 Miao2-0/+98
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-27Add sdnr actor to archetypePamela Dragosh1-0/+10
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-24Fix checkstyle declarationsPamela Dragosh1-273/+318
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-14fix NPE from rule timersJim Hahn1-34/+42
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-11disable http for drools apps using dmaapJorge Hernandez1-6/+3
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 Hahn1-2/+6
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-28use new SO API for scale-outJim Hahn1-2/+5
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 Hahn5-0/+5
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-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-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.0liamfallon1-1/+1
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-SNAPSHOTliamfallon1-1/+1
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 Dragosh1-1/+1
2018-05-16Upgrade SNAPSHOT to 1.2.2liamfallon1-1/+1
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 Hahn1-4/+4
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 Dragosh4-0/+52
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 Dragosh1-1/+1
Issue-ID: POLICY-736 Change-Id: I2bc455510e925764d18a1d8e96e072bdadb251c6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-03-27Removed checkstyle warningsmmis3-75/+75
Removed checkstyle warnings from: policy/drools-applications/controlloop/common/model-impl/appc policy/drools-applications/controlloop/common/model-impl/appclcm policy/drools-applications/controlloop/common/model-impl/events including changes to template files due to renamed methods Issue-ID: POLICY-705 Change-Id: Ieb93baf43268aa608f204eef1a610354f2adec32 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-03-27Merge "Add timeout to SO to wait for success"Jorge Hernandez1-1/+9
2018-03-26Removed checkstyle warningsmmis1-1/+0
Removed checkstyle warnings from policy/drools-applications/controlloop/common/model-impl/aai including renaming classes: AAI* -> Aai* PNF* -> Pnf* and renaming some methods in those classes Issue-ID: POLICY-705 Change-Id: I2d59a668728aa58a2c9fbe78c44e924e6cfb4531 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-03-25Add timeout to SO to wait for successliamfallon1-1/+9
The timeout implementation assumes that a finished request is a HTTP-200 together with either a request state of COMPLETE or FAILED in the embedded request in the response in the JSON. This is the same as what is done earlier in this class and in, for example, VFC. Unit test for timeout has also been added. Change-Id: I637dbecb8d230b8060f7ced76d92d11ec482503e Issue-ID: POLICY-448 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-03-14Fix artifactid parameter in archetype POMliamfallon1-1/+1
The parameter ${artifactId} is depricated in POMs. This change replaces that parameter ${project.artifactId} Change-Id: I754fe11918707c599847471c438bedfd1285b0ed Issue-ID: POLICY-238 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-02-19Rename maven modules to mirror directory structureliamfallon2-144/+144
The naming of Maven modules in drools-applications was not aligned with the directory structure in the git repository of drools-applications. Therefore it was difficult to see the strucutre of the repository in Eclipse and other IDEs. This change amends the Maven module IDs to reflect the repository directory structure. This patch reset fixes the previos patch set, where many references to maven modules internally in drools-applciations were missed. See also changes in engine and docker repos. Updated to reflect repo directory structure in maven artifact groups. Issue-ID: POLICY-238 Change-Id: I8ab1a7ecdb664045222bbbfda269135e3e449109 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-02-09Upgrade XACML jarPamela Dragosh1-1/+1
XACML was released with minor fixes for XML files with comments. Mainly it contained upgrade to dependencies that had fixed security issues. One still remains but will not be able to be fixed. Issue-ID: POLICY-616 Change-Id: Ifaf4f92d8da878a1c49dff5fd028744d01999ff5 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-02-08JUint/Technical Debt for eventmanagerliamfallon1-1/+1
Unit test expanded for SO POJOs, technical debt removed in eventmanager. Change-Id: I7045f5af88fd2c15019befe29a0b4fcd69801c49 Signed-off-by: liamfallon <liam.fallon@ericsson.com> Issue-ID: POLICY-455 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-02-06Add JUnit and Remove Technical Debt in Guardliamfallon1-5/+5
Unit test for guard added and technical debt removed. Issue-ID: POLICY-455 Change-Id: I440766660ddae078013e21b1991ee49c8e488bb3 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-01-18Fix Tech Debt/JUnit on control loop event POJOsLiam Fallon1-160/+160
Mainly making fields private, fixing field and methods to follow Java guidelines, and adding getter and setter methods. Unit test added for all classes in org.onap.policy.controlloop Issue-ID: POLICY-455 Change-Id: I445b7cfaf9eb921a230bbb72b06ff4455fe003ce Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
2017-12-08remove synchronized calls to avoid race conditionsJorge Hernandez1-26/+0
This is to prevent potential problems where multiple jar versions are updated one after the other. Change-Id: I78835b485e57125efb213cfdefba60351d815916 Issue-ID: POLICY-487 Signed-off-by: Jorge Hernandez <jh1730@att.com> (cherry picked from commit f2715bc0f272e5e657ed8a82c0f4e520a7c7706d)
2017-11-21Bump minor versionJessica Wagantall1-1/+1
Bump minor version in preparation for Amsterdam branching. Change-Id: Ia7e97a72053a2d1cd10c0b9d5c179817c3ac7e23 Issue-ID: CIMAN-120 Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
2017-11-15Upgrade to 1.1.2-SNAPSHOTPamela Dragosh1-1/+1
Released 1.1.1, now must bump patch by 1 Issue-ID: POLICY-436 Change-Id: I3f5e4c369575f6fe1fa06cabb96a5bd43cb11087 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-11-13default archetype tooling to 1.1.1Jorge Hernandez1-4/+4
Change-Id: I84cf9fe9e954a9ee9bac8eaff56169e44154e9c5 Issue-ID: POLICY-446 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-11-09Merge "Fix SO Request body"Jorge Hernandez1-3/+4
2017-11-08Fix SO Request bodyHockla, Ali (ah999m)1-3/+4
- Renamed modelNameVersionId to modelVersionId in SOModelInfo - Removed requestID from SO Request body - As a result of this, an SOResponseWrapper was needed in order to attach the control loop event requestId to use in the SOResponse rule in drl (the requestID that is returned in the SO response is a newly generated requestId with no relation to the Policy control loop event requestId as per Arthur) - Updated drl to reflect the above mentioned change - Updated simulator and junits to reflect changes - Added an additional null httpResponse check/logger statement in SOManager and RestManager Issue-ID: POLICY-438 Change-Id: I5f414ba69b60b5565cca9073b47f4c4835e5abbf Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-11-08Update SNAPSHOT versionPamela Dragosh1-1/+1
Releasing v1.1.0 so need to update version to 1.1.1 Issue-ID: POLICY-436 Change-Id: I8b85de39bb3a32f5f4faeeb4fcdfb5d95291ae31 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-11-02Write to DB on guard denyTemoc Rodriguez1-0/+1
When an operations was denied by guard, it was not writing to the DB at all. Only in the deny case we start the operation, then setOperationHasGuardDeny, then finish the operation. Had to add start operation just before finishing it. This allows the write to occur at setOperationHasGuardDeny. Issue-ID: POLICY-345 Change-Id: I665b9cfaa684493e39e731102d4d43ecb39fad7c Signed-off-by: Temoc Rodriguez <cr056n@att.com>
2017-10-31Fix Abatement Processingdaniel1-1/+3
The drools engine will now only fire the event rule if the event is an onset. This prevents abatements from being processed as onsets. Issue-Id: POLICY-407 Change-Id: Ic74efa74fbb1dc0e01d7c36a06fdaf48fc8a3238 Signed-off-by: Daniel Cruz <dc443y@att.com>
2017-10-30Merge "Fix Final Failure on AAI Queries"Pamela Dragosh1-41/+42
2017-10-30Fix Final Failure on AAI Queriesdaniel1-41/+42
The drools engine will now send final failure notifications if there is an error returned from A&AI queries instead of rejected notifications. Issue-Id: POLICY-364 Change-Id: Ie9c22686d859c633bad47d223726957cc9599f7c Signed-off-by: Daniel Cruz <dc443y@att.com>