aboutsummaryrefslogtreecommitdiffstats
path: root/examples
AgeCommit message (Collapse)AuthorFilesLines
2020-03-25Bump policy-apex-pdp to 2.3.1-SNAPSHOTa.sreekumar11-20/+20
Change-Id: I59b93fccb0f3a41f8db753d1e8e2978bbb51e9a0 Issue-ID: POLICY-2378 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-03-24Launch separate threads for Javascript task executionliamfallon2-16/+16
When a policy is loaded, a separate thread is spawned for each Javascript script executor. This allows us to precompile the Javascript scripts and also to have a larger stack available for script execution. Issue-ID: POLICY-2106 Change-Id: I97323aafb623ba537ac1889b3c9504b345b4f67e Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-23Adding example for APEX gRPC plugin for CDS interactiona.sreekumar30-4/+1998
Change-Id: I8361eb0cbe74c3548ca98f3005bc37f5a1f91747 Issue-ID: POLICY-2436 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-03-19Apex-pdp tutorial documentation changesaditya.puthuparambil5-30/+39
Issue-ID: POLICY-2424 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: I92491c904b65a0db93c9e6eaba676c653c276175
2020-03-11Fix minor checkstyle/eclipse warningsliamfallon2-3/+4
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-11Convert examples to Rhino Javascript formatliamfallon48-3751/+364
All examples are converted to Rhino Javascript from Nashorn Javascript. Issue-ID: POLICY-2106 Change-Id: Ia6fec5b57b1e6131799b4b069968e4766ce54c96 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-11Merge "Sonar Security vulnerabilities fix"Ram Krishna Verma1-23/+33
2020-03-11Adapt vCPE example for Rhino Javascriptliamfallon26-104/+146
Minor changes to Javascript source for execution under the Rhino script engine. Issue-ID: POLICY-2106 Change-Id: Ib7e30ce0067a11ea1bb3ca8d197c796dba9ea091 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-11Sonar Security vulnerabilities fixaditya.puthuparambil1-23/+33
Issue-ID: POLICY-1913 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: Ic86e04776c9300e37134210cd9db5b6d7e6a5a9e
2020-03-09Use Rhino javascript executor in apex-pdpliamfallon12-103/+93
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-04replace test sleep() with awaitality packageHenry.Sun5-31/+31
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-26Fix Java 11/Checkstyle/Sonar warningsliamfallon4-30/+43
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-01-30Remove content section from ToscaPolicy properties in APEXa.sreekumar1-2/+0
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-23Remove apex-pdp TextFileUtils classliamfallon2-6/+7
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 changesliamfallon5-188/+69
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-08Update vCPE example to use Avro schemasliamfallon50-62/+2689
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>
2019-12-04Minor changes for new Eclipse checkstyle checksliamfallon1-3/+6
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 baseliamfallon4-15/+20
Issue-ID: POLICY-1861 Change-Id: Iccbdcbc5b5978305c56ab74c01a52a562697bee1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-26Reduce verbosity of logging during unit testliamfallon4-7/+7
Logging dialled back in logback.xml files and on ligging statements in unit test java code. Issue-ID: POLICY-2272 Change-Id: I3b9a46d8993b1571c8dc62687a9c136af46c1f51 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-25Update vCPE example for A&AI custom queryliamfallon19-615/+375
The change in policy-models to use custom queries means that the named queries used in apex examples must be updated to use custom queries. This review is the second of two reviews to implement this change. This patch updates the policy and its associated tests to work with A&AI custom queries. Issue-ID: POLICY-2125 Change-Id: I6a5b90002e43272e3cf296158f09f91a0f6d6907 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-21Update vCPE example for A&AI custom queryliamfallon3-36/+3914
The change in policy-models to use custom queries means that the named queries used in apex examples must be updated to use custom queries. This review is the first of two reviews to implement this change. I thcnages the A&AI simulator, which will allow the apex-pdp to build again. A further change will bring in the policy changes to get the example implementation fixed. Issue-ID: POLICY-2125 Change-Id: I833c351b43995e648288cdf1c87c0abbe7a671cc Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-14Retaining context in APEX Engine based on policies received in PdpUpdatea.sreekumar4-12/+15
Change-Id: I73fad5bf76ed6b4979f5ab76013f204ea82da30b Issue-ID: POLICY-2215 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-11-07Fix vCPE example apex-pdp policyliamfallon10-89/+82
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-04Use jersey dependencies from policy-endpointsliamfallon4-29/+0
There is no need to have Jersey dependencies in the PDP POMs as they are inherited from the policy-endpoints POM. Issue-ID: POLICY-2209 Change-Id: I5c53e7b29f4df25fd730f7a521e149e4ee70d964 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-11-01Add common Jersey versionliamfallon4-6/+2
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-10-31Use updated APPC model code in apex vcpe exampleliamfallon2-21/+33
The APPC implementation was changed in a recent review, this review fixes the apex vcpe example to use this new model. Also fixes an an issue in the CLI editor where escape characters are not now required in example JSON. Issue-ID: POLICY-2043 Change-Id: Id251948c9de27f73ba48cec498e68a43f71c4062 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-16replace grizzly server with policy common endpointHenry.Sun2-20/+25
Issue-ID: POLICY-1915 Change-Id: I8702a8b54e158dfd0ac08140ca083f14f23963a2 Signed-off-by: Henry.Sun <henry.a.sun@est.tech>
2019-10-02Add example for creating apex policy in Tosca formata.sreekumar3-0/+311
Change-Id: I30e7d162a2aecdfe5c51e920b48d659130ae74e4 Issue-ID: POLICY-2127 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-09-12Bump version in apex-pdp masterjrh310-10/+10
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-07Bump version of apex-pdpjrh310-10/+10
Issue-ID: POLICY-1965 Signed-off-by: jrh3 <jrh3@att.com> Change-Id: Icd437f10c4d991030652ffa1abf48b7b5738145c
2019-07-10Add integration tests for executor propertiesliamfallon1-4/+4
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-01Merge "Fix issues from Checkstyle reviews"Ram Krishna Verma6-59/+37
2019-07-01Fix issues from Checkstyle reviewsliamfallon6-59/+37
Use lombok on fields in EnEvent. Remove unnecessary code in BBS WebClient class Address Sonar issue in Execurot class Issue-ID: POLICY-1791 Change-Id: If07dc4529b121f8bfcd6ab1ae6c9def4774f9f4d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-28Bump apex-pdp to 2.2.1-SNAPSHOTPamela Dragosh10-10/+10
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 inheritDocsliamfallon8-76/+36
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-27Fix Sonar/Checkstyle issues in apex-pdpliamfallon6-427/+254
BBS Java code introduced Sonar issues, these are resolved. Also fixed checkstyle errors in other classes. Also fiexed "unexpected type" eclipse errors. Issue-ID: POLICY-1791 Change-Id: I3931051f0944c6d53745c8dd1db7cca4ee118f1c Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-06-20Enable maven-checkstyle-plugin in apex-pdpa.sreekumar2-16/+16
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-11BBS APEX policy not updating PNF attachment point after relocations003703464-5/+125
Issue-ID: POLICY-1835 Signed-off-by: s00370346 <swarup.nayak1@huawei.com> Change-Id: I47473444b58fa3b064ba142ce13c5e3520adb8c7
2019-06-06BBS Apex Policy vendor --> manufacturer and others003703466-38/+36
Issue-ID: POLICY-1831 Signed-off-by: s00370346 <swarup.nayak1@huawei.com> Change-Id: Ib1e60287c6209e1f16764d071e28facc75a12c6e
2019-05-30Bump apex-pdp to version 2.2.0Jim Hahn10-10/+10
Issue-ID: POLICY-1747 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Iba1c6a80917a37cc63e2250a32df40046df9ee4f
2019-05-16Step snapshot version of apex-pdpliamfallon10-10/+10
Issue-ID: POLICY-1630 Change-Id: I6dfce7eb33d9bc41caabf6b8842377b486de672d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-05-03ONAP BBS Policy: CPE-Authentication event throwing errors003703464-67/+23
Issue-ID: POLICY-1734 Change-Id: I8d209afb67e9b46a7db516fce76977e679d7ab7b Signed-off-by: s00370346 <swarup.nayak1@huawei.com>
2019-04-26ONAP BBS: Apex Nomadic ONT bug fixess0037034616-438/+714
Issue-ID: DCAEGEN2-1237 Change-Id: Ibc1b5a221af5eb28799764498b2751d99f5764f3 Signed-off-by: s00370346 <swarup.nayak1@huawei.com>
2019-04-22ONAP BBS: Apex Nomadic ONT bug fixess0037034617-309/+860
Issue-ID: DCAEGEN2-1237 Change-Id: I739f8e55113793f5cd4d3b70e0a1296d775bb414 Signed-off-by: s00370346 <swarup.nayak1@huawei.com>
2019-04-16Merge "ONAP BBS: Apex Nomadic ONT Policy Implementation"Pamela Dragosh20-0/+1741
2019-04-16Fix Security and Unit Test DB issuesliamfallon16-152/+14
This review removes more links to the Zookeeper version 3.5.4-beta with Zookeeper version 3.4.14. It also replaces the Derby in-memory database with the H2 in memory database for unit tests. Issue-ID: POLICY-1540 Change-Id: Ic44f2e866644114b7c0cf66aac7e528017b8206b Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-15ONAP BBS: Apex Nomadic ONT Policy Implementations0037034620-0/+1741
Issue-ID: DCAEGEN2-1237 Change-Id: I81831f6498b6c47c0a43215e0445c791b12dac6e Signed-off-by: s00370346 <swarup.nayak1@huawei.com>
2019-03-27Change vCPE example to use POJOsliamfallon53-1166/+1926
This review uses POJOs rather than Avro schema to unmarshal and marshal events from and to DMaaP. The POJO classes for interacting with DMaaP have been moved into a common policy module. This review is now ready for full review (finally!). Issue-ID: POLICY-954 Change-Id: Ibb89d8af5b9006821e6a0a756e16bbe3815af15a Signed-off-by: liamfallon <liam.fallon@ericsson.com> Signed-off-by: liamfallon <liam.fallon@est.tech> Signed-off-by: Liam Fallon <liam.fallon@est.tech> 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>
2019-01-09Fix context clearing on model upgradeliamfallon4-0/+164
Existing context is cleared when a model upgrade is carried out on an Apex PDP. The clear() method is called in error on the Apex engine during the upgrade. This change also has some small updates to the DecisionMaker example, which is used to test this feature. Issue-ID: POLICY-1395 Change-Id: I547a3a60712d1572d9daadf5eab4afcae2a5c321 Signed-off-by: liamfallon <liam.fallon@est.tech>