aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions
AgeCommit message (Collapse)AuthorFilesLines
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 Hahn15-30/+1153
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 Verma11-36/+116
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 Hahn11-36/+116
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 Verma7-8/+390
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 Dragosh8-76/+716
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
2020-02-25Remove ActorService singletonJim Hahn3-32/+7
The ActorService singleton is not needed at this time, so it was removed. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I9b4cbb72cedbeb77b39422e71650ab60c9aec7ec
2020-02-25Support separate VF Counts for different TargetsJim Hahn5-67/+132
Changed the key by which the VF Count is stored within the context so that each Target can have its own VF Count. Also moved VF Count code from VfModuleCreate to SoOperation, to hide the determination of the VF Count "key". Fixed sonar issue about return "null" instead of returning an empty list - modified the code to use Optional. Issue-ID: POLICY-2371 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ia23eabea0edf6857372e269a2db1a21e741824c6
2020-02-25Add "disabled" property to Guard ActorJim Hahn8-3/+80
Issue-ID: POLICY-2350 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I3e9c9aae474d4b288a162243bc492b301d1044c0
2020-02-25Add PipelineUtilJim Hahn3-8/+93
Issue-ID: POLICY-2385 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I7745e8286dd6f086941b979f16b2328bfa066788
2020-02-25Merge "Move CQ operation name from actor.aai to aai"Ram Krishna Verma7-23/+4
2020-02-24Move CQ operation name from actor.aai to aaiJim Hahn7-23/+4
Issue-ID: POLICY-2385 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I12a7d55b118baa5f0f849855fbcf0602a1208b52
2020-02-24Add "finalOutcome" flag to OperationOutcomeJim Hahn3-29/+76
The Actor clients receive notifications of operation failures, but no indication if it's the final failure, thus they do not know if they should progress on to the "failure" policies. Issue-ID: POLICY-2385 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: If053ed459e1d790e58eca950a8feeabaf4d67a41
2020-02-21Change payload to Map<String,Object> so it's more versatileJim Hahn63-184/+1267
This was supposed to be two separate commits, but I goofed something. Added guard query to Operation superclass. Modified VfModuleCreate to store the VF count, pass it to the guard, and bump it once the create completes successfully. Added code to check Actors for proper plug-in to ActorService. Renamed "operation" property to "operations", to be more consistent with other parameters (e.g., TopicParameterGroup). The META-INF/services files for the actors had mixed case, which did not match the package name of the Actor class, preventing the ServiceLoader from recognizing them. Also modified the ActorService to skip any that cannot actually be loaded, for whatever reason (e.g., not in the classpath). Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ifa97744543f2866cc553138ec5ec644b033de780
2020-02-20More actor clean-upJim Hahn68-644/+1646
Currently, Operator classes refer to Operation classes, and vice versa, creating a dependency cycle. In addition, there is a slight problem in that if an operator is reconfigured, any running operation may get inconsistent configuration data. Modified the code to create Config objects that are passed to the operation, instead of passing the Operator to the operations. This solved both issues. Replaceed makeOperator() with constructors. Added parameter type to HttpActors. Modified guard to get "ONAP" properties from its configuration, as a default. Changed setUp() to setUpBasic(), so "throws Exception" could be removed, thus resolving a sonar issue. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I21eb8798acfbc636ff1bd8741b21c7278365b6e4
2020-02-20Merge "Add Guard Actor"Jorge Hernandez11-2/+534
2020-02-19Add Guard ActorJim Hahn11-2/+534
Issue-ID: POLICY-2350 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ib68c22a1154607563cb8a657b8101757a29b47ef
2020-02-19Add SO actorJim Hahn21-57/+1933
Issue-ID: POLICY-2371 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I3faf0276e8039dc43a976d18ff8e704fdbec3d49
2020-02-18Validate request content of various actorsJim Hahn17-237/+379
Created common junit superclass, BasicOperation, containing verifyRequest() method, among others. Issue-ID: POLICY-2363 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I7ff4428e94bfd301ff4194e1766ef61906714dcf
2020-02-18Merge "Actor updates to support SO"Jim Hahn9-21/+34
2020-02-18APPC ActorJim Hahn7-1/+749
Issue-ID: POLICY-2363 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I21908c9875aa1d2ad3678cb7613b5a3e1fada340
2020-02-18Actor updates to support SOJim Hahn9-21/+34
Used SuperBuilder in operation Params classes. Added rawResponse to http setOutcome(). Made HttpOperation.operator private. Issue-ID: POLICY-2371 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ie894f2e6ae4a31b69a700e425f9e94c5e8a15daa
2020-02-17More changes to actor codeJim Hahn22-57/+451
Use Coder.convert() from policy-common. Passed response to setOutcome(). Changed class names from XxxOperator to XxxOperation. Modified SDNC junits to invoke start() instead of startOperationAsync(). Changed context obtain() to re-run if the future was canceled. Added junit support class, BasicBidirectionalTopicOperation. Modified HttpOperation to allow subsequent requests to be issued. Some actors, like SO, send an initial HTTP request and then follow it with HTTP "are you done?" requests. Issue-ID: POLICY-2363-prop Change-Id: I12b5c2d4f07254e0cb79fabfe1ccf844b70a0654 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-02-17Use BidirectionalTopicClient from policy-commonJim Hahn47-1765/+1887
Also modified "target" to sink in various places, and renamed various uses of "pair" to "bidirectional" (e.g., TopicPairParams => BidirectionalTopicParams). Also replaced MyExec with PseudoExecutor, from policy-common. As part of this, extracted the logRequest and logResponse methods from the Http and Topic classes, moving them into the common OperationPartial class. Modified A&AI, SDNC junit tests to use PseudoExecutor. Added support for incomplete responses on Topics, where multiple responses may be received for one request Fixed a duplicate entry in actor.aai pom. As the changes were already big enough, went ahead and also did the following to support the APPC Actor: - Reorganized parameter classes and content. - Modified anyOf, allOf to take functions instead of futures and handle exceptions thrown by any of the functions. Also added sequence() method. - Deleted doTask. - Modified ActorService.config to take a map of maps, not just a map. - Decided NOT to move anyOf, allOf, and sequence from OperationPartial to a utility class, because they depend on "params". Issue-ID: POLICY-2363 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I5a8bae05dfef22fe71c57c58f265b9dac20df5c5