policy/drools-applications.git
5 years agoResolve checkstyle formatting 63/60363/3
Pamela Dragosh [Mon, 13 Aug 2018 17:24:59 +0000 (13:24 -0400)]
Resolve checkstyle formatting

This submission is mostly focused on 120 spacing, missing
spaces, rearranged imports, newlines before package
and a few other items. Will have to submit further
reviews to finish this.

Issue-ID: POLICY-883
Change-Id: I772a2077ac97a0cb929810d8afadd2f415fae17b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "Fix basic code issues in controlloop"
Jorge Hernandez [Tue, 7 Aug 2018 14:11:39 +0000 (14:11 +0000)]
Merge "Fix basic code issues in controlloop"

5 years agoMerge "add scripts to measure performance of PDP-D"
Pamela Dragosh [Tue, 7 Aug 2018 13:01:11 +0000 (13:01 +0000)]
Merge "add scripts to measure performance of PDP-D"

5 years agoFix basic code issues in controlloop 69/59069/2
Krishnajinka [Mon, 6 Aug 2018 05:18:00 +0000 (14:18 +0900)]
Fix basic code issues in controlloop

Found few issues while going through the code. Fixing
these issues in the controlloop package classes

Issue-ID: POLICY-1017
Change-Id: I24d0ce1257ad689c3e9d9b7a3bea07eeb65383f1
Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
5 years agocarry forward template changes 31/59231/2
Jim Hahn [Mon, 6 Aug 2018 13:53:16 +0000 (09:53 -0400)]
carry forward template changes

Incorporated changes, to clean-up objects that have no associated Param
object, from the amsterdam rules template into the casablanca rules
template.  Also carried forward changes in behavior of PolicyGuard
lock requests.
Fix typo in comment.
Change tabs to spaces and removing trailing spaces.

Change-Id: Ifcfda573f4c271d804e526d8cc0bea4b89b16612
Issue-ID: POLICY-955
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoadd scripts to measure performance of PDP-D 21/57721/11
Jim Hahn [Thu, 26 Jul 2018 14:46:26 +0000 (10:46 -0400)]
add scripts to measure performance of PDP-D

Also changed tabs to spaces in scripts.
Fix typo in script name: "performace" -> "performance".
Add comments to uebtime.sh.
Removed comments about "wait".
Added "mt" to report script name.
Updated comments in both scripts.
Renamed jmeter script.
Modified uebtime.sh to scan zipped network files, too, and then combined
uebtime.sh into generate.sh.
Removed commented-out code from generate.sh.
Ignore errors from "ls network*.zip" in generate.sh.
Restructured the network.log parser and included additional request types
in the list of times it extracts from the log.
Removed unused import.
Rebased.
Removed unneeded network.log match pattern.
Added comments about matching abatements.
Renamed script to use hyphens instead of underscores, and dropped the
".sh" extension.

Change-Id: I5f8e74cec3e83d5427be03f5e684c871a038f923
Issue-ID: POLICY-888
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agorename rule template from beijing to casablanca 91/58791/2
Jim Hahn [Thu, 2 Aug 2018 20:40:41 +0000 (16:40 -0400)]
rename rule template from beijing to casablanca

Changed assertTrue to assertEquals in CasablancaFeatureTest.

Change-Id: I3bec009ddde2f10468575b4b7bf9c08c24748aae
Issue-ID: POLICY-955
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agohttps configuration for amsterdam controller 37/57937/2
Jorge Hernandez [Sun, 29 Jul 2018 03:04:03 +0000 (22:04 -0500)]
https configuration for amsterdam controller

configuration set to false until unblocked by DMAAP-547.

Change-Id: I2efdafa8b143725fd73f05ec3d0a6a9ffc3b12c6
Issue-ID: POLICY-941
Signed-off-by: Jorge Hernandez <jh1730@att.com>
5 years agoCopy policy-endpoints from drools-pdp to common 55/57155/3
mmis [Mon, 23 Jul 2018 11:22:07 +0000 (12:22 +0100)]
Copy policy-endpoints from drools-pdp to common

Replaced references to classes deleted from drools-pdp with references to the
corresponding in policy-common

Issue-ID: POLICY-967
Change-Id: Ia9d2ac704e6b7c434e5a9e7aee6d7dcf9198e4f2
Signed-off-by: mmis <michael.morris@ericsson.com>
5 years agoUse refresh() instead of lock() in guard 35/56735/1
Jim Hahn [Mon, 16 Jul 2018 21:04:55 +0000 (17:04 -0400)]
Use refresh() instead of lock() in guard

This is the second step of separating the lock "refresh" operation
from the original "lock" operation.
Modified PolicyGuard to use refresh() to extend a lock.  Also removed
the host name from the owner String, as it will no be longer needed
(once the final step is done).

Change-Id: I3a498e6f81d9dba1bbdfd6f7388087355192bcf5
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Username & password should be optional for VFC"
Pamela Dragosh [Thu, 12 Jul 2018 12:20:17 +0000 (12:20 +0000)]
Merge "Username & password should be optional for VFC"

5 years agoUsername & password should be optional for VFC 19/56219/3
Jim Hahn [Wed, 11 Jul 2018 15:00:58 +0000 (11:00 -0400)]
Username & password should be optional for VFC

Also updated licenses.
Replace tabs with spaces in new junit method.
Updated licenses again.

