summaryrefslogtreecommitdiffstats
path: root/model/policy-model
AgeCommit message (Collapse)AuthorFilesLines
2022-01-24Add TOSCA policy status header field to APEX event create CLIRashmi Pujar2-8/+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-11-29Update snapshot of policy/apex-pdp to 2.7.1-SNAPSHOTliamfallon1-1/+1
*** 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.sreekumar1-1/+1
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.sreekumar1-1/+1
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.sreekumar1-1/+1
Change-Id: Ie39d324e02a302b882318d46735a727322ce409d Issue-ID: POLICY-3587 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-08-05Use lombok in apex-pdp #2Jim Hahn3-28/+28
Updated context to use lombok. Issue-ID: POLICY-3391 Change-Id: I349e0202fffad161cac08cebaea4a9571db58bda Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-02Cleanup input & outputFields from Task definitiona.sreekumar10-372/+24
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-06-29Fixing checkstyle issue in APEXa.sreekumar1-3/+3
Change-Id: I6b88d59a54617cb9f14a5aaa2638f87a6c1ef3e9 Issue-ID: POLICY-3209 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-06-28Changes to support multiple outputs from a statea.sreekumar8-258/+92
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-06-28Update policy-apex-pdp for checkstyle 8.43liamfallon5-32/+32
Issue-ID: POLICY-3209 Change-Id: I0cb6fc8f5693fe03b4d68af2fde5116e9e248115 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-06-24Update apex-pdp for checkstyle 8.43liamfallon2-5/+5
Issue-ID: POLICY-3206 Change-Id: I3873c85aab577e85a9ae6b610c3871ee4de6ea53 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-03-12Bump apex-pdp to 2.6.0-SNAPSHOTliamfallon1-1/+1
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.sreekumar1-1/+1
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.sreekumar1-1/+1
Change-Id: I761ded255a97128f858d3a7ce95f2479b6208a4e Issue-ID: POLICY-3088 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-18Fix sonars in apex-pdpJim Hahn5-33/+51
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-01-28Improve handling of multiple policy in APEX PDPa.sreekumar1-2/+11
Change-Id: Ic4adf5bd8876dc31fc93993298e90389baaa2c39 Issue-ID: POLICY-2883 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-10-27Bump apex-pdp master to 2.5.0-SNAPSHOTRam Krishna Verma1-1/+1
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.sreekumar1-1/+1
Change-Id: I5e2cd92ee3620dea4070d9fa3aeb5ffd65f9412c Issue-ID: POLICY-2869 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-10-08Bump apex-pdp to 2.4.3-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2839 Change-Id: Ia7c847b3dafd28958d5df209af95cac19fa480a0 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-09-10Bump APEX version to 2.4.2-SNAPSHOTa.sreekumar1-1/+1
Change-Id: Idde5050b425eb1bebe312e80e795c21513367a1b Issue-ID: POLICY-2789 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-09-03Clean up warnings and SONAR issuesliamfallon1-5/+4
Issue-ID: POLICY-2654 Change-Id: Ifd391ea9141d37cfd3ca4110d66c667962230ae1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-08-17SONAR fixes - assert dissimiliar typeswaynedunican8-10/+10
Fix for assertions comparing dissimiliar types. Issue-ID: POLICY-2761 Change-Id: I1b2b8afa3e6308cda887d73a4ee079709847d054 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-08-10Merge "Sonar Fixes"Pamela Dragosh6-23/+24
2020-08-10SONAR assertion cleanupwaynedunican8-28/+30
Replaced assertions to not have the same actual and expected expression in apex-pdp Issue-ID: POLICY-2761 Change-Id: I2bf45a3cc4411bd39f93f9d0b8c8e56dd318281e Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-08-07Sonar FixesJvD_Ericsson6-23/+24
Replace the type specification in this constructor call with the diamond operator and other small fixes Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Issue-ID: POLICY-2760 Change-Id: I83821859a4a1dbbffbaeae15281abac2de3b5712
2020-07-24APEX changes to support policy disable/enable and some improvementsa.sreekumar2-15/+13
1) Do not stop all the marshallers/unmarshallers while updating the engine. Stop and remove only those that are part of the policies that are undeployed. 2) Do not reinitilaize any marshaller/unmarshaller that is already initilaized as part of the policies which were already deployed. Initialize only the ones as part of any newly deployed policy. 3) EngineParameters could be different in different policies. Aggregate these parameters and make it available in the engine for any running policy. 4) Enable support for running policies with same model and different configurations. Change-Id: If74807a0515a741ef4e53bd0a93e43b05872f6b5 Issue-ID: POLICY-2536 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-07-24Fix replaceAll SONAR issues in apex-pdpJvD_Ericsson2-7/+8
Change replaceAll() with repalce() in apex-pdp Issue-ID: POLICY-2722 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I8a15b99f02399addfc8f0e25349e3022d8b8c9f1
2020-07-23Merge "Fix assertTrue in apex-pdp/model"Jim Hahn1-19/+18
2020-07-23Fix assertTrue in apex-pdp/modelJvD_Ericsson1-19/+18
Replace assertTrue with assertEquals and assertFalse with assertNotEquals in apex-pdp/model Issue-ID: POLICY-2690 Change-Id: Ifd435a4ea69d8f682407c2a70d5e8119f017ae9f Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
2020-07-23Merge "Remove try/catch blocks with assertj - apex-pdp"Jim Hahn1-22/+7
2020-07-23Remove try/catch blocks with assertj - apex-pdpwaynedunican1-22/+7
Removed try/catch blocks in apex-pdp and replaced with assertj assertions Part III Issue-ID: POLICY-2451 Change-Id: I1e6ede1c256c5bcf7899e1af130add71fdf1381c Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-21Fix assertTrue in apex-pdp/model apex-pdp/plugins, apex-pdp/services and ↵JvD_Ericsson4-26/+26
apex-pdp/testsuites Replace assertTrue with assertEquals and assertFalse with assertNotEquals in apex-pdp/model, apex-pdp/plugins, apex-pdp/services and apex-pdp/testsuites Issue-ID: POLICY-2690 Change-Id: If088371cf012d5648e04ade2aa4d49b38945f6d2 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
2020-07-17Fix assertTrue SONAR issues in apex-pdp/modelJvD_Ericsson8-131/+116
Replace assertTrue with assertEquals and assertFalse with assertNotEquals in apex-pdp/model Issue-ID: POLICY-2690 Change-Id: Id37989ea8a6ad7b3156e13851cc072ce6c53c03e Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
2020-07-15Replaced try/catch blocks with assertj - apex-pdpwaynedunican7-349/+197
Removed try/catch blocks in apex-pdp with assertj assertions Part IV Issue-ID: POLICY-2451 Change-Id: I4b6accb9f944195db9ccf8a5de165b169301ac7f Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-13Remove old documentation from buildliamfallon4-145/+0
apex-pdp had an in-line docuemntation build system built on asciidoc. It has proven to be very difficult to maintain and keep up to date and it is incompatible with the ONAP official RST/ReadTheDocs docuementation system. In the Dublin release, we converted the asciidoc documentation to RST format, and hae been updating the RST documentation since. The asciidoc docuemntation system is now so out of date that it is being removed. In this change, the "site" directory is removed from all modules in apex-pdp and a profile called "apexSite" is removed from the pom.xml file in all modules. Issue-ID: POLICY-2686 Change-Id: I645f3ed101159d356cd90e619cef791067ad5eb5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-07-10Bump apex-pdp to 2.4.1-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2695 Change-Id: I15b489de9ca2614e3a6c94b450a3d6397d17d4ff Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-06-19Changes for checkstyle 8.32liamfallon34-76/+11
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-05-21Bump apex master to 2.4.0RossC1-1/+1
Issue-ID: POLICY-2514 Change-Id: I764cfe41ed8cf8ffebd4ff076d0b76b79d61e142 Signed-off-by: RossC <ross.carter@est.tech>
2020-05-20Bump Apex to 2.3.3RossC1-1/+1
Issue-ID: POLICY-2514 Change-Id: I5b130b052150eb0e51759c751b83ab9d6f199759 Signed-off-by: RossC <ross.carter@est.tech>
2020-04-15Bump policy-apex-pdp to 2.3.2-SNAPSHOTa.sreekumar1-1/+1
Change-Id: Ic668ab20498bdc41edc78f52c7ce9d89a1385f19 Issue-ID: POLICY-2378 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-03-25Bump policy-apex-pdp to 2.3.1-SNAPSHOTa.sreekumar1-2/+2
Change-Id: I59b93fccb0f3a41f8db753d1e8e2978bbb51e9a0 Issue-ID: POLICY-2378 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-01-23Remove apex-pdp TextFileUtils classliamfallon1-6/+5
This class was moved to policy-common some time ago. Removing it in apex-pdp. Issue-ID: POLICY-1913 Change-Id: I982fbd799334b34f1526e19f339236b52205b91e Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-12-04Minor changes for new Eclipse checkstyle checksliamfallon1-10/+10
The laest Eclipse checkstyle version 8.26.0 does more thorough checking and identified a number of small issues in the apex-pdp codebase. This review fixes those issues. Issue-ID: POLICY-1913 Change-Id: I30ba25e3e425c6d54c77f925e8da3ab841a8357c Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-26Reduce verbosity of logging during unit testliamfallon1-1/+1
Logging dialled back in logback.xml files and on ligging statements in unit test java code. Issue-ID: POLICY-2272 Change-Id: I3b9a46d8993b1571c8dc62687a9c136af46c1f51 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-01Resolve mapping between TOSCA policies and APEX policy modelsa.sreekumar3-137/+142
Change-Id: Ifaedc5074bcc51a5d495e342feae89b6a2aac1cf Issue-ID: POLICY-1626 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-09-12Bump version in apex-pdp masterjrh31-1/+1
Also added defaultbranch to the .gitreview file to make it easier to change it when apex-pdp is branched in the future. Issue-ID: POLICY-2045 Signed-off-by: jrh3 <jrh3@att.com> Change-Id: Ib2570fd395aae38862299f2193b07ab06e32ace5
2019-08-07Bump version of apex-pdpjrh31-1/+1
Issue-ID: POLICY-1965 Signed-off-by: jrh3 <jrh3@att.com> Change-Id: Icd437f10c4d991030652ffa1abf48b7b5738145c
2019-07-01Merge "ApexPDP: Adding support to omit the (context) albums entry in an apex ↵Pamela Dragosh2-37/+166
policy model if it is empty. Implemented as a pair of JAXB XMLAdaters Updated copyright, fixed somecheckstyle issues, refactored affected tests & Merge"
2019-07-01ApexPDP: Adding support to omit the (context) albums entry in an apexJohnKeeney2-37/+166
policy model if it is empty. Implemented as a pair of JAXB XMLAdaters Updated copyright, fixed somecheckstyle issues, refactored affected tests & Merge Issue-ID: POLICY-1802 Change-Id: Id68d9a524700f44c164939b7533f2d511b591e36 Signed-off-by: JohnKeeney <John.Keeney@est.tech>
2019-06-28Bump apex-pdp to 2.2.1-SNAPSHOTPamela Dragosh1-1/+1
Released 2.2.0 Issue-ID: POLICY-1737 Change-Id: I144a3c07d3eaf8c53d339eecedf2b3d8d3ce3c7e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>