aboutsummaryrefslogtreecommitdiffstats
path: root/services
AgeCommit message (Collapse)AuthorFilesLines
2021-07-29Improve APEX logging for irrelevant eventsa.sreekumar1-0/+3
When multiple policies are expecting event on the same topic/endpoint, a lot of event parsing failure log messages are generated unnecessarily. With this change, only a 1 line message will be printed if an event cannot be parsed, and the detailed messages will be available at debug level. Change-Id: If1e7460ef5ed86fd470396f1e2ed8cc3c8af70c4 Issue-ID: POLICY-3499 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-07-12Update pdp statistics to count deploy/undeploy separately.adheli.tavares5-7/+171
Issue-ID: POLICY-3383 Change-Id: Ie9c5c7178c4c4302a0ba63ab42732f7157d302f8 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-06-30Merge "Use unique name in apex-pdp messages"Jim Hahn4-11/+15
2021-06-28Use unique name in apex-pdp messagesJim Hahn4-11/+15
Used name generator for apex-pdp instance id. Issue-ID: POLICY-3410 Change-Id: Ifcb216d45fba7d6b10043f39fcb299daffe86b69 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-28Changes to support multiple outputs from a statea.sreekumar2-4/+6
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-24Update apex-pdp for checkstyle 8.43liamfallon5-8/+6
Issue-ID: POLICY-3206 Change-Id: I3873c85aab577e85a9ae6b610c3871ee4de6ea53 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-06-18Fix Sonar Issues in apex-pdp-services-enginelapentafd16-87/+97
Test refactoring and local-variable type inference replaced Issue-ID: POLICY-3093 Change-Id: I0c5506f27ea53da7740acce87a25060ba2bce7f4 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-05-31Fixing issues around policy deployment in APEXa.sreekumar4-33/+59
Following items are fixed. 1) When in PASSIVE state, any policiesToBeUndeployed received in PDP_UPDATE message are not handled. 2) APEX policy deployment fails when policiesToBeUndeployed and policiesToBeDeployed come together in PDP_UPDATE message from PAP. 3) Improve response messages after deployment/undeployment. Change-Id: I8f9c802db4b19c43881c734570b65ad66b3867d5 Issue-ID: POLICY-3332 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-05-07Merge "Code coverage for Service Engine Event"Jim Hahn4-3/+381
2021-05-07Code coverage for Service Engine Eventarkadiusz.adamski4-3/+381
- Increase code coverage for service engine events Issue-ID: POLICY-3092 Signed-off-by: arkadiusz.adamski <aadamski@est.tech> Change-Id: I40bda05fc53168d86ec4ac1c72b69a1badb02b38
2021-05-07Code coverage for File Carrier Pluginarkadiusz.adamski4-0/+596
- Increase code coverage for file carrier plugin in service engine Issue-ID: POLICY-3092 Signed-off-by: arkadiusz.adamski <aadamski@est.tech> Change-Id: I8c08ee55c9d31792e35a1acc79330c8eef42af56
2021-05-04Merge "Remove GroupValidationResult"Jim Hahn25-900/+451
2021-05-03Remove GroupValidationResultJim Hahn25-900/+451
Removed GroupValidationResult, replacing it with BeanValidationResult. Modified the ParameterGroup subclasses to use BeanValidator, adding annotations where needed to trigger the validations that had been automatically performed by GroupValidationResult. Issue-ID: POLICY-2059 Change-Id: I2c0c01fac355e6cde4d8d6998dc42f8a2e2ebb65 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-28Merge "Support delta policies in apex-pdp"Ram Krishna Verma5-39/+87
2021-04-27Support delta policies in apex-pdpwaynedunican5-40/+88
Remove scanning of policy list from apex engine. Use the policiesToBeDeployed and policiesToBeUndeployed lists from PDP_UPDATE message instead. Issue-ID: POLICY-3170 Change-Id: Icdde66ef87d9feab83ccb1cf99a64d7870bcaaaa Signed-off-by: waynedunican <wayne.dunican@est.tech>
2021-04-22Refactor of command line classesadheli.tavares10-420/+197
ApexCommandLineArguments class to have parse() overriden to keep remainingArgs taking the tosca file without -p. Issue-ID: POLICY-3129 Change-Id: Ib067bf4c32992c4477cb6751f65269c103513d10 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-04-15Code coverage for service engine event packagearkadiusz.adamski12-0/+1049
- Increase code coverage for service engine event package Issue-ID: POLICY-3092 Signed-off-by: arkadiusz.adamski <aadamski@est.tech> Change-Id: Iaed5fc31f242a47dd1dc46f5d5c74c43c720e9ee
2021-04-08APEX-PDP incorrectly reports successful policy deployment to PAPa.sreekumar2-4/+7
Change-Id: I2fbf0303805b4c5feead522ad78fd4ef518659af Issue-ID: POLICY-3173 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-03-29Fix sonar issuesarkadiusz.adamski1-7/+6
- reduce methods Cognitive Complexity from 19 to the 15 allowed in CommandLineParser - iteration replaced with bulk 'Collection.addAll' call - remove redundant initializers - replace try with try-with-resources Issue-ID: POLICY-3093 Signed-off-by: arkadiusz.adamski <aadamski@est.tech> Change-Id: Ia727b3145ef8f63bcfc07723191c85e1ec8c923c
2021-03-23Merge "Fixing issues around deploying APEX policies with duplicate concepts"Jim Hahn1-25/+35
2021-03-22Merge "Delete keystores from apex"Ram Krishna Verma2-4/+4
2021-03-19Fixing issues around deploying APEX policies with duplicate conceptsa.sreekumar1-25/+35
Deploying invalid APEX policies with duplicate concepts resulting in corrupting all the policies in memory. This is fixed here. This entire functionality handling multiple policies will be revisited as part of https://jira.onap.org/browse/POLICY-3018 Change-Id: I751102d5dddcb92cdcede8222855e2f467bb724d Issue-ID: POLICY-3141 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-03-19Delete keystores from apexJim Hahn2-4/+4
The Keystore is no longer needed in the tarball, as it is supplied externally by the CSITs and Helm charts. Deleted that file. Also modified the junits to use utils-test to generates keystores at runtime, thus deleted the junit keystore file, too. Issue-ID: POLICY-3143 Change-Id: I9bb53fcb5887e73d661ec4c4083970630c61e5c1 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-19Fixing parallel event execution problem in APEX-PDP REST layera.sreekumar1-4/+4
Parallel event execution in APEX was resulting in incorrect dynamic REST url. This issue is fixed in this review. Change-Id: Id8a28c001a7fd7915df1f5909109bb369667ab40 Issue-ID: POLICY-3019 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-03-16Update policy-keystore with newer certificatesjhh1-0/+0
Issue-ID: POLICY-3139 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ia67cb1486a5625385a710c5f6c2b4325ca108820
2021-03-12Bump apex-pdp to 2.6.0-SNAPSHOTliamfallon3-3/+3
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.sreekumar3-3/+3
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.sreekumar3-3/+3
Change-Id: I761ded255a97128f858d3a7ce95f2479b6208a4e Issue-ID: POLICY-3088 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-02-19Convert Date to Instant in statsliamfallon1-2/+2
Issue-ID: POLICY-3069 Change-Id: Ib30782485652ec693d2dbea79514183c7cfbb0c4 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-02-18Fix sonars in apex-pdpJim Hahn8-116/+70
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-11Changes related to multi policy handling improvement in APEXa.sreekumar3-133/+141
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.sreekumar8-357/+907
Change-Id: Ic4adf5bd8876dc31fc93993298e90389baaa2c39 Issue-ID: POLICY-2883 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-01-13Avoiding unwanted logging in APEX during event processinga.sreekumar3-26/+7
Change-Id: If0c93bfea08025c6c10e3f4572a14088990f415f Issue-ID: POLICY-2885 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-01-06Merge "Changed identifiers to concept identifiers"Liam Fallon8-56/+55
2021-01-04Changed identifiers to concept identifiersliamfallon8-56/+55
The policy models tosca classes ToscaPolicyIdentifier and ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA concept, not just TOSCA policies so they are renamed to ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion respectively. The class ToscaPolicyTypeIdentifier is redundant and is replaced by ToscaConceptIdentifier. Issue-ID: POLICY-2900 Change-Id: I5df89d023949cdf0f649951dbbd81a0b30f44ef6 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-12-17Prune superfluous log and exception messagesgregory.hayes5-31/+39
Large volume exception messages should not be repeated in log messages or in rethrown exceptions. Jira-Link: https://jira.onap.org/browse/POLICY-2885 Issue-ID: POLICY-2885 Signed-off-by: gregory.hayes <gregory.hayes@est.tech> Change-Id: I345531d3a7640cc5ad9dbfc367052b9c8cc19387
2020-10-27Bump apex-pdp master to 2.5.0-SNAPSHOTRam Krishna Verma3-3/+3
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.sreekumar3-3/+3
Change-Id: I5e2cd92ee3620dea4070d9fa3aeb5ffd65f9412c Issue-ID: POLICY-2869 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-10-16Merge "Remove apex asciidoc documents"Jim Hahn4-339/+0
2020-10-16Remove apex asciidoc documentsliamfallon4-339/+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 Verma3-3/+3
Issue-ID: POLICY-2839 Change-Id: Ia7c847b3dafd28958d5df209af95cac19fa480a0 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-10-05Remove legacy operational policy type from apex-pdpRam Krishna Verma5-8/+40
The legacy operational policy type for apex has been removed in Guilin release. Removing it fron supported policy type and other places in apex-pdp. Issue-ID: POLICY-2857 Change-Id: I41d58bf7e82292e11ff752f61dbe9be96a8a7af4 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-09-28Fixing APEX eventName handling to avoid duplicate requestsa.sreekumar1-26/+48
Change-Id: I6ee50fb455424ae1f241b7a12d1cdbf0e6ee4011 Issue-ID: POLICY-2815 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-09-24update default keystoresjhh1-0/+0
Issue-ID: POLICY-2827 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I7cde8197621ccc3d366baab952243c7b7894a29b
2020-09-17Cleanup related to removal of legacy format support in APEXa.sreekumar2-3/+1
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.sreekumar3-3/+3
Change-Id: Idde5050b425eb1bebe312e80e795c21513367a1b Issue-ID: POLICY-2789 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-09-09APEX standalone support for ToscaPolicy formata.sreekumar76-2884/+4275
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>
2020-09-04Remove client code from apex-pdpliamfallon10-1258/+39
Removal of the deployment and monitoring client from the apex-pdp as the functionality is replaced by the Policy Framework deployment using PAP and the Policy Framework monitoring GUI. Code in the engine proper that was used to administer apex-pdp over the Web Socket port is also removed, as this code was only used by the apex-pdp legacy GUIs. Issue-ID: POLICY-2621 Change-Id: Ib9fc4a667a4bc79377bb7b82fae6a2bd520a3e3d Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-09-03Clean up warnings and SONAR issuesliamfallon3-109/+93
Issue-ID: POLICY-2654 Change-Id: Ifd391ea9141d37cfd3ca4110d66c667962230ae1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-08-24Correct directory permission check in apexliamfallon1-19/+27
Apex checked if the current directory is writable when it starts, it is corrected to just check that the directory is readable and executable. Issue-ID: POLICY-2791 Change-Id: I794f836cabfde0f6f78392b3c9e1de364d76e5f6 Signed-off-by: liamfallon <liam.fallon@est.tech>