aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src
AgeCommit message (Collapse)AuthorFilesLines
2020-07-06Fix URL checking on REST pluginsliamfallon1-32/+0
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-06-19Changes for checkstyle 8.32liamfallon8-13/+0
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-04-06Fix intermittent unit test failures WebSocketliamfallon1-4/+4
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 reseterquestorliamfallon7-276/+168
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 testliamfallon9-40/+30
Issue-ID: POLICY-2106 Change-Id: I7bd44f8dfe349d73a4c8c4f978a30b455c45b2c7 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-09Use Rhino javascript executor in apex-pdpliamfallon2-13/+14
Integation unit tests resultd in StackOverflowException errors in the Graal Javascript interpreter. Following extensive testing and trouobleshooting, it proved very difficult to fix these issues in Graal as the stck overflow errors were occurring in native class instantiation methods being invoked by Grall on the JVM. The alternative Rhino Javascript engine is developed by mozilla, and was incorporated into the Java 6 JVM and evolved into Nashorn in the Java 8 JVM. Oracle dropped Nashorn in Java 11. However, in parallel, Rhino development has continued. This review brings in the Rhino javascript engine into apex-pdp as the replacement for Nashorn and instead of Graal. Graal seems to be pretty unstable as yet so we may bring it in in future releases but for now Rhino is a more stable and reliable alternative. Issue-ID: POLICY-2106 Change-Id: I0edeff3b0bee404b38e3ebe22001a6e3375a44dc Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-04Merge "replace test sleep() with awaitality package"Liam Fallon2-6/+6
2020-03-04replace test sleep() with awaitality packageHenry.Sun2-6/+6
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-03-01Switch apex to Graal javascript engineliamfallon2-7/+4
This is the main review to switch out the Nashorn Javascript interpreter and switch in the Graal javascript interpreter for apex Javascript tasks. The Graal Javascript dialect differs slightly from Nashorn in the way it accesses information passed over from the Java world so Javascript tasks need to be converted. Subsequent reviews will convert the JUnit tests marked @Ignore in previous reviews to this one and will convert the Javascript tasks into a format Graal can handle. Subsequent reviews will also convert the examples over to Graal format. Issue-ID: POLICY-2106 Change-Id: Ief582a36539e8a87724c17fb7e56864d5e471c07 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-26Merge "Fix Java 11/Checkstyle/Sonar warnings"Jim Hahn1-25/+6
2020-02-26Fix Java 11/Checkstyle/Sonar warningsliamfallon1-25/+6
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.xi1-39/+4
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-52/+3
2020-02-21remove code duplication in pluginsshaoqiu1-52/+3
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-20remove code duplication in plugin-event-carrierning.xi2-170/+12
Issue-ID: POLICY-1884 Change-Id: I610d7ee34d640cc3a7d3381b24993ee9b6f76f2d Signed-off-by: ning.xi <ning.xi@est.tech>
2019-11-28Replace getCaononicalName() with getName() in code baseliamfallon1-2/+2
Issue-ID: POLICY-1861 Change-Id: Iccbdcbc5b5978305c56ab74c01a52a562697bee1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-01Add common Jersey versionliamfallon1-1/+0
Add a common version of Jersey for all Policy Framework components. Issue-ID: POLICY-2209 Change-Id: I6282bc9938cbb63ddf3bf85e488f7b6be0dbdfc3 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-01Resolve mapping between TOSCA policies and APEX policy modelsa.sreekumar1-13/+12
Change-Id: Ifaedc5074bcc51a5d495e342feae89b6a2aac1cf Issue-ID: POLICY-1626 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-10-16replace grizzly server with policy common endpointHenry.Sun1-24/+31
Issue-ID: POLICY-1915 Change-Id: I8702a8b54e158dfd0ac08140ca083f14f23963a2 Signed-off-by: Henry.Sun <henry.a.sun@est.tech>
2019-08-21Fix checkstyle warnings in apex-pdpliamfallon5-56/+46
Unit tests introduced some checkstyle warnings, this review resolves those warnings. Issue-ID: POLICY-1942 Change-Id: I16438621c1db0adfbe70bc8b237d05bd7cc72697 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-07-12add status filter in restclient and restrequestorHenry.Sun10-206/+338
Issue-ID: POLICY-1742 Change-Id: Ib4984b18c0353cddb12c13c352277728be691bf5 Signed-off-by: Henry.Sun <henry.a.sun@est.tech>
2019-07-12fix sonar issues in restclient/restrequestning.xi1-10/+8
Issue-ID: POLICY-1743 Change-Id: I2bd2224904e459d56f5802e8b5276823e7f5d454 Signed-off-by: ning.xi <ning.xi@est.tech>
2019-07-11Merge "Make URL configurable in REST Requestor/Client"Jim Hahn7-22/+231
2019-07-11Make URL configurable in REST Requestor/Clientning.xi7-22/+231
Change-Id: Ifb9870636996d1af786f05fcef7aa811d6f57532 Issue-ID: POLICY-1743 Signed-off-by: ning.xi <ning.xi@est.tech>
2019-07-10Add integration tests for executor propertiesliamfallon1-1/+2
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-06-28Replace non-Javadoc comments with inheritDocsliamfallon3-61/+28
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-26Add passthrough properties for APEX engineliamfallon3-8/+10
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-02-05Fix bug with Apex rejecting HTTP 2xx responsesliamfallon1-1/+1
APEX rejects all HTTP responses except 200. This change accepts any HTTP 2xx response code as a valid response. Issue-ID: POLICY-1289 Change-Id: Ief681ba4dac1ef3ff5f257dd931569bd2274d017 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-11Add period after inheritDocliamfallon1-1/+1
Issue-ID: POLICY-1074 Change-Id: I88dc888b2a374b38499241f578a36dd116e2b85b Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-11Remove unused parameter from test dataliamfallon12-28/+9
The "restRequestTimeout" parameter is not used in the current version of Apex, it was replaced by the "requestorTimeout" paramter. However, the parameter remained in the JSON data files. Also updated to improve output of messages during unit test. This review also sets the Jersey injection dependendy scope to "test" Issue-ID: POLICY-1074 Change-Id: I75f495f571c8101310bd1eaec01a305318346cd9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-04Support HTTP headers in REST Requestorliamfallon15-24/+1092
Change-Id: Iea4211e7d3324f5ea6244f45c91241a4067d8d33 Issue-ID: POLICY-1222 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-11-20Rename test classes in apex-pdpParshad Patel2-4/+4
Make test classes name consistence under auth, model, plugins, testsuits, tools projects Issue-ID: POLICY-1263 Change-Id: I49ec9a9f5b457d6381e693de2c04ec0268ad1b02 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-11-07Refactor unit test dataliamfallon13-7213/+1328
There were many copies of test policies and examples strewn through the Apex unit tests. This change cleans up the unit tests so that a single version of all example policies is used in all tests. Also added a new relative file root command line parameter to Apex to allow the root of relative paths in configuration files to be set. Apologies for the size of this review but unfortunately all of this must be done in one shot. Issue-ID: POLICY-1252 Change-Id: Ibbb18fbf18e3897a1c61301d0a65e62bc643a0e9 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-14Fix exception not logged or rethrownliamfallon1-1/+1
Eclipse sonarlint does not check for exception dropping by default, it must be configured. This commit addresses exception dropping in apex. Change-Id: I406838990b3424c2912124b25d7326502cacc96c Issue-ID: POLICY-1034 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-13Sonar/Checkstyle in service/pluginsliamfallon13-91/+258
Sonar and Checkstyle changes in plugins and services, and knock on changes Issue-ID: POLICY-1034 Change-Id: Iff7df74e54fce2c661dcc2fae75ae93d4cacfe5b Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-07Parameter group fields must have gettersliamfallon6-19/+19
Modifications to apex parameters to include getters that follow naming conventions, and knock on changes. Also checkstyle fixes taken in modifified classes. Issue-ID: POLICY-1095 Change-Id: Iff5ccc7a069a4ec2b2b974ed9f5ed70a88692e00 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-08-31Use parameter service in apexliamfallon2-12/+2
Switch parameter handling in apex to use the ONAP PF common parameter service Change-Id: Id318d19c726b18b1a69c630fa81ca7d695355e9c Issue-ID: POLICY-954 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-08-05Adding Apex docs for Plugins moduleDinh Danh Le5-0/+229
Change-Id: Icf68473b472a5896972de5b07b275682a77a1c9f Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com> Issue-ID: POLICY-867
2018-06-11Fixing sonar bugswaqas.ikram1-17/+11
Change-Id: I05a81755ce132810c9535babb7bae5b9b9e0bd60 Issue-ID: POLICY-859 Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>
2018-06-08Adding plugins-event module to apex-pdpramverma17-0/+8757
Adding plugins-event module to apex-pdp Fix a minor bug in TextFileUtils Change-Id: I393c5f5809d078850d6669d22759ba9fa1b4f0e6 Issue-ID: POLICY-862 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>