aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src
AgeCommit message (Collapse)AuthorFilesLines
2024-02-09Remove Dmaap from apex-pdprameshiyer276-37/+37
Issue-ID: POLICY-4402 Signed-off-by: rameshiyer27 <ramesh.murugan.iyer@est.tech> Change-Id: I76c284b6ff7ec0ce77189f3f2bc93d5b91d4eb24
2023-12-18Change PDP topic to lower case for kafka compabilityadheli.tavares1-6/+5
Issue-ID: POLICY-4402 Change-Id: I77fee1d194f884022b42094838b96070c3eda663 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-10-12Remove AAF references from apex-pdp.adheli.tavares2-45/+5
Issue-ID: POLICY-4592 Change-Id: I1e546879ef217d1100659e1cf18a8fcf5d8fb4c9 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-09-22Java 17 Upgradeadheli.tavares3-43/+17
Updated dependencies to latest versions Made Java 17 changes Moved apex dependencies versions to main apex pom Issue-ID: POLICY-4675 Change-Id: Ia5cd5670a1f024f5402cbd7371162ce3313930ef Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-07-17Remove db based statistics from apex-pdpRam Krishna Verma1-90/+1
Removing the db based statistics feature from apex-pdp in lieu of Prometheus based one. Issue-ID: POLICY-4109 Change-Id: Ia20adf5b59c56681669d55c98e409269cd4f53c1 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2023-01-31Upgrade and clean up dependenciesliamfallon2-7/+11
- Upgrade Hibernate - Upgrade Mockito - Upgrade Mockserver - Remove Powermock (no longer supported) and replace with spring-test ReflectionTestUtils - Upgrade Spring Framework - Add spring-security to allow authentication on unit tests using MockMVC Minor clean-up - Replace deprecated authorization configuraiton on spring boot applications with SecurityFilterChain bean - Change @LocalPort include on tests to use test include rather than runtime include - Remove unused imports - Remove unused constants and variables - Add deprecation annotations where required Issue-ID: POLICY-4482 Change-Id: Ie004dcc5303e92f6e2c2154967c3537b91868dd5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-04-08Fix wrong APEX-PDP behaviour during state changea.sreekumar1-1/+5
When a policy is deployed & undeployed, and then on doing PDP_STATE_CHANGE to passive and then active, previously undeployed policies are taken from memory and tried to be deployed. Any undeployed policies should be cleared from the engine memory. This is fixed here. Change-Id: I8f6fbc64d29bd8d89e906376d0770d375ffd8b82 Issue-ID: POLICY-4087 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2022-03-31Bug fixes for APEX PDP metricsRashmi Pujar1-9/+10
1. APEX engine metrics were being initialized to 0 in the constructor which caused them to reset to 0. Hence, initialization is removed, and updates are done to metrics only upon: engineStart/Stop, executionEnter/Exit stages. 2. APEX engine Uptime was only updated when engine stopped, hence always 0. Also, uptime is redundant since it can be derived from lastStart timestamp and hence is removed as a metric. 3. Fixed a corner case bug which occurs when all policies are undeployed the counters are not correct. 4. Fix Unit tests Issue-ID: POLICY-4044 Signed-off-by: Rashmi Pujar <rashmi.pujar1@bell.ca> Change-Id: I4d875ff288cf8c242a1851eb105e56dc69b97883
2022-03-23Account for batch deploy/undeploy in apex app metricsRashmi Pujar2-18/+58
Batch deploy/undeploy operations will now increment pdpa_policy_deployments_total counter by the total number of policies as present in the request. Issue-ID: POLICY-4043 Signed-off-by: Rashmi Pujar <rashmi.pujar1@bell.ca> Change-Id: I9ea34d11f5952213b9e72d121ab85dcbd0b8dfc9
2021-09-02Fix sonar security issues in apex-pdpJim Hahn1-1/+2
Fixed sonar security issues: - set permissions of temporary files Issue-ID: POLICY-3093 Change-Id: I1dfc87f22975fa950cfcfc47196fad55d6cbf277 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-27Address more sonars in apex-pdpJim Hahn9-49/+52
Fixed services-engine thru utilities. Fixed: - use "var" - use Files.delete() - only one method call in assert() Issue-ID: POLICY-3093 Change-Id: I6f62108c770c15e8b84bc51746066fefa409e0fc Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-24Use CompareToBuilderJim Hahn3-8/+3
Also added lombok to test classes. Issue-ID: POLICY-3391 Change-Id: I9ecf479f3861a2e5211b037e885029d1719b6a56 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-23Fix junits broken by change in is-alive typeJim Hahn1-1/+3
Issue-ID: POLICY-3531 Change-Id: I1460333fdd2ebeb96aaa3b5d3186d2bd1eda2d71 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-23Enable prometheus by default in apex-pdpa.sreekumar1-2/+3
Change-Id: I0f0742474a5b242ebe71c0e5ab62bc2b1d0de1b9 Issue-ID: POLICY-3538 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-08-18Use common RestServer in apex-pdpa.sreekumar2-155/+7
Change-Id: I8e0089cdd16f8e5f8db70db9c678fb598521158b Issue-ID: POLICY-3539 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-08-02Use lombok annotations in apex-pdpJim Hahn4-39/+19
Updated projects: services-engine through utilities Issue-ID: POLICY-3391 Change-Id: I35ebb40d86e9bda360f7819516290b3fea88335c Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-12Update pdp statistics to count deploy/undeploy separately.adheli.tavares3-6/+33
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.sreekumar1-2/+3
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.43liamfallon1-1/+0
Issue-ID: POLICY-3206 Change-Id: I3873c85aab577e85a9ae6b610c3871ee4de6ea53 Signed-off-by: liamfallon <liam.fallon@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-04Merge "Remove GroupValidationResult"Jim Hahn5-35/+34
2021-05-03Remove GroupValidationResultJim Hahn5-35/+34
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.tavares6-257/+88
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-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-23Merge "Fixing issues around deploying APEX policies with duplicate concepts"Jim Hahn1-25/+35
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-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-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 Hahn1-4/+4
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.sreekumar1-71/+87
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-28/+175
Change-Id: Ic4adf5bd8876dc31fc93993298e90389baaa2c39 Issue-ID: POLICY-2883 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-01-04Changed identifiers to concept identifiersliamfallon5-27/+26
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-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-24update default keystoresjhh1-0/+0
Issue-ID: POLICY-2827 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I7cde8197621ccc3d366baab952243c7b7894a29b
2020-09-09APEX standalone support for ToscaPolicy formata.sreekumar3-48/+22
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-08-18Changes to make APEX container crash with non zero exitCodea.sreekumar2-39/+39
Change-Id: I1d36c28cfb07881ebede1cf918140397b076512c Issue-ID: POLICY-2753 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-08-13SONAR fixes - log formattingwaynedunican1-1/+3
Fixed the sonar issues relating to Printf format being used for logging instead of String concatenation Issue-ID: POLICY-2773 Change-Id: I38db8d1df077fd7102f6c4f9b33685f2914bd624 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-27SONAR assertions apex-pdpwaynedunican2-2/+7
Ensure assertions are present in test cases Issue-ID: POLICY-2706 Change-Id: I3673a7668564401d2136450b0bdd7a013605dd7c Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-21Fix assertTrue in apex-pdp/model apex-pdp/plugins, apex-pdp/services and ↵JvD_Ericsson1-3/+4
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-15Replace try/catch with assertjwaynedunican1-38/+17
Replaced try/catch blocks with assertj assertions in apex-pdp. Last batch of changes Issue-ID: POLICY-2451 Change-Id: I39bd02fdbd8389818dcf1b786189c1e344ddcea5 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-06-25Fixing error with Main class name usage in APEXa.sreekumar1-2/+2
Change-Id: I0da222e592e6e29f0afca4a1515d8f126fe91cbb Issue-ID: POLICY-2623 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-06-19Changes for checkstyle 8.32liamfallon17-23/+2
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-17renew policy certs till 03/17/2021jhh1-0/+0
Issue-ID: POLICY-2402 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I6bd157d80a0aa1604e634ec561ee76e8197e97df
2020-03-05Fixing SONAR bug + code smelladitya.puthuparambil2-3/+1
Change-Id: If76ddc860b67e0d8dcd4c48bacb5436ffc773faa Issue-ID: POLICY-1913 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech>
2020-02-03Adding Tosca compliant operational policy type to default config file for ↵a.sreekumar1-0/+4
apex-pdp Change-Id: I6de1fd31c2e73814a546b05ee71419fded4a3357 Issue-ID: POLICY-2147 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>