Change-Id: Iebff19353c052e59bfd69da1677e9a05c44592a0
Issue-ID: POLICY-869
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Include hostname as part of lock owner"
Jorge Hernandez [Wed, 11 Jul 2018 17:54:48 +0000 (17:54 +0000)]
Merge "Include hostname as part of lock owner"

5 years agoCatch exception from missing property in operation 39/56139/2
Jim Hahn [Tue, 10 Jul 2018 20:29:13 +0000 (16:29 -0400)]
Catch exception from missing property in operation

When a new operation is started it will throw an IllegalArgumentException
if a property is missing.  Modified the rules to catch this
exception, indicate the failure, and move on to the next operation.
Modified code to catch generic exception.

Change-Id: Ie8c24371eb84ee55ff0a0a5fcacda3670483efc5
Issue-ID: POLICY-869
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoInclude hostname as part of lock owner 01/56201/1
Jim Hahn [Wed, 11 Jul 2018 13:07:23 +0000 (09:07 -0400)]
Include hostname as part of lock owner

Because the lock owner string is constructed, using just the target type
and request ID, lock requests made by different ONSETs running on
different PDP-Ds may both succeed.  Added the hostname to the owner
string so that locks for ONSETs for the same request ID will be rejected
if the request is made on different PDP-Ds.

Change-Id: I1d45194cbb1c5b1a1f6000477fe51879a2fecc19
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoRemove Params for deleted rules 81/55981/1
Jim Hahn [Fri, 6 Jul 2018 19:10:45 +0000 (15:10 -0400)]
Remove Params for deleted rules

If rules are deleted, then no rule is left to retract the
associated Params object.  However, we can create more general
rules that will fire whenever rules are added, thus causing
clean-up of old Params at that time.
Implemented the above approach.

Change-Id: I207d493cc6924a4b34a8d0fa4915ed499ebc4a6e
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoClean up objects for deleted rules 97/55897/4
Jim Hahn [Thu, 5 Jul 2018 18:24:36 +0000 (14:24 -0400)]
Clean up objects for deleted rules

When rules for a closed loop are deleted, associated working memory
elements may be left around.
Modified the code to retract the various elements.
Re-added code to unlock when retracting TargetLock.
Add junit tests for new methods.
Forgot the junit test for request id.

Change-Id: Iec2805adbdb147a643f6163badee05ea353ada88
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agounlock should always return TargetLock 87/55887/1
Jim Hahn [Thu, 5 Jul 2018 14:36:49 +0000 (10:36 -0400)]
unlock should always return TargetLock

ControlLoopEventManager.unlock only returns the TargetLock if
the PolicyGuard.unlock operation is successful.  However, if
the lock has already expired, then PolicyGuard.unlock will return
false, and ControlLoopEventManager.unlock will then return null.
As a result, the rules do not retract the TargetLock.  (The rules
do, however, retract any left-over TargetLock objects during the
clean-up phase.  Nevertheless, the earlier rules should not have
to depend on the clean-up rules to do that.)
Modified the code to address this issue.

Change-Id: I2e6099a4e3511053d2e6e1373cae4b480798d1b6
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd time limit to local guard locking facility 73/55573/2
Jim Hahn [Wed, 27 Jun 2018 15:04:11 +0000 (11:04 -0400)]
Add time limit to local guard locking facility

Modified the local policy guard locking facility to add
a time parameter.
Modified the control loop event manager to extend the lock
when lockCurrentOperation() is re-invoked.
Modified the rules to retract the lock if the lock request
was denied.
Reorder assertions in junit test.

Change-Id: Ic9b77acbb4881a5a516f30eb56664bad1a5c4d7e
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Remove Eclipse lifecycle error on plugin"
Pamela Dragosh [Wed, 6 Jun 2018 15:46:56 +0000 (15:46 +0000)]
Merge "Remove Eclipse lifecycle error on plugin"

5 years agoRemove Eclipse lifecycle error on plugin 15/50715/1
liamfallon [Wed, 6 Jun 2018 15:26:10 +0000 (16:26 +0100)]
Remove Eclipse lifecycle error on plugin

The kie-maven-plugin causes a lifecycle management
error in Eclipse (not in normal build). A profile
is added to the POM to remove this eclipse
error.

Change-Id: I6f5e5bec5e1e388edb083a910b9d1472af889a47
Issue-ID: POLICY-716
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
5 years agoUpdate drools-applications to SNAPSHOT-1.3.0 89/50389/1
liamfallon [Tue, 5 Jun 2018 15:41:35 +0000 (16:41 +0100)]
Update drools-applications to SNAPSHOT-1.3.0

Snapshot updated for Casablanca.

Issue-ID: POLICY-875
Change-Id: I0307282c4eabdb9ccd03282f918f4cd727ac4f86
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoDon't build credentials if user name is empty 99/48999/1 2.0.0-ONAP beijing 2.0.0-ONAP v1.2.3
Jim Hahn [Thu, 24 May 2018 17:24:12 +0000 (13:24 -0400)]
Don't build credentials if user name is empty

Modified code to skip building credentials if user name
is empty, in addition to case where user name is null.

Change-Id: I5b53d4f97263df98cfe082f44a4e6af64b1e488b
Issue-ID: POLICY-868
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoMerge "Update Drools Applcations to 1.2.3-SNAPSHOT"
Jorge Hernandez [Tue, 22 May 2018 17:56:44 +0000 (17:56 +0000)]
Merge "Update Drools Applcations to 1.2.3-SNAPSHOT"

6 years agoreduce transaction cache size 27/48527/1
Jorge Hernandez [Tue, 22 May 2018 16:47:41 +0000 (11:47 -0500)]
reduce transaction cache size

