aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src
AgeCommit message (Collapse)AuthorFilesLines
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>
2020-01-30Remove content section from ToscaPolicy properties in APEXa.sreekumar2-11/+20
Currently APEX specific information is placed under properties|content in ToscaPolicy. Avoid keeping under "content" and keep the information directly under properties. Change-Id: Ic437271c9a2d71104013b5568af5525df4a4bb56 Issue-ID: POLICY-2332 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-01-09Merge "Populate the PdpStatistics data in heartbeat"Jim Hahn7-10/+140
2020-01-08Populate the PdpStatistics data in heartbeatshaoqiu7-10/+140
Apex to populate the PdpStatistics data in every heartbeat sent to PAP Issue-ID: POLICY-2302 Change-Id: I2d3a6c1e8605d53bf754a135980527bd50762abd Signed-off-by: shaoqiu <tim.huang@est.tech>
2019-12-06Merge "Adding native policy type to the config file in APEX"Pamela Dragosh1-1/+10
2019-12-06Merge "Minor changes for new Eclipse checkstyle checks"Pamela Dragosh3-7/+23
2019-12-06Adding native policy type to the config file in APEXa.sreekumar1-1/+10
Change-Id: If8167c837d7d28ec9049b00ff6ca314eb4199930 Issue-ID: POLICY-2279 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-12-05APEX-PDP remove supported policy types from heartbeata.sreekumar2-8/+13
Change-Id: Iafd2e2625cfabd89480ca1807eb1607788b30899 Issue-ID: POLICY-2235 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-12-04Minor changes for new Eclipse checkstyle checksliamfallon3-7/+23
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-26Fixing Junit test cases causing too much logs output during APEX builda.sreekumar2-2/+2
Change-Id: If0ad9c6b3a0f19ff3711d6230eb64e0dca1c1ef1 Issue-ID: POLICY-2272 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-11-21Apex PDP change to add PDP groupa.sreekumar9-4/+36
Change-Id: I6cff921bdc65fe505c0b5e7dba94a6cf9aa3ba91 Issue-ID: POLICY-2234 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-11-14Retaining context in APEX Engine based on policies received in PdpUpdatea.sreekumar2-10/+34
Change-Id: I73fad5bf76ed6b4979f5ab76013f204ea82da30b Issue-ID: POLICY-2215 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-11-01Resolve mapping between TOSCA policies and APEX policy modelsa.sreekumar15-181/+1136
Change-Id: Ifaedc5074bcc51a5d495e342feae89b6a2aac1cf Issue-ID: POLICY-1626 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-08-22update keystorejhh1-0/+0
Issue-ID: POLICY-1988 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I576cf60ef4915f9e79246c42f0dd90710a244f47 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-08-08Change to fix PDP-A incorrectly going into ACTIVE state even during APEX ↵a.sreekumar3-24/+46
engine failure PDP-A goes to ACTIVE state even when the APEX engine failed to start. This is fixed. Change-Id: Iad4b45abf257f68267dd2526a624dc6d882c84af Issue-ID: POLICY-1980 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-07-30Use new addTopic() method in apex-pdpjrh35-32/+18
Replaced ParameterUtils with the use of the new addTopic(TopicParameterGroup) method. Issue-ID: POLICY-1953 Signed-off-by: jrh3 <jrh3@att.com> Change-Id: Ie1952c3bdf6d40834261029141ccb21edcdc1ad7
2019-07-08Fix apex-pdp due to sonar changes in commonjrh32-8/+9
Fixed breakages due to changes made in policy/common to satisfy sonar. Issue-ID: POLICY-1791 Signed-off-by: jrh3 <jrh3@att.com> Change-Id: I79ee847db2fc3c5af992af85b78ccaa587328463
2019-07-02Fix security vulnerabilities in apex-pdpliamfallon1-0/+1
Upgraded the versions of avro, jquery and jgroups to versions in order to remove security vulnerabilities. Issue-ID: POLICY-1074 Change-Id: I412b9c951b061b19e6ae6edacf7b3785d4c7869b Signed-off-by: liamfallon <liam.fallon@est.tech>