policy/engine.git
5 years agoUSE TRY WITH RESOURCES 67/56467/4
Krishnajinka [Mon, 16 Jul 2018 01:02:24 +0000 (10:02 +0900)]
USE TRY WITH RESOURCES

Fix sonar issues to convert try blocks to
try with resources plus change tabs 2 space

Issue-ID: POLICY-961
Change-Id: I553d6a42f1efaab5b7eb3a53bab945a3360e69bb
Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
5 years agoReverting "Merge "fix try block"" 97/56397/2
Jorge Hernandez [Fri, 13 Jul 2018 15:05:50 +0000 (10:05 -0500)]
Reverting "Merge "fix try block""

This reverts commit 240bbdbdc76e0e91af9f18164eadb2708d14c6fb, reversing
changes made to 3ee69f1af0acddd1e06060ad88c0029fe7ceeaaf.

Change-Id: I61f07ead1d7d3e89c512a2224efecf9ac440df10
Issue-ID: POLICY-961
Signed-off-by: Jorge Hernandez <jh1730@att.com>
5 years agoMerge "fix try block"
Jorge Hernandez [Fri, 13 Jul 2018 14:05:15 +0000 (14:05 +0000)]
Merge "fix try block"

5 years agofix try block 67/56367/1
Krishnajinka [Fri, 13 Jul 2018 08:54:49 +0000 (17:54 +0900)]
fix try block

Issue-ID: POLICY-961

Change-Id: Ia1f388368007a4a82a57520dc6ddd99cc484a393
Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
5 years agoUpgrade Portal SDK to resolve Security Issues 51/56251/2
Michael Mokry [Wed, 11 Jul 2018 21:13:13 +0000 (16:13 -0500)]
Upgrade Portal SDK to resolve Security Issues

Upgraded version in pom to 2.3.1
Added SQL scripts from Portal to Upgrade Portal related db tables
Added SQL downgrade script and license header
Sorted SQL commands in upgrade script by function_cd per Jim

Change-Id: Id6bef295956b6ec5b13d8fbd0006bbfe98c1c0ac
Issue-ID: POLICY-918
Signed-off-by: Mike Mokry <mm117s@att.com>
5 years agoRevert "Fix policy gui missing schema_info table" 93/55593/1
Joseph Chou [Fri, 29 Jun 2018 20:03:19 +0000 (16:03 -0400)]
Revert "Fix policy gui missing schema_info table"

This reverts commit e67481ed648c419a1645d0fc8b98506fe544a454.

Change-Id: I092053ec1815cf7ca598b1913663532673125604
Issue-ID: POLICY-898
Signed-off-by: Joseph Chou <jc2555@att.com>
5 years agoMerge "Address missing files in junit tests"
Liam Fallon [Wed, 27 Jun 2018 13:01:28 +0000 (13:01 +0000)]
Merge "Address missing files in junit tests"

5 years agoMerge "Don't use hard-coded tmp path"
Liam Fallon [Wed, 27 Jun 2018 07:41:44 +0000 (07:41 +0000)]
Merge "Don't use hard-coded tmp path"

5 years agoMerge "Fix console warning about xacml.properties"
Liam Fallon [Wed, 27 Jun 2018 07:40:08 +0000 (07:40 +0000)]
Merge "Fix console warning about xacml.properties"

5 years agoAddress missing files in junit tests 33/55433/1
Jim Hahn [Tue, 26 Jun 2018 16:46:59 +0000 (12:46 -0400)]
Address missing files in junit tests

Renamed logback.xml to logback-test.xml.
Added policyLogger.properties to config directories.

Change-Id: Ib6f50666a13c3258482b4007e7ceeb742f2e87a6
Issue-ID: POLICY-784
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoRemove %h from log file names 31/55431/1
Jim Hahn [Tue, 26 Jun 2018 15:57:03 +0000 (11:57 -0400)]
Remove %h from log file names

Modified code, either removing "%h" or replacing it with a directory
name that is relative to the junit test.

Change-Id: I6ea3e3139a04fefadca42340454be36a5b54445d
Issue-ID: POLICY-784
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoFix console warning about xacml.properties 25/55425/1
Jim Hahn [Tue, 26 Jun 2018 15:39:06 +0000 (11:39 -0400)]
Fix console warning about xacml.properties

Configured location of property file.

Change-Id: I58a89b34aa58f4efd6ed3ee0f984869ee7bf2f6c
Issue-ID: POLICY-921
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoDon't use hard-coded tmp path 23/55423/2
Jim Hahn [Tue, 26 Jun 2018 15:22:48 +0000 (11:22 -0400)]
Don't use hard-coded tmp path

Modified code to use java system variable to identify temp
directory.

Change-Id: Ib656dd2a2d57e43febb0daaa25cf90cb1b9330a7
Issue-ID: POLICY-920
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoChange PrefixList.class to Zone.class 43/55143/1
Jim Hahn [Wed, 20 Jun 2018 16:59:56 +0000 (12:59 -0400)]
Change PrefixList.class to Zone.class

