policy/apex-pdp.git
4 years agoBump version of Infinispan for security 34/104734/1
liamfallon [Tue, 31 Mar 2020 08:45:15 +0000 (09:45 +0100)]
Bump version of Infinispan for security

Change-Id: Ie01b221e182dd43e85e3e7277bb55169f85a1460
Signed-off-by: liamfallon <liam.fallon@est.tech>
Issue-ID: POLICY-2449
Change-Id: Icbb7a769eb8f0d9ef278d222ab007f330576abb3
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Fix hanging tests in JavascritExecutor"
Ram Krishna Verma [Mon, 30 Mar 2020 21:00:04 +0000 (21:00 +0000)]
Merge "Fix hanging tests in JavascritExecutor"

4 years agoFix hanging tests in JavascritExecutor 00/104600/12
liamfallon [Fri, 27 Mar 2020 17:24:18 +0000 (17:24 +0000)]
Fix hanging tests in JavascritExecutor

Added tests to check threads start, execute, and stop correctly and
fixed JavescriptExecutor class to handle startup and shutdown correctly
without hanging.

Issue-ID: POLICY-2106
Change-Id: I9ab41023aae2ab1cbcaea53fdf5d48eccd90a2f1
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoFix timeout issues in gRPC tests 32/104632/2
liamfallon [Sun, 29 Mar 2020 12:10:38 +0000 (13:10 +0100)]
Fix timeout issues in gRPC tests

When running the gRPC tests in a slow or overloaded environment, the
timeupts must be set longer.

Issue-ID: POLICY-2106
Change-Id: Id152f1f82ef47f646c7b0488b4486425c6816e31
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoPoint to latest snapshots 91/104591/1
Pamela Dragosh [Fri, 27 Mar 2020 16:58:48 +0000 (12:58 -0400)]
Point to latest snapshots

Issue-ID: POLICY-2378
Change-Id: Ie85ef583e8f0732a3b716b9e9b8947fb349522c7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Point to models 2.2.2"
Jorge Hernandez [Thu, 26 Mar 2020 01:34:08 +0000 (01:34 +0000)]
Merge "Point to models 2.2.2"

4 years agoPoint to models 2.2.2 52/104452/1
Pamela Dragosh [Thu, 26 Mar 2020 00:03:17 +0000 (20:03 -0400)]
Point to models 2.2.2

Issue-ID: POLICY-2378
Change-Id: Iffbed4a039e9a645cc081f09997aeedf0dba4056
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoBump policy-apex-pdp to 2.3.1-SNAPSHOT 53/104453/1
a.sreekumar [Wed, 25 Mar 2020 23:01:06 +0000 (23:01 +0000)]
Bump policy-apex-pdp to 2.3.1-SNAPSHOT

Change-Id: I59b93fccb0f3a41f8db753d1e8e2978bbb51e9a0
Issue-ID: POLICY-2378
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoRelease policy-apex-pdp 2.3.0 docker image 43/104443/1
a.sreekumar [Tue, 24 Mar 2020 16:03:24 +0000 (16:03 +0000)]
Release policy-apex-pdp 2.3.0 docker image

Change-Id: I7ad38253cab457f92912e17ea9eaf8300347f62e
Issue-ID: POLICY-2378
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoRelease policy-apex-pdp 2.3.0 artifacts 36/104436/2
a.sreekumar [Tue, 24 Mar 2020 16:00:28 +0000 (16:00 +0000)]
Release policy-apex-pdp 2.3.0 artifacts

Change-Id: Id23e5c848b6a338f09bbaecbf89e184e4e9f4e4f
Issue-ID: POLICY-2378
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoIgnore JUnit tests that hang on await 10/104410/1
liamfallon [Wed, 25 Mar 2020 19:23:29 +0000 (19:23 +0000)]
Ignore JUnit tests that hang on await

This change ignores the tests that are hanging in Jenkins until the Apex
images are released. Once the images are released we'll fix these tests.

