policy/drools-applications.git
6 years agoBump up artifacts version to 1.1.3-SNAPSHOT 09/28109/3 amsterdam 1.0.1-Amsterdam 1.0.1-ONAP v1.1.3
Marco Platania [Sat, 13 Jan 2018 23:19:38 +0000 (18:19 -0500)]
Bump up artifacts version to 1.1.3-SNAPSHOT

Change-Id: I94b681b64a537695a75b6332b646c82a609dd1d5
Issue-ID: POLICY-486
Signed-off-by: Marco Platania <platania@research.att.com>
6 years agoremove synchronized calls to avoid race conditions 45/25745/1 v1.1.2
Jorge Hernandez [Wed, 6 Dec 2017 21:46:08 +0000 (15:46 -0600)]
remove synchronized calls to avoid race conditions

This is to prevent potential problems where multiple jar versions are
updated one after the other.

Change-Id: I78835b485e57125efb213cfdefba60351d815916
Issue-ID: POLICY-487
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Update version.properties 1.1.2" into amsterdam
Pamela Dragosh [Mon, 20 Nov 2017 19:49:52 +0000 (19:49 +0000)]
Merge "Update version.properties 1.1.2" into amsterdam

6 years agoUpdate version.properties 1.1.2 23/24523/1
Pamela Dragosh [Thu, 16 Nov 2017 19:09:02 +0000 (14:09 -0500)]
Update version.properties 1.1.2

Missed this in the last update.

Issue-ID: POLICY-436
Change-Id: I673f13d75c8676630a94f8706bf1ceea91608518
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
(cherry picked from commit 483dcd2272e2b8a0c8812851d2c81609da390b4c)

6 years agoUpgrade to 1.1.2-SNAPSHOT 09/24509/1
Pamela Dragosh [Wed, 15 Nov 2017 16:47:35 +0000 (11:47 -0500)]
Upgrade to 1.1.2-SNAPSHOT

Released 1.1.1, now must bump patch by 1

Issue-ID: POLICY-436
Change-Id: I3f5e4c369575f6fe1fa06cabb96a5bd43cb11087
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
(cherry picked from commit fbe7e04d1961055213d9b71bcac7d1dac6a80043)

6 years agoUpdate default branch to Amsterdam 43/24443/1
Daniel Cruz [Mon, 20 Nov 2017 18:12:30 +0000 (12:12 -0600)]
Update default branch to Amsterdam

Updating the default git branch for the amsterdam release branch.

Issue-Id: POLICY-453
Change-Id: Icd896f774d27103412e311200f7148cb32f10ac7
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoMerge "Update SO to use is-base-vf-module=false" 1.0.0-Amsterdam 1.0.0-ONAP v1.1.1
Pamela Dragosh [Tue, 14 Nov 2017 00:57:19 +0000 (00:57 +0000)]
Merge "Update SO to use is-base-vf-module=false"

6 years agoUpdate SO to use is-base-vf-module=false 15/23415/3
Hockla, Ali (ah999m) [Mon, 13 Nov 2017 23:12:28 +0000 (17:12 -0600)]
Update SO to use is-base-vf-module=false

Issue-ID: POLICY-447
Change-Id: I63cd5d20670f224aa4b9220b99ee40aad4f3e50c
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agodefault archetype tooling to 1.1.1 85/23385/2
Jorge Hernandez [Mon, 13 Nov 2017 18:45:53 +0000 (12:45 -0600)]
default archetype tooling to 1.1.1

Change-Id: I84cf9fe9e954a9ee9bac8eaff56169e44154e9c5
Issue-ID: POLICY-446
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Fix release job"
Jorge Hernandez [Sat, 11 Nov 2017 03:54:23 +0000 (03:54 +0000)]
Merge "Fix release job"

6 years agoFix release job 05/23205/2
Pamela Dragosh [Sat, 11 Nov 2017 01:11:58 +0000 (20:11 -0500)]
Fix release job

Missing staging repo

Issue-ID: POLICY-441
Change-Id: Ib652d90ced62d8e96fd737ddd491c7a96d5dd45c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoFix SO Request mismatch and udpate AAI NQ response 45/23145/1
Hockla, Ali (ah999m) [Fri, 10 Nov 2017 17:27:15 +0000 (11:27 -0600)]
Fix SO Request mismatch and udpate AAI NQ response

Issue-ID: POLICY-438
Change-Id: I1d27d0e5f7d253aa3cba82f5f4b515c01be35d8b
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoFix SO Request structure 63/22963/1
Hockla, Ali (ah999m) [Thu, 9 Nov 2017 14:38:35 +0000 (08:38 -0600)]
Fix SO Request structure

Issue-ID: POLICY-438
Change-Id: I05e634782004fff5540b3e6fabb9e22846438cb1
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoMerge "Fix SO Request body"
Jorge Hernandez [Thu, 9 Nov 2017 04:03:10 +0000 (04:03 +0000)]
Merge "Fix SO Request body"

