summaryrefslogtreecommitdiffstats
path: root/controlloop/templates
AgeCommit message (Collapse)AuthorFilesLines
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>
2018-03-27Removed checkstyle warningsmmis11-951/+843
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 "Create Drools Scripts for Beijing"Jorge Hernandez17-28/+83
2018-03-27Merge "Fix path to logging class"Jorge Hernandez4-4/+4
2018-03-26Fix path to logging classliamfallon4-4/+4
The package path of LoggerUtil changed as below: From: import org.onap.policy.drools.utils.LoggerUtil; To: import org.onap.policy.drools.utils.logging.LoggerUtil; Change-Id: I8187d97de5eeab92268baab155fb4de37f4df3ad Issue-ID: POLICY-448 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-03-27Merge "Add timeout to SO to wait for success"Jorge Hernandez1-1/+9
2018-03-26Create Drools Scripts for BeijingDaniel Cruz17-28/+83
The create-cl-beijing script will now allow the user to create a rules jar that does not need to be expanded and also generate test files that can be used to insert facts for all the supported beijing use cases. The yaml for each policy is provisioned by the user in case custom yaml is desired. In addition to this, a new script is included that will extract the needed data from the controller properties file to insert facts for all the supported use cases. This script can be used to insert ControlLoopParams facts after the create-cl-beijing script is used to generate the rules artifact. No provisioning necessary other than specifying where the controller properties file is located. Issue-ID: POLICY-692 Change-Id: I42f0a08fba133ca36fb1be588a720e4f9598d79f Signed-off-by: Daniel Cruz <dc443y@att.com>
2018-03-26Removed checkstyle warningsmmis2-3/+1
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-23Create archetype for Beijing ReleaseDaniel Cruz22-0/+1955
This new archetype is a proof of concept for removing template expansion from the BRMSGW. The idea is to have a ueb or dmaap topic that the BRMSGW uses to send params json and then the pdp-d will deserialize it into a ControlLoopParams object. The rules engine will then insert that fact in to the working memory which will be used for rules matching between onset events and corresponding policies. Issue-ID: POLICY-692 Change-Id: I4237221c2216dab16160e79a8f2fdcab6571e1eb Signed-off-by: Daniel Cruz <dc443y@att.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-03-01Remove CLM issues with commons-collectionsPamela Dragosh1-0/+9
We know that we are not configuring an LDAP PIP in our use of the XACML open source. The LDAP implementation uses Apache Velocity, which uses a very old version of commons-collections that has security issues. So we can exclude commons-collections from the build. Issue-ID: POLICY-504 Change-Id: I6d90731e601f58c8edaca6fe02df30ee2a090c2f Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-02-19Rename maven modules to mirror directory structureliamfallon4-339/+342
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-11Tidy dependencies and scopes in POMsliamfallon1-12/+0
There were some duplicate dependencies in the POMs that were causing warnings. These have been removed. In cases where the revision of the duplicate dependencies were different,the latest revision was used. The scope of the "junit" dependency was "provided" in some POMs. These have been corrected with the scope of "test" being used for junit dependencies. Issue-ID: POLICY-238 Change-Id: Ib1cc6f040b0c4d7f2b39ae02bc6fb4590d395809 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-02-09Upgrade XACML jarPamela Dragosh2-3/+3
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 Fallon6-375/+375
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>
2018-01-16Fix Sonar Technical Debt, Unit Test for APPC POJOsLiam Fallon2-4/+3
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.appc Change-Id: If3db740bc146a09f8f7387f02c12b048ad00b201 Signed-off-by: Liam Fallon <liam.fallon@ericsson.com> Issue-ID: POLICY-455 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 Wagantall3-3/+3
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 Dragosh3-3/+3
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 Dragosh3-3/+3
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-03Fix Generic VNF isClosedLoopDisableddaniel1-5/+18
No A&AI queries will be done for enriched events. The event manager now understands prepended "generic-vnf." in front of is-closed-loop-disabled from DCAE onsets. A test case was revised to include sample data from an enriched onset with vnf data based on the VES documentation. Issue-Id: POLICY-350 Change-Id: Id7f59f8b860b9f147087067a2a9a7766f167f7e4 Signed-off-by: Daniel Cruz <dc443y@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 Dragosh4-64/+59
2017-10-30Fix Final Failure on AAI Queriesdaniel4-64/+59
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>
2017-10-27Send final failure on null vfc requestCharles Cole2-2/+62
Made sure a final failure is sent and the memroy is cleaned up if we cannot contruct a vfc request. Issue-Id: POLICY-350 Change-Id: Ia9bc827572042ae6ff2d2d2851d33034ee86fc49 Signed-off-by: Charles Cole <cc847m@att.com>
2017-10-27remove explicit call to shutdown in junitsJorge Hernandez6-15/+27
since it will exit the process immediately in a graceful case and affect junit execution. Change-Id: Ibcbb65269203e189515f68c557686c29667307e2 Issue-ID: POLICY-386 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-10-25Fix Source/Target Lockdaniel4-8/+19
The locking of the target is now taken care of when the operation manager is initialized. This allows us to keep the template flow the same and to ensure that for vFW we will not lock the source if it is not intended to be the target. NOTE: This will have to be revised in the future if policy chaining will support having different targets specified for each policy in the chain. Additional work was done for hardening the APPC model code to make sure exceptions are caught and we gracefully end processing the event with memory clean up and a final failure notification sent. Issue-Id: POLICY-367 Change-Id: Ic796d95eb5400067744492f810dd8069ba6241b3 Signed-off-by: Daniel Cruz <dc443y@att.com> Signed-off-by: daniel <dc443y@att.com>
2017-10-24change drl line to avoid velocity bugJorge Hernandez1-3/+7
generating a control loop project from archetype (but not from junits) runs into velocity parse failures as specified in ticket. The existing .drl code for the line that fails the parsing has been slightly modified to bypass this problem. In addition a logging statement has been added to the catch. Change-Id: I3eec82c9b710cc9d2a13dc68032a8a6074016b40 Issue-ID: POLICY-376 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-10-24Change vnf-id to vnf-namedaniel2-13/+13
These changes now allow a lookup of the source vnf-id based on the onset's vnf-name. Issue-Id: POLICY-366 Change-Id: I6f6bd500b892dddbbb9e12156b4486208309e21d Signed-off-by: Daniel Cruz <dc443y@att.com>
2017-10-23Merge "Fix handling of aai 'get' errors"Jorge Hernandez6-116/+311
2017-10-23Fix handling of aai 'get' errorsCharles Cole6-116/+311
Now reject an event if the AAI get query for the event fails. Added test cases for this behavior. Fixed some issues from my previous pull request. Issue-Id: POLICY-314 Change-Id: I674e95302a271423c307a88d061064e12e491a7a Signed-off-by: Charles Cole <cc847m@att.com>
2017-10-20Removed pre-Amsterdam policy template codeMagnusen, Drew (dm741q)13-1585/+0
Removed the deprecated pre-Amsterdam policy template code from repository. Issue-Id: POLICY-308 Change-Id: I5000f61acddf3b84eef5fbfdbceabfc69aeb96c4 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-10-18Add support for AAI Named Query error handlingCharles Cole2-4/+114
Errors from AAI after a Named query now throw an AAIEXception. This is caught in the template to allow the resources to be removed from memory and a final failure to be thrown. Issue-ID: POLICY-314 Change-Id: I319d29ef537b2d01ca288622aac1d9dbbe05f5eb Signed-off-by: Charles Cole <cc847m@att.com>
2017-10-17Fix Target Entity Lockdaniel2-59/+436
This fix enables the pdp to stop events with different requestId's/controlLoopNames from being processed if the target entity specified is already being processed by another event/controlloop. The lock timeout rule is removed to stop the event from waiting to obtain a lock if it was not already required. Handling of the lock denied case is taken care of in the event manager rule instead of in a seperate rule to avoid further unneccessary computation. A new control loop test case was created that is for testing general control loop errors. The test case included is for testing that the lock will deny a request with a duplicate target entity. Issue-ID: POLICY-341 Change-Id: Ib62286eff74ec22b2c645f32f385cb331fb1dff3 Signed-off-by: Daniel Cruz <dc443y@att.com>