Issue-ID: POLICY-2106
Change-Id: I6a733896da044d3f24443ac202d6122a341db135
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoAdd timeout on Javascript latch awaits 99/104399/1
liamfallon [Wed, 25 Mar 2020 17:35:43 +0000 (17:35 +0000)]
Add timeout on Javascript latch awaits

It is possible that the initiation and especially shutdown happens so
fast that the execution thread counts down the latch before the caller
calls await(), in which case the Javascript Rhino thread will hang. This
review adds a timeout on the await calls.

Issue-ID: POLICY-2106
Change-Id: Icfc6d4b478cca62522461c25d61ce9ee7328684a
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoReduce size of client artifacts 61/104361/2
liamfallon [Wed, 25 Mar 2020 12:09:54 +0000 (12:09 +0000)]
Reduce size of client artifacts

This change:
- Removes separate packaging of the three clients
- Reduces the size of the combined client by suppressing unused
  dependencies
- Removes the Servlet code from the Docker packaging
- Removes the client WARs from the docker package

Issue-ID: POLICY-2443
Change-Id: If0a0c2dddc3f05f2815b84ae04fcc029b1c4fe08
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoLaunch separate threads for Javascript task execution 30/104230/4
liamfallon [Mon, 23 Mar 2020 17:49:50 +0000 (17:49 +0000)]
Launch separate threads for Javascript task execution

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>
4 years agoPoint to released artifacts 98/104198/1
Pamela Dragosh [Mon, 23 Mar 2020 23:51:45 +0000 (19:51 -0400)]
Point to released artifacts

Issue-ID: POLICY-2378
Change-Id: Ie1803786c6bbc636ef0f98a1c158aa17b6292e84
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoAdding example for APEX gRPC plugin for CDS interaction 51/104151/4
a.sreekumar [Fri, 20 Mar 2020 18:30:43 +0000 (18:30 +0000)]
Adding example for APEX gRPC plugin for CDS interaction

Change-Id: I8361eb0cbe74c3548ca98f3005bc37f5a1f91747
Issue-ID: POLICY-2436
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoMerge "Apex-pdp tutorial documentation changes"
Jorge Hernandez [Thu, 19 Mar 2020 16:56:29 +0000 (16:56 +0000)]
Merge "Apex-pdp tutorial documentation changes"

4 years agoApex-pdp tutorial documentation changes 48/103948/2
aditya.puthuparambil [Thu, 19 Mar 2020 10:52:46 +0000 (10:52 +0000)]
Apex-pdp tutorial documentation changes

Issue-ID: POLICY-2424
Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech>
Change-Id: I92491c904b65a0db93c9e6eaba676c653c276175

4 years agorenew policy certs till 03/17/2021 28/103828/1
jhh [Wed, 18 Mar 2020 00:45:42 +0000 (19:45 -0500)]
renew policy certs till 03/17/2021

Issue-ID: POLICY-2402
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I6bd157d80a0aa1604e634ec561ee76e8197e97df

4 years agoFix minor checkstyle/eclipse warnings 61/103561/1
liamfallon [Wed, 11 Mar 2020 21:29:17 +0000 (21:29 +0000)]
Fix minor checkstyle/eclipse warnings

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>
4 years agoMerge "Convert examples to Rhino Javascript format"
Ram Krishna Verma [Wed, 11 Mar 2020 20:52:09 +0000 (20:52 +0000)]
Merge "Convert examples to Rhino Javascript format"

4 years agoMerge "Fixing the gRPC consumer side"
Ram Krishna Verma [Wed, 11 Mar 2020 20:51:11 +0000 (20:51 +0000)]
Merge "Fixing the gRPC consumer side"

4 years agoConvert examples to Rhino Javascript format 46/103546/2
liamfallon [Wed, 11 Mar 2020 17:17:14 +0000 (17:17 +0000)]
Convert examples to Rhino Javascript format

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>
4 years agoMerge "Sonar Security vulnerabilities fix"
Ram Krishna Verma [Wed, 11 Mar 2020 16:16:22 +0000 (16:16 +0000)]
Merge "Sonar Security vulnerabilities fix"