6 years agoMerge "Update SNAPSHOT version"
Jorge Hernandez [Wed, 8 Nov 2017 23:59:42 +0000 (23:59 +0000)]
Merge "Update SNAPSHOT version"

6 years agoFix SO Request body 57/22857/1
Hockla, Ali (ah999m) [Wed, 8 Nov 2017 23:27:16 +0000 (17:27 -0600)]
Fix SO Request body

- Renamed modelNameVersionId to modelVersionId in SOModelInfo
- Removed requestID from SO Request body
- As a result of this, an SOResponseWrapper was needed in order to
  attach the control loop event requestId to use in the SOResponse
  rule in drl (the requestID that is returned in the SO response
  is a newly generated requestId with no relation to the Policy
  control loop event requestId as per Arthur)
- Updated drl to reflect the above mentioned change
- Updated simulator and junits to reflect changes
- Added an additional null httpResponse check/logger statement in SOManager and RestManager

Issue-ID: POLICY-438
Change-Id: I5f414ba69b60b5565cca9073b47f4c4835e5abbf
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoFix SO url to remove suffix HTTPS/1.1 33/22833/1
Hockla, Ali (ah999m) [Wed, 8 Nov 2017 19:38:51 +0000 (13:38 -0600)]
Fix SO url to remove suffix HTTPS/1.1

Issue-ID: POLICY-437
Change-Id: I19679d9782f78ff73e3a90d0c8c95b2b6e9d319f
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoUpdate SNAPSHOT version 27/22627/2
Pamela Dragosh [Wed, 8 Nov 2017 02:13:02 +0000 (21:13 -0500)]
Update SNAPSHOT version

Releasing v1.1.0 so need to update version to 1.1.1

Issue-ID: POLICY-436
Change-Id: I8b85de39bb3a32f5f4faeeb4fcdfb5d95291ae31
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoSNAPSHOT present in policy core and msb deps 35/22535/1 v1.1.0
Jorge Hernandez [Tue, 7 Nov 2017 15:04:10 +0000 (09:04 -0600)]
SNAPSHOT present in policy core and msb deps

Change-Id: I61c8d698f8cf984c648e510997498d41e7d9744a
Issue-ID: POLICY-433
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoFix Generic VNF isClosedLoopDisabled 43/22043/1
daniel [Fri, 3 Nov 2017 15:39:23 +0000 (10:39 -0500)]
Fix Generic VNF isClosedLoopDisabled

No A&AI queries will be done for enriched events.
The event manager now understands prepended "generic-vnf."
in front of is-closed-loop-disabled from DCAE onsets.
A test case was revised to include sample data from an
enriched onset with vnf data based on the VES documentation.

Issue-Id: POLICY-350
Change-Id: Id7f59f8b860b9f147087067a2a9a7766f167f7e4
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoMerge "Made network.log output more verbose."
Pamela Dragosh [Fri, 3 Nov 2017 14:29:29 +0000 (14:29 +0000)]
Merge "Made network.log output more verbose."

6 years agoMade network.log output more verbose. 35/21935/3
Magnusen, Drew (dm741q) [Thu, 2 Nov 2017 20:41:48 +0000 (15:41 -0500)]
Made network.log output more verbose.

Incoming values were not expanded in network logs for several
drools-applications. Current patch makes them more verbose.

Issue-ID: POLICY-410
Change-Id: I64bf88a3b39ea58dceaf24de698c8ae6a9a3f8b2
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoMerge "Write to DB on guard deny"
Pamela Dragosh [Fri, 3 Nov 2017 14:09:27 +0000 (14:09 +0000)]
Merge "Write to DB on guard deny"

6 years agoMerge "Add fix to catch exception"
Jorge Hernandez [Fri, 3 Nov 2017 03:36:11 +0000 (03:36 +0000)]
Merge "Add fix to catch exception"

6 years agoWrite to DB on guard deny 29/21929/2
Temoc Rodriguez [Thu, 2 Nov 2017 18:12:39 +0000 (11:12 -0700)]
Write to DB on guard deny

When an operations was denied by guard, it was not writing to the DB at
all. Only in the deny case we start the operation, then
setOperationHasGuardDeny, then finish the operation. Had to add start
operation just before finishing it. This allows the write to occur at
setOperationHasGuardDeny.

Issue-ID: POLICY-345
Change-Id: I665b9cfaa684493e39e731102d4d43ecb39fad7c
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoAdded fix to catch null pointer in SOManager 21/21921/3
Hockla, Ali (ah999m) [Thu, 2 Nov 2017 17:14:29 +0000 (12:14 -0500)]
Added fix to catch null pointer in SOManager

Issue-ID: POLICY-408
Change-Id: I9f6681b8cbafdd9639966d862e7b1df3b729297e
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoAdd fix to catch exception 37/21937/1
Ritu Sood [Thu, 2 Nov 2017 12:29:49 +0000 (05:29 -0700)]
Add fix to catch exception

Added fix to catch exception caused by
NULL url provided to Policy for VFC