Changed the class.  Modified the junit test to catch that type
of issue, refactoring it to extract common code.

Change-Id: Ibc3d22821f103cd3954d2f2f54d4d62307dbf4c6
Issue-ID: POLICY-909
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoFix policy gui missing schema_info table 59/54959/1
Joseph Chou [Fri, 15 Jun 2018 13:04:28 +0000 (09:04 -0400)]
Fix policy gui missing schema_info table

Modify docker-install.sh to include db schema update

Change-Id: I75941522ea932e59cd85d7ff9887bf7d4759ae7c
Issue-ID: POLICY-898
Signed-off-by: Joseph Chou <jc2555@att.com>
5 years agoMerge "Set default logger to EELF instead of SYSTEMOUT"
Pamela Dragosh [Tue, 12 Jun 2018 19:30:56 +0000 (19:30 +0000)]
Merge "Set default logger to EELF instead of SYSTEMOUT"

5 years agoUse POLICY_LOGS env variable in logging.properties 33/51233/1
Jim Hahn [Tue, 12 Jun 2018 18:35:01 +0000 (14:35 -0400)]
Use POLICY_LOGS env variable in logging.properties

Some logger.properties have /var/log/onap hard-coded; changed those
to use $POLICY_LOGS.
Other logger.properties had ${POLICY_LOGS} instead of ${{POLICY_LOGS}};
fixed those, too.

Change-Id: I56faf5982abf520ee364b54a3560313d0f15cc2a
Issue-ID: POLICY-784
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoSet default logger to EELF instead of SYSTEMOUT 31/51231/1
Jim Hahn [Tue, 12 Jun 2018 18:25:51 +0000 (14:25 -0400)]
Set default logger to EELF instead of SYSTEMOUT

Change-Id: I3395d3b95b11bf0166190beb454e60cb63de7454
Issue-ID: POLICY-784
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Enforce logback version"
Liam Fallon [Fri, 8 Jun 2018 20:51:42 +0000 (20:51 +0000)]
Merge "Enforce logback version"

5 years agoEnforce logback version 85/51085/1
Jim Hahn [Fri, 8 Jun 2018 19:48:52 +0000 (15:48 -0400)]
Enforce logback version

Some of the projects are being built with logback version, 1.1.3, which
does not support the SizeAndTimeBasedRollingPolicy appender.  Updated
the offending pom.xml to force it to use logback 1.2.3 instead.

Change-Id: I3277b28133498f4ad9fbc3ed8b3e9e7e9519bbeb
Issue-ID: POLICY-785
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Decryption messages should not be errors"
Pamela Dragosh [Fri, 8 Jun 2018 19:00:59 +0000 (19:00 +0000)]
Merge "Decryption messages should not be errors"

5 years agoMerge "Remove "&quot;" from logback xml files"
Liam Fallon [Fri, 8 Jun 2018 17:11:16 +0000 (17:11 +0000)]
Merge "Remove "&quot;" from logback xml files"

5 years agoRemove "&quot;" from logback xml files 69/51069/2
Jim Hahn [Fri, 8 Jun 2018 16:05:03 +0000 (12:05 -0400)]
Remove "&quot;" from logback xml files

Logback complains if %d{} values contain "&quot;", but it works fine
without them, thus they have been removed.
Update licenses.

Change-Id: Id1f21d3d51bb2495a92f54fcf5c3ad978612c375
Issue-ID: POLICY-785
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoDecryption messages should not be errors 51/51051/1
Jim Hahn [Fri, 8 Jun 2018 14:30:22 +0000 (10:30 -0400)]
Decryption messages should not be errors

Modified code to generate INFO messages when decryption fails,
instead of ERROR or WARN.  Also modified some of the text in
the afforementioned messages.

Change-Id: I895967cf16b0e5667e1797bc16ea1ede81d6dd7a
Issue-ID: POLICY-785
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoFixed Model Content Validation for API 45/51045/1
Michael Mokry [Fri, 8 Jun 2018 13:53:44 +0000 (08:53 -0500)]
Fixed Model Content Validation for API

This fixes the validation of the content of the model to include
validating parent nodes that are required based on the yaml. Prior to
this we were only validating required child nodes and in some cases this
was causing failures to create a policy.

Change-Id: I2bbef4a671cfc7af8b55b3b3c6454b8cea3a88c9
Issue-ID: POLICY-799
Signed-off-by: Michael Mokry <mm117s@att.com>
5 years agoDoc Updates: Policy OOM; StateMgmt 83/50883/1
Saryu Shah [Thu, 7 Jun 2018 02:03:42 +0000 (02:03 +0000)]
Doc Updates: Policy OOM; StateMgmt

Updated policy documentation: Policy OOM; StateMgmt
-------------------------------------------------------------