4 years agoFixing the gRPC consumer side 52/103452/2
a.sreekumar [Mon, 9 Mar 2020 10:56:39 +0000 (10:56 +0000)]
Fixing the gRPC consumer side

Change-Id: I21d9253f41eee9b958e8fb723f6c19f266502cef
Issue-ID: POLICY-1656
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoAdapt vCPE example for Rhino Javascript 79/103479/3
liamfallon [Tue, 10 Mar 2020 21:09:28 +0000 (21:09 +0000)]
Adapt vCPE example for Rhino Javascript

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>
4 years agoSonar Security vulnerabilities fix 43/103443/5
aditya.puthuparambil [Tue, 10 Mar 2020 14:12:55 +0000 (14:12 +0000)]
Sonar Security vulnerabilities fix

Issue-ID: POLICY-1913
Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech>
Change-Id: Ic86e04776c9300e37134210cd9db5b6d7e6a5a9e

4 years agoMerge "Sonar Bug fix"
Liam Fallon [Tue, 10 Mar 2020 13:49:32 +0000 (13:49 +0000)]
Merge "Sonar Bug fix"

4 years agoUse Rhino javascript executor in apex-pdp 28/103128/4
liamfallon [Thu, 5 Mar 2020 10:50:48 +0000 (10:50 +0000)]
Use Rhino javascript executor in apex-pdp

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>
4 years agoSonar Bug fix 57/103157/5
aditya.puthuparambil [Mon, 9 Mar 2020 12:03:33 +0000 (12:03 +0000)]
Sonar Bug fix

Change-Id: Icb465fdcf5a580f599a111ed3c5d3510f5346f64
Issue-ID: POLICY-1913
Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech>
4 years agoMerge "Adding gRPC plugin to dependencies in APEX"
Liam Fallon [Fri, 6 Mar 2020 10:26:59 +0000 (10:26 +0000)]
Merge "Adding gRPC plugin to dependencies in APEX"

4 years agoAdding gRPC plugin to dependencies in APEX 99/103199/1
a.sreekumar [Thu, 5 Mar 2020 23:36:06 +0000 (23:36 +0000)]
Adding gRPC plugin to dependencies in APEX

Change-Id: Iee8fdca9f23b432188a61054fe177283fdddc1ba
Issue-ID: POLICY-1656
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoFixing SONAR bug + code smell 12/103012/3
aditya.puthuparambil [Wed, 4 Mar 2020 14:31:19 +0000 (14:31 +0000)]
Fixing SONAR bug + code smell

Change-Id: If76ddc860b67e0d8dcd4c48bacb5436ffc773faa
Issue-ID: POLICY-1913
Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech>
4 years agoMerge "replace test sleep() with awaitality package"
Liam Fallon [Wed, 4 Mar 2020 13:32:27 +0000 (13:32 +0000)]
Merge "replace test sleep() with awaitality package"

4 years agoMerge "Preparing integration tests for Graal Javascript"
Pamela Dragosh [Wed, 4 Mar 2020 12:50:06 +0000 (12:50 +0000)]
Merge "Preparing integration tests for Graal Javascript"

4 years agoMerge "GRPC support for APEX-CDS interaction"
Pamela Dragosh [Wed, 4 Mar 2020 12:49:14 +0000 (12:49 +0000)]
Merge "GRPC support for APEX-CDS interaction"

4 years agoPreparing integration tests for Graal Javascript 43/102843/3
liamfallon [Mon, 2 Mar 2020 17:08:47 +0000 (17:08 +0000)]
Preparing integration tests for Graal Javascript

Graal enforces Javascript more strictly than Nashorn does. This review
changes the tests in apex-pdp to comply with the stricter -Javascript
checking, re-enabling the integration test module.
- All log calls must be passed as strings, using toString()
- Byte/Float/Long Java types not supported in Javascript

