summaryrefslogtreecommitdiffstats
path: root/examples
AgeCommit message (Collapse)AuthorFilesLines
2022-12-15Release policy/apex-pdp2.9.0jenkins-releng12-12/+12
2022-10-21Set snapshot and/or references of policy/apex-pdp for new releaseliamfallon12-12/+12
policy/apex-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4408 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I3463647a8a3689518769a5fe5aaab2cfea8438e7
2022-10-21Update snapshot and/or references of policy/apex-pdp to latest snapshotsliamfallon12-12/+12
policy/apex-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4408 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Ic5da8f09888e81bfe6b0132c8fd725a3a4a40aed
2022-09-23Update snapshot and/or references of policy/apex-pdp to latest snapshotsliamfallon12-12/+12
policy/apex-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4343 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Ib4d723d5d687714011e76f22edf6a6c6f44aad5b
2022-08-30Add example policy for AC element microservice testFrancescoFioraEst11-1/+631
Issue-ID: POLICY-4307 Change-Id: I0275bbacb3d2689f50f93eef541cd43601aab8ef Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
2022-07-26Update APEX example to use JSON Schema plugina.sreekumar28-444/+596
Change-Id: Ic8b412ce0ca71b4452d67b1e4445e423b0ec5b54 Issue-ID: POLICY-4292 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2022-07-18Support MetadataSet generation in APEX CLI Editorrameshiyer271-0/+23
In addition to the existing capabilities of CLI editor, new arguments added for generating Tosca policy template excluding the policy model entity. Also generates independent json file for node template comprising the policy model data. Issue-ID: POLICY-4084 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I7c6a9570846e3ebfaa3f4ebc8d60faa94b533240
2022-05-03Set snapshot and/or references of policy/apex-pdp for new releaseliamfallon11-11/+11
policy/apex-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4073 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I36c398ac9f30480b55e7ad15b3fb4161d8999206 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-04-28Update snapshot and/or references of policy/apex-pdp to latest snapshotsliamfallon11-11/+11
policy/apex-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4089 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: If859b088c5975c8dda67c34f335658c98341be57
2022-04-12Update snapshot and/or references of policy/apex-pdp to latest snapshotsliamfallon11-11/+11
policy/apex-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4089 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Ida537dd5acbd299893f3e30bac84146e134d3a0f
2022-03-11Update snapshot and/or references of policy/apex-pdp to latest snapshotsliamfallon11-11/+11
policy/apex-pdp updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-3982 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I838a8d4d6365de1df2feda9d7ba7ffefbfd82c4f
2022-03-10Remove bad dependency in apex POMliamfallon1-6/+0
The Apex core modules were all collapsed into a single module in Jakarta. Issue-ID: POLICY-3982 Change-Id: I76e039fa58d4338d03331aa818ee44ea58451930 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-02-11Remove apex-pdp unused core modulesliamfallon4-23/+8
This is the final review in the refactoring of the model code in apex-pdp. The core-messaging and core-infrastructure modules are unused in apex-pdp except for websocket communication. Websocket communication is also not used in any deployment. This review: - removes the core-mesaging module, which had an apex-specific websocket implementation, except for the MessageException class, which is moved to the base core module - removes the core-infrastructure module, except for the ThreadUtils class, which is moved to the base core module - removes the websocket event protocol, which used core-messaging but is not used in any deployment - collapses all three "core" submodules into a single module - Updates dependencies where needed Issue-ID: POLICY-1820 Change-Id: Ieae30063e99570e61943372d3fa23b77a211462c Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-02-10Collapse apex-pdp maven model submodulesliamfallon4-4/+4
This review collapses all the code in six podel submodules into a single model module. There are no code changes, just files moved around. This change reduces the complexity of the code structure and speeds up the build. Issue-ID: POLICY-1820 Change-Id: Ifb644e8ec85ae6d0987378f4616fbc8a8858a9a8 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-02-08Remove JAXB and XML, use GSON for JSONliamfallon7-33/+4
This review converst apex-pdp to use GSON for JSON handling. In order to preserve backward compatibility with the JAXB format of JSON, custom handling of maps was required. Therefore, the policy-common StandardCoder could not be used. There are a lot of small changes, removing annotations from concepts and tweaking of test data. However, this cleans up the code base so it is worth doing. Issue-ID: POLICY-1820 Change-Id: I213fa64f6d7f3f1df8d10f111d9fbedbe80f9fe0 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-02-03Remove direct DB Load/Save from apex-pdpliamfallon10-454/+7
This review is part of a series of reviews to move the apex-pdp state machine model to use the base model types in policy models. Persistence of policies for apex-pdp is now implemented in PAP and API. The historic direct load and save functionality for APEX policy state machine models to and from databases is no longer used and no longer supported. This revmoves the DAO code from apex-pdp and the associated handling and test code. The next review will remove the JPA annotations. Subsequent reviews will mvoe the mdoel across to use the policy models base model types. Issue-ID: POLICY-1820 Change-Id: Iabf034b40a413d32fe62091fe3446f52ec30d3af Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-01-24Add TOSCA policy status header field to APEX event create CLIRashmi Pujar4-8/+12
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-11-29Update snapshot of policy/apex-pdp to 2.7.1-SNAPSHOTliamfallon11-11/+11
*** This commit is generated by a PF release script *** policy/apex-pdp is update from 2.7.0-SNAPSHOT to 2.7.1-SNAPSHOT Issue-ID: POLICY-3827 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I334dda447490f6c3e848be7b58f4a5119ae70ead
2021-10-14Bump policy/apex-pdp to Jakarta 2.7.0-SNAPSHOTa.sreekumar11-11/+11
Change-Id: I8ead26be4968b94980dcafd269c7ab32022b34d0 Issue-ID: POLICY-3696 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-10-14Bump policy/apex-pdp to 2.6.2-SNAPSHOTa.sreekumar11-11/+11
Change-Id: I0db6ab5efb0595cba86ce9cbaaafab88349818ff Issue-ID: POLICY-3696 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-09-15Bump apex-pdp to 2.6.1-SNAPSHOTa.sreekumar11-11/+11
Change-Id: Ie39d324e02a302b882318d46735a727322ce409d Issue-ID: POLICY-3587 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-09-01Fix sonars in apex-pdp #3Jim Hahn1-3/+3
Fixed: - use "var" - use assertEquals instead of assertTrue(xxx.equals()) - separate assertions Issue-ID: POLICY-3093 Change-Id: Id4db62626948681cd267e68a56dda65fa355c6f8 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-24Use CompareToBuilderJim Hahn3-47/+14
Also added lombok to test classes. Issue-ID: POLICY-3391 Change-Id: I9ecf479f3861a2e5211b037e885029d1719b6a56 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-06Use lombok in apex-pdp #5Jim Hahn14-305/+71
Updated examples thru integration-executor-test. Issue-ID: POLICY-3391 Change-Id: Idc707146a646d05720675a787761c199484048e9 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-08Fix Sonar in apex examples aadm bbslapentafd3-187/+185
Replacing local-variable type inference Issue-ID: POLICY-3093 Change-Id: I84bc2d182256f6a4aa24d9c1e020e934190bd623 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-07-06Merge "Cleanup input & outputFields from Task definition"Ajith Sreekumar2-70/+2
2021-07-05Merge "Fix Sonar Issues in apex examples-adaptive"Liam Fallon4-125/+28
2021-07-02Cleanup input & outputFields from Task definitiona.sreekumar2-70/+2
1) Remove the usage of inputField and outputField from Task definition. 2) Fix issues around populating events to task in case of State Finalizer Logic. Change-Id: Ief17f400729410b83c6b7c665980d443e0cf6f28 Issue-ID: POLICY-3336 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-07-01Fix Sonar Issues in apex examples-adaptivelapentafd4-125/+28
Replacing local-variable type inference Replaced EqualsAndHashCode ToString methods with lombok annotation in AutoLearn class Issue-ID: POLICY-3093 Change-Id: I3f3911222f0e34ad3c7687d7a1e1aad218448303 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-06-28Changes to support multiple outputs from a statea.sreekumar7-44/+42
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-04-19Fix name of target-database property in persistence.xml filesktimoney1-4/+5
Updated property javax.persistence.target-database to eclipselink.target-database Removed tools/tools-common/testing.txt Added Modifications Copyright to headers Updated Postgres references to MySQL Updated user information Issue-ID: POLICY-3059 Change-Id: I42ad294458809c0a3dca4d3ce9dd1ae5a7daa417 Signed-off-by: ktimoney <kevin.timoney@est.tech>
2021-03-12Bump apex-pdp to 2.6.0-SNAPSHOTliamfallon11-11/+11
Issue-ID: POLICY-3105 Change-Id: I53abd7e9cf8c1425d115b0bb917db6389e9ded92 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-03-10Bump apex-pdp to 2.5.2-SNAPSHOTa.sreekumar11-11/+11
Change-Id: I291f968367b1f864bb417a72fd0bdb22a07ba0f7 Issue-ID: POLICY-3127 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-24Bump apex-pdp to 2.5.1-SNAPSHOTa.sreekumar11-11/+11
Change-Id: I761ded255a97128f858d3a7ce95f2479b6208a4e Issue-ID: POLICY-3088 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-18Fix sonars in apex-pdpJim Hahn1-2/+7
Addressed the following issues: - initialize mocks before use - use parameterized queries - Random() is not secure - provide parameterized type for generics - unused imports - constructor visibility - use compute() instead of containsKey()/put() - make final fields static - rename constants to all upper case - no assert() in Thread.run() methods - nested try - nested if/else - too many break/continue - use try-with-resources - repeatable annotations - overlapping characters in reg ex - hashcode is not sufficient in compareTo() - need equals() with compareTo() - make class an interface - use parameterized test - multiple calls in assert() - log or re-throw - use different type of lambda - use parameterized logging - use StringBuilder instead of concatenation - use StandardCharsets.UTF_8 Issue-ID: POLICY-2906 Change-Id: I2cf8c885e3e22c2c6cbe6403a34906928afad022 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-18Replace GsonXxxAdaptersJim Hahn11-13/+15
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>
2021-02-11Changes related to multi policy handling improvement in APEXa.sreekumar1-6/+1
This review fixes an issue identified during testing the changes done for improving multiple policy handling in APEX. Changes done to a few test files in the previous review are reverted as well. Change-Id: I98324da708239d314aadd4c45dc377137fd552ba Issue-ID: POLICY-2883 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-01-28Improve handling of multiple policy in APEX PDPa.sreekumar1-1/+6
Change-Id: Ic4adf5bd8876dc31fc93993298e90389baaa2c39 Issue-ID: POLICY-2883 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-11-16Merge "Update vCPE example for JSON Stringify"Jim Hahn6-9/+30
2020-11-16Update vCPE example for JSON Stringifyliamfallon6-9/+30
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 vCPE example in apex to use that new method. Issue-ID: POLICY-2463 Change-Id: I85cc33dc4633b1b6f4c4db3d5ad8579c66d7c18c Signed-off-by: liamfallon <liam.fallon@est.tech>
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-11-11Add method to allow JSON conversion to execution context for logicliamfallon1-0/+39
The Rhino JSON.Stringify() method does not work well. This patch allows the user to call schema specific or generic JSON conversion using the schema handling in Apex or not as the developer chooses. Added a single argument stringify2Json() method. Issue-ID: POLICY-2463 Change-Id: I9ec1e0dea2f6cd153b73b2eace63d8806674884d Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-10-27Bump apex-pdp master to 2.5.0-SNAPSHOTRam Krishna Verma11-11/+11
Issue-ID: POLICY-2875 Change-Id: Ibb0e9a243bf92f0255cb5c145d31ccddb988fdf5 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-10-20Bump apex-pdp to 2.4.4-SNAPSHOTa.sreekumar11-11/+11
Change-Id: I5e2cd92ee3620dea4070d9fa3aeb5ffd65f9412c Issue-ID: POLICY-2869 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-10-16Merge "Remove apex asciidoc documents"Jim Hahn76-12212/+0
2020-10-16Remove apex asciidoc documentsliamfallon76-12212/+0
Apex documentation has now all been ported to use the ONAP recommended rst format. This review removes the old asciidoc documents. Issue-ID: POLICY-2824 Change-Id: I562bd344cb7d6ff36e7d54bdb8f95e3b656468f8 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-10-08Bump apex-pdp to 2.4.3-SNAPSHOTRam Krishna Verma11-11/+11
Issue-ID: POLICY-2839 Change-Id: Ia7c847b3dafd28958d5df209af95cac19fa480a0 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-09-17Cleanup related to removal of legacy format support in APEXa.sreekumar33-33/+0
This review basically just removes all "policyModelFileName" occurences which are not used anymore. Change-Id: Ibac8ec776dd989a5d677ff27a99eb7a36110773f Issue-ID: POLICY-2835 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-09-10Bump APEX version to 2.4.2-SNAPSHOTa.sreekumar11-11/+11
Change-Id: Idde5050b425eb1bebe312e80e795c21513367a1b Issue-ID: POLICY-2789 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-09-09APEX standalone support for ToscaPolicy formata.sreekumar6-44/+67
Legacy format support is removed, and Tosca format support is added. Change-Id: I3cfc181ccb5471a5d224c0162af18c1fa0fdbc70 Issue-ID: POLICY-2812 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>