Change-Id: I6abf933d842ddf9e1c88b8eec714bd7a00e07bf8
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoUpdate engine to SNAPSHOT-1.3.0 97/50397/1
liamfallon [Tue, 5 Jun 2018 16:03:32 +0000 (17:03 +0100)]
Update engine to SNAPSHOT-1.3.0

Snapshot updated for Casablanca.

Change-Id: Ieb2c9a990c0f36f31c974038465e7d38aaa21e5d
Issue-ID: POLICY-875
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoDocument Security section of the Release Notes 01/49801/1
Gildas Lanilis [Thu, 31 May 2018 17:18:47 +0000 (10:18 -0700)]
Document Security section of the Release Notes

Change-Id: I2b74eb994ec16f47654e84a43a066c3497caca62
Issue-ID: DOC-271
Signed-off-by: Gildas Lanilis <gildas.lanilis@huawei.com>
5 years agoUpdate Release Notes 07/49407/1 2.0.0-ONAP 2.0.0-ONAP v1.2.3
Saryu Shah [Tue, 29 May 2018 19:13:04 +0000 (19:13 +0000)]
Update Release Notes

Update Release Notes
-------------------------------------------------------------

Change-Id: I6283bc08bb95d49a343047968049e1cca5f53bf7
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoSonar fixes for TOSCA Parser 75/49175/3
Michael Mokry [Fri, 25 May 2018 18:25:26 +0000 (13:25 -0500)]
Sonar fixes for TOSCA Parser

I fixed the sonar blocker in regards to nullPointerException and few
other majors that I found and were easy to fix.  I ran my local sonar
and the blocker was removed after the changes.

Change-Id: I7dcd7584fc955e1b520235a8e1376cf871761d21
Issue-ID: POLICY-776
Signed-off-by: Michael Mokry <mm117s@att.com>
5 years agoMerge "Replace LOGPATH with LOGSUFFIX"
Pamela Dragosh [Thu, 24 May 2018 11:04:37 +0000 (11:04 +0000)]
Merge "Replace LOGPATH with LOGSUFFIX"

5 years agoMerge "Fix Issues in TOSCA Parser"
Pamela Dragosh [Thu, 24 May 2018 11:02:59 +0000 (11:02 +0000)]
Merge "Fix Issues in TOSCA Parser"

5 years agoFix Issues in TOSCA Parser 63/48563/7
Wang,Frank(gw1218) [Tue, 22 May 2018 19:50:33 +0000 (14:50 -0500)]
Fix Issues in TOSCA Parser

Fixed a bug and added some new validations in TOSCA Parser

Issue-ID: POLICY-776
Change-Id: I2dc1b5b38cd137efc5c24ccf55b19de9f47c44da
Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
5 years agoReplace LOGPATH with LOGSUFFIX 83/48383/7
Jim Hahn [Mon, 21 May 2018 19:02:40 +0000 (15:02 -0400)]
Replace LOGPATH with LOGSUFFIX

docker-install.sh does not expand ${{xxx}} values in .conf
files before using them to update target files.  Consequently,
replaced LOGPATH with LOGSUFFIX in .conf files and updated
target files to use ${{POLICY_LOGS}}${{LOGSUFFIX}} instead.
Replace "${POLICY_HOME}/logs" in auxiliary files (e.g., logrotate)
with "${POLICY_LOGS}/policy".
Update license dates.
In .sh files, changed ${{POLICY_LOGS}} to ${POLICY_LOGS}, and
ensured that env.sh is sourced.
Use hard-coded paths in conf files instead of replacing
LOGPATH with LOGSUFFIX.
Update license dates.
Repoint path for IntegrityMonitor.log, as we cannot easily move
since it's in common.
Replace hard-coded log path in docker-install.sh.
Undo hard-coded log paths where possible, and modify scripts to
pass $POLICY_LOGS to JVM.

Change-Id: I027d8d2173ae97fef73b0daff1d6a87452857f93
Issue-ID: POLICY-759
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoUpdated version/date in release notes 55/48555/2
Saryu Shah [Tue, 22 May 2018 19:05:51 +0000 (19:05 +0000)]
Updated version/date in release notes

Updated version/date in release notes
-------------------------------------------------------------

Change-Id: I3d2fa0f7641074251e97e9f7b75772e9c8abe9f7
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoMerge "Update yml to use $POLICY_LOGS"
Pamela Dragosh [Tue, 22 May 2018 19:17:17 +0000 (19:17 +0000)]
Merge "Update yml to use $POLICY_LOGS"

5 years agoMerge "Update Policy Engine to 1.2.3-SNAPSHOT"
Jorge Hernandez [Tue, 22 May 2018 19:15:05 +0000 (19:15 +0000)]
Merge "Update Policy Engine to 1.2.3-SNAPSHOT"

5 years agoUpdate yml to use $POLICY_LOGS 49/48549/1
Jim Hahn [Tue, 22 May 2018 18:28:08 +0000 (14:28 -0400)]
Update yml to use $POLICY_LOGS

