summaryrefslogtreecommitdiffstats
path: root/controlloop/common
AgeCommit message (Collapse)AuthorFilesLines
2017-11-13Update SO to use is-base-vf-module=falseHockla, Ali (ah999m)2-12/+16
Issue-ID: POLICY-447 Change-Id: I63cd5d20670f224aa4b9220b99ee40aad4f3e50c Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-11-10Fix SO Request mismatch and udpate AAI NQ responseHockla, Ali (ah999m)2-12/+14
Issue-ID: POLICY-438 Change-Id: I1d27d0e5f7d253aa3cba82f5f4b515c01be35d8b Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-11-09Fix SO Request structureHockla, Ali (ah999m)4-0/+7
Issue-ID: POLICY-438 Change-Id: I05e634782004fff5540b3e6fabb9e22846438cb1 Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-11-09Merge "Fix SO Request body"Jorge Hernandez9-47/+138
2017-11-08Merge "Update SNAPSHOT version"Jorge Hernandez24-24/+24
2017-11-08Fix SO Request bodyHockla, Ali (ah999m)9-47/+138
- 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-08Fix SO url to remove suffix HTTPS/1.1Hockla, Ali (ah999m)3-3/+3
Issue-ID: POLICY-437 Change-Id: I19679d9782f78ff73e3a90d0c8c95b2b6e9d319f Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-11-08Update SNAPSHOT versionPamela Dragosh24-24/+24
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-07SNAPSHOT present in policy core and msb depsv1.1.0Jorge Hernandez12-59/+53
Change-Id: I61c8d698f8cf984c648e510997498d41e7d9744a Issue-ID: POLICY-433 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-11-03Fix Generic VNF isClosedLoopDisableddaniel2-2/+17
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-03Made network.log output more verbose.Magnusen, Drew (dm741q)4-9/+8
Incoming values were not expanded in network logs for several drools-applications. Current patch makes them more verbose. Issue-ID: POLICY-410 Change-Id: I64bf88a3b39ea58dceaf24de698c8ae6a9a3f8b2 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-11-03Merge "Add fix to catch exception"Jorge Hernandez1-21/+33
2017-11-02Added fix to catch null pointer in SOManagerHockla, Ali (ah999m)1-39/+45
Issue-ID: POLICY-408 Change-Id: I9f6681b8cbafdd9639966d862e7b1df3b729297e Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-11-02Add fix to catch exceptionRitu Sood1-21/+33
Added fix to catch exception caused by NULL url provided to Policy for VFC Change-Id: Ifb8bdf41fbb212acf13d388d041d3cb44143caeb Issue-ID: POLICY-408 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
2017-10-31Passed classloader property to entitymanager.Magnusen, Drew (dm741q)1-0/+2
Passed property EntityManager that sets its class loader. Issue-ID: POLICY-345 Change-Id: Ie2a94feb442243de18cc4de5aab0312a02565729 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-10-30clean up parent pom pre-releaseJorge Hernandez1-6/+12
remove also hardcoded references to snapshots that won't work when released Change-Id: If0c43699388e0bf700024b9428c8c21dccfe6797 Issue-ID: POLICY-404 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-10-30Merge "change parent pom for msb module"Jorge Hernandez1-2/+2
2017-10-30change parent pom for msb moduleJorge Hernandez1-2/+2
Change-Id: I7584c76ba8f7ba4c1d55d556c0d3f36eb1347ccc Issue-ID: POLICY-402 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-10-30Update SO url from v2 to v5Hockla, Ali (ah999m)3-3/+3
Issue-ID: POLICY-401 Change-Id: Id1be63d2f61bc0d9d8f15df7573af2c7307c1c31 Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-10-30Merge "Fix Final Failure on AAI Queries"Pamela Dragosh4-24/+66
2017-10-30Fix Final Failure on AAI Queriesdaniel4-24/+66
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-4/+7
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-25Merge "Ensure no AAI lookup on subsequent onset"Jorge Hernandez3-23/+67
2017-10-25Merge "Fix sonar blocker for SOManager"Jorge Hernandez1-9/+12
2017-10-25Ensure no AAI lookup on subsequent onsetCharles Cole3-23/+67
Decoupled checking AAI data from checking an event's syntax so that new onsets can check both while all other events can just check the syntax. Issue-Id: POLICY-371 Change-Id: Ic76b1335b389bbec47ff0d29485ccbb249d5f18c Signed-off-by: Charles Cole <cc847m@att.com>
2017-10-25Fix sonar blocker for SOManagerHockla, Ali (ah999m)1-9/+12
Issue-ID: POLICY-385 Change-Id: I142877a3173a028738b1aa2aea9521f6208bab38 Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-10-25Fix Source/Target Lockdaniel9-105/+76
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 vnf-id to vnf-namedaniel9-36/+169
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-24Ensure no AAI lookup on abatementsCharles Cole2-49/+80
Changed check event syntax in the event manager so that it only looks for AAI info if the event is an onset. Issue-Id: POLICY-368 Change-Id: I241e9a110cc5fc4553a5e9cd842d51f76a800368 Signed-off-by: Charles Cole <cc847m@att.com>
2017-10-23Fix handling of aai 'get' errorsCharles Cole7-14/+43
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-20Added log output to multiple drools applications.Magnusen, Drew (dm741q)5-11/+45
Added logger statments to network.log for AAI, SO, PDPX Guard, and VFC for all inbound/outbound traffic. Issue-Id: POLICY-356 Change-Id: I802d45d8136f987b4304baa8f17e166b1c8df165 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-10-18Merge "Add support for AAI Named Query error handling"Pamela Dragosh12-11/+165
2017-10-18Add support for AAI Named Query error handlingCharles Cole12-11/+165
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-18Removed useless imports to clear Sonar IssuesHockla, Ali (ah999m)3-7/+2
Issue-ID: POLICY-292 Change-Id: Ia4d4fae4150ea12e46079aabb4bbf4e3c92c8d00 Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-10-17Merge "Fix operation history DB properties for Junits"Jorge Hernandez5-40/+29
2017-10-17Update SO Interface AAI NQ response from v8 to v11Hockla, Ali (ah999m)3-49/+26
- 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-17Fix operation history DB properties for JunitsTemoc Rodriguez5-40/+29
Removed operation_history.properties / operations-history.properties. Changed the properties in persistence.xml so that it uses the correct values. Previously junit would never write to db because the "guard.disabled" property was not set. Set this property. Additionally the operationshistory10 table was trying to be created even though it exists. These values work in junit code. Not tested on rackspace yet. Issue-ID: POLICY-345 Change-Id: Id755b3152ae6ac4991ea9c314154592ea0105070 Signed-off-by: Temoc Rodriguez <cr056n@att.com>
2017-10-11Enable junits to work with the archetype templateCharles Cole3-2/+33
Control loop junits now use the actual PolicyEngine instead of a simulation, allowing them to work with the archetype template Issue-ID: POLICY-101 Change-Id: I910961996aaf831f4e91b7d7173d05fdfdd77683 Signed-off-by: Charles Cole <cc847m@att.com>
2017-10-11Merge "Fix nullPointerException non-200 guard response."Jorge Hernandez1-6/+7
2017-10-11Fix nullPointerException non-200 guard response.Temoc Rodriguez1-6/+7
Added a check for when the guard response from pdp-x is not 200. When the response is unauthorized or forbidden, it will have an empty body, try to convert to json, and throw an exception. Added a null check on the response and returns indeterminate in the case of an empty body. Issue-ID: POLICY-280 Change-Id: I9d384472e230495130bd41d377e25b74fe9ea9bd Signed-off-by: Temoc Rodriguez <cr056n@att.com>
2017-10-10set LCM Common Header api-vers to 2.0Jorge Hernandez1-1/+1
per Scott's feedback, see JIRA ticket notes Change-Id: I5e9a5a6f98fceabc58911a3673d1b889604b5a92 Issue-ID: POLICY-300 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-10-06Add fix for guard db on disableTemoc Rodriguez1-0/+7
Added a fix so that the guard database is not attempted to be accessed while guard is set to disabled. The guard db access is done in the operations manager which has no context of guardat the moment. Because of this separation, the boolean must be grabbed from the PolicyEngine properties. We should consider some guard refactoring. Issue-ID: POLICY-296 Change-Id: Ida7a2a7c19e568b076731e0f04bdc8a9fd0fcb26 Signed-off-by: Temoc Rodriguez <cr056n@att.com>
2017-10-06Merge "Fix JUnit Race Conditions"Jorge Hernandez2-3/+66
2017-10-05Fix JUnit Race Conditionsdaniel2-3/+66
This fix now implements the observer pattern for the PolicyEngineJUnitImpl so that the test cases can be notified when an event is available to be pulled. This eliminates the need to sleep the thread for some arbitrary time to let the rules process events. Issue-ID: POLICY-291 Change-Id: I884c959c20b95a1b58f357602099d8a01c8d2e3c Signed-off-by: Daniel Cruz <dc443y@att.com>
2017-10-04Fixed Sonar blockers/criticalsHockla, Ali (ah999m)3-6/+6
Issue-ID: POLICY-292 Change-Id: Id53e9d3b6ba23b20d7e45d4d3b39f8092f126333 Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-09-28Make Guard Configurabledaniel1-0/+10
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 Sonar CriticalsHockla, Ali (ah999m)1-10/+11
Made MSBServiceFactory serializable Issue-ID: POLICY-115 Change-Id: I8c8abdf656a49bc20ecefb42a7f4f7bacde57726 Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-09-28Merge "Fix Sonar criticals"Jorge Hernandez5-49/+56
2017-09-28Fix Sonar criticalsCharles Cole5-49/+56
Fixed two Sonar criticals. Changed VFC actor service provider to eliminate redundant AAI queries. Issue-ID: POLICY-115 Change-Id: Ic4993b5d498a1cb3d3fc51ce1d2b4e90bb26353d Signed-off-by: Charles Cole <cc847m@att.com>
2017-09-28Fix Retries for Policiesdaniel4-12/+10
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>