policy/drools-applications.git
5 years agoAdd implementation for OOF PCI use case 19/65519/7
Saravanan A [Mon, 10 Sep 2018 12:01:33 +0000 (17:31 +0530)]
Add implementation for OOF PCI use case

Receive DMaaP message from PCI-Handler MS with PCI Config
change recommendations through DCAE_CL_OUTPUT topic.

Trigger SDN-R (if allowed by policy) by sending
DMaaP request through SDNR-CL topic.

When the response is received from SDNR through
SDNR-CL-RSP topic, just parse and print.

Code review comments addressed

Change-Id: If340a23ae18367b7f98e31fe79c09a09e645b2ad
Issue-ID: POLICY-1089
Signed-off-by: Saravanan A<saravanan.a75@wipro.com>
5 years agodisable http for drools apps using dmaap 55/65655/1
Jorge Hernandez [Tue, 11 Sep 2018 05:05:53 +0000 (00:05 -0500)]
disable http for drools apps using dmaap

per security guidelines ..

Change-Id: I1db4468f20c3bd22a9e5f27fefcb76b55a3b6d89
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Issue-ID: POLICY-1105

5 years agoAdded min and max vnf count support 61/65561/4
Michael Mokry [Fri, 7 Sep 2018 21:46:20 +0000 (16:46 -0500)]
Added min and max vnf count support

Added variables for min and max with associated Constructor,  getters and setters
We will need to merge this commit before merging the policy/engine
commit to avoid compilation errors in policy/engine build

Made changes to address Jim Hahn's comments

Change-Id: I45357077cfe046028adcc0033ecf29f8cc1a525b
Issue-ID: POLICY-1038
Signed-off-by: Mike Mokry <mm117s@att.com>
5 years agoFix new sonar issue with vfModuleItem 15/65115/4
Piyush Garg [Fri, 7 Sep 2018 03:41:00 +0000 (09:11 +0530)]
Fix new sonar issue with vfModuleItem

find the last non-base vf module item from AAI response and use the same
to construct create or delete vf module SO request

Change-Id: I3b9b97ac3008f6e4f7952662d9e4262f77dbeec4
Issue-ID: POLICY-1079
Signed-off-by: Piyush Garg <piyush.garg1@amdocs.com>
5 years agoMerge "Added support for VF Module Delete recipe"
Pamela Dragosh [Thu, 6 Sep 2018 00:27:03 +0000 (00:27 +0000)]
Merge "Added support for VF Module Delete recipe"

5 years agoMerge "Added junit test for commitAbatement."
Jorge Hernandez [Wed, 5 Sep 2018 20:08:42 +0000 (20:08 +0000)]
Merge "Added junit test for commitAbatement."

5 years agoAdd appc lcm request formatter 57/63957/7
Gabriel [Fri, 31 Aug 2018 09:20:43 +0000 (11:20 +0200)]
Add appc lcm request formatter

Formatter is used to dash case recipe in URL and camel case it in body.

Issue-ID: POLICY-1083

Change-Id: I908ae93665f3d069b3a032ae378b7775ebe1110a
Signed-off-by: Gabriel <adam.krysiak@nokia.com>
5 years agoAdded junit test for commitAbatement. 37/61437/5
Joshua Reich [Sun, 19 Aug 2018 07:57:54 +0000 (00:57 -0700)]
Added junit test for commitAbatement.

Change-Id: Iee71481e357861618bed068f8b8ef37ec0ea2ab8
Issue-ID: POLICY-975
Signed-off-by: Joshua Reich <jreich@research.att.com>
5 years agoAdded support for VF Module Delete recipe 33/63433/7
Piyush Garg [Wed, 29 Aug 2018 10:10:53 +0000 (15:40 +0530)]
Added support for VF Module Delete recipe

Enhanced SOActorServiceProvider to support VF Module Delete Recipe.
Added SOOperationType enum to map the policy recipe with the SO API that
we want to call for a recipe. vf module id from non-base vf module is
used to construct the delete request url and same will be deleted.

Updated SOManager so that it sends request to SO based on the
SOOperationType enum value.