Change-Id: I4fec68b7bd50f8e71e36510bf595126435726677
Issue-ID: POLICY-759
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoUpdated release notes 99/48399/1
Saryu Shah [Mon, 21 May 2018 23:57:12 +0000 (23:57 +0000)]
Updated release notes

Updated release notes
-------------------------------------------------------------

Change-Id: I4f6282d25d177078306954be852a28301eb26c2d
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoUpdate Policy Engine to 1.2.3-SNAPSHOT 43/48343/1
liamfallon [Mon, 21 May 2018 15:49:26 +0000 (16:49 +0100)]
Update Policy Engine to 1.2.3-SNAPSHOT

These reviews must be merged in order because of layering.

This review should be merged FOURTH.

Change-Id: Ifca8e33b79085a4032164b44dae3401f8179f5f6
Issue-ID: POLICY-844
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoAdd braces around property name 09/48209/1
Jim Hahn [Fri, 18 May 2018 17:20:52 +0000 (13:20 -0400)]
Add braces around property name

In pdplp.conf, changed ${POLICY_LOGS} to ${{POLICY_LOGS}}.

Change-Id: Id952dee7a38b868fea5650f4e54bfccb612bb56c
Issue-ID: POLICY-759
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Upgrade SNAPSHOT to 1.2.2" v1.2.2
Pamela Dragosh [Wed, 16 May 2018 23:01:34 +0000 (23:01 +0000)]
Merge "Upgrade SNAPSHOT to 1.2.2"

5 years agoMerge "Added Release Notes - Known Issues"
Pamela Dragosh [Wed, 16 May 2018 23:00:47 +0000 (23:00 +0000)]
Merge "Added Release Notes - Known Issues"

5 years agoAdded Release Notes - Known Issues 19/47919/1
Saryu Shah [Wed, 16 May 2018 21:39:15 +0000 (21:39 +0000)]
Added Release Notes - Known Issues

Added Release Notes - Known Issues
-------------------------------------------------------------

Change-Id: Ie5b1e9499114e09aedb72a95d389f2e07b4f5514
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoUpgrade SNAPSHOT to 1.2.2 19/47819/6
liamfallon [Wed, 16 May 2018 12:59:46 +0000 (13:59 +0100)]
Upgrade SNAPSHOT to 1.2.2

These reviews must be merged in order because of layering.

This review should be merged SECOND

Note: In order to get past the following layering problems, there
are temporary chages to the following POMs to temporarily use 1.2.1-SNAPSHOT
for those dependencies. They are
ONAP-PAP-REST/pom.xml
 org.onap.policy.drools-applications.controlloop.common.policy-yaml
ONAP-PDP/pom.xml
 org.onap.policy.drools-pdp.policy-endpoints

A separate review will be used to restore these dependencies to 1.2.2-SNAPSHOT
once the drools-pdp and drools-applications reviews are submitted and merged

PLD added version.properties

Issue-ID: POLICY-798
Change-Id: Id7e83f2ba12181c63cc8845b7eeccf2004d2bab9
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoMerge "policy documentation - release notes"
Jorge Hernandez [Wed, 16 May 2018 16:30:44 +0000 (16:30 +0000)]
Merge "policy documentation - release notes"

5 years agopolicy documentation - release notes 51/47851/1
Saryu Shah [Wed, 16 May 2018 15:54:15 +0000 (15:54 +0000)]
policy documentation - release notes

policy documentation - release notes
-------------------------------------------------------------

Change-Id: Ie480002003725fe6949c631c2a9c50fa7d1665c2
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoMerge "Documentation edits for pooling"
Pamela Dragosh [Wed, 16 May 2018 00:34:16 +0000 (00:34 +0000)]
Merge "Documentation edits for pooling"

5 years agoDocumentation edits for pooling 15/47715/1
Saryu Shah [Tue, 15 May 2018 20:30:13 +0000 (20:30 +0000)]
Documentation edits for pooling

Documentation edits for pooling and locks
-------------------------------------------------------------

Change-Id: I1b594db33437f9c9d43902ec448bcd205093beaf
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoMerge "SRM, Locking, Pooling documentation"
Jorge Hernandez [Tue, 15 May 2018 19:05:29 +0000 (19:05 +0000)]
Merge "SRM, Locking, Pooling  documentation"

5 years agoMerge "Documentation edits for OOF"
Jorge Hernandez [Tue, 15 May 2018 19:05:19 +0000 (19:05 +0000)]
Merge "Documentation edits for OOF"

5 years agoSRM, Locking, Pooling documentation 73/47673/1
Saryu Shah [Tue, 15 May 2018 18:07:54 +0000 (18:07 +0000)]
SRM, Locking, Pooling  documentation

SRM, Locking, Pooling  documentation
-------------------------------------------------------------

