policy/drools-applications.git
6 years agoFix TestSO properties 61/15661/1
Temoc Rodriguez [Tue, 26 Sep 2017 17:28:40 +0000 (10:28 -0700)]
Fix TestSO properties

TestSO was missing the environment properties for AAI and SO url, user,
and pass. Set SO and AAI properties in TestSO.java. If this is not set,
then the response will be null and the junit will fail. Moved setting
properties to Util.java to promote code reuse.

Issue-ID: POLICY-259
Change-Id: Id73611abab900675a1f2b543f71566baa05318b2
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoUse MSB for service discovery 01/15301/1
wangxinyuan10113332 [Tue, 26 Sep 2017 03:01:49 +0000 (11:01 +0800)]
Use MSB for service discovery

Change-Id: I524946a1c352b5e9225b7fb37d35fa03a3f77e82
Issue-ID: POLICY-172
Signed-off-by: wangxinyuan10113332 <wang.xinyuan1@zte.com.cn>
6 years agoMerge "Create common object to consolidate AAI response"
Jorge Hernandez [Mon, 25 Sep 2017 22:39:40 +0000 (22:39 +0000)]
Merge "Create common object to consolidate AAI response"

6 years agoMerge "Fix Usecase Template for VoLTE"
Jorge Hernandez [Mon, 25 Sep 2017 21:25:04 +0000 (21:25 +0000)]
Merge "Fix Usecase Template for VoLTE"

6 years agoFix Usecase Template for VoLTE 09/15209/1
daniel [Mon, 25 Sep 2017 20:50:33 +0000 (15:50 -0500)]
Fix Usecase Template for VoLTE

This includes VoLTE support for the amsterdam template.
As of right now all use cases are able to get a final
success with guard disabled and no A&AI GET queries.
Currently, the GET query is not working in the lab.
I will address this in another pull request.

Issue-ID: POLICY-259
Change-Id: I216aa84daaa1e93ab12c56ee53283b4cb413a7c3
Signed-off-by: Daniel Cruz<dc443y@att.com>
6 years agooverride guard url when simulator feature enabled 91/15191/1
Jorge Hernandez [Mon, 25 Sep 2017 20:17:44 +0000 (15:17 -0500)]
override guard url when simulator feature enabled

Change-Id: I6af04238d043b95960a29484bcfbb08d2eab5b13
Issue-ID: POLICY-256
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoadd guard simulator to pdp-d feature for labs 81/15181/1
Jorge Hernandez [Mon, 25 Sep 2017 19:42:02 +0000 (14:42 -0500)]
add guard simulator to pdp-d feature for labs

Change-Id: Id1852e55c3b03cf2c9e3800e40067806c6b9be5e
Issue-ID: POLICY-256
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agostand up amsterdam controller at initialization 55/15155/1
Jorge Hernandez [Mon, 25 Sep 2017 17:16:04 +0000 (12:16 -0500)]
stand up amsterdam controller at initialization

Change-Id: I9bcbaf50e802fceb07c0db3bf13df8f8403a6dea
Issue-ID: POLICY-265
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoCreate common object to consolidate AAI response 53/15153/1
Joseph Chou [Mon, 25 Sep 2017 17:11:51 +0000 (13:11 -0400)]
Create common object to consolidate AAI response

Add Junit test to improve sonar coverage

Change-Id: I32688dad756d2cba80559cd1d090e334ebf77aa3
Issue-ID: POLICY-228
Signed-off-by: Joseph Chou <jc2555@att.com>
6 years agoapps environment properties for pdp-x client auth 47/15147/1
Jorge Hernandez [Mon, 25 Sep 2017 16:36:08 +0000 (11:36 -0500)]
apps environment properties for pdp-x client auth

Change-Id: I23d2e8d16abe6ccbfda6f7d1a3e3d69b209d5b20
Issue-ID: POLICY-260
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Added the Override annotation"
Jorge Hernandez [Mon, 25 Sep 2017 14:04:40 +0000 (14:04 +0000)]
Merge "Added the Override annotation"

6 years agoMerge "Fix Blocker/Critical sonar issues"
Jorge Hernandez [Mon, 25 Sep 2017 13:54:48 +0000 (13:54 +0000)]
Merge "Fix Blocker/Critical sonar issues"

6 years agoAdded the Override annotation 85/15085/1
rama-huawei [Mon, 25 Sep 2017 13:37:04 +0000 (19:07 +0530)]
Added the Override annotation

Added diamond symbol on RHS side

Change-Id: I3945e5f2217f74b71fa143b128f271e48b4882a7
Issue-ID: POLICY-239
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
6 years agoMerge "Added Override annotation"
Jorge Hernandez [Mon, 25 Sep 2017 13:16:03 +0000 (13:16 +0000)]
Merge "Added Override annotation"

6 years agoMerge "Added private constructor"
Jorge Hernandez [Mon, 25 Sep 2017 13:15:32 +0000 (13:15 +0000)]
Merge "Added private constructor"

6 years agoMerge "Fix for Sonar major issues"
Jorge Hernandez [Mon, 25 Sep 2017 13:14:45 +0000 (13:14 +0000)]
Merge "Fix for Sonar major issues"