Disable integration tests so that other changes can be brought in.

JMS integration test is disabled for now, it will be re-enabled in a
review shortly.

Issue-ID: POLICY-2106
Change-Id: I14bdb930eff735e862b51802cf72e4793cec3699
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoreplace test sleep() with awaitality package 21/102721/6
Henry.Sun [Mon, 2 Mar 2020 07:47:09 +0000 (15:47 +0800)]
replace test sleep() with awaitality package

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>
4 years agoGRPC support for APEX-CDS interaction 76/102676/7
a.sreekumar [Sun, 1 Mar 2020 19:38:50 +0000 (19:38 +0000)]
GRPC support for APEX-CDS interaction

Change-Id: I586153244dbd97a41e9b9d616ee9a84327b7c2da
Issue-ID: POLICY-1656
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agouse policy/parent awaitility 67/102867/1
Pamela Dragosh [Tue, 3 Mar 2020 14:27:23 +0000 (09:27 -0500)]
use policy/parent awaitility

use common version

Issue-ID: POLICY-2381
Change-Id: Id231aa8709b3c4515fcac80b82d53fb8ed45eaf0
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "FIxing Sonar issues in APEX"
Jorge Hernandez [Mon, 2 Mar 2020 19:15:46 +0000 (19:15 +0000)]
Merge "FIxing Sonar issues in APEX"

4 years agoMerge "Switch apex to Graal javascript engine"
Ram Krishna Verma [Mon, 2 Mar 2020 15:24:14 +0000 (15:24 +0000)]
Merge "Switch apex to Graal javascript engine"

4 years agoFIxing Sonar issues in APEX 44/102744/1
aditya.puthuparambil [Mon, 2 Mar 2020 13:25:29 +0000 (13:25 +0000)]
FIxing Sonar issues in APEX

Change-Id: I8ac07eede6758c84a4a9ca505382f215d531cf47
Issue-ID: POLICY-1913
Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech>
4 years agoPoint to docker 2.0.1 81/102681/1
Pamela Dragosh [Sun, 1 Mar 2020 21:42:04 +0000 (16:42 -0500)]
Point to docker 2.0.1

policy/docker is released.

Issue-ID: POLICY-2378
Change-Id: If3ed5a595f9e6138c18ed8d7386e07a776d7c903
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoSwitch apex to Graal javascript engine 56/102656/2
liamfallon [Fri, 28 Feb 2020 16:54:48 +0000 (16:54 +0000)]
Switch apex to Graal javascript engine

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>
4 years agoMerge "Add integration tests for Parameter passing in APEX"
Liam Fallon [Thu, 27 Feb 2020 17:00:08 +0000 (17:00 +0000)]
Merge "Add integration tests for Parameter passing in APEX"

4 years agoAdd integration tests for Parameter passing in APEX 89/102389/4
a.sreekumar [Tue, 25 Feb 2020 16:49:33 +0000 (16:49 +0000)]
Add integration tests for Parameter passing in APEX

Change-Id: I5d01766ffb0104f632bebc9b553e7dca83b4829f
Issue-ID: POLICY-2364
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoMerge "Fix Java 11/Checkstyle/Sonar warnings"
Jim Hahn [Wed, 26 Feb 2020 14:23:16 +0000 (14:23 +0000)]
Merge "Fix Java 11/Checkstyle/Sonar warnings"

4 years agoFix Java 11/Checkstyle/Sonar warnings 30/102330/2
liamfallon [Tue, 25 Feb 2020 16:10:08 +0000 (16:10 +0000)]
Fix Java 11/Checkstyle/Sonar warnings

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>
4 years agoremove duplication code in plugins-event producer 00/102300/2
ning.xi [Tue, 25 Feb 2020 08:55:22 +0000 (16:55 +0800)]
remove duplication code in plugins-event producer