- reduce memory footprint
- avoid verbose logging from cache when
  the object is not in the cache to
  invalidate it.

Change-Id: I819cfbcfe32f5afdd238397c79ccd5cebd4534b8
Issue-ID: POLICY-852
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoUpdate Drools Applcations to 1.2.3-SNAPSHOT 29/48329/2
liamfallon [Mon, 21 May 2018 14:35:55 +0000 (15:35 +0100)]
Update Drools Applcations to 1.2.3-SNAPSHOT

These reviews must be merged in order because of layering.

This review should be merged THIRD.

Issue-ID: POLICY-844
Change-Id: I61d128f3244cd420abab15ab70c5c0e9d9afa625
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoAdd ID to stability test assembly 37/48337/1
liamfallon [Mon, 21 May 2018 14:58:38 +0000 (15:58 +0100)]
Add ID to stability test assembly

The <id/> tag was missing on the stability test assembly.xml. THis
caused the build of drools-applications to fail on Ubuntu 16.04 LTS
under maven 3.3.9.

Change-Id: I9689063068d9306e373161c15310eebe5e47a507
Issue-ID: POLICY-844
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoFix authentication info in request to SO 27/47927/3
Jim Hahn [Wed, 16 May 2018 22:07:23 +0000 (18:07 -0400)]
Fix authentication info in request to SO

The code was passing two different sets of credentials to the REST
manager, and the wrong one was taking precedence.  Modified the code
to only pass the correct set of credentials.
Updated license date.

Change-Id: I13e2db93a8eebbb0cd77fdfaca80125cd28a2553
Issue-ID: POLICY-800
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoMerge "Upgrade SNAPSHOT to 1.2.2" v1.2.2
Pamela Dragosh [Wed, 16 May 2018 21:31:57 +0000 (21:31 +0000)]
Merge "Upgrade SNAPSHOT to 1.2.2"

6 years agoUpgrade SNAPSHOT to 1.2.2 27/47827/2
liamfallon [Wed, 16 May 2018 13:50:40 +0000 (14:50 +0100)]
Upgrade SNAPSHOT to 1.2.2

These reviews must be merged in order because of layering.

This review should be merged FOURTH

PLD added version.properties

Change-Id: If7af7b3ae37166e88af92c0d1f1c558e5b60ab8e
Issue-ID: POLICY-798
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoAdd prefix to make rule name unique 55/47855/1
Jim Hahn [Wed, 16 May 2018 15:59:58 +0000 (11:59 -0400)]
Add prefix to make rule name unique

Change-Id: I3b04d6be4939cc2e652a676e7c2e4cb647f1bfec
Issue-ID: POLICY-796
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoAdd rule to cleanup onsets without Params 01/47701/1
Jim Hahn [Tue, 15 May 2018 20:08:59 +0000 (16:08 -0400)]
Add rule to cleanup onsets without Params

Change-Id: I0040a3be47d56808e2cda8a5ab2d3c1aa8e9fbb9
Issue-ID: POLICY-796
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoFix error stability test jmx file 81/47281/2
waqas.ikram [Fri, 11 May 2018 20:45:23 +0000 (21:45 +0100)]
Fix error stability test jmx file

Change-Id: Ideb306e12b5cd8e65f2a894371942aeff1ddfebc
Issue-ID: POLICY-525
Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>
6 years agoRemove requestId and instance append 93/47293/1
Pamela Dragosh [Fri, 11 May 2018 23:21:32 +0000 (19:21 -0400)]
Remove requestId and instance append

The requestId keeps creeping into this code. For the instance
Id appending, we need a better strategy that conforms with robot
test scripts in order to do multiple scale ups.

Issue-ID: POLICY-793
Change-Id: Iab5d7608d5ee049cb6dd0508108bf77c2982db47
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoAdd missing service modelVersionId 37/47237/1
Pamela Dragosh [Fri, 11 May 2018 16:44:00 +0000 (12:44 -0400)]
Add missing service modelVersionId

It seems this field is missing possibly from refactoring code.

Issue-ID: POLICY-792
Change-Id: I6d13feb12a383d32dce3bbba431e32ad0b9d1e19
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoAdding performance test script 99/47199/2
eikrwaq [Fri, 11 May 2018 11:39:53 +0000 (12:39 +0100)]
Adding performance test script

Change-Id: I19489319e590faa40ab35bc71eb6eb226212c579
Issue-ID: POLICY-529
Signed-off-by: eikrwaq <waqas.ikram@ericsson.com>
6 years agoallow dcae consumer group configuration 63/46663/1 v1.2.1
Jorge Hernandez [Tue, 8 May 2018 16:53:29 +0000 (11:53 -0500)]
allow dcae consumer group configuration

this allows to change the dcase onset processing
group behavior across pdp-ds.

if installation sets DCAE_CONSUMER_GROUP, all
PDP-Ds will share the same consumer group, therefore
will have exclussive processing of onsets.  Otherwise
if installation unsets it (blank), all pdp-d's will
process all onsets being placed in dcae topic on
dmaap bus

Change-Id: I4cc63005402ce66c09617b52dfad9a6094cbcb46
Issue-ID: POLICY-766
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoFixing minor concurrency issues in test plan 81/46181/1
eikrwaq [Fri, 4 May 2018 10:04:45 +0000 (11:04 +0100)]
Fixing minor concurrency issues in test plan

