aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates/archetype-cl-amsterdam
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-10-27Send final failure on null vfc requestCharles Cole1-0/+5
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-25Fix Source/Target Lockdaniel1-6/+15
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-23Fix handling of aai 'get' errorsCharles Cole1-0/+1
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-18Add support for AAI Named Query error handlingCharles Cole1-3/+19
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 Lockdaniel1-59/+37
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>
2017-10-17Merge "Update SO Interface AAI NQ response from v8 to v11"Jorge Hernandez1-1/+6
2017-10-17Update SO Interface AAI NQ response from v8 to v11Hockla, Ali (ah999m)1-1/+6
- Removed nonBaseIndex since there is only base vf Module in v11 response - Reverted to checkExtractedFields() - Modified the AAI Simulator to return the v11 response - If AAI NQ fails then the SO Request will not be constructed. In this case, we are retracting objects from the transaction and inserting policyResult.FAILURE into current operation to prevent null values in finishOperation Issue-ID: POLICY-339 Change-Id: I1c48fac4f9a51467ad54b0706543f5d1baa70389 Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-10-16Update abatement=false and add Abated eventPamela Dragosh5-12/+22
Missing abatement=false for Use Cases other than vCPE. Added DCAE Control Loop Event message for ABATED. Issue-ID: POLICY-346 Change-Id: Ic8890dd81607ff8657a6f9e49cd9be51cb410fe1 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-10-10add structure only for PAP rule managementJorge Hernandez1-0/+21
PAP currently generates a set up rule that inserts a Params object when the session is loaded. Since the official template also has an equivalent rule that is used by the drools applications team to perform initializations tasks, at runtime we end up with 2 Params objects with the same control loop data. This has sideeffects where the same rule becomes true for 2 Params objects therefore performing duplicated actions which introduces somewhat anomalous behavior. The PapParams is introduced to satisfy current PAP needs for management of rules. The structure is included here only for those purposes but it carries no significance at runtime during drools executions since the rules go by Params instead of PapParams. In the near future, the plan is to have the PAP not generating SET UP rules. There is a companion review on the PAP side to refer to PapParams instead of Params to fulfill the resolution of POLICY-302. Change-Id: I2f9ed3cee3d5d5209eecd43823cfc44a4b937600 Issue-ID: POLICY-302 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-10-09strengthen APPC Response Cleanup RulesJorge Hernandez1-2/+2
The existing APPC Response Cleanup Rules will drop responses that are not specific for that control loop. For example vDNS control loop will drop LCM Response for vCPE control loops preventing progress of the use cases. This only happens when the control loops coexist with the current set of rules. Change-Id: I5a9ae26e39ecce8dd7f1098d02b6c6b97650b67a Issue-ID: POLICY-298 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-28missing $ in guard expansion variablesJorge Hernandez1-4/+3
Change-Id: I05c577e8760f5b4b8e6375f50a327c9dde575e06 Issue-ID: POLICY-260 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-28Make Guard Configurabledaniel1-2/+5
This allows the user to disable or enable guard through the .properties.environment file. Verified and tested in a pdp. Properties were added to the simulators properties file for the simulators to work out of the box. Issue-ID: POLICY-259 Change-Id: I0027a5d28f1b30e81bdbe42fa17621b36a61c850 Signed-off-by: Daniel Cruz <dc443y@att.com>
2017-09-28Fix Retries for Policiesdaniel1-10/+5
This applies changes to make retries work properly for all control loops. The current design was ignoring the upper bound of the retries and retrying until either a success or control loop timeout occured. This is now fixed to only do retries until the limit is reached that is specified from the policy. The operation is now started in the GUARD.PERMITTED rule. I think this is better because it stops Policy from doing extra processing if there is a guard deny. This is also needed so that we can properly do retries for all cases. The notifications sent in GUARD_NOT_YET_QUERIED and GUARD.RESPONSE are now more informative with the message specifying the actor and recipe. The not queried rule has a message stating that we are sending a query to guard and the guard response message in the guard response rule specifices the result from guard. During a retest of vDNS it appeared that the archetype template was no longer working, this was because there were changes in the JUnit template that were not reflected in the archetype template. These were added to archetype and vDNS is verified to work again. Another small fix needed was making sure the action for vCPE is "Restart" instead of "restart". APPC will reject our request if "Restart" is not sent as the action. Issue-ID: POLICY-259 Change-Id: I28dd3c9a629d297b408775a01afadd5c19351e37 Signed-off-by: Daniel Cruz <dc443y@att.com>
2017-09-28Add missing auth headers to guard requestTemoc Rodriguez1-2/+1
Added guard authentication, client authentication, and environment http headers to the pdp-x guard restful request. Properties are set to PolicyEngine.manager. Property getter, setter, and properties in guard/.../Util.java. Test properties defined in junits themselves. Added code from GuardContext.java to grab the properties and make restful request. PolicyGuardXacmlHelper now closely resembles GuardContext in order to mimic functionality. Guard url no longer is passed into CallGuardTask, it is now a property. Issue-ID: POLICY-260 Change-Id: I5b144764828b6da0e7b738a578e4f6596a0f4f36 Signed-off-by: Temoc Rodriguez <cr056n@att.com>
2017-09-27Fix Use Case Templatedaniel1-3/+3
This is a WIP for getting guard to work. Currently the A&AI GET and named queries are connecting to the simulator and working in the labs. Guard is not connecting to simulator and needs further analysis. Issue-ID: POLICY-259 Change-Id: If9875bfd83cbd82dcae04a876b3818ec9c07b1f7 Signed-off-by: Daniel Cruz <dc443y@att.com>
2017-09-25Fix Usecase Template for VoLTEdaniel3-7/+115
This includes VoLTE support for the amsterdam template. As of right now all use cases are able to get a final success with guard disabled and no A&AI GET queries. Currently, the GET query is not working in the lab. I will address this in another pull request. Issue-ID: POLICY-259 Change-Id: I216aa84daaa1e93ab12c56ee53283b4cb413a7c3 Signed-off-by: Daniel Cruz<dc443y@att.com>
2017-09-22Fix Use Case Testingdaniel11-22/+178
These changes are necessary to get the use cases working on an actual PDP. So far vCPE, vFW, and vDNS have been tested successfully on a pdp. These are priliminary tests to just test a FINAL SUCCESS without A&AI GET queries being used. A&AI named queries for vFW and vDNS have been verified to work. Changes in the template were made for SO as there were changes in the JUnit template that did not get reflected in the archetype template. Changes in the code were made in various places to use the environment properties for REST urls, usernames, and passwords. Due to VoLTE not being tested yet, the url for VFC is still hard coded and will be changed later. It has been confirmed with APPC that LCM will have two topics: APPC-LCM-READ and APPC-LCM-WRITE. Policy needs to sink to APPC-LCM-READ and pull from source APPC-LCM-WRITE. This has been reflected in the controller properties file. Issue-ID: POLICY-259 Change-Id: Ib9a8df07ae5ad9d3052c88907c1e522952af474d Signed-off-by: Daniel Cruz <dc443y@att.com>
2017-09-21Merge "Implement restful call to xacml pdp guard"Jorge Hernandez1-3/+2
2017-09-21Implement restful call to xacml pdp guardTemoc Rodriguez1-3/+2
Removed the embedded guard decision and replace with restful call to xacml pdp to restore guard functionality. Set guard URL with PolicyEngine env properties. Modified templates accordingly. Issue-Id: POLICY-260 Change-Id: Ic1558a6ebdd5f6d1b74a748f69433f6213dbf984 Signed-off-by: Temoc Rodriguez <cr056n@att.com> Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>