Change-Id: Id66463fc89f2c2c466ad92936816be878cfd77b7
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoFix BRMS Gateway version on properties 57/47657/1
liamfallon [Tue, 15 May 2018 16:47:11 +0000 (17:47 +0100)]
Fix BRMS Gateway version on properties

Incorrect snapshot version showed up on scan of source code for snapshots

Issue-ID: POLICY-780
Change-Id: I7fb838a88fc50ce8b566aa9b9ad0b4b7e3188b3a
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoDocumentation edits for OOF 19/47419/1
Saryu Shah [Mon, 14 May 2018 14:55:27 +0000 (14:55 +0000)]
Documentation edits for OOF

Documentation edits for OOF
-------------------------------------------------------------

Change-Id: I84f9992bd61e10ef9f263b68a28cca100a515437
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoMerge "Documentation OOF Spec"
Pamela Dragosh [Sat, 12 May 2018 15:32:28 +0000 (15:32 +0000)]
Merge "Documentation OOF Spec"

5 years agoDocumentation OOF Spec 95/47295/1
Saryu Shah [Sat, 12 May 2018 00:31:24 +0000 (00:31 +0000)]
Documentation OOF Spec

Documentation for Policy Specification and Retrieval for OOF
-------------------------------------------------------------

Change-Id: Idb063b85c8bc3ff45b04d522563cffe33b4224c9
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoMerge "Fix POLICY_LOGS property in paplp.conf" v1.2.1
Jorge Hernandez [Fri, 11 May 2018 03:10:35 +0000 (03:10 +0000)]
Merge "Fix POLICY_LOGS property in paplp.conf"

5 years agoMerge "Change error to warning"
Jorge Hernandez [Fri, 11 May 2018 03:09:50 +0000 (03:09 +0000)]
Merge "Change error to warning"

5 years agoPolicy OOF-HPA documentation 53/47153/1
Saryu Shah [Thu, 10 May 2018 23:46:56 +0000 (23:46 +0000)]
Policy OOF-HPA documentation

Policy OOF-HPA documentation
-------------------------------------------------------------

Change-Id: I1015b21cb6b5599a48e7914a6fcb97ee4cb63ccd
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoFix POLICY_LOGS property in paplp.conf 47/47147/2
Jim Hahn [Thu, 10 May 2018 21:58:28 +0000 (17:58 -0400)]
Fix POLICY_LOGS property in paplp.conf

Added extra braces around POLICY_LOGS property.

Change-Id: I4022d00a74971be70dc5b3c2cb435be31d91386c
Issue-ID: POLICY-758
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoChange error to warning 41/47141/1
Jim Hahn [Thu, 10 May 2018 21:38:25 +0000 (17:38 -0400)]
Change error to warning

Changed ERROR about decryption to WARNING.
Added POLICY_LOGS to base.conf (for non-docker).

Change-Id: If32965f1c37b36102c12371e739e1a155bb255f0
Issue-ID: POLICY-758
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "fixing NullPointException incase of db exception"
Jorge Hernandez [Tue, 8 May 2018 18:11:20 +0000 (18:11 +0000)]
Merge "fixing NullPointException incase of db exception"

5 years agoMerge "Convert license header to SQL comment"
Jorge Hernandez [Tue, 8 May 2018 17:00:47 +0000 (17:00 +0000)]
Merge "Convert license header to SQL comment"

5 years agofixing NullPointException incase of db exception 59/46659/2
waqas.ikram [Tue, 8 May 2018 16:46:40 +0000 (17:46 +0100)]
fixing NullPointException incase of db exception