6 years agoMerge "Fix for Sonar major issues"
Jorge Hernandez [Mon, 25 Sep 2017 13:13:24 +0000 (13:13 +0000)]
Merge "Fix for Sonar major issues"

6 years agoAdded Override annotation 09/15009/2
ramanjaneya [Mon, 25 Sep 2017 10:12:01 +0000 (15:42 +0530)]
Added Override annotation

Issue-ID: POLICY-239
Change-Id: Ia84e5656744289be52cf22b1b68d870a03b85404
Signed-off-by: ramanjaneya <ramanjaneya.palleti@huawei.com>
6 years agoAdded private constructor 13/15013/2
ramanjaneya [Mon, 25 Sep 2017 10:25:29 +0000 (15:55 +0530)]
Added private constructor

Reorder the modifiers to comply with the Java Language Specification

Issue-ID: POLICY-239
Change-Id: I1c156dd420d27c45d496b07841f6375aec1b8de3
Signed-off-by: ramanjaneya <ramanjaneya.palleti@huawei.com>
6 years agoMerge "Added private constructor"
Pamela Dragosh [Fri, 22 Sep 2017 23:41:07 +0000 (23:41 +0000)]
Merge "Added private constructor"

6 years agoMerge "Add simple JUnit test for LCMResponse"
Pamela Dragosh [Fri, 22 Sep 2017 22:30:27 +0000 (22:30 +0000)]
Merge "Add simple JUnit test for LCMResponse"

6 years agoAdd simple JUnit test for LCMResponse 17/14717/1
Pamela Dragosh [Fri, 22 Sep 2017 20:08:57 +0000 (16:08 -0400)]
Add simple JUnit test for LCMResponse

This covers all the methods

Issue-ID: POLICY-32
Change-Id: I6da6c54c257f6254f5116c99a64c02dbf0c77e05
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "Fix Use Case Testing"
Jorge Hernandez [Fri, 22 Sep 2017 19:48:18 +0000 (19:48 +0000)]
Merge "Fix Use Case Testing"

6 years agoAdded private constructor 89/14589/2
ramanjaneya [Fri, 22 Sep 2017 11:51:58 +0000 (17:21 +0530)]
Added private constructor

Issue-ID: POLICY-239

Change-Id: I2ed90fc27c70ae03a772913bf3fefd28b692cec7
Signed-off-by: ramanjaneya <ramanjaneya.palleti@huawei.com>
6 years agoAdded private constructor 83/14583/2
ramanjaneya [Fri, 22 Sep 2017 11:23:13 +0000 (16:53 +0530)]
Added private constructor

Issue-ID: POLICY-239

Change-Id: I261d3aa1b9f67c3e78e1016a84ed64924e306f43
Signed-off-by: ramanjaneya <ramanjaneya.palleti@huawei.com>
6 years agoFix Use Case Testing 93/14693/1
daniel [Thu, 21 Sep 2017 19:29:07 +0000 (14:29 -0500)]
Fix Use Case Testing

These changes are necessary to get the use cases working
on an actual PDP. So far vCPE, vFW, and vDNS have been tested
successfully on a pdp. These are priliminary tests to just
test a FINAL SUCCESS without A&AI GET queries being used.
A&AI named queries for vFW and vDNS have been verified to
work.

Changes in the template were made for SO as there were
changes in the JUnit template that did not get reflected
in the archetype template.

Changes in the code were made in various places to use
the environment properties for REST urls, usernames, and
passwords. Due to VoLTE not being tested yet, the url
for VFC is still hard coded and will be changed later.

It has been confirmed with APPC that LCM will have two
topics: APPC-LCM-READ and APPC-LCM-WRITE. Policy needs
to sink to APPC-LCM-READ and pull from source
APPC-LCM-WRITE. This has been reflected in the controller
properties file.

Issue-ID: POLICY-259
Change-Id: Ib9a8df07ae5ad9d3052c88907c1e522952af474d
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoCreate common object to consolidate AAI response 59/14659/1
Joseph Chou [Fri, 22 Sep 2017 15:37:03 +0000 (11:37 -0400)]
Create common object to consolidate AAI response

Create base object for AAI GET query

Change-Id: I874b10f89054d8adcc28b1e601e9ff15ee884784
Issue-ID: POLICY-228
Signed-off-by: Joseph Chou <jc2555@att.com>
6 years agoMerge "Add VFC Response in Working Memory & JUNIT"
Pamela Dragosh [Fri, 22 Sep 2017 15:08:34 +0000 (15:08 +0000)]
Merge "Add VFC Response in Working Memory & JUNIT"

6 years agoAdd guard simulator and multiple AAI responses 71/14371/2
Charles Cole [Thu, 21 Sep 2017 19:20:42 +0000 (14:20 -0500)]
Add guard simulator and multiple AAI responses

Added a guard simulator that can permit or deny (it sends a deny if the
clname is denyGuard).  Added responses to the AAI simulator to set the
is-closed-loop-disabled to true (use a get query with a key of
disableClosedLoop). Changed the content-type of all responses to
application/json.

