summaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src/main
AgeCommit message (Collapse)AuthorFilesLines
2021-05-04Merge "Remove GroupValidationResult"Jim Hahn2-5/+8
2021-05-03Remove GroupValidationResultJim Hahn2-5/+8
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 Verma2-17/+45
2021-04-27Support delta policies in apex-pdpwaynedunican2-17/+45
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.tavares2-243/+17
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-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-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 Verma1-4/+0
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-09APEX standalone support for ToscaPolicy formata.sreekumar1-42/+14
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.sreekumar1-24/+18
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-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.32liamfallon7-9/+1
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
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.sreekumar1-8/+15
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 Hahn5-6/+122
2020-01-08Populate the PdpStatistics data in heartbeatshaoqiu5-6/+122
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-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-11-21Apex PDP change to add PDP groupa.sreekumar3-3/+3
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.sreekumar3-58/+153
Change-Id: Ifaedc5074bcc51a5d495e342feae89b6a2aac1cf Issue-ID: POLICY-1626 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
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-pdpjrh32-12/+9
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>
2019-07-01Merge "Remove topic.properties and incorporate into overall properties"Ram Krishna Verma7-91/+18
2019-06-28Remove topic.properties and incorporate into overall propertiesa.sreekumar7-91/+18
1) The properties in the topic.properties file is moved into overall config json file and the topic.properties file is removed. 2) Common parameters such as RestServer and Topic related parameters from policy-common is used. Change-Id: Ifc25185c8f717c95a226b2db25c1a8e96b9bbff9 Issue-ID: POLICY-1744 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-06-28Replace non-Javadoc comments with inheritDocsliamfallon1-4/+2
Copyright headers not changed as this review only amends comments. Issue-ID: POLICY-1791 Change-Id: Icbeb2c6e591b3b160ae102bb67aef2d407924a4d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-21Replace uses of getCanonicalName() with getName() in APEXa.sreekumar2-3/+3
Change-Id: Ifcd8866e65a7bc1238d5a4137f7bad288a5bfb3b Issue-ID: POLICY-1861 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-06-20Enable maven-checkstyle-plugin in apex-pdpa.sreekumar3-23/+22
Enable maven-checkstyle-plugin in apex-pdp/pom.xml to fail the build at warning level. Fix all the existing check style issues in the component. Change-Id: I4de9c1bd9ca5a2876de9086d2d3526cbdc25c080 Issue-ID: POLICY-1732 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-06-14Policy JSON formatting issues in APEXa.sreekumar1-7/+7
In APEX, the policy model currently needs to be escaped, otherwise causes json formatting issues. This is fixed. Change-Id: If9d5043acef0b175494be797fc7acd9c6c4f4494 Issue-ID: POLICY-1839 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-05-07Fix to accomodate recent changes in policy-models-toscaa.sreekumar3-5/+5
Recent change in JpaToscaPolicy require corresponding changes in PDP-A as the code was expecting a simple string earlier. This review contains the changes to fix this Change-Id: I3bbae264800b2c8bb8bdd61eae7b171028a85bc3 Issue-ID: POLICY-1739 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-29Updating the supportedPolicyTypes in config filesa.sreekumar1-1/+1
Changing the supportedPolicyTypes in apex-pdp configuration files to "onap.policies.controlloop.operational.Apex" Change-Id: Ie92d5284fbd80da48318ce7863471876ccb380bb Issue-ID: POLICY-1632 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-25Changes to fix PDP-A not going to ACTIVE statea.sreekumar2-7/+19
PDP-A state will now change to ACTIVE even when the policy list is empty. When the state is ACTIVE and PAP sends a PDP_UPDATE with policies, PDP-A will start executing the policies. Change-Id: Icb5b139939698920d4fa3991dcca33536c6caefc Issue-ID: POLICY-1674 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-16Bug fix as per Jim's commenta.sreekumar1-11/+6
Changing the PdpUpdate already handled check back to previous code. Change-Id: Icc195b5a8609fba8601dc151f62fdaf0c67b7be0 Issue-ID: POLICY-1632 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-16Changes for RestServer support and some sonar fixa.sreekumar15-58/+490
1) Changes to add RestServer to the PDP-A for healthcheck. 2) Adding Junit testcases. 3) Fixing some sonar issues. 4) Fixing checkstyle issues. Change-Id: I03530190c733432d219284dda9d9d4cc32ab0773 Issue-ID: POLICY-1632 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-11Changes for packaging services-onappf and some refactoringa.sreekumar19-49/+81
1) Added the code for packaging PDP-A. 2) Updating the package names. 3) Updating the dependencies in services-onappf. Some dependencies can be removed as they are brought in while packaging. 4) Some other minor changes. Change-Id: Idf62d7854f3435806a9e8aa975138fbfd45e3ea8 Issue-ID: POLICY-1632 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-09Some changes and bug fixes for PdpMessage handlinga.sreekumar5-88/+79
1) Updating pom file of services-onappf to fix dependency related issues. 2) Some changes to accomodate recent updates. 3) Fix for some issues identified during testing. Change-Id: I8150ed9858902ebbe12321a793770df3fdc7e773 Issue-ID: POLICY-1453 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-08Changes to handle PdpUpdate and PdpStateChange messagesa.sreekumar13-185/+705
1) Adding listeners and handlers for PdpUpdate messages. 2) Adding listeners and handlers for PdpStateChange messages. 3) Some changes to accomodate recent changes in the models. 4) Test cases. Change-Id: I66644d94fd2a242738d9b0f78e5d0ece76342057 Issue-ID: POLICY-1453 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-02Changes to send pdp status messagesa.sreekumar9-17/+451
1) Adding handlers to create and send pdp status messages from apex-pdp. 2) Changes to read initial pdp status parameters from configuration file. 3) Adding test cases. Change-Id: Id2d1caa8abc124865a9ef8fbfe4d9f751e4491b5 Issue-ID: POLICY-1452 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-03-26Adding services-onappf module to apex-pdpa.sreekumar8-0/+870
1) Adding services-onappf module to apex-pdp. 2) Following the code base from policy/pap to build the module. 3) Currently PAP is using property & configuration file for bootstrap. Continuing the same in this module as well. 4) Adding relevant test cases. Change-Id: Id9740ea60ae3ecbd88e5d6d3586ee0dde1054cca Issue-ID: POLICY-1452 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>