Change-Id: Iada3fa32f901c5efe54e5279eec78e3755b707b2
Issue-ID: POLICY-525
Signed-off-by: eikrwaq <waqas.ikram@ericsson.com>
6 years agoChanging abatement param to true for vCPE 67/45667/1
eikrwaq [Wed, 2 May 2018 15:28:29 +0000 (16:28 +0100)]
Changing abatement param to true for vCPE

- Changing abatement parameter to true for vCPE in create-cl-amsterdam script
- Enabling abatement test case jMeter Test plan

Change-Id: I01487666a807941dfec729c68bc31d3cedf29967
Issue-ID: POLICY-525
Signed-off-by: eikrwaq <waqas.ikram@ericsson.com>
6 years agoAdding JMeter Test Plan for PDP-D 53/45453/3
eikrwaq [Tue, 1 May 2018 14:30:21 +0000 (15:30 +0100)]
Adding JMeter Test Plan for PDP-D

Change-Id: Id9de78a02706dc2c68e0def4e27631964baf3922
Issue-ID: POLICY-525
Signed-off-by: eikrwaq <waqas.ikram@ericsson.com>
6 years agoAdd INFO.yaml file 61/45361/4
Jessica Wagantall [Tue, 1 May 2018 03:08:06 +0000 (20:08 -0700)]
Add INFO.yaml file

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

Change-Id: Ic36292261eba0a39d8e59d702547947a27acb974
Issue-ID: CIMAN-134
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
6 years agoAAI simulator fixes 73/45273/2
eikrwaq [Mon, 30 Apr 2018 13:42:03 +0000 (14:42 +0100)]
AAI simulator fixes

AAI simulator fixes for multi onset messages in parallel

Change-Id: Ia32dacf6caaded7fc45232ba4be8f49f3ccfd614
Issue-ID: POLICY-525
Signed-off-by: eikrwaq <waqas.ikram@ericsson.com>
6 years agoMerge "Modify PolicyGuard to use new locking API"
Jorge Hernandez [Mon, 30 Apr 2018 14:14:52 +0000 (14:14 +0000)]
Merge "Modify PolicyGuard to use new locking API"

6 years agoModify PolicyGuard to use new locking API 19/45119/2
Jim Hahn [Fri, 27 Apr 2018 13:54:17 +0000 (09:54 -0400)]
Modify PolicyGuard to use new locking API

Modified PolicyGuard to use the locking API from policy-core instead
of its own internal map.
Initialized PolicyGuard.factory.
Fixed bug in eventmanager junit test uncovered due to changes to
PolicyGuard.

Change-Id: I853ee5f146f3bde16b3f6e65bc188ca7c0cc4f73
Issue-ID: POLICY-577
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoFix failure in PIPEngineGetHistoryTest 33/45133/1
Jim Hahn [Fri, 27 Apr 2018 15:23:00 +0000 (11:23 -0400)]
Fix failure in PIPEngineGetHistoryTest

Turns out that the getAttributesTest() method depends on
testGetCountFromDb() being executed first, but junit does
not guarantee this.  Modified the code so that it is
independent of the order in which the tests are executed.

Change-Id: Ie081061e4e83895f4ac89242cf00d843b6e069d4
Issue-ID: POLICY-765
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoFix NullPointException in SO and VFC.RESPONSE 49/44749/1
Jim Hahn [Wed, 25 Apr 2018 19:28:03 +0000 (15:28 -0400)]
Fix NullPointException in SO and VFC.RESPONSE

In the rules, the $manager was missing the condition to match the
request id of the manager with the request id of the event.  As a
result, the completed operation was being applied to an unrelated
manager.

Change-Id: Icb63c0f151788e7f96450e26853270a7368dfcd8
Issue-ID: POLICY-763
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoPrevent AAI re-query 31/44531/5
Jim Hahn [Tue, 24 Apr 2018 21:15:52 +0000 (17:15 -0400)]
Prevent AAI re-query

Modified event manager code to not query AAI if there's already
a response from a previous query.
Modified code to store AAI properties in local variables instead
of static to prevent any chance of a race condition in a multi-threaded
situation.
Updated junit tests to use a new manager for each subsequent
query.
Update license.
Change variable name, in junit test, from onsetEvent to event,
because it can be any type of event.
Included fix to prevent initial AAI query if AAI data was already
available in the initial onset event.

Change-Id: Idf3e15ea8c5e297f22f23570c22fd837b72ba200
Issue-ID: POLICY-754
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoSend credentials to AAI 31/44031/6
Jim Hahn [Sat, 21 Apr 2018 05:07:34 +0000 (01:07 -0400)]
Send credentials to AAI

link: http://www.baeldung.com/httpclient-4-basic-authentication
apache HttpClient does not send the credentials by default,
but instead waits for the server to issue a challenge before
sending them.  Modified RESTManager to construct and send the
Authorization header always instead of waiting for the
challenge.
Remove unused imports.
Also add Authorization header for POST request.
Change error message to match original error message when
username is null.
Preempt sonar issue.
Allow null user name, which indicates that the Authorization header
should not be sent.  Note: this only impacts the RESTManager class;
invoking classes (e.g., AaiManager) still enforce that the user name
exists in the properties.
Fix license dates in modified test code.

Change-Id: I3cb26e76562db746939631437775727809553390
Issue-ID: POLICY-754
Signed-off-by: Jim Hahn <jrh3@att.com>
6 years agoAdd missing license headers 91/43091/1
Pamela Dragosh [Mon, 16 Apr 2018 15:53:04 +0000 (11:53 -0400)]
Add missing license headers

