aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.sdnr/src/main/java
AgeCommit message (Collapse)AuthorFilesLines
2021-02-05Give better messages than NPE for missing dataJim Hahn1-2/+2
When data is not available to actor operations, an NPE is generally thrown. Modified the code to provide more info about what is missing than simply NPE. Issue-ID: POLICY-2913 Change-Id: I37b6eadd966e0693508a6d552b7db4edf5410018 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-27Make Actors event-agnosticJim Hahn1-21/+1
Removed event and event-context code from the Actor code. Also removed the preprocessing steps from the Actor code, giving the application complete control over any preprocessing. Also fixed a bug wherein the APPC actor was treating the AAI_RESOURCE_VNF property as a String instead of as a GenericVnf. Issue-ID: POLICY-2746-actor Change-Id: Ibc05fe39ffedc0bc461abf10e6a960861ac70119 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-27Remove Target and TargetTypePamela Dragosh1-2/+2
The dependency should have been removed in the last review to remove SDC and policy-yaml legacy code. It was revealed that usage of TargetType and Type were spread out over the actor code. Those fields are represented differently in the new TOSCA Operational Policy Type, so fields were created to capture those values to be used by actor code. Issue-ID: POLICY-2428 Change-Id: Ib783526a518ca7942ae9e38019bd343639f4dd98 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-08-06Modify Actors to use properties when providedJim Hahn1-2/+16
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-07-31Add property lists to ActorsJim Hahn1-6/+7
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-13Remove legacy actor code from modelsJim Hahn1-250/+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-02Rename XxxActorServiceProvider to XxxActorJim Hahn1-4/+4
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-05-29Made Actor names publicJim Hahn1-1/+1
Some of the XxxActor.NAME constants were private. Made them public so drools-applications can reference them instead of hard-coding the text. Issue-ID: POLICY-1242 Change-Id: I849c979a3e209430db5132e6ff574ec73f1e3769 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-29Do not generate notification in SDNR ActorJim Hahn1-27/+0
Now that the SDNR Actor populates the operation outcome with the SDNR response, it no longer needs to populate the notification structure, as the application (e.g., drools-apps) can now generate the notification, itself, using the response. Issue-ID: POLICY-2593 Change-Id: Ie9bed0e59ca750211f17782fa7a2833c2087ac23 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-27Include response in OperationOutcomeJim Hahn1-5/+7
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-04-08SDNR Actor enhancementsJim Hahn3-64/+61
Made the following changes: - Enhanced SDNR Actor to support any operation name specified within the policy, constructing the same request, but passing a different "RPC name" and "Action" in the request. - Added ControlLoopResponse to OperationOutcome - Modified SDNR Actor to populate ControlLoopResponse Issue-ID: POLICY-2468 Change-Id: I50ee0674077d975f3cd211454656edc47d78520f Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-01Set sub request ID before start callbackJim Hahn2-11/+7
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-23Update new SDNR actor with v2.0 structuresJim Hahn2-31/+31
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-06Add subrequest ID to OperationOutcomeJim Hahn2-12/+8
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-01Add SDNR ActorPamela Dragosh3-24/+242
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-02-03Actor redesign.Jim Hahn1-8/+11
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
2019-06-17Fix simple sonar issues in modelsJim Hahn1-1/+0
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-04-08Code changes for OOF SON Use CasePamela Dragosh1-1/+36
Companian review to https://gerrit.onap.org/r/#/c/84361/ Issue-ID: POLICY-1463 Change-Id: I2640f01c07890a4b1e8938175b637b84dcc19f3c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-01move actors code in drools-applications to policy/modelsning.xi1-0/+256
remove white-space in policy/models Issue-ID: POLICY-1264 Change-Id: I8856fc7cd2c2a57af0031637870ca33c684bacf5 Signed-off-by: ning.xi <ning.xi@est.tech>