Enhanced RESTManager to add support for the http delete using new class
HttpDeleteWithBody (to allow pass the payload to the SO delete VF module API).

Change-Id: I15b678ed9ebc85dfa7cb62bbf23e41c0fe6e4c69
Issue-ID: POLICY-1079
Signed-off-by: Piyush Garg <piyush.garg1@amdocs.com>
5 years agopass VF count to guard for scale-out 71/64071/2
Jim Hahn [Fri, 31 Aug 2018 20:26:05 +0000 (16:26 -0400)]
pass VF count to guard for scale-out

Also updated license dates.
Fixed new checkstyle errors.

Change-Id: Ia6153814c4333724185918f76be560aba5a52f96
Issue-ID: POLICY-1084
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd code to store abatement events. 35/61435/5
Joshua Reich [Tue, 14 Aug 2018 22:04:03 +0000 (15:04 -0700)]
Add code to store abatement events.

Stores abatement events in history DB.

Change-Id: Ifca6acd42cd9eea85e27765bd268a491028e305a
Issue-ID: POLICY-975
Signed-off-by: Joshua Reich <jreich@research.att.com>
5 years agoFix remaining checkstyle 57/63457/6
Pamela Dragosh [Wed, 29 Aug 2018 11:58:53 +0000 (07:58 -0400)]
Fix remaining checkstyle

Lots of formatting, missing javadoc, distance from use,
imports must be explicit, ordering of methods.

Fixed some abbreviation problems in classes and renamed
JUnit tests to fix this.

Issue-ID: POLICY-883
Change-Id: I8494f63d88d63c0232aca97f7bcc848816228fb1
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoRemove overriding dependencies warnings 95/63295/4
Pamela Dragosh [Tue, 28 Aug 2018 15:57:33 +0000 (11:57 -0400)]
Remove overriding dependencies warnings

With the move to oparent for dependencies, there are still
some warnings in the pom's for overriding managed dependencies.

Issue-ID: INT-619
Change-Id: I7ea771cc4536d8dfc77b4d1717e59cf6bfcfcda9
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "use new SO API for scale-out"
Pamela Dragosh [Tue, 28 Aug 2018 15:22:22 +0000 (15:22 +0000)]
Merge "use new SO API for scale-out"

5 years agouse new SO API for scale-out 49/63149/3
Jim Hahn [Mon, 27 Aug 2018 19:32:14 +0000 (15:32 -0400)]
use new SO API for scale-out

Updated licenses and serialization IDs.
Moved hashCode() and equals() methods to be in same location as in the
original code so it can be more easily compared.
Changed vDNS yaml timeout and retry to 1200 and 0, respectively, to match
the original values.
Removed extra newline from yaml, to match original yaml.
Reformatted source to wrap lines at 120 characters and removing trailing
white space.

Change-Id: I3f5e59a1f44750347de49164f587d4ffefdee8b4
Issue-ID: POLICY-962
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoChange parent to policy/parent 71/63271/2
Pamela Dragosh [Tue, 28 Aug 2018 13:57:31 +0000 (09:57 -0400)]
Change parent to policy/parent

Should be pointing to policy/parent rather than oparent
directly. This will automatically support upgrades more
easily. Also removing duplicated managed version override
warnings from Maven.

This is continuing work to support the integration effort
to consolidate common versions of java dependencies across
all projects.

Issue-ID: INT-619
Change-Id: I37ac20e669262d9ac8fff09fd1ac540190b47a30
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agouse new vf-walk code in SO request 93/62393/2
Jim Hahn [Fri, 24 Aug 2018 18:00:30 +0000 (14:00 -0400)]
use new vf-walk code in SO request

Methods were added to AaiNqResponseWrapper to extract VF modules
and generate the new VF module name.  This step modifies the SO
code to use those methods.  It was also determined that the SO
code needs the VF module container object, not just the VF module,
itself.  As a result, AaiNqResponseWrapper was modified to return
a list of the containers instead of a list of the VF modules.

Also modified the AAI simulator to return two VF modules in the
response to the vserver named query.  As part of that, a method
was added to the simulator so that JSON responses can be read from
files rather than having to convert them to Java Strings.

Modified simulator to work even if vnf-id is null.