Change-Id: Ifb8bdf41fbb212acf13d388d041d3cb44143caeb
Issue-ID: POLICY-408
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
6 years agoMerge "Fix Abatement Processing"
Pamela Dragosh [Tue, 31 Oct 2017 17:20:08 +0000 (17:20 +0000)]
Merge "Fix Abatement Processing"

6 years agoFix Abatement Processing 91/21491/5
daniel [Tue, 31 Oct 2017 12:37:41 +0000 (07:37 -0500)]
Fix Abatement Processing

The drools engine will now only fire the event rule if the
event is an onset. This prevents abatements from being processed
as onsets.

Issue-Id: POLICY-407
Change-Id: Ic74efa74fbb1dc0e01d7c36a06fdaf48fc8a3238
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoPassed classloader property to entitymanager. 15/21515/2
Magnusen, Drew (dm741q) [Tue, 31 Oct 2017 14:41:11 +0000 (09:41 -0500)]
Passed classloader property to entitymanager.

Passed property EntityManager that sets its class loader.

Issue-ID: POLICY-345
Change-Id: Ie2a94feb442243de18cc4de5aab0312a02565729
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoclean up parent pom pre-release 93/21393/1
Jorge Hernandez [Mon, 30 Oct 2017 23:51:07 +0000 (18:51 -0500)]
clean up parent pom pre-release

remove also hardcoded references to snapshots that
won't work when released

Change-Id: If0c43699388e0bf700024b9428c8c21dccfe6797
Issue-ID: POLICY-404
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "change parent pom for msb module"
Jorge Hernandez [Mon, 30 Oct 2017 18:05:45 +0000 (18:05 +0000)]
Merge "change parent pom for msb module"

6 years agochange parent pom for msb module 25/21325/1
Jorge Hernandez [Mon, 30 Oct 2017 17:06:36 +0000 (12:06 -0500)]
change parent pom for msb module

Change-Id: I7584c76ba8f7ba4c1d55d556c0d3f36eb1347ccc
Issue-ID: POLICY-402
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoUpdate SO url from v2 to v5 09/21309/2
Hockla, Ali (ah999m) [Mon, 30 Oct 2017 16:14:54 +0000 (11:14 -0500)]
Update SO url from v2 to v5

Issue-ID: POLICY-401
Change-Id: Id1be63d2f61bc0d9d8f15df7573af2c7307c1c31
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoMerge "Fix Final Failure on AAI Queries"
Pamela Dragosh [Mon, 30 Oct 2017 14:12:57 +0000 (14:12 +0000)]
Merge "Fix Final Failure on AAI Queries"

6 years agoFix Final Failure on AAI Queries 91/21291/1
daniel [Mon, 30 Oct 2017 12:58:34 +0000 (07:58 -0500)]
Fix Final Failure on AAI Queries

The drools engine will now send final failure notifications
if there is an error returned from  A&AI queries instead of
rejected notifications.

Issue-Id: POLICY-364
Change-Id: Ie9c22686d859c633bad47d223726957cc9599f7c
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoSend final failure on null vfc request 81/21081/1
Charles Cole [Fri, 27 Oct 2017 21:19:13 +0000 (16:19 -0500)]
Send final failure on null vfc request

Made sure a final failure is sent and the memroy is cleaned up if we
cannot contruct a vfc request.

Issue-Id: POLICY-350
Change-Id: Ia9bc827572042ae6ff2d2d2851d33034ee86fc49
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoremove explicit call to shutdown in junits 75/21075/1
Jorge Hernandez [Fri, 27 Oct 2017 20:31:19 +0000 (15:31 -0500)]
remove explicit call to shutdown in junits

since it will exit the process immediately in
a graceful case and affect junit execution.

Change-Id: Ibcbb65269203e189515f68c557686c29667307e2
Issue-ID: POLICY-386
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Ensure no AAI lookup on subsequent onset"
Jorge Hernandez [Wed, 25 Oct 2017 17:25:05 +0000 (17:25 +0000)]
Merge "Ensure no AAI lookup on subsequent onset"

6 years agoMerge "Fix sonar blocker for SOManager"
Jorge Hernandez [Wed, 25 Oct 2017 17:23:25 +0000 (17:23 +0000)]
Merge "Fix sonar blocker for SOManager"

6 years agoEnsure no AAI lookup on subsequent onset 83/20583/2
Charles Cole [Wed, 25 Oct 2017 15:51:42 +0000 (10:51 -0500)]
Ensure no AAI lookup on subsequent onset

Decoupled checking AAI data from checking an event's syntax so that new
onsets can check both while all other events can just check the syntax.

Issue-Id: POLICY-371
Change-Id: Ic76b1335b389bbec47ff0d29485ccbb249d5f18c
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoFix sonar blocker for SOManager 85/20585/1
Hockla, Ali (ah999m) [Wed, 25 Oct 2017 17:03:48 +0000 (12:03 -0500)]
Fix sonar blocker for SOManager

