aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors
AgeCommit message (Collapse)AuthorFilesLines
2020-03-30Test new actors against simulatorsJim Hahn31-32/+780
Also modified HttpParams to allow "path" to be blank to support any cases that really have no "path" to append to the context URI base path. Issue-ID: POLICY-2405 Change-Id: I49eebde6759659d2804b5a11c1504c37674bd0c4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-27Cleanup sonar bugs and security hotspotPamela Dragosh1-1/+1
Just some trivial sonar bugs for missing argument and a couple sonar overrides to clear security hotspots. Issue-ID: POLICY-2165 Change-Id: I392e5fee458465c66313a16a8912e23a3a119848 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-26Discard requests in APPC legacy actorJim Hahn1-0/+3
The new actor for legacy APPC attempts to discard request messages received on the response topic by discarding those that have a null response. Unfortunately, when it decodes them, the Response object creates a status object, even if there isn't one in the json message, thus the test fails and the actor treats it as a failed response. Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I26cfb25443ff2ed394781d309f9097d50b8f160b Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-25Bump models 2.2.3-SNAPSHOTPamela Dragosh12-12/+12
Released 2.2.2 Issue-ID: POLICY-2378 Change-Id: I829f0dfc88aeaf1f9b7efad91c983628f2a5d706 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-25Cleanup eclipse warningsPamela Dragosh1-2/+1
Issue-ID: POLICY-2165 Change-Id: Iaad54af1b1210fe96fa44dcaa609834c46557877 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-24Bump policy-models to version 2.2.2-SNAPSHOTliamfallon12-12/+12
Issue-ID: POLICY-2378 Change-Id: I644e45822154f57d2bf6a81e55df07e2e4ca6966 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-23New Guard actor request structure is incorrectJim Hahn14-128/+71
Missing various fields within the request structure (e.g., ONAPName). Fixed. In the process, also modified makeGuardPayload() so that it only constructs the inner "guard" JSON object, making it easier for invoking code to modify it. Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I7d34a279845bb98425caf66565eab7513d310815
2020-03-23Update new SDNR actor with v2.0 structuresJim Hahn5-56/+81
SDNR v2.0 introduced an extra "input" and "output" layer within the body of the messages. Added POJOs to match that, and updated the actor to use the new POJOs so that no extra steps are needed during serialization or deserialization. Also modified the SDNR and APPC-LCM simulators to discard request messages when looking for the response, if the sink and source topics happen to be the same. Added the SDNR simulator. Added more coverage to the SDNR actor. Fixed a sonar issue in the SDNR junit code: - use a constant instead of a literal (i.e., for "ModifyConfig") Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I70914a299dd5e9ee8eaccb5d42a2596cab814091
2020-03-23Merge "Exception not propagated by processResponse"Liam Fallon2-6/+41
2020-03-20Fix legacy APPC handling of RequestJim Hahn2-4/+5
Legacy APPC uses the same topic for both requests and responses. Unfortunately, when the actor sees the request, thinking it's a response, it throws an exception because it can't find the status code. Fixed. Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I6137fb21dbf1149ff2faca2407ba69be0de6d40b
2020-03-20Exception not propagated by processResponseJim Hahn2-6/+41
If the topic processResponse() method throws an exception, then the actor/operation is left in an incomplete state. Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I6c5d149d4046fbfb970c8dd831fc3938516d1115
2020-03-12Clean up minor checkstyle/sonar issuesliamfallon1-14/+11
A few minor eclipse warnings and checkstyle warnings in policy models. Issue-ID: POLICY-1910 Change-Id: I612c6514fa7d88cb8658a7ee1618869a525e48d7 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-11Merge "Add VFC Actor"Jim Hahn13-52/+1121
2020-03-10Merge "Immediately finish if guard is disabled"Liam Fallon2-6/+24
2020-03-10Add VFC ActorPamela Dragosh13-52/+1121
Adding first cut at VFC Actor. Issue-ID: POLICY-2386 Change-Id: I4749ed3f350f01d05026057ffe4149f3843d8475 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com> Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2020-03-10Fix field names in SO Actor messagesJim Hahn2-6/+6
Issue-ID: POLICY-2371 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I42b6980460c2075544eb7698479b386eff8ef7b5
2020-03-10Immediately finish if guard is disabledJim Hahn2-6/+24
Modified the Guard Actor to check the "disabled" flag during start() instead of waiting until it gets down into startOperationAsync. Issue-ID: POLICY-1625-guard-disabled Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Id6ccf506b82504552d6e1f4637ad11e2e41e77e5
2020-03-06Add subrequest ID to OperationOutcomeJim Hahn24-59/+128
Rule notifications need the subrequest ID to be populated in the OperationOutcome object, where possible. Issue-ID: POLICY-2385 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ic44320f67ad8df7bcb3000cfa667f95427818e71
2020-03-06Log full URL for REST callsJim Hahn7-40/+26
Actors only log the URI, without the host and port info. Modified to log the full URL. Also adjusted URLs for trailing "/". Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I0c9a2d139258ef23bc363a873b56f5cb4680247d
2020-03-05Add other APPC-LCM operationsJim Hahn10-276/+451
Also added legacy ModifyConfig as an operation within APPC-LCM. Added logging to topic registration keys. Issue-ID: POLICY-2403 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ia54a573fd6218a8afe870184b9a3baebc05b766a
2020-03-05Add SO VF Module Delete OperationJim Hahn13-27/+1105
Redesigned the SO Operation classes; moved some code from the subclass to the superclass so it could be reused by the VF Module Delete Operation. JerseyClient does not support DELETE with a request body, so had to implement a delete() method using java11 HttpClient. Fix some issues found while testing with drools-apps. Added "delete" operation to SO simulator. Issue-ID: POLICY-2371 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I269fe13cf90c295ec2bbac92bc5a59b3820ea265
2020-03-05Merge "Add APPC-LCM actor"Ram Krishna Verma9-18/+541
2020-03-05Add APPC-LCM actorPeyton Puckett9-18/+541
Issue-ID: POLICY-2403 Change-Id: Ia7b26cce9ec8308c3d83c374e5ac6aea3af38a1d Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2020-03-04SDNC Actor doesn't use full URLJim Hahn2-2/+8
Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ib9e6e4d988013966317df5b7c15867e3691b5748
2020-03-04Fix exception message in ActorsJim Hahn1-1/+1
Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I1efa70785e162c9a02ed90f5f8d94e85d2432d73
2020-03-03Translate APPC Instant to LongJim Hahn4-8/+14
APPC uses encode Instant fields as milliseconds instead of as ISO date strings. Issue-ID: POLICY-2363 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Id9bedb11c43264f882b6fd044155621c8ccc79f6
2020-03-03Merge "Fix path issues"Ram Krishna Verma10-35/+115
2020-03-03Merge "Don't log cancellation exception"Jim Hahn1-2/+9
2020-03-02Log topic message before publishingJim Hahn1-2/+2
Code was publishing and then logging the message. Reversed the order. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I1b5dd5e96d86d818cd38d2a671fb37c2576e2054
2020-03-02Don't log cancellation exceptionJim Hahn1-2/+9
When an Actor operation is canceled it's done on purpose, yet the whole exception stack trace is included in the log. Modified the code to leave out the stack trace for cancellations. I don't THINK this will cause a sonar issue, as it isn't the exception is never caught via a "catch" clause. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ib5238e4791ae491b30286cdc8ed9caf67432dc26
2020-03-03Fix path issuesJim Hahn10-35/+115
A&AI tenant query is prepending the target entity with "/", but it should not. Fixed it. Modified A&AI and SO actors to get path prefixes from parameters. Fixed a bug in an A&AI simulator response (extra "}" at the end. Issue-ID: POLICY-2349 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I71f8b1e5fb8a4bd29b4f616a7757d366c7d58127
2020-03-02Merge "Log Actor parameter error message"Ram Krishna Verma2-14/+3
2020-03-02Log Actor parameter error messageJim Hahn2-14/+3
When an operation cannot be configured, the message did not include information describing the issue. Fixed it. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I671bf27693a8bfa87305099fcefa0e4e0c48928d
2020-03-02Testcases for cds actorRam Krishna Verma6-7/+389
Adding test cases for cds actor, operator, operation & manager. Coverage is more than 95% overall. Fixed review comments. Issue-ID: POLICY-2384 Change-Id: I64beeb0c46918b990ad7e67248559169fc7940a1 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-03-01Add SDNR ActorPamela Dragosh7-76/+680
Actor for SDNR and necessary JUnit tests. Removed the Pair code. Issue-ID: POLICY-2382 Change-Id: I3da1d95f431cc076f12e9ad26280b92058fe51cc Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-01Merge "Add sequence number to Actors"Ram Krishna Verma7-14/+73
2020-03-01Merge "Sequence throws NPE if task outcome is null"Liam Fallon2-2/+4
2020-02-29Guard Actor is adding the wrong type of OperatorJim Hahn2-2/+4
The Guard Actor should be adding a GuardOperator, but it was adding an HttpOperator, instead. Fixed the code. Issue-ID: POLICY-2350 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I03517e993442da13a4dbd1eb0c4a0318b0c1c9f2
2020-02-29Add sequence number to ActorsJim Hahn7-14/+73
When actors with duplicate names are loaded, a way is needed to determine which should take precedence. Added a sequence number to Actor to facilitate this. Unfortunately, couldn't use OrderedServiceImpl, because it only creates the Actors once, which would break a number of junit tests. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I1ade92f4fe516cfc54bb92d0a3624c67e8981075
2020-02-29Sequence throws NPE if task outcome is nullJim Hahn2-2/+4
If a task outcome is null, then sequence() throws an NPE. Modified it to treat a null outcome as a failure. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I57b8be27f72c7cbf43e0b3b8816696ab1928f396
2020-02-26Change ActorService config to Map<String,Object>Jim Hahn3-6/+8
It's a bit of a pain to pass Map<String, Map<String,Object>> to the ActorService configure() method. Changed it to simply take a Map<String,Object>, as it had been in a previous iteration. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ib6e703115027bc4919cc93762ca5b38d254f2b8f
2020-02-26Merge "ActorService constructor should be public"Ram Krishna Verma2-1/+8
2020-02-26ActorService constructor should be publicJim Hahn2-1/+8
Now that ActorService is no longer a singleton, the constructor should be public so other classes can create an instance. Also added a test to verify that each ActorService instance gets its own instances of the actors. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I78cabecc0ca6b355696a5d27489a4e59b6e7c012
2020-02-26Custom Query should always use vserverJim Hahn2-9/+34
Modified the Custom Query Operation to ignore the target entity passed via the "params" and always use the vserver name found in the enrichment data. Issue-ID: POLICY-2349 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: If2c45df2d0377ca08059bdbfa0bcc3d3f043c5b9
2020-02-26Merge "Add actor for CDS"Liam Fallon6-38/+497
2020-02-26Merge "Remove ActorService singleton"Ram Krishna Verma3-32/+7
2020-02-25Eliminate a couple more xxxAsync calls in ActorsJim Hahn1-6/+12
Eliminated a few more xxxAsync calls in Actors. Now, the remaining xxxAsync calls are necessary so that the callbacks are executed using the executor specified via the "params". Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ia4ff758f71f8bbe014ae5b1a58d8439c0d4ea2ed
2020-02-25Merge "Add "disabled" property to Guard Actor"Ram Krishna Verma8-3/+80
2020-02-25Add actor for CDSRam Krishna Verma6-38/+497
1) Create the operator, operation & manager classes for gRPC request. 2) Use CompletableFuture to track CDS request flow. Issue-ID: POLICY-2384 Change-Id: I84e30131a69c2d24c1871ceebced2b69194f619c Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-02-25Merge "Support separate VF Counts for different Targets"Pamela Dragosh5-67/+132