aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.cds
AgeCommit message (Collapse)AuthorFilesLines
2021-09-15Bump policy-models to 2.5.1-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3587 Change-Id: Idca2237777c1f7bda3fab89934dc97b9360fbc3d Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-06-17Use lombok annotations for actorsJim Hahn1-5/+6
This is the last one for policy-models! Issue-ID: POLICY-3396 Change-Id: I05b114a57a720a6ae8ae073b80c8bded36d0d06d Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-07Fix sonars in policy-models actorsJim Hahn2-11/+10
Fixed: - use "var" - don't throw generic Exception Issue-ID: POLICY-3094 Change-Id: I020addb9511fd665b5fed48e7d40719e27039224 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-10Bump version to 2.5.0 in modelsJim Hahn1-1/+1
Issue-ID: POLICY-3105 Change-Id: I01fe35f16609f9b8d98fb2083c8b18fc7ce3ccf3 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-09Bump models to 2.4.2-SNAPSHOTJim Hahn1-1/+1
Issue-ID: POLICY-3127 Change-Id: Ie37871c54dc5e7eab0ee7d553c6b38ea0e720a29 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-23Bump models to 2.4.1-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-3088 Change-Id: I7f6cc0ab5299200315c78f6e6c79c79349d2608c Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-02-11Fix sonars from depeendency upgradeJim Hahn3-18/+12
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner, in most cases. Changed to openMocks() in one case and removed unnecessary stubbings. Issue-ID: POLICY-2905 Change-Id: I9aa098aa7aaebba09f6dcea4cac69ac1e5fbd4d6 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-30Remove targetEntity from makeOutcomeJim Hahn1-2/+2
The Actor Params class had two flavors of makeOutcome, the second of which took a "targetEntity" parameter. As the Params no longer deal directly with the targetEntity, the second flavor was removed. Issue-ID: POLICY-2804 Change-Id: Ic736dd1c809ce54f6bb7cd37d03bc84cf4a1410c Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-20Delete preprocessed flag from actorsJim Hahn1-5/+4
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 Hahn3-360/+41
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-10-27Bump models master to 2.4.0 SNAPSHOTJim Hahn1-1/+1
Bumping minor version now that guilin branch has been created. Issue-ID: POLICY-2875 Change-Id: Iec7868062610a3acca6f883f999615ccc109f850 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-19Bump models to 2.3.6 snapshotJim Hahn1-1/+1
Issue-ID: POLICY-2869 Change-Id: I98223c20d6d1d6d9bf5bd958d9d3ed4aacdf17e6 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-13Bug fixes and improvements in CDS Simulatora.sreekumar1-0/+27
1) CDS Simulator was not able to run alone. It needed one of the RestServer simulators to start up to continue running. Providing the cds simulators parameters alone in the config file was resulting in termination of the Main process. This is fixed. 2) Response from the CDS Simuator when blueprint and action names are unknown (in real cases, when a corresponding CBA is not uploaded to CDS) is updated to mimic an actual CDS response instead of always returning a dummy success response. Change-Id: I79a6d158addaad31649809006d1e3c1dfdb47a1f Issue-ID: POLICY-2828 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-10-09Bump models to 2.3.5Jim Hahn1-1/+1
Issue-ID: POLICY-2863 Change-Id: Iba0dfe78576a2ad1551c165e3b9f53fa3c55259a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-09Bump models to 2.3.4 snapshotJim Hahn1-1/+1
Issue-ID: POLICY-2863 Change-Id: I9d764a0cd695aa95a5880fd20b594e465d14c658 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-07Bump models to 2.3.3Jim Hahn1-1/+1
Issue-ID: POLICY-2839 Change-Id: Ifd7f45854904545b4f2973e1429cb791ac00b600 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-08Bump models to 2.3.2Jim Hahn1-1/+1
Issue-ID: POLICY-2789 Change-Id: I19b397ecb165bea30059142d9d4c5357ceba9825 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-27Remove Target and TargetTypePamela Dragosh5-35/+37
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-18/+16
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-08-06Modify Actors to use properties when providedJim Hahn2-25/+207
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 Hahn2-41/+32
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 Hahn2-3/+63
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 Hahn2-453/+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-11/+11
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 Hahn2-2/+74
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-06-11Default ActorImpl should have an "operations" propertyJim Hahn1-6/+7
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-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 Hahn2-5/+9
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-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-17Add PNF support to new CDS actorJim Hahn3-9/+210
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 Hahn4-4/+26
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-16CDS actor was not registeredJim Hahn6-16/+55
Moved the spi file to register the actor and added a test to ensure that the registration worked. Also removed some deprecated code from the CDS junits. Issue-ID: POLICY-2501 Change-Id: I06f50ea8f074cdb7a89c7e387f9f31ea7cffa7e2 Signed-off-by: Jim Hahn <jrh3@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-1/+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-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-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-12Clean up minor checkstyle/sonar issuesliamfallon1-14/+11
A few minor eclipse warnings and checkstyle warnings in policy models. Issue-ID: POLICY-1910 Change-Id: I612c6514fa7d88cb8658a7ee1618869a525e48d7 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-02Testcases for cds actorRam Krishna Verma4-1/+381
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 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-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
2020-01-10Bumped patch version for policy/modelsHOCKLA1-1/+2
Issue-ID: POLICY-1592 Change-Id: Iafc35fe53e28c815a79041f289cb17b6354ceccd Signed-off-by: HOCKLA <ah999m@att.com>
2019-11-26CDS actor payload to be JSON object when applicableRashmi Pujar3-12/+71
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 Pujar3-3/+17
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 Pujar5-66/+146
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