I removed a couple of empty README and added licenses.

Issue-ID: POLICY-741
Change-Id: I10aad3536d02b738a1dc606f7311de6b3a2777cd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoExclude commons-collections 91/42791/1
Pamela Dragosh [Fri, 13 Apr 2018 18:41:44 +0000 (14:41 -0400)]
Exclude commons-collections

Since we are not using LDAP PIP we can get rid of this jar
that has security issues.

Issue-ID: POLICY-722
Change-Id: I93feacc8733a834866476db75933d8b2cf08c212
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoUpdate to SNAPSHOT 1.2.1 87/42787/1
Pamela Dragosh [Fri, 13 Apr 2018 18:29:04 +0000 (14:29 -0400)]
Update to SNAPSHOT 1.2.1

Issue-ID: POLICY-736
Change-Id: I2bc455510e925764d18a1d8e96e072bdadb251c6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoFix Event Syntax 65/40865/1 v1.2.0
Daniel Cruz [Wed, 4 Apr 2018 02:09:58 +0000 (21:09 -0500)]
Fix Event Syntax

The "requestID" field was changed to "requestId" which brakes
the use cases since this does not conform to the events
DCAE will be sending. To avoid further issues with changed
variable names, all onset fields now have a serialized name
that will be used when serializing/deserializing with gson.

Issue-ID: POLICY-681
Change-Id: I731b0c83a9b6c9bbaae0312f76382d7f4644db8c
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoConfigure correct classnames for LCM classes 83/40783/1
Jorge Hernandez [Tue, 3 Apr 2018 19:21:04 +0000 (14:21 -0500)]
Configure correct classnames for LCM classes

Change-Id: I5305e71bb0cc844dd37ff6420cd30012f98c88ed
Issue-ID: POLICY-720
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoinstallation enhancements 77/40577/2
Jorge Hernandez [Mon, 2 Apr 2018 22:23:47 +0000 (17:23 -0500)]
installation enhancements

The following changes aim to have a quicker start of the drools container:

1.  For both amsterdam (and the experimental beijing) controllers
    dependencies are pre-installed, so the loading of 3rd party
    dependencies are faster.

2.  Further enhancements in installation.

3.  Make sure that the naming of the generated control loop
    artifacts have a "control loop" label associated with it,
    so in the future, if other applications are added (non
    control loop related) do not conflict and is clear.

Change-Id: Iecb84d186fcc34069aa5c4a175a8a4521b38499d
Issue-ID: POLICY-534
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoExclude jackson-databind 95/39895/1
Pamela Dragosh [Thu, 29 Mar 2018 00:25:35 +0000 (17:25 -0700)]
Exclude jackson-databind

we are not using this code yet, but let's remove
jackson-databind. The inclusion of drools-pdp adds
in the latest jackson-databind.

Issue-ID: POLICY-504
Change-Id: I73a1939eb3827a7ef06c40e11764944b3d80685b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoRemove ECOMP trademark 73/39773/1
Pamela Dragosh [Wed, 28 Mar 2018 18:22:26 +0000 (11:22 -0700)]
Remove ECOMP trademark

Issue-ID: POLICY-696
Change-Id: Ic33a1f7fd1c5f6368422603a3ed40d8704523240
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoRemoved checkstyle warnings 93/39093/5
mmis [Tue, 27 Mar 2018 12:13:57 +0000 (13:13 +0100)]
Removed checkstyle warnings

Removed checkstyle warnings from:
policy/drools-applications/controlloop/common/model-impl/appc
policy/drools-applications/controlloop/common/model-impl/appclcm
policy/drools-applications/controlloop/common/model-impl/events
including changes to template files due to renamed methods

Issue-ID: POLICY-705
Change-Id: Ieb93baf43268aa608f204eef1a610354f2adec32
Signed-off-by: mmis <michael.morris@ericsson.com>
6 years agoMerge "transaction logging through feature part 2"
Pamela Dragosh [Tue, 27 Mar 2018 14:09:37 +0000 (14:09 +0000)]
Merge "transaction logging through feature part 2"

6 years agoMerge "Create Drools Scripts for Beijing"
Jorge Hernandez [Tue, 27 Mar 2018 02:33:00 +0000 (02:33 +0000)]
Merge "Create Drools Scripts for Beijing"

6 years agotransaction logging through feature part 2 55/38355/2
Jorge Hernandez [Mon, 26 Mar 2018 04:50:23 +0000 (23:50 -0500)]
transaction logging through feature part 2

Change-Id: I3b411ee2855a1ffe94ffc67fccfb1e475335d036
Issue-ID: POLICY-533
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Fix path to logging class"
Jorge Hernandez [Tue, 27 Mar 2018 00:57:44 +0000 (00:57 +0000)]
Merge "Fix path to logging class"

6 years agoFix path to logging class 29/38729/1
liamfallon [Tue, 27 Mar 2018 00:09:39 +0000 (17:09 -0700)]
Fix path to logging class

The package path of LoggerUtil changed as below:
From:
import org.onap.policy.drools.utils.LoggerUtil;
To:
import org.onap.policy.drools.utils.logging.LoggerUtil;

Change-Id: I8187d97de5eeab92268baab155fb4de37f4df3ad
Issue-ID: POLICY-448
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoMerge "Add timeout to SO to wait for success"
Jorge Hernandez [Tue, 27 Mar 2018 00:06:19 +0000 (00:06 +0000)]
Merge "Add timeout to SO to wait for success"

