aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.so
AgeCommit message (Collapse)AuthorFilesLines
2020-08-06Modify Actors to use properties when providedJim Hahn6-91/+301
Modified the Actors to use properties when the application provides them instead of going to the event context for the data. This sometimes entailed moving code out of the Operation subclass constructor that used or validated the context data. Combined some property names and renamed others. Changed VF Count from AtomicInteger to Integer. Issue-ID: POLICY-2746 Change-Id: Ib8730538309bb77d2f4f6161e9a20a49362d8972 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-04Skip preprocessor step in ActorsJim Hahn4-0/+26
Modified Actors to skip the preprocessor step if the "preprocessed" flag is set to true in the parameters. Did not add any error checking code to ensure the data was actually available to the operation - will add that once the properties are being set by the application code. Extracted common code in GrpcOperationTest into the setup method. Issue-ID: POLICY-2746 Change-Id: Id70c31a2c96a7aaa9d73cc70cdf4f55f8a4e087f Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-31Add property lists to ActorsJim Hahn6-9/+67
Modified the Actor code to provide a list of properties needed by the actor to perform a given operation. Added a build() method to the parameter class so invokers can build an operation and set its properties prior to starting it. Added a "preprocessed" field to the parameter class so invokers can indicate that the Actor need not perform any preprocessing steps. Will modify the actors, in a subsequent review, to observe the flag. Added "properties" to Operation so invokers can set the properties. Will modify the actors, in a subsequent review, to use the property values instead of the event context. Tweaked a few Actors to get values using the "params" object instead of reaching inside to the event object that it contains. Addressed review comment(s): - add prefix to other property names Issue-ID: POLICY-2746 Change-Id: I65996aef5cec5afe25e8287c0b2f5f322c532ca5 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-21Fix some sonars in policy-modelsJim Hahn2-3/+2
Fixed the following sonar issues in some of the project directories: - use assertNull, assertEquals, etc. - swap assertEquals arguments - extract a constant - don't invoke toString() in logger calls - TODOs - generic types Issue-ID: POLICY-2714 Change-Id: Id8803f9bf617ea9fc173a67b8606600709b55bdc Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-13Remove legacy actor code from modelsJim Hahn2-623/+0
Deleted legacy actor code. That includes deleting most of the XxxManager classes. Issue-ID: POLICY-2559 Change-Id: I1ef1b900ca1d23e88da64b2c95a18986feb1b765 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-09Bump policy/models to 2.3.1-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2695 Change-Id: I64473cc81ae48942010472f15faac75c13cb0b7d Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-02Rename XxxActorServiceProvider to XxxActorJim Hahn3-28/+27
Renamed the actors and their test classes. Addressed review comments: - some license dates Issue-ID: POLICY-2684 Change-Id: Ic9d83e146ef36bb305496d541166cb9f80544025 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-12Moving common polling code into HttpOperationJim Hahn17-855/+93
SO and VFC have duplicate code for polling. Moved it into the common superclass. Issue-ID: POLICY-2632 Change-Id: I27128bfb2d54ef522b6b44ff569819a8463f3454 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-11Default ActorImpl should have an "operations" propertyJim Hahn1-3/+3
Added "operations" level to actor properties. Also renamed CommonActorParams to ActorParams, in the process. Note: This impacts the properties specified in drools-apps. Issue-ID: POLICY-2629 Change-Id: I155bcb6ced73cb54e656d34e0b184fb2ed6250d1 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-02Change Actor makeCoder() to getCoder()Jim Hahn3-4/+4
Issue-ID: POLICY-2603 Change-Id: I29d5c73f4b8b129bfdd6d0c9fb6d766b260e27c4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-01Merge "Use "coder" to serialize Actor requests"Pamela Dragosh3-61/+15
2020-05-29Use "coder" to serialize Actor requestsJim Hahn3-61/+15
Modified the Actors to use the "coder" to serialize requests instead of defaulting to the HttpClient serialization provider. Decided to just pretty-print the requests since that can be used for both logging and transmission, which avoids serializing the request twice. Issue-ID: POLICY-2601 Change-Id: I190ed19dd852a1aa66156b358cbc97c3b121af1f Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-29Use default serialization providerJim Hahn1-2/+1
The default provider has been changed to gson, so the provider property no longer has to be set. Issue-ID: POLICY-1527 Change-Id: I3c829e2070617f85d998a56c0f58127d7f22b467 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-27Include response in OperationOutcomeJim Hahn4-0/+17
Added the response field and modified the actors to populate it. Issue-ID: POLICY-2592 Change-Id: I24487b6fbc23b69bde4a95acd470864d8231c49d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-19Bump models master to 2.3.0-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2514 Change-Id: I6a3d4e588a0ff0d15fccf49de66c51ea7d709b4b Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-05-19Bump models to 2.2.7-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2514 Change-Id: Ie482926a56a5250be5d78a97aa7c1c19311a292c Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-05-15Cannot parse finishTime in legacy SO responsesJim Hahn1-46/+1
Adding the actual sample responses to the SO simulator broke the drools-apps junit for usecases. Fixed (in theory) by updating the legacy SO actor to properly decode the finishTime. Refactored the new SO actor, extracting the type adapter into its own class file so it could be shared between the new and legacy actors. Issue-ID: POLICY-2570 Change-Id: I061b603172440b1a91da16d09b4f2a0d289dfc41 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-15Cannot parse finishTime in SO responsesJim Hahn3-3/+103
The timestamp in SO responses appears to follow RFC-1123/RFC-822 format instead of ISO format. Added a type adapter for SO. In Guilin, we may want to consider combining the two type adapters for LocalDateTime so that either format is accepted. Also modified the SO simulator to return responses that are actual samples from SO. As part of that work, discovered that the legacy SO actor is not able to parse these timestamps either. However, as that code is now deprecated, left it as is. Issue-ID: POLICY-2570 Change-Id: I322318d1007e36eef47bb8867fd8ed01cb60223a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-14SO poll should not require request IDJim Hahn6-12/+20
When SO is polled for the result of a previous request, it does not necessarily include the originally returned request ID in the response. This causes the SO actor to generate a "missing request ID in response" exception. Modified the actor to only extract the request ID from the first response and cache it for subsequeent responses. Testing this required the SO simulator to be modified so that it would return an INCOMPLETE on the initial request, forcing the actor to poll until it returns a COMPLETE. Made this a settable flag so that it could be enabled just to test the SO actor without impacting other components (e.g., drools-apps, CSITs). Also fixed a couple of checkstyle issues in the simulators. Issue-ID: POLICY-2568 Change-Id: Ifad8b3c0c2c0b03cb82da693c2cf5ced44ede105 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-24Bump models patch 2.2.6-SNAPSHOTPamela Dragosh1-1/+1
Also point to parent, common snapshots Issue-ID: POLICY-2510 Change-Id: Iad79c341bcfb8cb6bb828ee71e199ba3bb9a838b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-14Bump models to 2.2.5-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2378 Change-Id: I5461bafd3c2d19f4f457da0816bba117a2d8b550 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-04-11Bump models patch 2.2.4-SNAPSHOTPamela Dragosh1-1/+1
Issue-ID: POLICY-2378 Change-Id: I51c6c57bdcc0299c25b5ee05f47c20f4542bc02d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-01Set sub request ID before start callbackJim Hahn2-9/+16
Modified new actor code to generate the sub request ID before invoking the start callback. Issue-ID: POLICY-2461 Change-Id: I4adabd6efda2c30c0e2da31f95f01dd5fe546c0a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-30Test new actors against simulatorsJim Hahn3-0/+76
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-25Bump models 2.2.3-SNAPSHOTPamela Dragosh1-1/+1
Released 2.2.2 Issue-ID: POLICY-2378 Change-Id: I829f0dfc88aeaf1f9b7efad91c983628f2a5d706 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-24Bump policy-models to version 2.2.2-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-2378 Change-Id: I644e45822154f57d2bf6a81e55df07e2e4ca6966 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-23New Guard actor request structure is incorrectJim Hahn2-18/+2
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-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-06Add subrequest ID to OperationOutcomeJim Hahn2-2/+17
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-05Add SO VF Module Delete OperationJim Hahn12-27/+1102
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-03Fix path issuesJim Hahn3-8/+6
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-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-24Move CQ operation name from actor.aai to aaiJim Hahn2-8/+1
Issue-ID: POLICY-2385 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I12a7d55b118baa5f0f849855fbcf0602a1208b52
2020-02-21Change payload to Map<String,Object> so it's more versatileJim Hahn11-41/+303
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 Hahn10-138/+212
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-19Add SO actorJim Hahn18-56/+1920
Issue-ID: POLICY-2371 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I3faf0276e8039dc43a976d18ff8e704fdbec3d49
2020-02-18Actor updates to support SOJim Hahn1-6/+13
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-03Actor redesign.Jim Hahn1-3/+7
Left original code intact so that it can continue to be used until everything has been converted to use the new approach. Simply added new methods and classes. (A few minor edits were required to the old code, e.g., added constructors to the Actor implementations). Code to be removed is annotated with "TODO". This only contains one revised actor, SDNC. This actor combines code from actor.sdnc, sdnc, and drools-applications. Coverage tests are incomplete, but I anticipate some simplification to this design in a couple of days; coverage will be added at that time. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I4b75730e3621a9ee026ad10e557abe92df10dcf4
2020-01-10Bumped patch version for policy/modelsHOCKLA1-2/+2
Issue-ID: POLICY-1592 Change-Id: Iafc35fe53e28c815a79041f289cb17b6354ceccd Signed-off-by: HOCKLA <ah999m@att.com>
2019-11-13Removing Named Query.pramod.jamkhedkar2-362/+0
Removing all the related files and necessary modifications for removing named query. The code now only supports Custom Query Issue-ID: POLICY-2125 Change-Id: Ifa5ccb74142aa424359c0dea85b90bbcf70147cb Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2019-10-09Added ModelType to SO Req.pramod.jamkhedkar1-0/+1
Added ModelType to SO Request and set it to vfModule Issue-ID: POLICY-2156 Change-Id: Icfd824ff1f521ec32a711506d01283566d2a7ed9 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2019-09-10Bump versions for models masterJim Hahn1-1/+1
Change-Id: I351d1a0ebd3c7cfa76d57297ce44ef6a6fa8c753 Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-30Added VFModule countpramod.jamkhedkar1-673/+0
Added the function VFModuleCount to AaiCqResponse class. It counts the number of vf modules. Also changed the same custom query response in AaiSimulator. Issue-ID: POLICY-1858 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com> Change-Id: If08de84f74d2bd9501b501b881cdd761089614dc
2019-08-06Bump version in policy/modelsJim Hahn1-1/+1
Change-Id: Ie8761ccbd05edc80af51e0ae5e8c90a4dfaf7715 Issue-ID: POLICY-1965 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-05Bump versions to 2.1.2jhh1-1/+1
self-release process need to generate partial releases with some jars missing. Workaround is to bump versions an additional patch number. Issue-ID: POLICY-1953 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I4b8fa38f082d8f06c7fe56a26f8c55db91cd1d9e Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-06-21Bump models to 2.1.1 SNAPSHOTPamela Dragosh1-1/+1
Released 2.1.0 Issue-ID: POLICY-1737 Change-Id: I2bc12dd4a9cdad7a867e3d710bb427493de6c7f4 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-06-17Fix simple sonar issues in modelsJim Hahn2-41/+39
Added @FunctionalInterface where needed. Replaced anonymous classes with lambda expressions. Replaced duplicate strings with a constant. Removed unused BeforeClass & AfterClass test methods. Removed some trailing spaces. Fixed: aai actor.appc actor.appclcm actor.sdnc actor.sdnr actor.so actor.vfc actorServiceProvider appc appclcm cds events Change-Id: I0e21cbb10db6d1217bbd0e00e6dd4fac3eb84e31 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-14Merge "Fixed SO request creation"Pamela Dragosh2-5/+4
2019-06-13Fixed SO request creationpramod.jamkhedkar2-5/+4
Fixed the SO creation from aai custom query. Issue-ID: POLICY-1856 Change-Id: I5842a4dccbd61c774d84c8e897a876eae76d3a79 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2019-05-29Change version to 2.1.0Pamela Dragosh1-1/+1
Bump for El Alto Issue-ID: POLICY-1747 Change-Id: I72ec2583715744e9e6debe84b75d0c1d3ffab997 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>