Issue-ID: POLICY-1884
Change-Id: I7774dfdc7d7edcc0409a817bfd21ddacec21d085
Signed-off-by: ning.xi <ning.xi@est.tech>
4 years agoMerge "remove code duplication in plugins"
Ram Krishna Verma [Mon, 24 Feb 2020 14:39:34 +0000 (14:39 +0000)]
Merge "remove code duplication in plugins"

4 years agoMerge "remove code duplication in plugin-event-carrier"
Ram Krishna Verma [Mon, 24 Feb 2020 14:38:07 +0000 (14:38 +0000)]
Merge "remove code duplication in plugin-event-carrier"

4 years agoremove code duplication in plugins 59/102059/2
shaoqiu [Thu, 20 Feb 2020 04:28:25 +0000 (12:28 +0800)]
remove code duplication in plugins

Remove consumer code duplication in plugins-event-carrier

Issue-ID: POLICY-1884
Signed-off-by: shaoqiu <tim.huang@est.tech>
Change-Id: I2d222436a97224e54a03c2501f4dc14d3f5f6ac0

4 years agoPassing taskParameters from ApexConfig to policy logic 12/102012/2
a.sreekumar [Thu, 13 Feb 2020 11:17:54 +0000 (11:17 +0000)]
Passing taskParameters from ApexConfig to policy logic

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>
4 years agoremove code duplication in plugin-event-carrier 58/102058/1
ning.xi [Thu, 20 Feb 2020 03:17:28 +0000 (11:17 +0800)]
remove code duplication in plugin-event-carrier

Issue-ID: POLICY-1884
Change-Id: I610d7ee34d640cc3a7d3381b24993ee9b6f76f2d
Signed-off-by: ning.xi <ning.xi@est.tech>
4 years agoUpdating module names to resolve conflicts 02/101202/2
Ram Krishna Verma [Wed, 5 Feb 2020 21:31:01 +0000 (16:31 -0500)]
Updating module names to resolve conflicts

Issue-ID: POLICY-2355
Change-Id: I67f0ca2ced9cbe37a3d00d9f312101e756454107
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoAdding Tosca compliant operational policy type to default config file for apex-pdp 00/101100/1
a.sreekumar [Mon, 3 Feb 2020 15:14:48 +0000 (15:14 +0000)]
Adding Tosca compliant operational policy type to default config file for apex-pdp

Change-Id: I6de1fd31c2e73814a546b05ee71419fded4a3357
Issue-ID: POLICY-2147
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoRemove content section from ToscaPolicy properties in APEX 87/100887/3
a.sreekumar [Wed, 29 Jan 2020 09:50:33 +0000 (09:50 +0000)]
Remove content section from ToscaPolicy properties in APEX

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>
4 years agoRemove unnecessary sonar config 21/100821/1
Pamela Dragosh [Mon, 27 Jan 2020 15:04:00 +0000 (10:04 -0500)]
Remove unnecessary sonar config

This is no longer needed now that it is pointing to
latest policy/parent.

BTW - I decided there were too many changes required
for combining into one single .exec jacoco file. And it
was not improving any of the numbers. This repo is very
close to original numbers before the move to sonar cloud.

Will investigate another time.

Issue-ID: POLICY-2321
Change-Id: If2f3a762de943fb6f73709d9308333b8feda436e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRemove apex-pdp TextFileUtils class 01/100701/1
liamfallon [Thu, 23 Jan 2020 16:50:47 +0000 (16:50 +0000)]
Remove apex-pdp TextFileUtils class

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>
4 years agoRun apex-pdp in Java 11: base changes 92/100592/6
liamfallon [Wed, 22 Jan 2020 12:11:11 +0000 (12:11 +0000)]
Run apex-pdp in Java 11: base changes

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>
4 years agoFirst sonar update 78/100478/1
Pamela Dragosh [Mon, 20 Jan 2020 14:41:21 +0000 (09:41 -0500)]
First sonar update

