summaryrefslogtreecommitdiffstats
path: root/examples/examples-grpc/src/main
AgeCommit message (Collapse)AuthorFilesLines
2022-07-26Update APEX example to use JSON Schema plugina.sreekumar27-444/+583
Change-Id: Ic8b412ce0ca71b4452d67b1e4445e423b0ec5b54 Issue-ID: POLICY-4292 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2022-01-24Add TOSCA policy status header field to APEX event create CLIRashmi Pujar3-5/+8
In order to expose the processing status of a TOSCA policy to APEX-PDP, a new header field for APEX concept "event" has been introduced to track this within an APEX policy implementation. This field will be leveraged to extract the TOSCA policy execution metrics. Note, that the field is marked as optional for backward compatibility. Unit tests have been augmented to test for the field wherever applicable and the default empty value is retained for the others. "example-grpc" module has been updated to include this field. Exposing the TOSCA policy execution metrics is outside the scope of this patch since the current changes are already very large owing to the atomic nature of the change introduced. Issue-ID: POLICY-3845 Signed-off-by: Rashmi Pujar <rashmi.pujar1@bell.ca> Change-Id: Ief6d70f9abcfc8414e10aa51a27815ee9028e4c8
2021-06-28Changes to support multiple outputs from a statea.sreekumar5-39/+34
This review addresses two main changes: 1) inputFields and outputFields are not tied to task definition anymore. Instead inputEvent and outputEvents associated to a task is populated as part of the policy state definition, as the state definition have the information anyway. - Clean up of the usage of inputFields and outputFields in task definition will happen in a future review - inputFields and outputFields defined in task definition in policies until honolulu will not make the policy invalid as the changes are done in backward compatible way. 2) Multiple output events can come out of a final state now. - Define another policy state output with the relevant eventName in the command file - In the task logic, create a map to store the fields of the relevant outputEvent, and then just call "executor.addFieldsToOutput(<the_map_of_fields>)" These 2 steps are enough to send multiple events to relevant components as per the apex configuration. Change-Id: Id88ca402704106404f529e595e1a76f6bf167876 Issue-ID: POLICY-3336 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-18Replace GsonXxxAdaptersJim Hahn1-1/+1
The GsonXxxAdapters were removed from the models Serialization classes and replaced with type adapters from common. Modified the code to refer to the new adapters. Without this fix, examples-onap-vcpe will not compile. Could that be the cause of the apex-pdp standalone issue, POLICY-3066? Allow TypeAdapter in lieu of JsonSerializer/Deserializer adapters in config files. Note: examples-ona-bbs refers to the following, which were removed several releases ago (during the actor re-write?): - appclcm.util.Serialization$RequestAdapter & Serialization$ResponseAdapter Issue-ID: POLICY-2905 Change-Id: Ia57e0346343614cbd4a1cffd9c8393f207284244 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-16Update gRPC example for JSON Stringifyliamfallon2-5/+48
The JSON.stringify() call in the Rhino Javascript interpreter is not working correctly. A previous patch introduced a method into the Apex execution context to provide an alternative method for stringifying JSON. This patch updates the gRPC example in apex to use that new method. Issue-ID: POLICY-2463 Change-Id: I7f789c000d53dec60020fda2a6fccd71ef18edc3 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-05-01Minor fixes in examples-grpcRam Krishna Verma2-264/+5
Issue-ID: POLICY-1916 Change-Id: I4bd93d72f234e1ce572b11bcb0621078480e061b Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-03-23Adding example for APEX gRPC plugin for CDS interactiona.sreekumar24-0/+1517
Change-Id: I8361eb0cbe74c3548ca98f3005bc37f5a1f91747 Issue-ID: POLICY-2436 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>