aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-engine
AgeCommit message (Collapse)AuthorFilesLines
2020-07-24APEX changes to support policy disable/enable and some improvementsa.sreekumar3-42/+74
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-21Fix assertTrue in apex-pdp/model apex-pdp/plugins, apex-pdp/services and ↵JvD_Ericsson1-1/+1
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-16Merge "Replace try/catch with assertj"Pamela Dragosh11-1437/+989
2020-07-15Replace try/catch with assertjwaynedunican11-1437/+989
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-07-13Remove old documentation from buildliamfallon8-205/+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-07-06Fix URL checking on REST pluginsliamfallon1-17/+17
The URL parameter must always be provided on the REST client carrier plugin The URL parameter must always be provided on the REST requestor consumer The URL parameter is not required on the REST requestor producer This patch fixes the implementation to always checks the URL for existence on the REST Client plugin. The current checks on the REST Requestor are correct for the REST requestor plugin consumer and producer classes, so the checks are not required in the REST Requestor parameters. Issue-ID: POLICY-2692 Change-Id: I4e1534202002cf4a03bd159ac97b2a4f5b1746ab Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-07-01Fixing ConcurrentModificationException during multiple policy deployment in APEXa.sreekumar1-24/+34
Change-Id: Ib39e798d733727bdc676755b66adf2c499e618af Issue-ID: POLICY-2655 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-06-19Changes for checkstyle 8.32liamfallon50-81/+15
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-06-12Improve robustness of unit testinghuaxing2-22/+25
Issue-ID: POLICY-2630 Signed-off-by: huaxing <huaxing.jin@est.tech> Change-Id: I6475f9272c1a770836af537c13b23e486b66ac3e
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-04-06Fix intermittent unit test failures WebSocketliamfallon2-7/+15
The Web Socket server is marked as started before the start process has complted. This change fixes that issue. Issue-ID: POLICY-1470 Change-Id: I5b5ef5832893d884a6551b0516df91cb71d6c622 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-04-05Fix intermittent unit test failures reseterquestorliamfallon1-32/+49
When consumers and producers are paired as in the case of the REST Rquestor, both sides must come up and be wired together in the initiation phase of apex-pdp before the consumers and producers start handling envents. In the ApexActivator class, the consumers were started immediately after they were initialized meaning that a consumer could return events to a producer that had not started yet. This change fixes the ApexActivator so that it waits until all consumers and producers are initialized before starting event handling. It also fixes the timings on RestRequestor tests and tidies up the unit tests. Issue-ID: POLICY-2469 Change-Id: Ib66d9531bf21f2a879ab33795aded4f48e7bfbc6 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-04-02Fix hanging timeout on Executor testliamfallon1-15/+15
Issue-ID: POLICY-2106 Change-Id: I7bd44f8dfe349d73a4c8c4f978a30b455c45b2c7 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-25Bump policy-apex-pdp to 2.3.1-SNAPSHOTa.sreekumar1-1/+1
Change-Id: I59b93fccb0f3a41f8db753d1e8e2978bbb51e9a0 Issue-ID: POLICY-2378 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-03-11Fix minor checkstyle/eclipse warningsliamfallon2-16/+10
Some minor checkstyle and eclipse warnings have crept into the code in the last few weeks. This review cleams them up. Issue-ID: POLICY-1913 Change-Id: Ib5f103bc28c71a6c4db05ea05719eff41bb38914 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-04replace test sleep() with awaitality packageHenry.Sun1-32/+16
Signed-off-by: Henry.Sun <henry.a.sun@est.tech> Change-Id: I305771ddef42bd3032ad52f4c5ecd55b01ed5a1a Issue-ID: POLICY-1914 Signed-off-by: Henry.Sun <henry.a.sun@est.tech>
2020-02-26Merge "Fix Java 11/Checkstyle/Sonar warnings"Jim Hahn12-171/+153
2020-02-26Fix Java 11/Checkstyle/Sonar warningsliamfallon12-171/+153
A number of Java 11, checkstyle, and SONAR warnings have crept into the Apex codebase over the last number of reviews. This change fixes those issues. Issue-ID: POLICY-1913 Change-Id: I2afd607e80f48323355380fb2fe5e048e18879f9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-25remove duplication code in plugins-event producerning.xi2-43/+81
Issue-ID: POLICY-1884 Change-Id: I7774dfdc7d7edcc0409a817bfd21ddacec21d085 Signed-off-by: ning.xi <ning.xi@est.tech>
2020-02-24Merge "remove code duplication in plugins"Ram Krishna Verma1-0/+76
2020-02-24Merge "remove code duplication in plugin-event-carrier"Ram Krishna Verma1-0/+277
2020-02-21remove code duplication in pluginsshaoqiu1-0/+76
Remove consumer code duplication in plugins-event-carrier Issue-ID: POLICY-1884 Signed-off-by: shaoqiu <tim.huang@est.tech> Change-Id: I2d222436a97224e54a03c2501f4dc14d3f5f6ac0
2020-02-20Passing taskParameters from ApexConfig to policy logica.sreekumar1-3/+36
TaskParameters can be used to pass parameters from ApexConfig to the policy logic. In the config, these are optional. Usage as below: { "engineParameters": { "taskParameters": [ { "key": "ParameterKey1", "value": "ParameterValue1" }, { "taskId": "TaskIdVal", "key": "ParameterKey2", "value": "ParameterValue2" } ] } } In the taskLogic, taskParameters can be accessed as below: eg: executor.parameters.get("ParameterKey1")) If taskId is provided in ApexConfig for an entry, then that parameter is updated only for that particular task. Otherwise, the task parameter is added to all tasks. Change-Id: I9e1b3d3697428309e7d86db40b63ffe822935b69 Issue-ID: POLICY-2364 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-02-20remove code duplication in plugin-event-carrierning.xi1-0/+277
Issue-ID: POLICY-1884 Change-Id: I610d7ee34d640cc3a7d3381b24993ee9b6f76f2d Signed-off-by: ning.xi <ning.xi@est.tech>
2020-01-23Remove apex-pdp TextFileUtils classliamfallon5-133/+139
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>
2020-01-23Run apex-pdp in Java 11: base changesliamfallon2-129/+122
This change brings in the minimum changes to get apex-pdp running in Java 11. Other reviews will bring in changes to remove Java 11 warnings and to convert apex-pdp Javascript handling from the now deprecated nashorn engine. Issue-ID: POLICY-1581 Change-Id: I879bbae08d4e67aca3f1bfeedeca639d8dbbc281 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-09Merge "Populate the PdpStatistics data in heartbeat"Jim Hahn8-25/+297
2020-01-08Update vCPE example to use Avro schemasliamfallon1-0/+42
THis change updates the vCPE example to show how the example can work towards the APPC using Avro schemas only. This means that Policies can be adapted to changes in controller APIs using Avro alone. This example works with the old and new format policy-models. Issue-ID: POLICY-2043 Change-Id: I42ac0eac5203eaa37316cf6c460c67f7e8d6deb2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-08Populate the PdpStatistics data in heartbeatshaoqiu8-25/+297
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-04Minor changes for new Eclipse checkstyle checksliamfallon12-213/+222
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-28Replace getCaononicalName() with getName() in code baseliamfallon7-68/+74
Issue-ID: POLICY-1861 Change-Id: Iccbdcbc5b5978305c56ab74c01a52a562697bee1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-14Retaining context in APEX Engine based on policies received in PdpUpdatea.sreekumar5-69/+176
Change-Id: I73fad5bf76ed6b4979f5ab76013f204ea82da30b Issue-ID: POLICY-2215 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-11-07Fix vCPE example apex-pdp policyliamfallon1-14/+14
The changes in policy-models for appclcm had knock-on impacts on the apex-pdp example policies. This patch fixes the vCPE policy to comply with the new APPCLCM POJOs. Issue-ID: POLICY-2043 Change-Id: Ieebc2cf97a05efde560a2f5a819924ff63dfd695 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-01Resolve mapping between TOSCA policies and APEX policy modelsa.sreekumar6-140/+340
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-08Change to fix PDP-A incorrectly going into ACTIVE state even during APEX ↵a.sreekumar1-4/+13
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-08-07Bump version of apex-pdpjrh31-1/+1
Issue-ID: POLICY-1965 Signed-off-by: jrh3 <jrh3@att.com> Change-Id: Icd437f10c4d991030652ffa1abf48b7b5738145c
2019-07-10Add integration tests for executor propertiesliamfallon5-10/+15
Added integration test that sets properties in a dummy plugin and amends them in tasks in a policy. Variosu tests added to check combinations of where properties are set in plugins or in tasks or both. Implementaiton changed to: - Always pass in a Properies object, the properties object coming into the policy cannot be null because the task/TSL/SFL may wish to set it - Fix a bug where the properties were not passed from the ApexEvent to the engine event in the ApexEventUnmarshaller class Issue-ID: POLICY-1743 Change-Id: I6aa152b28d46cf3cc6fa56a1a95b76a8e55f5a49 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-07-02ApexPDP: Fixed jenkin failure in NordixJohnKeeney1-18/+32
getLocalHost() fails in Nordix jenkins test build - misconfiguration of nordix jenkins vms/containers Change-Id: I726fc141ced07f15cfaa8a9815b4d090dbb74c9a Issue-ID: POLICY-1879 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>
2019-06-28Replace non-Javadoc comments with inheritDocsliamfallon33-606/+266
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-27Add period after inheritDoc for Sonarliamfallon4-18/+22
Issue-ID: POLICY-1791 Change-Id: I60f65fb60ca77fe97bd1c23822038b835bd98a11 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-26Add passthrough properties for APEX engineliamfallon14-314/+190
APEX event receiver and sender plugins sometimes need to exchange information with tasks, especially in the case of REST communication. This change enables passthrough of Properties from the event carrier technology plugins to APEX task, task selection, and state finalizer logics. Apologies for the size of the review but this change involves passinng the properties through all the APEX components, hence the large number of small changes. Issue-ID: POLICY-1742 Change-Id: I219fd69550f06702ef64adbb165fe7baac422e96 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-21Replace uses of getCanonicalName() with getName() in APEXa.sreekumar12-37/+36
Change-Id: Ifcd8866e65a7bc1238d5a4137f7bad288a5bfb3b Issue-ID: POLICY-1861 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-06-19Fix junit tests in apex-pdpliamfallon4-313/+290
Sonar fix broke some of the junit tests for parameters; fixed those. Issue-ID: POLICY-1791 Change-Id: If39472b9936d5312a1d4109ad83610f5913d3e34 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-05-30Bump apex-pdp to version 2.2.0Jim Hahn1-1/+1
Issue-ID: POLICY-1747 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Iba1c6a80917a37cc63e2250a32df40046df9ee4f
2019-05-16Step snapshot version of apex-pdpliamfallon1-1/+1
Issue-ID: POLICY-1630 Change-Id: I6dfce7eb33d9bc41caabf6b8842377b486de672d Signed-off-by: liamfallon <liam.fallon@est.tech>