Just updating this way gets apex to around 79%, which
passes. Previously around 80%, when JDK11 is done I will
fix it up and hopefully we will get it back to over 80%.

Issue-ID: POLICY-2321
Change-Id: If3440e8c8c71f858adcc3f1b349da4e1048f8464
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoPoint to policy/models release version 20/100220/1
HOCKLA [Fri, 10 Jan 2020 21:37:28 +0000 (15:37 -0600)]
Point to policy/models release version

Issue-ID: POLICY-1592
Change-Id: I4a795fc1496f5608884a7b8bdad0c212c4321392
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoMerge "Populate the PdpStatistics data in heartbeat"
Jim Hahn [Thu, 9 Jan 2020 14:34:54 +0000 (14:34 +0000)]
Merge "Populate the PdpStatistics data in heartbeat"

4 years agoMerge "Enabling logback file to be loaded using oom configmap"
Pamela Dragosh [Thu, 9 Jan 2020 13:38:02 +0000 (13:38 +0000)]
Merge "Enabling logback file to be loaded using oom configmap"

4 years agoMerge "Update vCPE example to use Avro schemas"
Jorge Hernandez [Wed, 8 Jan 2020 16:53:02 +0000 (16:53 +0000)]
Merge "Update vCPE example to use Avro schemas"

4 years agoEnabling logback file to be loaded using oom configmap 85/100085/1
a.sreekumar [Wed, 8 Jan 2020 12:55:20 +0000 (12:55 +0000)]
Enabling logback file to be loaded using oom configmap

Change-Id: I746ee57003175ae9e3f903ee3e5948ed1875dceb
Issue-ID: POLICY-2308
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoUpdate vCPE example to use Avro schemas 89/99989/5
liamfallon [Fri, 20 Dec 2019 03:42:34 +0000 (21:42 -0600)]
Update vCPE example to use Avro schemas

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>
4 years agoPopulate the PdpStatistics data in heartbeat 95/99595/6
shaoqiu [Fri, 13 Dec 2019 07:10:29 +0000 (15:10 +0800)]
Populate the PdpStatistics data in heartbeat

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>
4 years agoChanging ownership of configuration files in APEX 25/100025/3
a.sreekumar [Mon, 6 Jan 2020 15:48:31 +0000 (15:48 +0000)]
Changing ownership of configuration files in APEX

Default user when logging into APEX container is apexuser. Updating the
ownership of configuration files such as logback.xml and key files so
that these can be updated at runtime.

Change-Id: Icf21e0b408d3b4ef829e1b1c5505f142a7d08adc
Issue-ID: POLICY-2308
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoMerge "Adding native policy type to the config file in APEX"
Pamela Dragosh [Fri, 6 Dec 2019 21:56:04 +0000 (21:56 +0000)]
Merge "Adding native policy type to the config file in APEX"

4 years agoMerge "Point to release versions of policy/parent and policy/common"
Pamela Dragosh [Fri, 6 Dec 2019 21:09:23 +0000 (21:09 +0000)]
Merge "Point to release versions of policy/parent and policy/common"

4 years agoPoint to release versions of policy/parent and policy/common 32/99232/4
HOCKLA [Thu, 5 Dec 2019 20:24:04 +0000 (14:24 -0600)]
Point to release versions of policy/parent and policy/common

Issue-ID: POLICY-1583
Change-Id: I5dd6f77991bd5e8419176ea4cba751f58c05d501
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoMerge "Minor changes for new Eclipse checkstyle checks"
Pamela Dragosh [Fri, 6 Dec 2019 14:08:23 +0000 (14:08 +0000)]
Merge "Minor changes for new Eclipse checkstyle checks"

4 years agoAdding native policy type to the config file in APEX 54/99254/1
a.sreekumar [Fri, 6 Dec 2019 12:37:05 +0000 (12:37 +0000)]
Adding native policy type to the config file in APEX