6 years agoCreate Drools Scripts for Beijing 35/38635/1
Daniel Cruz [Mon, 26 Mar 2018 18:39:05 +0000 (13:39 -0500)]
Create Drools Scripts for Beijing

The create-cl-beijing script will now allow the user to create a rules
jar that does not need to be expanded and also generate test files that
can be used to insert facts for all the supported beijing use cases. The
yaml for each policy is provisioned by the user in case custom yaml is
desired.

In addition to this, a new script is included that will extract the
needed data from the controller properties file to insert facts for all
the supported use cases. This script can be used to insert
ControlLoopParams facts after the create-cl-beijing script is used to
generate the rules artifact. No provisioning necessary other than
specifying where the controller properties file is located.

Issue-ID: POLICY-692
Change-Id: I42f0a08fba133ca36fb1be588a720e4f9598d79f
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoRemoved checkstyle warnings 57/38057/4
mmis [Thu, 22 Mar 2018 16:36:47 +0000 (16:36 +0000)]
Removed checkstyle warnings

Removed checkstyle warnings from
policy/drools-applications/controlloop/common/model-impl/aai
including renaming classes:
AAI* -> Aai*
PNF* -> Pnf*
and renaming some methods in those classes

Issue-ID: POLICY-705
Change-Id: I2d59a668728aa58a2c9fbe78c44e924e6cfb4531
Signed-off-by: mmis <michael.morris@ericsson.com>
6 years agoMerge "Create archetype for Beijing Release"
Jorge Hernandez [Mon, 26 Mar 2018 13:52:37 +0000 (13:52 +0000)]
Merge "Create archetype for Beijing Release"

6 years agoAdd timeout to SO to wait for success 59/37159/5
liamfallon [Tue, 20 Mar 2018 15:30:17 +0000 (15:30 +0000)]
Add timeout to SO to wait for success

The timeout implementation assumes that a finished request is a HTTP-200
together with either a request state of COMPLETE or FAILED in the embedded
request in the response in the JSON. This is the same as what is done earlier
in this class and in, for example, VFC.

Unit test for timeout has also been added.

Change-Id: I637dbecb8d230b8060f7ced76d92d11ec482503e
Issue-ID: POLICY-448
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agotransaction logging through a feature 75/37975/2
Jorge Hernandez [Fri, 23 Mar 2018 06:14:12 +0000 (01:14 -0500)]
transaction logging through a feature

This is the first of 2 code inspections.

This review contains though most of the work.
It keeps tracks of all in progress transactions
by intercepting all notifications.   From that
appropriate metrics can be obtained and logged.

The actual logging of the metrics and enablement
of the feature at install time will come in a
subsequent review.

Change-Id: Ie5c8adfbdeae72758da7da8a1b4133cd4818c6fb
Issue-ID: POLICY-533
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoCreate archetype for Beijing Release 87/38087/2
Daniel Cruz [Fri, 23 Mar 2018 13:04:17 +0000 (08:04 -0500)]
Create archetype for Beijing Release

This new archetype is a proof of concept for removing
template expansion from the BRMSGW. The idea is to have
a ueb or dmaap topic that the BRMSGW uses to send params
json and then the pdp-d will deserialize it into a
ControlLoopParams object. The rules engine will then
insert that fact in to the working memory which will be
used for rules matching between onset events and
corresponding policies.

Issue-ID: POLICY-692
Change-Id: I4237221c2216dab16160e79a8f2fdcab6571e1eb
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoRemoved checkstyle warnings 09/37809/1
mmis [Thu, 22 Mar 2018 14:20:46 +0000 (14:20 +0000)]
Removed checkstyle warnings

Removed checkstyle warnings in:
policy/controlloop/common/guard
policy/controlloop/common/msb
policy/controlloop/simulators
including renaming of the following classes:
MSBServiceFactory -> MsbServiceFactory
MSBServiceManager -> MsbServiceManager
MSBServiceException -> MsbServiceException

Issue-ID: POLICY-705
Change-Id: I11d62a74fcb77e764121df119cb0bd9b844b485b
Signed-off-by: mmis <michael.morris@ericsson.com>
6 years agoMerge "Removed checkstyle warnings"
Pamela Dragosh [Thu, 22 Mar 2018 14:35:27 +0000 (14:35 +0000)]
Merge "Removed checkstyle warnings"

6 years agoRemoved checkstyle warnings 51/37751/3
mmis [Wed, 21 Mar 2018 15:22:10 +0000 (15:22 +0000)]
Removed checkstyle warnings

Removed checkstyle warnings in:
policy/drools-applications/controlloop/common/actors
policy/drools-applications/controlloop/common/eventmanager
policy/drools-applications/controlloop/common/feature-controlloop-utils

Issue-ID: POLICY-705
Change-Id: Iccf99b291bc62bc3ba2082ccdb4c1f9e12107896
Signed-off-by: mmis <michael.morris@ericsson.com>
6 years agoMerge "Fix Serialized Names for Legacy APPC"
Pamela Dragosh [Thu, 22 Mar 2018 12:25:48 +0000 (12:25 +0000)]
Merge "Fix Serialized Names for Legacy APPC"

6 years agoFix Serialized Names for Legacy APPC 25/37625/2
CRUZ [Thu, 22 Mar 2018 00:49:32 +0000 (19:49 -0500)]
Fix Serialized Names for Legacy APPC

The legacy APPC request and response messages must be upper camel case.