Issue-ID: POLICY-385
Change-Id: I142877a3173a028738b1aa2aea9521f6208bab38
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoFix Source/Target Lock 83/20483/2
daniel [Wed, 25 Oct 2017 03:00:08 +0000 (22:00 -0500)]
Fix Source/Target Lock

The locking of the target is now taken care of when
the operation manager is initialized. This allows us
to keep the template flow the same and to ensure that
for vFW we will not lock the source if it is not intended
to be the target. NOTE: This will have to be revised in
the future if policy chaining will support having
different targets specified for each policy in the chain.

Additional work was done for hardening the APPC model code
to make sure exceptions are caught and we gracefully end
processing the event with memory clean up and a final failure
notification sent.

Issue-Id: POLICY-367
Change-Id: Ic796d95eb5400067744492f810dd8069ba6241b3
Signed-off-by: Daniel Cruz <dc443y@att.com>
Signed-off-by: daniel <dc443y@att.com>
6 years agochange drl line to avoid velocity bug 55/20455/1
Jorge Hernandez [Tue, 24 Oct 2017 22:16:31 +0000 (17:16 -0500)]
change drl line to avoid velocity bug

generating a control loop project from archetype
(but not from junits) runs into velocity parse failures
as specified in ticket.   The existing .drl code
for the line that fails the parsing has been slightly
modified to bypass this problem.   In addition a
logging statement has been added to the catch.

Change-Id: I3eec82c9b710cc9d2a13dc68032a8a6074016b40
Issue-ID: POLICY-376
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoChange vnf-id to vnf-name 11/20411/2
daniel [Tue, 24 Oct 2017 11:33:31 +0000 (06:33 -0500)]
Change vnf-id to vnf-name

These changes now allow a lookup of the source vnf-id
based on the onset's vnf-name.

Issue-Id: POLICY-366
Change-Id: I6f6bd500b892dddbbb9e12156b4486208309e21d
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoEnsure no AAI lookup on abatements 75/20375/2
Charles Cole [Tue, 24 Oct 2017 14:31:03 +0000 (09:31 -0500)]
Ensure no AAI lookup on abatements

Changed check event syntax in the event manager so that it only looks
for AAI info if the event is an onset.

Issue-Id: POLICY-368
Change-Id: I241e9a110cc5fc4553a5e9cd842d51f76a800368
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoMerge "Fix handling of aai 'get' errors"
Jorge Hernandez [Mon, 23 Oct 2017 18:41:52 +0000 (18:41 +0000)]
Merge "Fix handling of aai 'get' errors"

6 years agoFix handling of aai 'get' errors 91/19891/3
Charles Cole [Fri, 20 Oct 2017 13:52:59 +0000 (08:52 -0500)]
Fix handling of aai 'get' errors

Now reject an event if the AAI get query for the event fails. Added test
cases for this behavior.

Fixed some issues from my previous pull request.

Issue-Id: POLICY-314
Change-Id: I674e95302a271423c307a88d061064e12e491a7a
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoMerge "Removed pre-Amsterdam policy template code"
Pamela Dragosh [Mon, 23 Oct 2017 10:03:00 +0000 (10:03 +0000)]
Merge "Removed pre-Amsterdam policy template code"

6 years agoRemoved pre-Amsterdam policy template code 15/19915/1
Magnusen, Drew (dm741q) [Fri, 20 Oct 2017 17:22:19 +0000 (12:22 -0500)]
Removed pre-Amsterdam policy template code

Removed the deprecated pre-Amsterdam policy template code from repository.

Issue-Id: POLICY-308
Change-Id: I5000f61acddf3b84eef5fbfdbceabfc69aeb96c4
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoAdded log output to multiple drools applications. 93/19793/2
Magnusen, Drew (dm741q) [Thu, 19 Oct 2017 19:26:32 +0000 (14:26 -0500)]
Added log output to multiple drools applications.

Added logger statments to network.log for AAI, SO,
PDPX Guard, and VFC for all inbound/outbound traffic.

Issue-Id: POLICY-356
Change-Id: I802d45d8136f987b4304baa8f17e166b1c8df165
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoMerge "Add support for AAI Named Query error handling"
Pamela Dragosh [Wed, 18 Oct 2017 17:02:33 +0000 (17:02 +0000)]
Merge "Add support for AAI Named Query error handling"

6 years agoAdd support for AAI Named Query error handling 31/19531/3
Charles Cole [Mon, 16 Oct 2017 17:05:08 +0000 (12:05 -0500)]
Add support for AAI Named Query error handling

Errors from AAI after a Named query now throw an AAIEXception.  This is
caught in the template to allow the resources to be removed from memory
and a final failure to be thrown.

Issue-ID: POLICY-314
Change-Id: I319d29ef537b2d01ca288622aac1d9dbbe05f5eb
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoRemoved useless imports to clear Sonar Issues 23/19523/1
Hockla, Ali (ah999m) [Wed, 18 Oct 2017 13:06:12 +0000 (08:06 -0500)]
Removed useless imports to clear Sonar Issues