Change-Id: If8167c837d7d28ec9049b00ff6ca314eb4199930
Issue-ID: POLICY-2279
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoAPEX-PDP remove supported policy types from heartbeat 16/99216/1
a.sreekumar [Thu, 5 Dec 2019 16:01:40 +0000 (16:01 +0000)]
APEX-PDP remove supported policy types from heartbeat

Change-Id: Iafd2e2625cfabd89480ca1807eb1607788b30899
Issue-ID: POLICY-2235
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoMinor changes for new Eclipse checkstyle checks 26/99126/5
liamfallon [Wed, 4 Dec 2019 09:20:04 +0000 (09:20 +0000)]
Minor changes for new Eclipse checkstyle checks

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>
4 years agoReplace getCaononicalName() with getName() in code base 97/98897/2
liamfallon [Wed, 27 Nov 2019 13:32:45 +0000 (13:32 +0000)]
Replace getCaononicalName() with getName() in code base

Issue-ID: POLICY-1861
Change-Id: Iccbdcbc5b5978305c56ab74c01a52a562697bee1
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoReduce verbosity of logging during unit test 59/98859/1
liamfallon [Tue, 26 Nov 2019 14:31:28 +0000 (14:31 +0000)]
Reduce verbosity of logging during unit test

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>
4 years agoMerge "Fixing Junit test cases causing too much logs output during APEX build"
Ram Krishna Verma [Tue, 26 Nov 2019 13:55:31 +0000 (13:55 +0000)]
Merge "Fixing Junit test cases causing too much logs output during APEX build"

4 years agoMerge "Update vCPE example for A&AI custom query"
Ram Krishna Verma [Tue, 26 Nov 2019 13:55:03 +0000 (13:55 +0000)]
Merge "Update vCPE example for A&AI custom query"

4 years agoFixing Junit test cases causing too much logs output during APEX build 50/98850/1
a.sreekumar [Mon, 25 Nov 2019 18:00:22 +0000 (18:00 +0000)]
Fixing Junit test cases causing too much logs output during APEX build

Change-Id: If0ad9c6b3a0f19ff3711d6230eb64e0dca1c1ef1
Issue-ID: POLICY-2272
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoUpdate vCPE example for A&AI custom query 72/98772/2
liamfallon [Fri, 22 Nov 2019 17:09:57 +0000 (17:09 +0000)]
Update vCPE example for A&AI custom query

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>
4 years agoBuild tar.gz without requiring docker image build 36/98636/3
jhh [Tue, 19 Nov 2019 22:48:24 +0000 (16:48 -0600)]
Build tar.gz without requiring docker image build

This allows the tar.gz to be released by LF jobs.

Issue-ID: POLICY-2250
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I5c4aa52b6cd599b3b4a8f537d927631a14036dfc

4 years agoApex PDP change to add PDP group 29/98729/1
a.sreekumar [Tue, 19 Nov 2019 17:00:59 +0000 (17:00 +0000)]
Apex PDP change to add PDP group

Change-Id: I6cff921bdc65fe505c0b5e7dba94a6cf9aa3ba91
Issue-ID: POLICY-2234
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoUpdate vCPE example for A&AI custom query 14/98714/1
liamfallon [Thu, 21 Nov 2019 13:52:37 +0000 (13:52 +0000)]
Update vCPE example for A&AI custom query

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>
4 years agoFix JRuby interpreter shutdown issue 50/98450/1
liamfallon [Fri, 15 Nov 2019 13:40:08 +0000 (13:40 +0000)]
Fix JRuby interpreter shutdown issue

The new version of JRuby fixes this issue. Also amended unit test to
check for shutdown and immediate recreation of JRuby interpreter.

Issue-ID: POLICY-1276
Change-Id: I723e0396985d3163b483e52fdaceb4b4fab7274b
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoRetaining context in APEX Engine based on policies received in PdpUpdate 13/98313/2
a.sreekumar [Tue, 5 Nov 2019 14:37:09 +0000 (14:37 +0000)]
Retaining context in APEX Engine based on policies received in PdpUpdate