Issue-ID: POLICY-681
Change-Id: I439fa22b76dd2cb35a054bf93260705b8cf1af51
Signed-off-by: dc443y <dc443y@att.com>
6 years agoMerge "Fix Serialized Names of A&AI Subtag"
Pamela Dragosh [Tue, 20 Mar 2018 12:37:43 +0000 (12:37 +0000)]
Merge "Fix Serialized Names of A&AI Subtag"

6 years agoFix Serialized Names of A&AI Subtag 89/36889/1
dc443y [Tue, 20 Mar 2018 02:04:50 +0000 (21:04 -0500)]
Fix Serialized Names of A&AI Subtag

Onset events received from DCAE contain an "AAI" subtag that is
capitalized. The casing of the AAI variable was changed to lower case which was making the gson serializer unable to deserialze a simulated onset event that
matches the casing DCAE uses, which resulted in Policy rejecting the
events because they appear to be missing "AAI".

A serialized name was added to preserve the lower cased variable as
sonar wants but will also allow onsets with capitalized AAI
subtags to be processed by the rules engine.

Issue-ID: POLICY-681
Change-Id: Ia37694f606b3fb0898d6c4dadea7c48c5372e64e
Signed-off-by: dc443y <dc443y@att.com>
6 years agoUpdate oparent version to 1.1.0 35/35835/2
liamfallon [Wed, 14 Mar 2018 21:39:34 +0000 (21:39 +0000)]
Update oparent version to 1.1.0

Directive from ONAP project that all repos should be
updated. Change vierified with a build with .m2 /org/onap
cleared.

Changed dependency org.onap.msb.java-sdki.msb-java-sdk from
version 1.1.0-SNAPSHOT to version 1.1.0

Change-Id: I46abc49019cb81b726e3f71ca8fe1beed621a426
Issue-ID: POLICY-693
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoMerge "Changed SO request to iterate extra props"
Pamela Dragosh [Wed, 14 Mar 2018 15:45:21 +0000 (15:45 +0000)]
Merge "Changed SO request to iterate extra props"

6 years agoChanged SO request to iterate extra props 59/35759/3
Magnusen, Drew (dm741q) [Wed, 14 Mar 2018 13:36:25 +0000 (08:36 -0500)]
Changed SO request to iterate extra props

Modified SoActorServiceProvider.constructRequest() method so that it
iterates over extra properties instead of hard coding array values.

Issue-ID: POLICY-443
Change-Id: I37d6be9dc595bd8d5e9f9f3f63d6890ef1b2f8b3
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoFix artifactid parameter in archetype POM 41/35741/1
liamfallon [Wed, 14 Mar 2018 11:07:28 +0000 (11:07 +0000)]
Fix artifactid parameter in archetype POM

The parameter ${artifactId} is depricated in POMs. This change replaces that
parameter ${project.artifactId}

Change-Id: I754fe11918707c599847471c438bedfd1285b0ed
Issue-ID: POLICY-238
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoMerge "Upgrade MSB client for security issues"
Jorge Hernandez [Fri, 2 Mar 2018 18:15:50 +0000 (18:15 +0000)]
Merge "Upgrade MSB client for security issues"

6 years agoUpgrade MSB client for security issues 21/33821/1
Pamela Dragosh [Fri, 2 Mar 2018 16:04:27 +0000 (11:04 -0500)]
Upgrade MSB client for security issues

Via LiZi, the MSB team has made some changes to resolve
their CLM security issues. We will upgrade to their release
version when they have completed that work.

Issue-ID: POLICY-615
Change-Id: I7ccc0e0f14d4d8ae8b6852275308b1aad62acaa3
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "Reduce Technical Debt on drools-applications"
Pamela Dragosh [Fri, 2 Mar 2018 16:02:28 +0000 (16:02 +0000)]
Merge "Reduce Technical Debt on drools-applications"

6 years agoReduce Technical Debt on drools-applications 97/33797/1
liamfallon [Fri, 2 Mar 2018 14:24:23 +0000 (14:24 +0000)]
Reduce Technical Debt on drools-applications

This commit mops up the technical debt issues in
drools-applications that are reaistic to fix witout
major surgery on the code.

note: warnings on non compliant Java class names that are used in
yaml serializaiton and deserailization are ignored.

note: warnings on complexity figures for equals() methods are ignored.

Issue-ID: POLICY-455
Change-Id: I99ccda4bd9932ceb5ccbcfd2778730234b55d7a5
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoRemove CLM issues with commons-collections 87/33687/1
Pamela Dragosh [Thu, 1 Mar 2018 22:11:20 +0000 (17:11 -0500)]
Remove CLM issues with commons-collections

We know that we are not configuring an LDAP PIP in our
use of the XACML open source. The LDAP implementation
uses Apache Velocity, which uses a very old version
of commons-collections that has security issues. So
we can exclude commons-collections from the build.

Issue-ID: POLICY-504
Change-Id: I6d90731e601f58c8edaca6fe02df30ee2a090c2f
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoSupport vDNS scale out for multiple times 85/32385/1
SwapnilPathak [Wed, 21 Feb 2018 11:26:27 +0000 (16:56 +0530)]
Support vDNS scale out for multiple times

Generation of Unique values for attribute vf-module-name for every scale out operation

Change-Id: I5274361c2f5a4136020a384dbe4a4009607f589a
Issue-ID: POLICY-610
Signed-off-by: SwapnilPathak <SP00494485@techmahindra.com>
6 years agoRename maven modules to mirror directory structure 93/31593/6
liamfallon [Tue, 13 Feb 2018 11:29:56 +0000 (11:29 +0000)]
Rename maven modules to mirror directory structure

