summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.appclcm/src/test
AgeCommit message (Collapse)AuthorFilesLines
2021-02-05Give better messages than NPE for missing dataJim Hahn1-3/+17
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-11-20Delete preprocessed flag from actorsJim Hahn1-2/+5
Removed the "preprocessed" flag from the Actor parameter class, now that the actors no longer have a startPreprocess() method. Also removed targetEntity from Actor parameter class. Created a makeOutcome method within OperationPartial, which is used to create an initial outcome whose target field is pre-populated with the target-entity extracted from the properties. As the meaning of "target" may be specific to an operation, the makeOutcome method may be overridden by an operation subclass. Issue-ID: POLICY-2804 Change-Id: Ifb66de63301d644e69340009593513773ee5672d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-27Make Actors event-agnosticJim Hahn1-39/+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-13/+15
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-18Make targetEntity a propertyJim Hahn1-6/+3
The target entity is not always known when an Operation is first constructed, thus it should be treated as an Operation property instead of being included within the ControlLoopParams. Started the process of moving it from the Params to the properties. Also fixed a bug in custom query - it was setting the outcome response to the String response instead of setting it to the AaiCqResponse object. Also added logging when an Operation's properties are set. Issue-ID: POLICY-2746 Change-Id: I56c0cd90985f6140363548b0b8d031471b586e88 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-31Add property lists to ActorsJim Hahn1-0/+6
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 Hahn1-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 Hahn1-415/+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-29/+29
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-02Change Actor makeCoder() to getCoder()Jim Hahn1-1/+1
Issue-ID: POLICY-2603 Change-Id: I29d5c73f4b8b129bfdd6d0c9fb6d766b260e27c4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-27Include response in OperationOutcomeJim Hahn1-1/+8
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-01Set sub request ID before start callbackJim Hahn1-12/+11
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 Hahn1-0/+51
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-06Add subrequest ID to OperationOutcomeJim Hahn1-6/+13
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 other APPC-LCM operationsJim Hahn2-151/+273
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 APPC-LCM actorPeyton Puckett3-1/+228
Issue-ID: POLICY-2403 Change-Id: Ia7b26cce9ec8308c3d83c374e5ac6aea3af38a1d Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2019-12-10Fix minor checksyle issues in modelsliamfallon2-56/+48
New checkstyle profile flagged some minor issues in policy models. Issue-ID: POLICY-2165 Change-Id: I17ed070a3d55601ad31e48fdfd29fff01d29fa42 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-13Removing Named Query.pramod.jamkhedkar1-13/+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-25Refactor Appc LCM ModelDaniel Cruz1-57/+82
Added model classes for APPC LCM Input and APPC LCM Output and removed adding the input/output tag to the JSON via the APPC LCM custom serializer. Issue-ID: POLICY-2043 Signed-off-by: Daniel Cruz <dc443y@att.com> Change-Id: I54e1b5f589a4b29357cf1a45dbdf2173610870ce
2019-07-08Fix models due to sonar changes in commonJim Hahn1-2/+2
Fixed breakages due to changes made in policy/common to satisfy sonar. Change-Id: I7de701e743664afb5963a454c59478d1a1c83e87 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-17Fix simple sonar issues in modelsJim Hahn1-48/+46
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-08Remove drools PDP dependencyPamela Dragosh1-7/+2
Removing working memory and use of PolicyEngine from drools in these classes. Cleaned up some unused imports and checkstyle. Issue-ID: POLICY-1264 Change-Id: Id059da9689a721b0eafc6b310adcbdad43574ce7 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-01move actors code in drools-applications to policy/modelsning.xi2-0/+542
remove white-space in policy/models Issue-ID: POLICY-1264 Change-Id: I8856fc7cd2c2a57af0031637870ca33c684bacf5 Signed-off-by: ning.xi <ning.xi@est.tech>