Change-Id: I73fad5bf76ed6b4979f5ab76013f204ea82da30b
Issue-ID: POLICY-2215
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoMerge "Do not hardcode io.fabric8 plugin"
Pamela Dragosh [Mon, 11 Nov 2019 16:32:59 +0000 (16:32 +0000)]
Merge "Do not hardcode io.fabric8 plugin"

4 years agoDo not hardcode io.fabric8 plugin 06/98206/1
Pamela Dragosh [Fri, 8 Nov 2019 19:54:12 +0000 (14:54 -0500)]
Do not hardcode io.fabric8 plugin

policy/parent now has this plugin defined

Issue-ID: POLICY-2222
Change-Id: I2cc318e0f46f1ae9b9bda23a160c6db55003eca9
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoFix vCPE example apex-pdp policy 61/98161/1
liamfallon [Thu, 7 Nov 2019 21:33:12 +0000 (21:33 +0000)]
Fix vCPE example apex-pdp policy

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>
4 years agoMerge "Fixing multiple policies with optional event fields fails execution in APEX"
Pamela Dragosh [Tue, 5 Nov 2019 12:21:42 +0000 (12:21 +0000)]
Merge "Fixing multiple policies with optional event fields fails execution in APEX"

4 years agoUse jersey dependencies from policy-endpoints 24/97924/1
liamfallon [Mon, 4 Nov 2019 18:07:20 +0000 (18:07 +0000)]
Use jersey dependencies from policy-endpoints

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>
4 years agoFixing multiple policies with optional event fields fails execution in APEX 18/97918/1
a.sreekumar [Mon, 4 Nov 2019 15:40:46 +0000 (15:40 +0000)]
Fixing multiple policies with optional event fields fails execution in APEX

Policy execution fails when multiple policy models are running and the policies have optional fields.

Change-Id: Ifb1a45a25e3a88b8707fb8b76f8279b6ec0b91ce
Issue-ID: POLICY-2211
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoAdd common Jersey version 47/97847/3
liamfallon [Fri, 1 Nov 2019 11:47:21 +0000 (11:47 +0000)]
Add common Jersey version

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>
4 years agoResolve mapping between TOSCA policies and APEX policy models 83/97383/8
a.sreekumar [Wed, 16 Oct 2019 10:46:21 +0000 (11:46 +0100)]
Resolve mapping between TOSCA policies and APEX policy models

Change-Id: Ifaedc5074bcc51a5d495e342feae89b6a2aac1cf
Issue-ID: POLICY-1626
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoUse updated APPC model code in apex vcpe example 94/97394/2
liamfallon [Mon, 21 Oct 2019 18:59:22 +0000 (19:59 +0100)]
Use updated APPC model code in apex vcpe example

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>
4 years agoTemporarily enable trace in startup script 20/97620/1
jhh [Fri, 25 Oct 2019 17:57:38 +0000 (12:57 -0500)]
Temporarily enable trace in startup script

No kubernetes logs are produced at start up.
This will be used temporarily to trace execution of
the initialization script.

Issue-ID: POLICY-2064
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I14d326b4e2065effccb3226c64a78bc77169c41e

4 years agooverride cert stores 90/97290/1
jhh [Thu, 17 Oct 2019 20:29:19 +0000 (15:29 -0500)]
override cert stores

Issue-ID: POLICY-2064
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ie48b9c322b5a643d3e5fa5a6125389c81cf31c96

4 years agoreplace grizzly server with policy common endpoint 91/96991/4
Henry.Sun [Wed, 9 Oct 2019 10:02:56 +0000 (18:02 +0800)]
replace grizzly server with policy common endpoint

Issue-ID: POLICY-1915
Change-Id: I8702a8b54e158dfd0ac08140ca083f14f23963a2
Signed-off-by: Henry.Sun <henry.a.sun@est.tech>