Issue-ID: POLICY-256
Change-Id: If84813968d3ea59d9ebe029caa69f444a1f413c8
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoMerge "ONAP AAI GET QUERY code to support ONAP project"
Jorge Hernandez [Thu, 21 Sep 2017 19:38:11 +0000 (19:38 +0000)]
Merge "ONAP AAI GET QUERY code to support ONAP project"

6 years agoONAP AAI GET QUERY code to support ONAP project 55/13155/17
Joseph Chou [Tue, 19 Sep 2017 20:39:56 +0000 (16:39 -0400)]
ONAP AAI GET QUERY code to support ONAP project

check in code to use simulator url

Issue-ID: POLICY-103
Change-Id: I352140dd3cb3159fc2c5738bf02dbb6272de48bc
Signed-off-by: Joseph Chou <jc2555@att.com>
6 years agoMerge "Implement restful call to xacml pdp guard"
Jorge Hernandez [Thu, 21 Sep 2017 17:49:29 +0000 (17:49 +0000)]
Merge "Implement restful call to xacml pdp guard"

6 years agoMerge "Upgrade to oparent release version"
Jorge Hernandez [Thu, 21 Sep 2017 17:30:13 +0000 (17:30 +0000)]
Merge "Upgrade to oparent release version"

6 years agopdp-d feature to simulate aai/mso/vfc in lab 53/14053/2
Jorge Hernandez [Thu, 21 Sep 2017 04:12:27 +0000 (23:12 -0500)]
pdp-d feature to simulate aai/mso/vfc in lab

implemented as an optional loadable feature, this
capability enables to bring up simulators used by
junits in a pdp-d lab configuration.

After lab installation, perform:

1. features enable controlloop-util
2. policy start

Now the simulators are opened at ports 6666, 6667, and 6668.

netstat output:
tcp6       0      0 127.0.0.1:6666          :::*                    LISTEN      21562/java
tcp6       0      0 127.0.0.1:6667          :::*                    LISTEN      21562/java
tcp6       0      0 127.0.0.1:6668          :::*                    LISTEN      21562/java

21562 is the pdp-d PID in the lab.

curl http://localhost:6666/aai/v11/network/generic-vnfs/generic-vnf/vnfIdA
{ "vnf-id": "5e49ca06-2972-4532-9ed4-6d071588d792", ... }

Change-Id: I3f05333ce5549b2274eb967b2b8866189b7f8843
Issue-ID: POLICY-259
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoUpgrade to oparent release version 05/14305/1
Pamela Dragosh [Thu, 21 Sep 2017 15:23:35 +0000 (11:23 -0400)]
Upgrade to oparent release version

Following independent release and versioning process guidelines.

Issue-ID: POLICY-225
Change-Id: If679e4002690bb7614c72fb846c383eb265fb2e0
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoImplement restful call to xacml pdp guard 57/13557/10
Temoc Rodriguez [Tue, 19 Sep 2017 18:13:34 +0000 (11:13 -0700)]
Implement restful call to xacml pdp guard

Removed the embedded guard decision and replace with restful call to
xacml pdp to restore guard functionality. Set guard URL with PolicyEngine env properties. Modified templates accordingly.

Issue-Id: POLICY-260
Change-Id: Ic1558a6ebdd5f6d1b74a748f69433f6213dbf984
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoAdd VFC Response in Working Memory & JUNIT 55/11855/10
Ritu Sood [Mon, 11 Sep 2017 21:20:13 +0000 (14:20 -0700)]
Add VFC Response in Working Memory & JUNIT

Adding code to insert VFC reponse in working
memory and handling that response. Also adding
JUNIT and yaml file for VoLTE usecase.

Issue-Id: POLICY-212
Change-Id: I74a13272ccd931478d27d80715d8c3ac756fb5c7
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
6 years agoMerge "Fix for Sonar major issues"
Jorge Hernandez [Wed, 20 Sep 2017 21:06:10 +0000 (21:06 +0000)]
Merge "Fix for Sonar major issues"

6 years agoFix for Sonar major issues 71/13871/1
SwapnilPathak [Wed, 20 Sep 2017 12:17:33 +0000 (17:47 +0530)]
Fix for Sonar major issues

Add override annotation above the method signature.

Issue-ID: POLICY-248
Change-Id: I8086a6fc1dc24719c3ffd3785a12c086ab556ae9
Signed-off-by: SwapnilPathak <SP00494485@techmahindra.com>
6 years agoFix for Sonar major issues 67/13867/1
SwapnilPathak [Wed, 20 Sep 2017 12:00:07 +0000 (17:30 +0530)]
Fix for Sonar major issues

Move the String literal on left side of string comparison.

Issue-ID: POLICY-249
Change-Id: I8086a6fc1dc24719c3ffd3785a12c086ab555ae9
Signed-off-by: SwapnilPathak <SP00494485@techmahindra.com>
6 years agoMerge "Fixing VFC simulator for junit tests"
Pamela Dragosh [Wed, 20 Sep 2017 11:20:28 +0000 (11:20 +0000)]
Merge "Fixing VFC simulator for junit tests"