Issue-ID: POLICY-292
Change-Id: Ia4d4fae4150ea12e46079aabb4bbf4e3c92c8d00
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoFix Target Entity Lock 87/19387/1
daniel [Tue, 17 Oct 2017 22:56:08 +0000 (17:56 -0500)]
Fix Target Entity Lock

This fix enables the pdp to stop events with
different requestId's/controlLoopNames from
being processed if the target entity specified is
already being processed by another event/controlloop.

The lock timeout rule is removed to stop the event from
waiting to obtain a lock if it was not already required.

Handling of the lock denied case is taken care of in the
event manager rule instead of in a seperate rule to avoid
further unneccessary computation.

A new control loop test case was created that is for testing
general control loop errors. The test case included is for
testing that the lock will deny a request with a duplicate
target entity.

Issue-ID: POLICY-341
Change-Id: Ib62286eff74ec22b2c645f32f385cb331fb1dff3
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoMerge "Fix operation history DB properties for Junits"
Jorge Hernandez [Tue, 17 Oct 2017 20:58:39 +0000 (20:58 +0000)]
Merge "Fix operation history DB properties for Junits"

6 years agoMerge "Update SO Interface AAI NQ response from v8 to v11"
Jorge Hernandez [Tue, 17 Oct 2017 20:58:14 +0000 (20:58 +0000)]
Merge "Update SO Interface AAI NQ response from v8 to v11"

6 years agoUpdate SO Interface AAI NQ response from v8 to v11 13/19113/6
Hockla, Ali (ah999m) [Mon, 16 Oct 2017 17:15:03 +0000 (12:15 -0500)]
Update SO Interface AAI NQ response from v8 to v11

- Removed nonBaseIndex since there is only base vf Module in v11 response
- Reverted to checkExtractedFields()
- Modified the AAI Simulator to return the v11 response
- If AAI NQ fails then the SO Request will not be constructed. In this
  case, we are retracting objects from the transaction and inserting policyResult.FAILURE into current operation to
  prevent null values in finishOperation

Issue-ID: POLICY-339
Change-Id: I1c48fac4f9a51467ad54b0706543f5d1baa70389
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoFix operation history DB properties for Junits 37/19137/3
Temoc Rodriguez [Mon, 16 Oct 2017 20:37:05 +0000 (13:37 -0700)]
Fix operation history DB properties for Junits

Removed operation_history.properties / operations-history.properties.
Changed the properties in persistence.xml
so that it uses the correct values. Previously junit would never write
to db because the "guard.disabled" property was not set. Set this property.
Additionally the operationshistory10 table was trying to be created even
though it exists. These values work in junit code. Not tested on
rackspace yet.

Issue-ID: POLICY-345
Change-Id: Id755b3152ae6ac4991ea9c314154592ea0105070
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoUpdate abatement=false and add Abated event 25/19125/1
Pamela Dragosh [Mon, 16 Oct 2017 18:51:47 +0000 (14:51 -0400)]
Update abatement=false and add Abated event

Missing abatement=false for Use Cases other than vCPE. Added DCAE
Control Loop Event message for ABATED.

Issue-ID: POLICY-346
Change-Id: Ic8890dd81607ff8657a6f9e49cd9be51cb410fe1
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoEnable junits to work with the archetype template 37/18337/2
Charles Cole [Fri, 6 Oct 2017 14:18:45 +0000 (09:18 -0500)]
Enable junits to work with the archetype template

Control loop junits now use the actual PolicyEngine instead of a
simulation, allowing them to work with the archetype template

Issue-ID: POLICY-101
Change-Id: I910961996aaf831f4e91b7d7173d05fdfdd77683
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoMerge "Fix nullPointerException non-200 guard response."
Jorge Hernandez [Wed, 11 Oct 2017 15:40:41 +0000 (15:40 +0000)]
Merge "Fix nullPointerException non-200 guard response."

6 years agoFix nullPointerException non-200 guard response. 71/18071/2
Temoc Rodriguez [Tue, 10 Oct 2017 22:26:10 +0000 (15:26 -0700)]
Fix nullPointerException non-200 guard response.

Added a check for when the guard response from pdp-x is not
200. When the response is unauthorized or forbidden, it will
have an empty body, try to convert to json, and throw an
exception. Added a null check on the response and returns
indeterminate in the case of an empty body.

Issue-ID: POLICY-280
Change-Id: I9d384472e230495130bd41d377e25b74fe9ea9bd
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoset LCM Common Header api-vers to 2.0 67/18067/1
Jorge Hernandez [Tue, 10 Oct 2017 22:16:28 +0000 (17:16 -0500)]
set LCM Common Header api-vers to 2.0

per Scott's feedback, see JIRA ticket notes

Change-Id: I5e9a5a6f98fceabc58911a3673d1b889604b5a92
Issue-ID: POLICY-300
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoadd structure only for PAP rule management 49/18049/3
Jorge Hernandez [Tue, 10 Oct 2017 20:28:55 +0000 (15:28 -0500)]
add structure only for PAP rule management