Change-Id: I68fdf07ea80ee0daf9e16403e35b11710315a8a8
Issue-ID: POLICY-1037
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agowalk VF module names 05/62205/7
jh7358 [Thu, 23 Aug 2018 21:00:50 +0000 (17:00 -0400)]
walk VF module names

Added code to walk the VF modules to count the number of modules and
to generate the new module instance name.
Added comment to test method.
Fix checkstyle errors.
Read json files instead of resources.
Removed checkstyle plugin from aai pom, as it continues to barf every
time I use some automated feature of Eclipse.
Use Files.readAllBytes() instead of IoUtils.toString(uri).
Try concatenating file path.
Turned out to be a problem with file name case sensitivity - renamed
the file.

Change-Id: I1ce98d846dfa1d29e109b161c869108425d29771
Issue-ID: POLICY-1037
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agomove AAI named query 73/61673/2
Jim Hahn [Tue, 21 Aug 2018 19:54:11 +0000 (15:54 -0400)]
move AAI named query

The AAI vserver named-query was being done as a preliminary step for the
SO request.  However, it will now be needed during the guard query, which
happens much earlier.  Thus it has been moved from the SO classes into
the event manager class, where it is retrieved in a lazy fashion and
cached.
Also removed some trailing white space.
Update licenses.
Make test method private.

Change-Id: Id7353a2e0f2d42601d5142cb92961528fa21aa94
Issue-ID: POLICY-1011
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agofix new sonar issues with prov-status check 63/60963/3
Jim Hahn [Thu, 16 Aug 2018 18:57:15 +0000 (14:57 -0400)]
fix new sonar issues with prov-status check

Changes made while adding the prov-status check triggered some sonar
thresholds in ControlLoopEventManager.  Updated the code to resolve
them.  One of the changes that had been introduced was to check for
the existence of both the is-closed-loop-disabled AND the prov-status
fields.  However, if one is there then the other should be there, thus
the second check is redundant and was removed, which should reduce the
cyclomatic complexity back under the threshold.
Re-ordered the code a little, to make it less ambiguous.
Removed trailing white space.

Change-Id: If0ce74cedbf947c32cae3df3374cda6ba1305cd2
Issue-ID: POLICY-964
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoadd prov-status check to AAI queries 01/60801/2
Jim Hahn [Wed, 15 Aug 2018 20:34:02 +0000 (16:34 -0400)]
add prov-status check to AAI queries

Also had to add prov-status field to AaiGetVnfResponse class.
Removed bogus comment from test.
Verify response is not null in test.
Verify no requery by vnf name in test.
Add prov-status to template.demo tests.
Add prov-status to sample json for archetype-cl's.

Change-Id: I3f36a2bb6de8265ce5b10103690d6d8813c15b1a
Issue-ID: POLICY-964
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Fix checkstyle issues"
Jorge Hernandez [Wed, 15 Aug 2018 18:11:01 +0000 (18:11 +0000)]
Merge "Fix checkstyle issues"

5 years agoMerge "update AAI response classes per API"
Pamela Dragosh [Wed, 15 Aug 2018 15:20:09 +0000 (15:20 +0000)]
Merge "update AAI response classes per API"

5 years agoFix checkstyle issues 97/60597/1
Pamela Dragosh [Tue, 14 Aug 2018 18:22:34 +0000 (14:22 -0400)]
Fix checkstyle issues

Spacing, missing javadoc

Issue-ID: POLICY-883
Change-Id: Ice65c6c1baf0bb7c6273411f078bacfe3496b89b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoupdate AAI response classes per API 91/60091/2
Jim Hahn [Fri, 10 Aug 2018 22:16:21 +0000 (18:16 -0400)]
update AAI response classes per API

Several of the AAI response classes did not match the new AAI
interface.  Updated AaiGetVnfResponse and AaiGetVserverResponse
and the classes they use to reflect the new API; other top-level
classes were left untouched.
Fix checkstyle errors.

Change-Id: Ife5830c45ba8aece8d676a10f0fd8a9c9fe6cb66
Issue-ID: POLICY-964
Signed-off-by: Jim Hahn <jrh3@att.com>
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"