summaryrefslogtreecommitdiffstats
path: root/controlloop
AgeCommit message (Collapse)AuthorFilesLines
2020-06-16fix sonar issue for m2/baseTaka Cho1-10/+8
-using {} in logger in stead -diamond operator (<>) to reduce the verbosity of generics code. -rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$' Issue-ID: POLICY-2616 Change-Id: I8e722af52b08382ca53190a33a3a27ad1e7d4830 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-15Merge "Adjust properties in anticipation of actor changes"Ram Krishna Verma2-10/+28
2020-06-12Adjust properties in anticipation of actor changesJim Hahn2-10/+28
Issue-ID: POLICY-2632 Change-Id: I4d20fe6b46432298ba796fe978796d5d74e1eb14 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-12Clean up to remove controlloop.simulator.envuj426b1-42/+0
Change-Id: Ic336eb24f1f3ecda359f07714e59f075596cc105 Issue-ID: POLICY-2555 Signed-off-by: uj426b <uj426b@att.com>
2020-06-12Merge "Remove deprecated properties for CDS and VFC"Liam Fallon4-36/+6
2020-06-12Merge "sonar issue drools applications - 3"Pamela Dragosh4-12/+8
2020-06-11Remove deprecated properties for CDS and VFCJim Hahn4-36/+6
Now that the changes to the Actors have been merged, the former properties can be removed, too. Also fixed guard operator/operation name since it changed from "Guard" to "Decision". Issue-ID: POLICY-2629 Change-Id: I1c8d4575be598a8cab12b1aa4ad9b1d3e1f12113 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-11Merge "Match property changes to CDS and VFC actors"Ram Krishna Verma2-0/+30
2020-06-10Merge "sonar issue drools-application - 2"Ram Krishna Verma3-19/+14
2020-06-10Merge "reduce sonar issue - drool-applications"Ram Krishna Verma2-17/+17
2020-06-10Match property changes to CDS and VFC actorsJim Hahn2-0/+30
An "operations" level is being added to the properties for the CDS and VFC actor. Added the new properties; the old ones can be deleted once the change to the actors has been merged. Issue-ID: POLICY-2629 Change-Id: Ib0bb3f62d6a2d3380aa6ec5a6e8b61ddd0a44c00 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-10sonar issue drools applications - 3Taka Cho4-12/+8
get already returns string redudant return block unused import swap expected argument use equals method instead useless assignment for payload Issue-ID: POLICY-2616 Change-Id: Ie4f07085994420b7ea3f39db89f980f6594f01b7 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-09sonar issue drools-application - 2Taka Cho3-19/+14
fixed some sonar issues: removed empty method, put expected value in the 1st argument Change-Id: I86747938187abda34e9ab41b735d55fbf920ecd8 Issue-ID: POLICY-2616 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-09Merge "Fix VFC actor properties"Jorge Hernandez2-6/+12
2020-06-09Merge "Changes for feature-controlloop-util actor conf."Ram Krishna Verma2-0/+86
2020-06-09reduce sonar issue - drool-applicationsTaka Cho2-17/+17
In some conditions for assertTrue, sonarcloud recommends using assertEquals Assert.assertTrue(a.equals(b)); Assert.assertTrue(a == b); Assert.assertTrue(a == null); Assert.assertTrue(a != null); Assert.assertFalse(a.equals(b)); Compliant Solution Assert.assertEquals(a, b); Assert.assertSame(a, b); Assert.assertNull(a); Assert.assertNotNull(a); Assert.assertNotEquals(a, b); Change-Id: Ic50bf6e961b74abcc698c2cc0347dd0472fefe71 Issue-ID: POLICY-2616 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-08Changes for feature-controlloop-util actor conf.uj426b2-0/+86
Change-Id: I5b48d716dcb17082ad376de1e1fe58b2f4ea4130 Issue-ID: POLICY-2555 Signed-off-by: uj426b <uj426b@att.com>
2020-06-08Fix VFC actor propertiesJim Hahn2-6/+12
The VFC actor doesn't have the same property structure as the other actors, which meant that the properties listed in the file were incorrect. Fixed them. Renamed the operation to "Restart" per review comments. Issue-ID: POLICY-2407 Change-Id: Icb8ccad518d01a5f23253a9835976eae666566f4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-02Merge "Use OperationsHistory from models"Pamela Dragosh24-2038/+155
2020-06-01Use actor constants instead of literalsJim Hahn1-2/+4
Modified drools-apps to use constants from the actor classes instead of hard-coded literals. Only made this change in code that uses the new actor model, as the old code will be deleted during this release. Issue-ID: POLICY-1242 Change-Id: Iac718159fd7cf571a48ac620585bf2b8f94c1e5d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-01Use OperationsHistory from modelsJim Hahn24-2038/+155
Deleted Dbao and replaced it with the shared class in policy-models. Also had to update the queries and the persistence.xml accordingly. Note: with this change, the "database" project is no longer needed, so it was deleted. Issue-ID: POLICY-2581 Change-Id: Idfde68b28b3a27f2ee794fa477d15e0f12717373 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-29Use default serialization providerJim Hahn2-2/+0
The default provider has been changed to gson, so the provider property no longer has to be set. Issue-ID: POLICY-1527 Change-Id: I9b555ed3c3b735ca9622314e1ca06476416bae6e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-28Generate SDNR notification in drools-appsJim Hahn2-21/+54
Modified drools-apps to generate the SDNR notification using the SDNR-response provided by the actor in the operation outcome, instead of using the controlloop-response provided in the operation outcome, as the latter is deprecated. Issue-ID: POLICY-2593 Change-Id: I70ee4a4b11345a4295d720250a63f407f51cb0bd Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-27Do additional processing when control loop times outJim Hahn2-5/+37
When the overall control loop times out, a notification is sent to POLICY-CL-MGT, but then the event is discarded. Modified the code to update the operation history, if an operation had been started, and to generate an SDNR notification, if appropriate. Applied the same logic for when a lock is lost. Issue-ID: POLICY-2582 Change-Id: I35510ec8a3cfc6b2ca9be5751896f3c0f7d9bd09 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-26Merge "Generate SDNR notification even on timeout"Ram Krishna Verma2-1/+59
2020-05-26Bump Drools-Apps to 1.7.0a.sreekumar28-28/+28
Change-Id: I1b4b088d276da6aae3b577102470a6d8e3dcdc6a Issue-ID: POLICY-2514 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-05-26Bump drools-applications to 1.6.5a.sreekumar28-28/+28
Change-Id: I52c0b421e6ca94153b7f37ae67fdcd086f14f3fa Issue-ID: POLICY-2514 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-05-22Generate SDNR notification even on timeoutJim Hahn2-1/+59
If a request to SDNR times out, the actor class does not generate a notification for the DCAE_CL_RSP topic. Rather than modifying the actor, decided to modify models to handle that case. Seems like that's where it belongs anyway, as notifications are more of an application- level behavior. Issue-ID: POLICY-2580 Change-Id: Id9426c223b719efce337a604316f19335dae8a94 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-22Use "outcome" to indicate pending recordJim Hahn3-0/+14
Mariadb is setting the "endtime" to the current time by default, so rather than indicate a pending record using a null endtime, just modified the code set "outcome" to "Started" to indicate a pending record. Also added code to ensure the "outcome" is never null, as that causes a DB error. Also addressed a comment from a previous review to log a warning message if more than one matching record is found in operations history. Issue-ID: POLICY-2581 Change-Id: I6bf67551cef46808a79cc15afeb0abbfc1b6d945 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-21Merge "Insert pending record when operation starts"Jorge Hernandez4-37/+139
2020-05-21Add secondary indices to operationshistory tableJim Hahn1-4/+5
Queries to the operationshistory table will degrade substantially as more records are added to the DB. The Dbao class should be moved to policy-models, but for now we'll just update it in both places (i.e., drools-apps and xacml-pdp). Issue-ID: POLICY-2581 Change-Id: Ic43cefdfd4d353b73d815bd629ef25f3d2b486c6 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-21Insert pending record when operation startsJim Hahn4-37/+139
Modified code to insert a pending record when an operation starts. Also modified it to update the existing record when the operation completes, rather than adding a new record. Note: the "outcome" for a "pending" record is left unset (i.e., it is null). Issue-ID: POLICY-2581 Change-Id: Ia1a02ed5a16b8af1328a49b22478fd57c4b9aca0 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-18Add getter for ControlLoopPolicy instance in ControlLoopProcessordc443y1-0/+1
This is to allow other frameworks, such as M2, to obtain the ControlLoopPolicy instance after the raw ToscaPolicy has been adapted. Issue-ID: POLICY-2574 Change-Id: I003e60991f6e4007bd30f0e9392f6fa8bf21733a Signed-off-by: dc443y <dc443y@att.com>
2020-05-14Do not encode null fields in SO requestJim Hahn2-0/+2
Currently, the default serialization provider for HTTP clients is jackson, which encodes null fields in requests. Unfortunately, SO does not like the null fields. Fixed this by modifying the SO config parameters to use the GSON serialization provider. Issue-ID: POLICY-2568 Change-Id: I6c2e7c985f23e09940d89409c2a84303bfd54b8a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-13Merge "Handle duplicate events in drools-apps"Jorge Hernandez5-16/+43
2020-05-13Handle duplicate events in drools-appsJim Hahn5-16/+43
Modified the frankfurt rules to compare the event objects instead of comparing the request ID when determining if an event is new. The event object's equals() method ignores the request ID when doing the comparison, thus it will treat an event as a duplicate even if the request ID is different, which is the behavior we want. Also removed the @Ignore from the junit that tests for duplicate events in the hope that this change will fix it. If the docker build still breaks, then @Ignore can be added back in. Issue-ID: POLICY-2557 Change-Id: If2b9fd26473d78a356218b951bfe160f93daeb32 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-13Make that SO actor uses http by defaultjhh1-1/+1
Issue-ID: POLICY-2560 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I6cd3de9238793fef671c9e058c494c179d4cb25c
2020-05-08delete dependency section in junit test op.pomjhh1-8/+0
This is to correct junit failures Issue-ID: POLICY-2551 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I4522f01a8ed8a66ddcb09549d4281adbcd644ab7
2020-04-29change the @api path in rest transactions apijhh2-12/+15
Issue-ID: POLICY-2530 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: If21e0607edcf75f491be61012779ddfa5d880105 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-04-28Merge "Plain move from test dir to src"Jorge Hernandez1-0/+0
2020-04-28Bump drools-apps to 1.6.4-SNAPSHOTPamela Dragosh28-28/+28
Issue-ID: POLICY-2510 Change-Id: Ic431fa80f7b389c84b799f8662df81b4f0ea124f Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-27Plain move from test dir to srcjhh1-0/+0
The file was placed there by mistake. Issue-ID: POLICY-2456 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I37a0bad7963aa9fe2931d68f5779355471cda345 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-04-27Bump drools-apps 1.6.3-SNAPSHOTPamela Dragosh28-28/+28
Before I can re-release, the patch needs to be bumped. Issue-ID: POLICY-2510 Change-Id: Ib868d0d72cd28f87b5eb7c233f239d219f699954 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-23transaction tracking improvements with telemetryjhh11-74/+726
Issue-ID: POLICY-2456 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I75b7e8e787d567cf120d7ae7d65d1bff12e8e24e Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-04-20Add properties needed by A&AI PNF OperationJim Hahn2-0/+2
Added properties needed by A&AI PNF Operation. Issue-ID: POLICY-2505 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I58966faf9eb9900123a085bf8093050440c15170
2020-04-16Change CDS operation name to generic "any"Jim Hahn2-10/+10
Issue-ID: POLICY-2504 Change-Id: I4dec3dfd62fa230ad8f0de66c0d1b71e5393bcbd Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-16Fix CDS actor propertiesJim Hahn2-14/+10
CDS actor properties in drools-apps did not match the properties in the actor, itself. Fixed them (as best I could be inspection). Issue-ID: POLICY-2501 Change-Id: Ibb4ac5ee59762bd740342c1d54fc472a9fca8968 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-15bump to 1.6.2-SNAPSHOTjhh28-28/+28
Issue-ID: POLICY-2378 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I8feb308f90755a078d0b35e0d8742e385916c225
2020-04-10Added vpci and vsonh testspramod.jamkhedkar12-6/+347
Added test cases for vpci and vsonh usecases Issue-ID: POLICY-2162 Change-Id: Ia69b16e74b82b92366b5065eeccab8d35f647742 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com> Signed-off-by: Jim Hahn <jrh3@att.com> Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2020-04-08Add SDNR notifications to frankfurt rulesJim Hahn6-3/+36
Issue-ID: POLICY-2468 Change-Id: Ibf4d3e5f62fa3106028dcf85050c270b8eab0a89 Signed-off-by: Jim Hahn <jrh3@att.com>