PAP currently generates a set up rule that inserts a Params object
when the session is loaded.   Since the official template also
has an equivalent rule that is used by the drools applications
team to perform initializations tasks, at runtime we end up with
2 Params objects with the same control loop data.   This has
sideeffects where the same rule becomes true for 2 Params objects
therefore performing duplicated actions which introduces somewhat
anomalous behavior.

The PapParams is introduced to satisfy current PAP needs for
management of rules.  The structure is included here only for
those purposes but it carries no significance at runtime during
drools executions since the rules go by Params instead of PapParams.

In the near future, the plan is to have the PAP not generating
SET UP rules.

There is a companion review on the PAP side to refer to PapParams
instead of Params to fulfill the resolution of POLICY-302.

Change-Id: I2f9ed3cee3d5d5209eecd43823cfc44a4b937600
Issue-ID: POLICY-302
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agostrengthen APPC Response Cleanup Rules 75/17675/1
Jorge Hernandez [Mon, 9 Oct 2017 13:24:23 +0000 (08:24 -0500)]
strengthen APPC Response Cleanup Rules

The existing APPC Response Cleanup Rules will drop responses
that are not specific for that control loop.   For example
vDNS control loop will drop LCM Response for vCPE control loops
preventing progress of the use cases.

This only happens when the control loops coexist with the
current set of rules.

Change-Id: I5a9ae26e39ecce8dd7f1098d02b6c6b97650b67a
Issue-ID: POLICY-298
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Fix Artifact POM"
Jorge Hernandez [Fri, 6 Oct 2017 18:27:31 +0000 (18:27 +0000)]
Merge "Fix Artifact POM"

6 years agoFix Artifact POM 99/17499/1
daniel [Fri, 6 Oct 2017 18:01:36 +0000 (13:01 -0500)]
Fix Artifact POM

Removed a lingering dependency on the "demo" project
that is causing build errors.

Issue-ID: POLICY-291
Change-Id: If1870ebba33c4ff29a0bd5bcdaa39d9b61f62436
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoMerge "Fix Build Errors"
Jorge Hernandez [Fri, 6 Oct 2017 16:38:24 +0000 (16:38 +0000)]
Merge "Fix Build Errors"

6 years agoFix Build Errors 75/17475/1
daniel [Fri, 6 Oct 2017 15:08:21 +0000 (10:08 -0500)]
Fix Build Errors

Removing the legacy "demo" project as this uses obsolete
code. The operation and control loop timeouts were increased
to allow more time for the simulators to respond.

Issue-Id: POLICY-291
Change-Id: I1143352cefaf9749ca0eca55927960535b2599b8
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoAdd fix for guard db on disable 89/17389/2
Temoc Rodriguez [Fri, 6 Oct 2017 14:57:02 +0000 (07:57 -0700)]
Add fix for guard db on disable

Added a fix so that the guard database is not attempted to be accessed
while guard is set to disabled. The guard db access is done in the
operations manager which has no context of guardat the moment. Because
of this separation, the boolean must be grabbed from the PolicyEngine
properties. We should consider some guard refactoring.

Issue-ID: POLICY-296
Change-Id: Ida7a2a7c19e568b076731e0f04bdc8a9fd0fcb26
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoMerge "Fix JUnit Race Conditions"
Jorge Hernandez [Fri, 6 Oct 2017 01:29:06 +0000 (01:29 +0000)]
Merge "Fix JUnit Race Conditions"

6 years agoFix JUnit Race Conditions 51/17251/2
daniel [Wed, 4 Oct 2017 15:09:37 +0000 (10:09 -0500)]
Fix JUnit Race Conditions

This fix now implements the observer pattern for the
PolicyEngineJUnitImpl so that the test cases can be
notified when an event is available to be pulled.
This eliminates the need to sleep the thread for
some arbitrary time to let the rules process events.

Issue-ID: POLICY-291
Change-Id: I884c959c20b95a1b58f357602099d8a01c8d2e3c
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoFixed Sonar blockers/criticals 57/17257/1
Hockla, Ali (ah999m) [Wed, 4 Oct 2017 16:58:13 +0000 (11:58 -0500)]
Fixed Sonar blockers/criticals

Issue-ID: POLICY-292

Change-Id: Id53e9d3b6ba23b20d7e45d4d3b39f8092f126333
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agomissing $ in guard expansion variables 35/16535/3
Jorge Hernandez [Thu, 28 Sep 2017 23:52:46 +0000 (18:52 -0500)]
missing $ in guard expansion variables

Change-Id: I05c577e8760f5b4b8e6375f50a327c9dde575e06
Issue-ID: POLICY-260
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMake Guard Configurable 19/16519/1
daniel [Thu, 28 Sep 2017 21:17:04 +0000 (16:17 -0500)]
Make Guard Configurable

This allows the user to disable or enable guard
through the .properties.environment file. Verified
and tested in a pdp. Properties were added to the
simulators properties file for the simulators to
work out of the box.

Issue-ID: POLICY-259
Change-Id: I0027a5d28f1b30e81bdbe42fa17621b36a61c850
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoMerge "Fix Sonar Criticals"
Jorge Hernandez [Thu, 28 Sep 2017 20:21:15 +0000 (20:21 +0000)]
Merge "Fix Sonar Criticals"