The naming of Maven modules in drools-applications was not
aligned with the directory structure in the git repository
of drools-applications. Therefore it was difficult to
see the strucutre of the repository in Eclipse and other
IDEs. This change amends the Maven module IDs to
reflect the repository directory structure.

This patch reset fixes the previos patch set, where many
references to maven modules internally in drools-applciations
were missed. See also changes in engine and docker repos.

Updated to reflect repo directory structure in maven
artifact groups.

Issue-ID: POLICY-238
Change-Id: I8ab1a7ecdb664045222bbbfda269135e3e449109
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoModify sonar settings to include all sub-modules 83/31983/1
Pamela Dragosh [Fri, 16 Feb 2018 15:41:37 +0000 (10:41 -0500)]
Modify sonar settings to include all sub-modules

We are now including all the sub-modules coverage into one file.
This will now reflect correct statistics for any sub-module that
tests code located in another sub-module.

Issue-ID: POLICY-634
Change-Id: Id96eb9e9f637770932067bd803cb5ccdb571c05a
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "Fix technical debt/JUnit on policy-yaml"
Jorge Hernandez [Mon, 12 Feb 2018 16:54:48 +0000 (16:54 +0000)]
Merge "Fix technical debt/JUnit on policy-yaml"

6 years agoFix technical debt/JUnit on policy-yaml 25/31425/1
mmis [Mon, 12 Feb 2018 11:54:51 +0000 (11:54 +0000)]
Fix technical debt/JUnit on policy-yaml

Unit tests added and technical debt removed

Issue-ID: POLICY-455
Change-Id: I31566f9386cb94d78e9af3d6261e31b9cad1cb53
Signed-off-by: mmis <michael.morris@ericsson.com>
6 years agoTidy dependencies and scopes in POMs 61/31261/1
liamfallon [Sun, 11 Feb 2018 12:42:11 +0000 (12:42 +0000)]
Tidy dependencies and scopes in POMs

There were some duplicate dependencies in the POMs that were causing warnings.
These have been removed. In cases where the revision of the duplicate
dependencies were different,the latest revision was used.

The scope of the "junit" dependency was "provided" in some POMs. These have been
corrected with the scope of "test" being used for junit dependencies.

Issue-ID: POLICY-238

Change-Id: Ib1cc6f040b0c4d7f2b39ae02bc6fb4590d395809
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoMerge "Upgrade XACML jar"
Jorge Hernandez [Fri, 9 Feb 2018 15:52:57 +0000 (15:52 +0000)]
Merge "Upgrade XACML jar"

6 years agoMerge "Remove Technical Debt from MSB code"
Pamela Dragosh [Fri, 9 Feb 2018 15:08:42 +0000 (15:08 +0000)]
Merge "Remove Technical Debt from MSB code"

6 years agoUpgrade XACML jar 93/31093/1
Pamela Dragosh [Fri, 9 Feb 2018 14:52:40 +0000 (09:52 -0500)]
Upgrade XACML jar

XACML was released with minor fixes for XML files with comments. Mainly
it contained upgrade to dependencies that had fixed security issues. One
still remains but will not be able to be fixed.

Issue-ID: POLICY-616
Change-Id: Ifaf4f92d8da878a1c49dff5fd028744d01999ff5
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoRemove Technical Debt from MSB code 75/31075/1
liamfallon [Fri, 9 Feb 2018 13:17:41 +0000 (13:17 +0000)]
Remove Technical Debt from MSB code

Some minor warnings showed up in Eclipse on the MSB module. This change
removes those warnings.

Issue-ID: POLICY-455

Change-Id: Ibdd8c563120178d73a55adfd0d8853b6bc82b820
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoJUint/Technical Debt for eventmanager 25/30925/2
liamfallon [Thu, 8 Feb 2018 21:54:16 +0000 (21:54 +0000)]
JUint/Technical Debt for eventmanager

Unit test expanded for SO POJOs, technical debt removed in eventmanager.

Change-Id: I7045f5af88fd2c15019befe29a0b4fcd69801c49
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Issue-ID: POLICY-455
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
6 years agoMerge "Resolve security issues SONATYPE-2017-0359"
Jorge Hernandez [Wed, 7 Feb 2018 20:50:20 +0000 (20:50 +0000)]
Merge "Resolve security issues SONATYPE-2017-0359"

6 years agoResolve security issues SONATYPE-2017-0359 83/30683/1
Pamela Dragosh [Wed, 7 Feb 2018 16:01:19 +0000 (11:01 -0500)]
Resolve security issues SONATYPE-2017-0359

Upgrade httpclient to 4.5.5 - the latest version.

Issue-ID: POLICY-612
Change-Id: I5e79918bc447889b1dbcd1bf897c3324f6a0cc0d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "Fix technical debt/JUnit on MSB"
Jorge Hernandez [Wed, 7 Feb 2018 15:58:54 +0000 (15:58 +0000)]
Merge "Fix technical debt/JUnit on MSB"

6 years agoFix technical debt/JUnit on MSB 31/30431/3
eeimmis [Tue, 6 Feb 2018 09:43:40 +0000 (09:43 +0000)]
Fix technical debt/JUnit on MSB

Unit tests added and technical debt removed

Issue-ID: POLICY-455
Change-Id: Ib10613ff7cac64bb576046e038b2acbd66152648
Signed-off-by: mmis <michael.morris@ericsson.com>