aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.cds/src/main/java
AgeCommit message (Collapse)AuthorFilesLines
2020-10-27Make Actors event-agnosticJim Hahn1-110/+12
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 Dragosh2-7/+8
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-21/+79
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 Hahn1-0/+4
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 Hahn1-3/+23
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-239/+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-3/+3
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-26Add CDS simulator to policy-modelsJim Hahn1-2/+16
Added CDS simulator to policy-models. Added a test case to the CDS Actor to verify that it works with the simulator. Issue-ID: POLICY-2676 Change-Id: I9b10de3bde93c69e82df983f77eecc253de8a1a2 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-29Made Actor names publicJim Hahn1-0/+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-27Include response in OperationOutcomeJim Hahn1-0/+2
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-17Add PNF support to new CDS actorJim Hahn1-4/+105
Made the following updates: - added new A&AI get-PNF Operation by refactoring AaiGetOperation, separating out Tenant and PNF operations - added PNF support to the CDS actor - added logging to the CDS Handler - added get-pnf to the A&AI simulator Issue-ID: POLICY-2505 Change-Id: Iff140e7c864f762790d8e2ecaba62c161c859e6e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-16CDS Operator should be genericJim Hahn2-3/+13
Like the SDNR Operator, the CDS Operator should work regardless of the operation name. Issue-ID: POLICY-2504 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I9a77838462bc5b91e2d95e7dcf1f8822bd45f04c
2020-04-01Set sub request ID before start callbackJim Hahn1-1/+6
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-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-02Testcases for cds actorRam Krishna Verma1-1/+1
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-02-25Add actor for CDSRam Krishna Verma5-38/+491
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-03Actor redesign.Jim Hahn1-2/+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
2019-11-26CDS actor payload to be JSON object when applicableRashmi Pujar2-4/+17
When the policy-payload supplied by CLAMP is a valid JSON string the CDS Blueprint payload must be a JSON object, else retain the CDS Blueprint payload to be a string. Issue-ID: POLICY-2253 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: I6380ab0424339603ecf52d298e4f6f0cd8df754b
2019-11-04PNF support changes in policy/modelsRashmi Pujar2-3/+13
AAI Enrichment method for PNF target-type and unit tests. Addition of a hashmap field to ControlLoopEvent class to hold event specific parameters. Update CDS actor to include additional event parameters Issue-ID: POLICY-1187 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ie0ceb320943531de6e6bc8675844b29a358dfb7e
2019-10-23Flatten the CDS grpc request payloadRashmi Pujar4-66/+92
Before: { "vfw-modify-config-request":{ "resolution-key":"1234567890", "aai-properties":{ "service-instance.service-instance-id":"1234", "generic-vnf.vnf-id":"5678" }, "policy-payload":{ "data":"{\"active-streams\":\"5\"}" } } } After: { "vfw-modify-config-request":{ "resolution-key":"1234567890", "vfw-modify-config-properties":{ "service-instance.service-instance-id":"1234", "generic-vnf.vnf-id":"5678", "data":"{\"active-streams\":\"5\"}" } } } Issue-ID: POLICY-2089 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: I139a7ca3e1e2d0cd50bbd86d0cdf499f215be74f
2019-10-17Remove the CDS blueprint name and version from its payload.Rashmi Pujar2-3/+8
This information is redundant since it is included in the request header. Found during integration testing Issue-ID: POLICY-2089 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Icdb4753ccae687f85318f5efeed09d5e13a6853b
2019-10-15Fix remaining fixable Sonar issues on policy modelsliamfallon1-1/+4
This patch fixes the remaining easy to fix Sonar issues on policy models. The remaining issues are - methods that do not follow Java naming conventions and fixing those will probably break policies that use those methods - TODO statements to do with functionality we didn't get done in Dublin and will address in Frankfurt Issue-ID: POLICY-2165 Change-Id: I7f604bc2335388bdc0dd9286ae17a5ab76517665 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-11Clean up SONAR issues in CDS actorliamfallon1-1/+4
Issue-ID: POLICY-2165 Change-Id: I2ccfb32193c85958d525af19a7744a74c97a3485 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-07Changes in model to integrate cds actorBruno Sakoto1-17/+24
* Create class for CDS response Issue-ID: POLICY-2088 Change-Id: I813a310f7d5123fac4bb1c3880d108391096250f Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
2019-10-01Update CDS grpc request generation in CDS Actor service providerRashmi Pujar2-7/+25
- CDS payload requires resolution-key (random UUID) - Update the CDS request object to rename the payload child node key name from config-deploy-properties to policy-payload. - Generate dynamic childnode key name from the policy recipe-name aka CDS action-name. action-name itself is never included in serialization as is. Below is a sample: { "commonHeader": { "subRequestId": "$subReqId", "requestId": "$reqId", "originatorId": "POLICY" }, "actionIdentifiers": { "mode": "sync", "blueprintName": "$bpName", "blueprintVersion": "$bpVer", "actionName": "$recipeName" }, "payload": { "$recipeName-request": { "resolution-key": "{{$guid}}", "aai-properties": { "$key": "$value", ... }, "policy-payload": { "$clamp-payload" } } } } Issue-ID: POLICY-2120 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ia7f0551f94755bbe73b48ae387b4c53842729a81
2019-09-06CDS Actor service-provider implemntationRashmi Pujar3-0/+322
https://wiki.onap.org/display/DW/CDS+actor+support+in+Policy Issue-ID: POLICY-1763 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Idcb6e9168b949745cc644e97ba77c479573a8bf5