6 years agoFix Sonar Criticals 97/16497/1
Hockla, Ali (ah999m) [Thu, 28 Sep 2017 18:44:26 +0000 (13:44 -0500)]
Fix Sonar Criticals

Made MSBServiceFactory serializable

Issue-ID: POLICY-115

Change-Id: I8c8abdf656a49bc20ecefb42a7f4f7bacde57726
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoDelete ControlLoopXacmlGuardTest.java 79/16479/2
Temoc Rodriguez [Thu, 28 Sep 2017 17:33:40 +0000 (10:33 -0700)]
Delete ControlLoopXacmlGuardTest.java

Deleted ControlLoopXacmlGuardTest.java so avoid sonar blockers. This
junit will reduce coverage a bit but is not significant. This junit is
already covered by the other use case junit files in template demo. A
more robust junit is in need to test guard permit, deny, and pdp-x
misconnecion in relation to the drl operations and rules. For now, this
file does not add useful testing.

Issue-ID: POLICY-260
Change-Id: Iaed0ad62f72ddc5b9a6b7626a037c26d6fd1ca52
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoMerge "Fix Sonar criticals"
Jorge Hernandez [Thu, 28 Sep 2017 18:14:53 +0000 (18:14 +0000)]
Merge "Fix Sonar criticals"

6 years agoFix Sonar criticals 07/15707/5
Charles Cole [Tue, 26 Sep 2017 19:43:58 +0000 (14:43 -0500)]
Fix Sonar criticals

Fixed two Sonar criticals.  Changed VFC actor service provider to
eliminate redundant AAI queries.

Issue-ID: POLICY-115
Change-Id: Ic4993b5d498a1cb3d3fc51ce1d2b4e90bb26353d
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoFix Retries for Policies 39/16439/2
daniel [Thu, 28 Sep 2017 15:01:21 +0000 (10:01 -0500)]
Fix Retries for Policies

This applies changes to make retries work properly
for all control loops. The current design was ignoring
the upper bound of the retries and retrying until either
a success or control loop timeout occured. This is now
fixed to only do retries until the limit is reached that
is specified from the policy.

The operation is now started in the GUARD.PERMITTED rule.
I think this is better because it stops Policy from doing
extra processing if there is a guard deny. This is also
needed so that we can properly do retries for all cases.

The notifications sent in GUARD_NOT_YET_QUERIED and
GUARD.RESPONSE are now more informative with the
message specifying the actor and recipe. The not queried
rule has a message stating that we are sending a query
to guard and the guard response message in the guard
response rule specifices the result from guard.

During a retest of vDNS it appeared that the archetype
template was no longer working, this was because there
were changes in the JUnit template that were not
reflected in the archetype template. These were added
to archetype and vDNS is verified to work again.

Another small fix needed was making sure the action for
vCPE is "Restart" instead of "restart". APPC will
reject our request if "Restart" is not sent as the
action.

Issue-ID: POLICY-259
Change-Id: I28dd3c9a629d297b408775a01afadd5c19351e37
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoMerge "Add missing auth headers to guard request"
Jorge Hernandez [Thu, 28 Sep 2017 15:27:50 +0000 (15:27 +0000)]
Merge "Add missing auth headers to guard request"

6 years agoAdd missing auth headers to guard request 45/15745/5
Temoc Rodriguez [Tue, 26 Sep 2017 23:03:34 +0000 (16:03 -0700)]
Add missing auth headers to guard request

Added guard authentication, client authentication, and environment http
headers to the pdp-x guard restful request. Properties are set to
PolicyEngine.manager. Property getter, setter, and properties in
guard/.../Util.java. Test properties defined in junits themselves. Added
code from GuardContext.java to grab the properties and make restful request.
PolicyGuardXacmlHelper now closely resembles GuardContext in order to mimic
functionality. Guard url no longer is passed into CallGuardTask, it is now
a property.

Issue-ID: POLICY-260
Change-Id: I5b144764828b6da0e7b738a578e4f6596a0f4f36
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoMerge "Fix major sonar issues"
Pamela Dragosh [Thu, 28 Sep 2017 04:40:23 +0000 (04:40 +0000)]
Merge "Fix major sonar issues"

6 years agoMerge "Use MSB for service discovery"
Pamela Dragosh [Thu, 28 Sep 2017 04:38:36 +0000 (04:38 +0000)]
Merge "Use MSB for service discovery"

6 years agoMerge "Fix major sonar issues"
Jorge Hernandez [Thu, 28 Sep 2017 03:51:49 +0000 (03:51 +0000)]
Merge "Fix major sonar issues"

6 years agoMerge "Add functionality for VFC request retries"
Jorge Hernandez [Thu, 28 Sep 2017 02:51:54 +0000 (02:51 +0000)]
Merge "Add functionality for VFC request retries"