Making changes for NullPointerException
it was triggered by
- SQL Query Failed in PAP return unhandled reponse code  >  activeVersion variable is set to null > if statement in DeletePolicyService (!activeVersion.equalsIgnoreCase("0") result into NullPointerException

Change-Id: Iad9de0d31b6cf16d1eafd6175d1c355b07481db9
Issue-ID: POLICY-773
Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>
5 years agoRemove eclipse toolbuilder file 57/46657/1
Pamela Dragosh [Tue, 8 May 2018 16:30:45 +0000 (12:30 -0400)]
Remove eclipse toolbuilder file

This file should not be in gerrit. Removing prior to release
of artifacts.

Issue-ID: POLICY-780
Change-Id: Ib950a6033ec3069263e9fd44628fb9d2181c9c44
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoConvert license header to SQL comment 39/46639/1
liamfallon [Tue, 8 May 2018 15:40:03 +0000 (16:40 +0100)]
Convert license header to SQL comment

Changed comment from Java style to SQL style

Change-Id: Ia0ac3991cd58939f5efc0c752148b11931136a4f
Issue-ID: POLICY-773
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoMerge "Configuration as argument to BRMS Gateway"
Pamela Dragosh [Tue, 8 May 2018 14:56:31 +0000 (14:56 +0000)]
Merge "Configuration as argument to BRMS Gateway"

5 years agoConfiguration as argument to BRMS Gateway 77/46577/2
liamfallon [Tue, 8 May 2018 10:28:40 +0000 (11:28 +0100)]
Configuration as argument to BRMS Gateway

Added the ability specify the parameter file for the BRMS Gateway
as a argument to allow different configurations to be used during
unit test. This will allow more thorought unit tests to be written.

Replaced System.exit() calls with exeception throws becasue
System.exit() call bring down the entire JVM during testing, terminating
the test at that point.

Changed the package path on four unit test files to the correct path for
unit tests for the BRMS gateway.

Added a unit test for sanity test of the configuraiton file argument.

Issue-ID: POLICY-773
Change-Id: Ic095a5131ddb846eaf3b11157853fab71908c629
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agofix PE DB lock timeout problems 19/46519/1
Jorge Hernandez [Tue, 8 May 2018 01:26:19 +0000 (20:26 -0500)]
fix PE DB lock timeout problems

see companion docker review.

The failOverReadOnly .. flags should only be used when a DB high
availability environment is used, such as a master/slave
configuration.

As they are the jdbc parameters have caused bad interactions
with the underlying persistence libraries rendering the PAP
useless.

It is thought that this may perhaps solve
POLICY-773, POLICY-775, POLICY-779, and perhaps POLICY-776.

Change-Id: Icb69a3afc0a19969a34af40d960fa8e1b94aabc0
Issue-ID: POLICY-777
Signed-off-by: Jorge Hernandez <jh1730@att.com>
5 years agoautomate dependency.json version population 07/46507/1
Jorge Hernandez [Mon, 7 May 2018 23:22:12 +0000 (18:22 -0500)]
automate dependency.json version population

This avoids error-prone manual version changes
to configuration files.

Change-Id: I1a991ef9a8eb4cc7dd5fe26d9952286d8b5c0115
Issue-ID: POLICY-766
Signed-off-by: Jorge Hernandez <jh1730@att.com>
5 years agoAdding rollback for transaction handling 45/46245/3
waqas.ikram [Fri, 4 May 2018 15:50:35 +0000 (16:50 +0100)]
Adding rollback for transaction handling

Change-Id: I90887aafdd3cc49940bb4ed4b9283ec8a25aa205
Issue-ID: POLICY-773
Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>
5 years agoUpdated policy documentation 31/45931/1
Saryu Shah [Thu, 3 May 2018 17:50:48 +0000 (17:50 +0000)]
Updated policy documentation

Updated policy documentation
-------------------------------------------------------------

Change-Id: I840d17df857bb14fdc7e96e3c5f984037944c889
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoMerge "Ignore directories created"
Jorge Hernandez [Wed, 2 May 2018 16:19:28 +0000 (16:19 +0000)]
Merge "Ignore directories created"

5 years agoAdd INFO.yaml file 65/45365/6
Jessica Wagantall [Tue, 1 May 2018 03:08:17 +0000 (20:08 -0700)]
Add INFO.yaml file

Add INFO.yaml to list:
- Project description
- Properties
- PTL information
- Meeting information
- Committer information

Change-Id: Iab302b1e24c08980e3073d3fa34d53e4e81cabad
Issue-ID: CIMAN-134
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
5 years agoIgnore directories created 77/45477/2
Pamela Dragosh [Tue, 1 May 2018 17:20:05 +0000 (13:20 -0400)]
Ignore directories created

Clean up some outstanding logging side effects in .gitignore

Issue-ID: POLICY-708
Change-Id: Ia3f268f0adf5615a11a109cb0d7d029a069b4520
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoFix Test fail with variable length memory address 75/45475/1
liamfallon [Tue, 1 May 2018 17:13:12 +0000 (18:13 +0100)]
Fix Test fail with variable length memory address

The unit test class PIPConfigurationTest.java has a test that checks a
configuration string for length. However, the length of the "piptype"
field in that string can vary, causing the test to intermittently fail.

Field that passes:
piptype=org.onap.policy.rest.jpa.PIPType@71b3bc45

Field that fails:
piptype=org.onap.policy.rest.jpa.PIPType@a8c1f44

This fix removes the memory address from the "piptype" field, so that the configuration string will
now always be 323 characters in length.

Change-Id: Ib3640ec6f69ac7d691dcc989c44a7822bcc9b7f7
Issue-ID: POLICY-765
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoUpdated installation documentation 45/45345/2
Saryu Shah [Tue, 1 May 2018 01:12:23 +0000 (01:12 +0000)]
Updated installation documentation

Updated installation documentation
-------------------------------------------------------------

Change-Id: I71d24c0806fc5d53691c505f87425c71e2f0a04f
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
5 years agoMerge "Remove sysout from junit and disable assert."
Pamela Dragosh [Tue, 1 May 2018 13:52:30 +0000 (13:52 +0000)]
Merge "Remove sysout from junit and disable assert."

5 years agoRemove sysout from junit and disable assert. 83/45183/4
pa834y [Sat, 28 Apr 2018 00:13:24 +0000 (20:13 -0400)]
Remove sysout from junit and disable assert.

Updated BRMS Gateway junit tests to be less strict on hit counts
on queries to Nexus.

Draft version passed build son now submitting as full submission.

Change-Id: Iab81d14be69835faefbb96fb0af17b3f3759575b
Issue-ID: POLICY-756
Signed-off-by: pa834y <pa834y@att.com>
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoUpdated policy documentation 67/45167/1
Saryu Shah [Fri, 27 Apr 2018 20:45:25 +0000 (20:45 +0000)]
Updated policy documentation

Fixed typos, Updated release notes, Deleted old release files
-------------------------------------------------------------

Change-Id: I43bb64b7d1829e92b30bfd45ec3f3608a59672cf
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
6 years agoIncorporate Liam code review 63/44963/1
pa834y [Thu, 26 Apr 2018 19:26:26 +0000 (15:26 -0400)]
Incorporate Liam code review

Change-Id: I387a54b8bd8c619c521c512258928669a8c1b791
Issue-ID: POLICY-756
Signed-off-by: pa834y <pa834y@att.com>
6 years agoMerge "Fix typo in documentation"
Pamela Dragosh [Thu, 26 Apr 2018 18:32:15 +0000 (18:32 +0000)]
Merge "Fix typo in documentation"

6 years agoFix typo in documentation 47/44947/1
Saryu Shah [Thu, 26 Apr 2018 18:04:45 +0000 (18:04 +0000)]
Fix typo in documentation

Fix typo in documentation
-------------------------------------------------------------

Change-Id: I01b8849c97645e9e5ed81f99768088f2fa439e45
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
6 years agoMerge "Remove unit test Java version dependency"
Pamela Dragosh [Thu, 26 Apr 2018 11:20:50 +0000 (11:20 +0000)]
Merge "Remove unit test Java version dependency"

6 years agoRemove unit test Java version dependency 47/44747/1
liamfallon [Wed, 25 Apr 2018 19:11:54 +0000 (20:11 +0100)]
Remove unit test Java version dependency

In the unit tests for the direct Sona Nexus Rest Interface, one
of the unit tests only passed on an Oracle Java specific string.

This test is fixed to now work on both Oracle and OpenJDK java

Issue-ID: POLICY-700
Change-Id: Idae1aaf612a10ac003f2a91c0b5a80540152ac95
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agocook policy-keystore into pe image 15/44715/1
Jorge Hernandez [Wed, 25 Apr 2018 17:53:23 +0000 (12:53 -0500)]
cook policy-keystore into pe image

OOM team reported issues with ONAP installation in
terms of config map sizes.   After discussion with
OOM team, one solution is to cook it in the docker
image itself.   This will solve the size issue on
the OOM side.

Change-Id: I2ca20bdc3aa8ee959c5e4c1d07483fe5f0c14607
Issue-ID: POLICY-747
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Add JUnit for direct Sonar Nexus REST interface"
Jorge Hernandez [Wed, 25 Apr 2018 14:34:54 +0000 (14:34 +0000)]
Merge "Add JUnit for direct Sonar Nexus REST interface"

6 years agoAdd websocket client code. 41/44541/1
pa834y [Wed, 25 Apr 2018 00:25:22 +0000 (20:25 -0400)]
Add websocket client code.

Change-Id: I2d3939c698a0df6bec068063f08566226f65bfd3
Issue-ID: POLICY-756
Signed-off-by: pa834y <pa834y@att.com>
6 years agoAdd JUnit for direct Sonar Nexus REST interface 35/44535/1
liamfallon [Tue, 24 Apr 2018 22:47:45 +0000 (23:47 +0100)]
Add JUnit for direct Sonar Nexus REST interface

JUnit tests and changes to the source code to fix issues that were
identified in JUnit testing.

JUnit testing runs tests towards the Nexus server at
https://nexus.onap.org
If that server does not exist then the unit tests will fail
but as the nexus serveir is required for the build to work then
it should be OK to use that server for unit testing. This removes
the need to write complex (and less effective) Mockito type
unit tests.

Issue-ID: POLICY-700
Change-Id: I4aa33a1022033b42bb1fd1fa36785a8e0216b887
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoImplement Sonar Nexus REST interface directly 85/44385/1
liamfallon [Tue, 24 Apr 2018 14:29:41 +0000 (15:29 +0100)]
Implement Sonar Nexus REST interface directly

The BRMS gateway used the obsolete nexus-rest-client-java library
to query the Nexus repository. This change removes that dependency and
implements an interface directly to Nexus servers using the Nexus
REST interface.

This change is being submitted to ensure that the security issues with the
plugin are resolved. The unit test for the new code will be implemented
in a later submission.

Issue-ID: POLICY-700
Change-Id: Ia1044e432d370034fe13f42cf7ed55d75e21187a
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoRemove cookbook gif 59/44259/1
Saryu Shah [Mon, 23 Apr 2018 21:54:37 +0000 (21:54 +0000)]
Remove cookbook gif

Remove cookbook picture from page
-------------------------------------------------------------

Change-Id: I61edd0e4f336b19237421f05d6d36b61bb63170f
Issue-ID: POLICY-536
Signed-off-by: Saryu Shah <ss3917@att.com>
6 years agoAdd license to policy/engine image files 17/44217/2
Jim Hahn [Mon, 23 Apr 2018 16:31:28 +0000 (12:31 -0400)]
Add license to policy/engine image files

Added license to gif, jpg, and png files.
Removed changes from gif files in POLICY-SDK-APP.

Change-Id: Ief0c4be74cbdb844dd503040832be6c89bcc7ef9
Issue-ID: POLICY-741
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoBuild fails when build host running web server 07/44007/1
liamfallon [Fri, 20 Apr 2018 20:08:12 +0000 (21:08 +0100)]
Build fails when build host running web server

If the host on which the policy engine is running a web server that
respoonds with a HTTP response on the URL "http://localhost", the build
fails because one of the tests in ONAP-XACML expects a ConnectException
on this URL. When the URL returns a valid respose the test fails causing
the buld to fail.

This fix changes the URL to "http://localhost:54287", which I guess could
also exist but is much less liekly to exist.

Change-Id: I2f80d12a80d29a9bc7b2067f35c286f01c4d9550
Issue-ID: POLICY-700
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoAdd license to policy-engine files 47/43747/1
Jim Hahn [Thu, 19 Apr 2018 15:28:41 +0000 (11:28 -0400)]
Add license to policy-engine files

Added license to various files.
Updated XACMLPolicyScanner to work even when license comment
is added to the Policy.xml file.
Moved DOCTYPE before license in html files.
Removed license from css files, as many are generated or
come from third-party software.
Removed license from other generated files.

Change-Id: I9d98ca9f552a6eae17e80ef27fc7045cc4f27b8e
Issue-ID: POLICY-741
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoMerge "Remove insecure dependency on PolicyEngineAPI"
Pamela Dragosh [Thu, 19 Apr 2018 14:38:09 +0000 (14:38 +0000)]
Merge "Remove insecure dependency on PolicyEngineAPI"

6 years agoRemove insecure dependency on PolicyEngineAPI 11/43611/1
liamfallon [Wed, 18 Apr 2018 20:16:52 +0000 (21:16 +0100)]
Remove insecure dependency on PolicyEngineAPI

The insecure dependency tyrus-container-grizzly-client is
part of Tyrus, a Java web socket implementation library.

A direct substitution of this library is not available so
the code in AutoClientEnd.java and ManualClientEnd.java
was adapted to work with the library
org.java-websocket.Java-WebSocket
that does not seem to have any vulnerabilities when tested
with the org.owasp.dependency-check-maven plugin.

The purpose of this submission is to see if the new library
does indeed remove the vulnerability. If so, the implementation
in AutoClientEnd and ManualClientEnd must be cleaned up.

Change-Id: I961635aaea42c2f847edf11ee77e2961cdfb097b
Issue-ID: POLICY-744
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoUpgrade poi to clear CLM 21/43521/1
Pamela Dragosh [Wed, 18 Apr 2018 13:55:48 +0000 (09:55 -0400)]
Upgrade poi to clear CLM

https://nvd.nist.gov/vuln/detail/CVE-2017-12626

Issue-ID: POLICY-722
Change-Id: I016d2d357858729b402ad010d47a31af053d2799
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoUpgrade hibernator and netty 13/43413/1
Pamela Dragosh [Tue, 17 Apr 2018 18:16:32 +0000 (14:16 -0400)]
Upgrade hibernator and netty

Forgot one place for hibernator and need to upgrade netty to
clear CLM issue.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-2156

Issue-ID: POLICY-722
Change-Id: I741c47110af916c222f92329791217b0c3bc07df
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoUpgrade hibernator to clear clm 69/43369/1
Pamela Dragosh [Tue, 17 Apr 2018 14:30:19 +0000 (10:30 -0400)]
Upgrade hibernator to clear clm

Upgrade hibernator to clear clm issue.

https://nvd.nist.gov/vuln/detail/CVE-2017-7536

Issue-ID: POLICY-722
Change-Id: I1a4d9aa8ad3b477db0c91bd5a53a67932554213d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoUpgrade spring 4.3.15-RELEASE 37/43337/1
Pamela Dragosh [Tue, 17 Apr 2018 12:54:15 +0000 (08:54 -0400)]
Upgrade spring 4.3.15-RELEASE

Forgot this reference to spring.

Issue-ID: POLICY-722
Change-Id: I4335d860a883f925f1a6ba7bf28f6b59ed52511f
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>