6 years agoMerge "Fix Major sonar issues"
Pamela Dragosh [Wed, 20 Sep 2017 10:54:52 +0000 (10:54 +0000)]
Merge "Fix Major sonar issues"

6 years agoFix for Sonar major issues 37/13737/2
SwapnilPathak [Wed, 20 Sep 2017 07:34:50 +0000 (13:04 +0530)]
Fix for Sonar major issues

Add override annotation above the method signature.

Issue-ID: POLICY-248
Change-Id: I8086a6fc1dc24719c3ffd3785a12c086ab453ae9
Signed-off-by: SwapnilPathak <SP00494485@techmahindra.com>
6 years agoFix Major sonar issues 57/13357/2
shashikanth [Tue, 19 Sep 2017 08:39:45 +0000 (14:09 +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

Add the "@Override" annotation above this method signature
"value" is already a string, there's no need to call "toString()" on it

Issue-Id:POLICY-239
Change-Id: Ia64ac87c13d88c5d961b943e0b2286b273bd4831
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
6 years agotest tooling to generate vcpe use case in lab 21/13621/1
Jorge Hernandez [Wed, 20 Sep 2017 00:55:42 +0000 (19:55 -0500)]
test tooling to generate vcpe use case in lab

run successully vcpe case in lab in 2 steps:

1.  docker-install load
2.  run create-cl-amsterdam (with defaults)
3.  injecting dcae.onset and appc.success packaged
    with archetypes

Change-Id: Idb20c0078228da962510dbf36dae96aceb43546c
Issue-ID: POLICY-162
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Adding reading service-id from AA&I"
Jorge Hernandez [Tue, 19 Sep 2017 19:11:51 +0000 (19:11 +0000)]
Merge "Adding reading service-id from AA&I"

6 years agoenhancements to archetype and apps packaging 93/13493/1
Jorge Hernandez [Tue, 19 Sep 2017 14:09:05 +0000 (09:09 -0500)]
enhancements to archetype and apps packaging

Change-Id: I3e659d35d3cb397c011657f39ef12b10b0564fc9
Issue-ID: POLICY-162
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoRemove sonar blocker and unused import 65/13465/1
Pamela Dragosh [Tue, 19 Sep 2017 13:03:19 +0000 (09:03 -0400)]
Remove sonar blocker and unused import

Remove the 3 sonar blockers and unused import in AAI code.

Issue-ID: POLICY-111
Change-Id: I73001a06810ecff3f22da627583a0238c4a09967
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoFix Blocker/Critical sonar issues 77/13377/2
shashikanth [Tue, 19 Sep 2017 09:27:58 +0000 (14:57 +0530)]
Fix Blocker/Critical sonar issues

Fix Blocker/Critical 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=CRITICAL%2CMAJOR

Fixed 2 issues,
Used isEmpty() to check whether the collection is empty or not.
getActor returns a string, there's no need to call toString()

Issue-Id:POLICY-111
Change-Id: I645420ee370ceb5fca959f870e76db2390e19929
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
6 years agoInherit guard install env properties for cl. 79/13179/1
Jorge Hernandez [Mon, 18 Sep 2017 16:26:58 +0000 (11:26 -0500)]
Inherit guard install env properties for cl.

Clean up a few "mso" references.
Disable 1.0.0 template build for now (note that some
references are still pointing to old mso).
Ie., see
https://git.onap.org/policy/drools-applications/tree/controlloop
       /templates/template.demo.v1.0.0/template.demo
       /src/test/java/org/onap/policy/template/demo/TestSO.java

Since this
is going away, rather than maintaining it, and changing this
code, disabling it for the build.
It will be deleted within the next few days.

Issue-ID: POLICY-162
Change-Id: Ibb819a318fbbb2b7f3aa14cdf76155bdec321024
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Fix sonar critical"
Jorge Hernandez [Mon, 18 Sep 2017 13:52:01 +0000 (13:52 +0000)]
Merge "Fix sonar critical"

6 years agoFixing VFC simulator for junit tests 99/13199/1
Ritu Sood [Mon, 18 Sep 2017 10:01:54 +0000 (03:01 -0700)]
Fixing VFC simulator for junit tests

Added response type to post and removed
response id as it is unused.
Breaking up from the junit patch for ease of
review.

Issue-id: POLICY-212
Change-Id: I0c6b0c02b240cfe81246587184fe6a589dcc2367
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
6 years agoAdding reading service-id from AA&I 07/13007/2
Ritu Sood [Sun, 17 Sep 2017 22:34:16 +0000 (15:34 -0700)]
Adding reading service-id from AA&I

For VFC adding getting service-id from AA&I.

Issue-Id: POLICY-57
Change-Id: I740c7749bfb2d395851cbd5eb3e486bf4eb9b560
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
6 years agoFix sonar critical 07/12807/1
Pamela Dragosh [Fri, 15 Sep 2017 21:05:44 +0000 (17:05 -0400)]
Fix sonar critical

Last transient/serializable issues.
Throw a dedicated exception for DateUtil class
Unused imports
Make the enclosing method "static" or remove this set.

Issue-ID: POLICY-115
Change-Id: I366f85922c4d4d290b320e0b88678c805de59872
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "ONAP AAI GET Query code"
Jorge Hernandez [Fri, 15 Sep 2017 19:47:25 +0000 (19:47 +0000)]
Merge "ONAP AAI GET Query code"

6 years agoMerge "Fix sonar criticals"
Jorge Hernandez [Fri, 15 Sep 2017 18:58:52 +0000 (18:58 +0000)]
Merge "Fix sonar criticals"

6 years agoONAP AAI GET Query code 91/12291/2
Joseph Chou [Wed, 13 Sep 2017 21:15:49 +0000 (17:15 -0400)]
ONAP AAI GET Query code

Update ControlLoopEventManager to raise exception on null AAI response

Issue-ID: POLICY-103
Change-Id: Iebe8b03269a1801c4293600920aa267490cea1af
Signed-off-by: Joseph Chou <jc2555@att.com>
6 years agoFix sonar criticals 65/12765/1
Pamela Dragosh [Fri, 15 Sep 2017 15:41:47 +0000 (11:41 -0400)]
Fix sonar criticals

Either re-interrupt this method or rethrow Exception
Transient/Serializable issues
Unused imports
logging exceptions

Issue-ID: POLICY-115
Change-Id: I4c8a0c780e2f6c6e8218c1457f18470f7d95919c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMaster lab template changes for MSO rename to SO 59/12759/1
Hockla, Ali (ah999m) [Fri, 15 Sep 2017 17:17:37 +0000 (12:17 -0500)]
Master lab template changes for MSO rename to SO

Issue-ID: POLICY-162

Change-Id: Ieb0952379cd854e0ed8e4a3b068b7e29f3b93770
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoMerge "Modify AAI simulator to support new requests"
Pamela Dragosh [Fri, 15 Sep 2017 16:42:40 +0000 (16:42 +0000)]
Merge "Modify AAI simulator to support new requests"

6 years agoModify AAI simulator to support new requests 93/12293/2
Charles Cole [Wed, 13 Sep 2017 16:00:21 +0000 (11:00 -0500)]
Modify AAI simulator to support new requests

Updated the AAI simulator to support new AAI queries.  Also, modified
the post response to allow multiple responses.  Added code to ensure the
simulators were able to sucessfully start up.

Change-Id: I3e855b5e54c073f55fbaadc0064c140695fc1a58
Issue-ID: POLICY-200
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoClear eclipse warnings and sonar 67/12567/1
Pamela Dragosh [Thu, 14 Sep 2017 22:00:36 +0000 (18:00 -0400)]
Clear eclipse warnings and sonar

Removing warnings introduced with A&AI code. This should also
address sonar criticals and majors.

Issue-ID: POLICY-140
Change-Id: I3f8186dd9c5aa52bfbb061bf95d67b5614b3fb2e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "Move credential information out of persistence.xml"
Jorge Hernandez [Thu, 14 Sep 2017 21:35:26 +0000 (21:35 +0000)]
Merge "Move credential information out of persistence.xml"

6 years agoMerge "master lab template maintained under archetype"
Jorge Hernandez [Thu, 14 Sep 2017 21:30:58 +0000 (21:30 +0000)]
Merge "master lab template maintained under archetype"

6 years agomaster lab template maintained under archetype 79/12379/6
Jorge Hernandez [Thu, 14 Sep 2017 06:55:30 +0000 (01:55 -0500)]
master lab template maintained under archetype

This is work in progress, the official pom.xml with dependencies,
drl template, and support files for controller deployment
are maintained here.   In the near future the junit template
should be consolidated with this one.

Added controlloop.properties.environment, this environment file
will be populated at installation time with the lab's aai url,
etc .. and will be accessible by any drools application such as
control loops through the PolicyEngine interface.   Note that PDP-D
server already supports these environment files, so it is just natural.
Therefore, this is the default mechanism to provide to applications, the url, username,
and passwords to use at runtime by the control loops for the time being.
In the future MSB could set them globally here through existing APIs,
or it can be queried by any drools application using MSB library,
doesn't matter.

There's been some trouble playing nicely with the dependencies used
by a control loop application classsloader, and the pdp-d middleware one,
causing issues between dependencies version of libraries.  Specifically,
the snakeyaml library does not play well across classloader when using
constructor functionality, note that the snakeyaml libraries are pulled
also from jackson parsers used in the pdp-d.   I made a change in ControlLoopProcessor
to specifically tell the "Yaml" object which classloader to use in order to
find the class with the constructor that is intended to be built, otherwise,
yaml libraries use a different classloader that does not have visibility
into the ControlLoopPolicy that is trying to construct, and fails.   This also
should respect junits that use the same classloader I pressume and does not
give issues.

Change-Id: I36271d29cdbf8ff861f9c03ff91cf7116927906a
Issue-ID: POLICY-162
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMove credential information out of persistence.xml 71/12271/4
Temoc Rodriguez [Wed, 13 Sep 2017 19:23:46 +0000 (12:23 -0700)]
Move credential information out of persistence.xml

Move credential information out of persistence.xml. Define properties
file which will contain the credentials instead. Access db using new
properties file.

Issue-ID: POLICY-55
Change-Id: I01ad0611c053ad4285de2a225fca7920a3b1bc8f
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoMerge "Added changes for vDNS Use Case"
Jorge Hernandez [Thu, 14 Sep 2017 18:26:20 +0000 (18:26 +0000)]
Merge "Added changes for vDNS Use Case"

6 years agoAdded changes for vDNS Use Case 65/12265/2
Hockla, Ali (ah999m) [Wed, 13 Sep 2017 14:24:43 +0000 (09:24 -0500)]
Added changes for vDNS Use Case

-Renamed remaining MSO classes and packages to SO and modified drl
accordingly
-Connected SO Interface to SO Simulator
-Added vDNS Control Loop junit
-Modified SOActorServiceProvider to reflect AAI class changes (POLICY-103)

Issue-ID: POLICY-102

Change-Id: Iea5d3f096c4ccfedde68e79d7593d66331127aaf
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoFix AAINQF199 object references to AAINQ objects 43/12243/1
daniel [Wed, 13 Sep 2017 16:49:12 +0000 (11:49 -0500)]
Fix AAINQF199 object references to AAINQ objects

This is a small change to now reference the new AAI model
instead of using the older AAINQF199 model.

Issue-ID: POLICY-104
Change-Id: I2a1d2830fbd3bd7d62a9e27067a8c32a1c1ab4b1
Signed-off-by: daniel <dc443y@att.com>
6 years agoMerge "Fix A&AI Named Query for vFW"
Jorge Hernandez [Wed, 13 Sep 2017 13:59:58 +0000 (13:59 +0000)]
Merge "Fix A&AI Named Query for vFW"

6 years agoMerge "ONAP code for AAI, consolidate name and get query"
Jorge Hernandez [Wed, 13 Sep 2017 13:58:47 +0000 (13:58 +0000)]
Merge "ONAP code for AAI, consolidate name and get query"

6 years agoFix A&AI Named Query for vFW 87/11987/2
daniel [Tue, 12 Sep 2017 14:44:59 +0000 (09:44 -0500)]
Fix A&AI Named Query for vFW

The vFW named query has now been verified with the
A&AI simulator. Null checks were added to make the
namedQuery method work properly. In addition, a
recursive A&AI response parser was added to traverse
the response to find the correct generic-vnf object
with the target vnf-id.

For now the simulator URL is hard coded and the UUID
of the named query is hard coded. These should be
configurable in future releases.

Issue-ID: POLICY-104
Change-Id: I05a1a992ff68ca2c17fb6a578983e6b21626bf44
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoONAP code for AAI, consolidate name and get query 39/10639/7
Joseph Chou [Wed, 6 Sep 2017 20:54:33 +0000 (16:54 -0400)]
ONAP code for AAI, consolidate name and get query

Adding AAI GET query feature to support ONAP project (1 commit)

Issue-ID: POLICY-103
Change-Id: I0a55f41c3edd7a0bc0562ae4e12a19f262a50d74
Signed-off-by: Joseph Chou <jc2555@att.com>
6 years agoMerge "Fix nullPointerException"
Jorge Hernandez [Tue, 12 Sep 2017 20:18:45 +0000 (20:18 +0000)]
Merge "Fix nullPointerException"

6 years agoMerge "Fixing VFC Model response class"
Pamela Dragosh [Tue, 12 Sep 2017 19:29:46 +0000 (19:29 +0000)]
Merge "Fixing VFC Model response class"

6 years agoFix nullPointerException 77/11977/2
Temoc Rodriguez [Tue, 12 Sep 2017 15:23:53 +0000 (08:23 -0700)]
Fix nullPointerException

Fix nullPointerException by changing return values of attributesProvided
and attributesRequired from null to empty Set.

Issue-ID: POLICY-55
Change-Id: I9516a9bcad591cc582834cb49fa54e58a1f45a47
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoFixing VFC Model response class 45/11745/4
Ritu Sood [Mon, 11 Sep 2017 11:22:17 +0000 (04:22 -0700)]
Fixing VFC Model response class

Fixed the response class for VFC response
and also removed the Ignore test case.

Change-Id: I4373e86399089b7a3d743be4d19f76cc37d1ceea
Issue-id: POLICY-57
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
6 years agoAdd Support for Locking VNF Target Types 57/11757/1
daniel [Mon, 11 Sep 2017 19:42:59 +0000 (14:42 -0500)]
Add Support for Locking VNF Target Types

Fixed the target lock to support vnf target_types.
Generic-vnf.vnf-id and generic-vnf.vnf-name are also
supported when retrieving the target instance from the onset.
These changes are relfected in the vFW and vCPE junits as
they now work with VNF target types.

Issue-ID: POLICY-222
Change-Id: I92abeb02c769d35f3a9912cce6eaaec4c9cc8efb
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoMove the simulators to a new package 19/11719/2
Charles Cole [Fri, 8 Sep 2017 19:10:57 +0000 (14:10 -0500)]
Move the simulators to a new package

Moved the simulators to the simulators project in controlloop/common.
They can now be accessed with the Util class in the simulators project
or the Util class in template.demo, for backwards compatability. Also
renamed AaiSimulator to AaiSimulatorJaxRs

Issue-IS: POLICY-200
Change-Id: Id131af0243777db31a8f22e110d8a708dc033dcf
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoFix Eclipse warnings for raw type parameterization 01/11701/1
Pamela Dragosh [Mon, 11 Sep 2017 15:30:38 +0000 (11:30 -0400)]
Fix Eclipse warnings for raw type parameterization

Eclipse generates warnings for raw types and 2 fields are not accessed statically.

Issue-ID: POLICY-102
Change-Id: Ibeb2a76d527949cfd7283ab1a78d97e582725337
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "Cleanup project's name in Sonar"
Pamela Dragosh [Mon, 11 Sep 2017 12:12:15 +0000 (12:12 +0000)]
Merge "Cleanup project's name in Sonar"

6 years agoSet this class as serializable 29/11429/1
Pamela Dragosh [Fri, 8 Sep 2017 22:03:33 +0000 (18:03 -0400)]
Set this class as serializable

Fixing sonar critical to make this simple class serializable.

Issue-ID: POLICY-115
Change-Id: I6a3cf8b1c8c27f434e26d9f2909b2ef38c72825b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoCleanup project's name in Sonar 21/11321/1
Jessica Wagantall [Fri, 8 Sep 2017 20:33:33 +0000 (13:33 -0700)]
Cleanup project's name in Sonar

The name parameter in the root pom.xml should
match the project name in gerrit to reflect consistency
in Sonar.

Change-Id: If7e35a530da07411dc0b534da7f185bdb43368dd
Issue-id: CIMAN-65
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
6 years agoMerge "Clearing sonar critical for missing serialization"
Pamela Dragosh [Fri, 8 Sep 2017 16:47:59 +0000 (16:47 +0000)]
Merge "Clearing sonar critical for missing serialization"

6 years agoClearing sonar critical for missing serialization 49/11149/2
Pamela Dragosh [Fri, 8 Sep 2017 15:52:11 +0000 (11:52 -0400)]
Clearing sonar critical for missing serialization

These classes should be serializable in order to remove the sonar critical.
Also clearing unused import/code messages.

Issue-ID: POLICY-115
Change-Id: I25e504f6edae9fb38080e7d4d33b2b3e4cde4637
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoAdded changes for vDNS Use Case - MSO Interface 11/10411/12
Hockla, Ali (ah999m) [Tue, 5 Sep 2017 19:01:04 +0000 (14:01 -0500)]
Added changes for vDNS Use Case - MSO Interface

Rebased and fixed merge conflicts

Issue-ID: POLICY-102

Change-Id: Icc36a2cf6391aa9137593bc04f0d4543798b7ccd
Signed-off-by: Ali Hockla <ah999m@att.com>
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
Signed-off-by: HOCKLA <ah999m@att.com>
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
6 years agoMerge "Support drl compilation at design/development time"
Jorge Hernandez [Thu, 7 Sep 2017 18:41:27 +0000 (18:41 +0000)]
Merge "Support drl compilation at design/development time"

6 years agoAdd in-mem db to ControlLoopXacmlGuardTest 29/9929/5
Temoc Rodriguez [Fri, 1 Sep 2017 15:52:02 +0000 (08:52 -0700)]
Add in-mem db to ControlLoopXacmlGuardTest

Add in-mem specification in test/resources/META-INF/persistence.xml for junit. Use system properties to choose
which db to use. Removed named parameters in PIPEngineHistory.java. Change
6.3.0 versions of drools-core to 6.5.0 in pom. Make PIPEngineGetHistory
query more general. Increased sleep times in junit.

Issue-ID: POLICY-55
Change-Id: I6bc65fd88c43c4e7143f27a7e6d8666c2c4df060
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoSupport drl compilation at design/development time 07/10707/2
Jorge Hernandez [Thu, 7 Sep 2017 05:25:19 +0000 (00:25 -0500)]
Support drl compilation at design/development time

Change-Id: I0fe6277f92c0db7f596ff73d81987e2e78b5793e
Issue-ID: POLICY-162
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoMerge "Add APPC LCM Interface"
Pamela Dragosh [Thu, 7 Sep 2017 10:16:09 +0000 (10:16 +0000)]
Merge "Add APPC LCM Interface"

6 years agoAdd APPC LCM Interface 83/10583/3
daniel [Fri, 11 Aug 2017 16:36:09 +0000 (11:36 -0500)]
Add APPC LCM Interface

The LCM model code and service provider code is implemented.
This model code is now used for the vCPE use case scenario.

The vFW use case is still using the legacy APPC API as
request by APPC for Policy to use in R1. The APPC
service provider now generates a demo legacy APPC
request with pg-streams.

An A&AI named query is implemented for the vFW use case.
The code for obtaining the generic-vnf.vnf-id is not
in use until we set up the A&AI simulator to work
without having cyclical depenncies inside the POMs.

JUnits for the vFW and vCPE use cases are now supported.
These JUnits test the complete flow of each scenario.

A&AI testing is not supported in the JUnit test yet.
These JUnits use a target type of VM as VNF is not
supported yet. This will be changed when the Target
Lock supports VNF.

Amended to fix Sonar blockers.

Issue-ID: POLICY-104
Change-Id: I46869c5fd5094919da55ad563d608fe6d4b6fea7
Signed-off-by: Daniel Cruz <dc443y@att.com>
6 years agoAdd missing license. 89/10589/1
Pamela Dragosh [Wed, 6 Sep 2017 15:12:51 +0000 (11:12 -0400)]
Add missing license.

The license checkstyle is now issueing errors for missing licenses.

Change-Id: I3784c43e8d33d14c0ddd92668c68d400979b862f
Issue-ID: POLICY-206
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoAdd vFC and MSO Simulators 21/10021/1
Charles Cole [Fri, 1 Sep 2017 22:33:32 +0000 (17:33 -0500)]
Add vFC and MSO Simulators

Added vFC and MSO Simulators for jUnit testing

Issue-ID: POLICY-201, POLICY-202
Change-Id: Ia30ff6ec74a8ee4fa71ce0456eb6dcb60c897695
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoAdd mock AAI endpoint for jUnit testing 27/9727/2
Charles Cole [Thu, 31 Aug 2017 14:55:52 +0000 (09:55 -0500)]
Add mock AAI endpoint for jUnit testing

Created an AAI endpoint for use in jUnit testing of closed loops.
Added unit tests for my endpoint.
Added methods to Util in template.demo to support creation of AAI
endpoints and kieSessions.

Issue-ID: POLICY-101
Change-Id: I8e110b79f4c2ca700b29dcb29e9828303772d56d
Signed-off-by: Charles Cole <cc847m@att.com>
6 years agoMerge "Fix Sonar Blockers for Drools-Applications"
Pamela Dragosh [Thu, 31 Aug 2017 16:24:13 +0000 (16:24 +0000)]
Merge "Fix Sonar Blockers for Drools-Applications"

6 years agoFix Sonar Blockers for Drools-Applications 97/9597/1
Mike Babinski [Thu, 31 Aug 2017 05:15:13 +0000 (05:15 +0000)]
Fix Sonar Blockers for Drools-Applications

Issue-ID: POLICY-111

Add null check for pipResponse right before null check of pipResponse.gitAttributes().
Change-Id: Iba52791da1aae6900ab4dd4bb6286c3ac00e00a4
Signed-off-by: Mike Babinski <mb1915@att.com>
6 years agoCL dependencies fixes for lab environment runtime 91/9591/2
Jorge Hernandez [Thu, 31 Aug 2017 04:42:35 +0000 (23:42 -0500)]
CL dependencies fixes for lab environment runtime

This also includes workarounds to the recent oparent dependency
introduction that breaks runtime (with the version-check-maven-plugin).

manifested by loading control loops and failing to load some classes
due to different versions.

The issue was that underlying drools libraries use 3.2.5 and oparent
has included a had dependency with transitive dependencies for some maven
libraries in 3.2.3 and lower version xml parsers.   Bottomoline, the
classpath at runtime was formed by the union of both, with some
libraries being resolved to the oparent one, and others to the drools
one.   These errors are very obscured to debug.

Additional clean up of dependencies versions and order of build
was introduced to avoid issues loading dependencies at runtime in a
lab environment (non-junit)..

Issue-ID: POLICY-162
Change-Id: I019c82e6bed4eab4884cdbf8f6f32472c3a7352f
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agolegacy archetype simplification 85/9385/1
Jorge Hernandez [Wed, 30 Aug 2017 11:25:18 +0000 (06:25 -0500)]
legacy archetype simplification

removes pom warnings on versionn duplication from parent pom.

Change-Id: I7b218d6d72bf4db2692370ecc637dbd74e96290f
Issue-ID: POLICY-162
Signed-off-by: Jorge Hernandez <jh1730@att.com>
6 years agoFix New Sonar Blocker for Drools-Applications 85/9185/1
Mike Babinski [Tue, 29 Aug 2017 18:05:39 +0000 (18:05 +0000)]
Fix New Sonar Blocker for Drools-Applications

Add null checks to stop possible null pointer exceptions.

Issue-ID: POLICY-111
Change-Id: Idafb078edf984712e5d5a4d54763f2723e17c09f
Signed-off-by: Mike Babinski <mb1915@att.com>
6 years agoRestored global ControlLoopLogger 19/9119/1
Magnusen, Drew (dm741q) [Tue, 29 Aug 2017 13:56:58 +0000 (08:56 -0500)]
Restored global ControlLoopLogger

Restored previously deleted global ControlLoopLogger which
is loaded into the kieSession for the test.

Issued-ID: POLICY-197
Change-Id: I55e9a3a0c2627ecbecbef8059e70d672e6157fdc
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>