6 years agoMerge "Cleanup for VFC Actor code"
Jorge Hernandez [Thu, 28 Sep 2017 02:49:17 +0000 (02:49 +0000)]
Merge "Cleanup for VFC Actor code"

6 years agoMerge "Added @Override annotation to method signature"
Jorge Hernandez [Wed, 27 Sep 2017 20:16:00 +0000 (20:16 +0000)]
Merge "Added @Override annotation to method signature"

6 years agoMerge "Create common object to consolidate AAI response"
Jorge Hernandez [Wed, 27 Sep 2017 17:54:23 +0000 (17:54 +0000)]
Merge "Create common object to consolidate AAI response"

6 years agoAdded changes for SO Request retries 13/16013/2
Hockla, Ali (ah999m) [Wed, 27 Sep 2017 14:40:07 +0000 (09:40 -0500)]
Added changes for SO Request retries

This change will allow the control loop to increment the operation
attempts in the case of an SO failure in order to retry the
operation if defined in the yaml.

Issue-ID: POLICY-268

Change-Id: I1fee2ce64524e58fc3068f19c5cf31ed91159e0f
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoAdd functionality for VFC request retries 69/16069/1
Ritu Sood [Wed, 27 Sep 2017 10:19:57 +0000 (03:19 -0700)]
Add functionality for VFC request retries

This allows the control loop to track operation
attempts in case of VFC failures. This will
allow retries of the operation if required in the
YAML file.

Issue-ID: POLICY-270
Change-Id: Ieeaf6770a8d03fa4eecc976535301d9236d19972
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
6 years agoCleanup for VFC Actor code 55/16055/2
Ritu Sood [Wed, 27 Sep 2017 09:47:57 +0000 (02:47 -0700)]
Cleanup for VFC Actor code

Fix some sonar critical issues and
other clean up

Issue-ID: POLICY-57
Change-Id: Iec9b94ff238ea6a65cfe39fd5cdfb200c773c1a9
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
6 years agoFix major sonar issues 51/15451/4
shashikanth [Tue, 26 Sep 2017 10:41:41 +0000 (16:11 +0530)]
Fix major sonar issues

Fix major sonar issues in policy/drools-applications module
https://sonar.onap.org/component_issues?id=org.onap.policy.drools-applications%3Adrools-pdp-apps#resolved=false|severities=MAJOR|rules=squid%3AS1161

Added "@Override" annotation above this method signature.

Issue-Id:POLICY-239
Change-Id: I578d0e740a6c04ba02df400a3abc99f9b774908a
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
6 years agoAdded @Override annotation to method signature 45/15445/4
shashikanth [Tue, 26 Sep 2017 10:22:47 +0000 (15:52 +0530)]
Added @Override annotation to method signature

Fix major sonar issues in policy/drools-applications module
https://sonar.onap.org/component_issues?id=org.onap.policy.drools-applications%3Adrools-pdp-apps#resolved=false|severities=MAJOR|rules=squid%3AS1161

Added the "@Override" annotation above this method signature.

Issue-Id:POLICY-239
Change-Id: Ibb71db82d78b0df02d5d6416ac3f3f00a3780695
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
6 years agoFix major sonar issues 37/15437/5
shashikanth [Tue, 26 Sep 2017 10:06:17 +0000 (15:36 +0530)]
Fix major sonar issues

Fix major sonar issues in policy/drools-applications module
https://sonar.onap.org/component_issues?id=org.onap.policy.drools-applications%3Adrools-pdp-apps#resolved=false|severities=MAJOR|rules=squid%3AS1132

Fixed string literal comparison for for SO and VF Module Create and few optimizations.

Issue-Id:POLICY-239
Change-Id: I8e228463ebc7f3114e5caba9b423552bb84dd52d
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
6 years agoCreate common object to consolidate AAI response 79/15679/2
Joseph Chou [Tue, 26 Sep 2017 19:55:47 +0000 (15:55 -0400)]
Create common object to consolidate AAI response

Remove duplicate/obsolete code (NQF199)

Change-Id: Ibe0d4d958a1fe5ae0bae93f740e8b32196a3b07b
Issue-ID: POLICY-228
Signed-off-by: Joseph Chou <jc2555@att.com>
6 years agoFix Use Case Template 31/15731/2
daniel [Tue, 26 Sep 2017 21:21:02 +0000 (16:21 -0500)]
Fix Use Case Template

This is a WIP for getting guard to work. Currently
the A&AI GET and named queries are connecting to
the simulator and working in the labs. Guard is not
connecting to simulator and needs further analysis.

Issue-ID: POLICY-259
Change-Id: If9875bfd83cbd82dcae04a876b3818ec9c07b1f7
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoforce maven dependency plugin version to latest 75/15675/2
Jorge Hernandez [Tue, 26 Sep 2017 19:50:03 +0000 (14:50 -0500)]
force maven dependency plugin version to latest

the 2.1 version that comes with the ubuntu installation
have problems with the maven repositoryUrls.

disable asserts in fact counts, it seems almost impossible
to get clean builds in jenkins server because these
junit failures.

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