summaryrefslogtreecommitdiffstats
path: root/controlloop
AgeCommit message (Collapse)AuthorFilesLines
2017-09-14Merge "Move credential information out of persistence.xml"Jorge Hernandez5-13/+69
2017-09-14Merge "master lab template maintained under archetype"Jorge Hernandez17-90/+1721
2017-09-14master lab template maintained under archetypeJorge Hernandez17-90/+1721
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>
2017-09-14Move credential information out of persistence.xmlTemoc Rodriguez5-13/+69
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>
2017-09-14Merge "Added changes for vDNS Use Case"Jorge Hernandez40-235/+620
2017-09-14Added changes for vDNS Use CaseHockla, Ali (ah999m)40-235/+620
-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>
2017-09-13Fix AAINQF199 object references to AAINQ objectsdaniel1-14/+14
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>
2017-09-13Merge "Fix A&AI Named Query for vFW"Jorge Hernandez6-19/+106
2017-09-13Merge "ONAP code for AAI, consolidate name and get query"Jorge Hernandez32-23/+1918
2017-09-12Fix A&AI Named Query for vFWdaniel6-19/+106
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>
2017-09-12ONAP code for AAI, consolidate name and get queryJoseph Chou32-23/+1918
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>
2017-09-12Merge "Fix nullPointerException"Jorge Hernandez1-2/+3
2017-09-12Merge "Fixing VFC Model response class"Pamela Dragosh4-43/+10
2017-09-12Fix nullPointerExceptionTemoc Rodriguez1-2/+3
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>
2017-09-12Fixing VFC Model response classRitu Sood4-43/+10
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>
2017-09-11Add Support for Locking VNF Target Typesdaniel4-11/+18
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>
2017-09-11Move the simulators to a new packageCharles Cole12-49/+159
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>
2017-09-11Fix Eclipse warnings for raw type parameterizationPamela Dragosh1-4/+4
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>
2017-09-08Set this class as serializablePamela Dragosh4-29/+32
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>
2017-09-08Merge "Clearing sonar critical for missing serialization"Pamela Dragosh3-6/+15
2017-09-08Clearing sonar critical for missing serializationPamela Dragosh3-6/+15
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>
2017-09-08Added changes for vDNS Use Case - MSO InterfaceHockla, Ali (ah999m)40-918/+2424
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>
2017-09-07Merge "Support drl compilation at design/development time"Jorge Hernandez3-1/+20
2017-09-07Add in-mem db to ControlLoopXacmlGuardTestTemoc Rodriguez8-238/+348
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>
2017-09-07Support drl compilation at design/development timeJorge Hernandez3-1/+20
Change-Id: I0fe6277f92c0db7f596ff73d81987e2e78b5793e Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-06Add APPC LCM Interfacedaniel40-101/+3703
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>
2017-09-06Add missing license.Pamela Dragosh1-0/+20
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>
2017-09-01Add vFC and MSO SimulatorsCharles Cole6-1/+231
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>
2017-08-31Add mock AAI endpoint for jUnit testingCharles Cole5-238/+273
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>
2017-08-31Merge "Fix Sonar Blockers for Drools-Applications"Pamela Dragosh1-9/+7
2017-08-31Fix Sonar Blockers for Drools-ApplicationsMike Babinski1-9/+7
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>
2017-08-31CL dependencies fixes for lab environment runtimeJorge Hernandez5-18/+34
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>
2017-08-30legacy archetype simplificationJorge Hernandez7-239/+202
removes pom warnings on versionn duplication from parent pom. Change-Id: I7b218d6d72bf4db2692370ecc637dbd74e96290f Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-29Fix New Sonar Blocker for Drools-ApplicationsMike Babinski1-2/+7
Add null checks to stop possible null pointer exceptions. Issue-ID: POLICY-111 Change-Id: Idafb078edf984712e5d5a4d54763f2723e17c09f Signed-off-by: Mike Babinski <mb1915@att.com>
2017-08-29Restored global ControlLoopLoggerMagnusen, Drew (dm741q)1-1/+2
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>
2017-08-28Merge "Removal of sys.out/err with logger messages"Jorge Hernandez28-187/+242
2017-08-28Removal of sys.out/err with logger messagesMagnusen, Drew (dm741q)28-187/+242
Removed any use of System.out.println or System.err.println and replaced with relevant logger statements. Issue-ID: POLICY-176 Change-Id: I91513267635bfb2a34f2a9650c48f367d53fc842 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-08-28Fix JUnit Test for ControlLoopsdaniel3-7/+24
Fixed the test case by using getters and setters for Policy objects in the drl. Added gson dependency in the pom to fix gson runtime errors. Fixed dependencies in template.demo pom to add vfc. The drl was having compilation errors in the guard permitted rule due to the operation request object not being casted into a VFCRequest when being passed into the VFCManager. Issue-ID: POLICY-194 Change-Id: Id71c74ad9727ad942a683f63a0dfad3f22b6376b Signed-off-by: Daniel Cruz <dc443y@att.com>
2017-08-25Fix Sonar Blocker for Drools-ApplicationsMike Babinski1-12/+16
Add only the null check for pipResponse. Issue-ID: POLICY-111 Change-Id: I2721c759f27264ce164110a19ea8c649b74869df Signed-off-by: Mike Babinski <mb1915@att.com>
2017-08-24Add VFC integration codeRitu Sood20-5/+717
This patch adds VFC Actor code and updates drool template for VFC. This is WIP patch. There are two opens for this patch that are still in discussion 1) AA&I fields in onset event 2) VFC URL, username and password Issue-ID: POLICY-57 Change-Id: Idc1d1fada295fa1c2e563ba37dd359f7b5c59f87 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
2017-08-23Fix Sonar Blockers for Drools-ApplicationsMike Babinski3-26/+24
Add null checks to protect against potential null exceptions. Issue-ID: POLICY-111 Change-Id: Ib079d1b48a6858332ea3eaa0e75a991f518a0f9a Signed-off-by: Mike Babinski <mb1915@att.com>
2017-08-19Merge "Code cleanup to resolve critical sonar issues"Pamela Dragosh13-52/+96
2017-08-18Code cleanup to resolve critical sonar issuesMagnusen, Drew (dm741q)13-52/+96
Code cleanup mostly involed directing the output of exception messages to the correct logger stream. Issue-ID: [POLICY-115] Change-Id: I2042bac3d3b0991a2ebed33421a73f1aa300c7c1 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-08-17installation improvements and renaming archetypeJorge Hernandez17-38/+36
Two changes: - remove hardcoding of the DMaaP hosts, and DCAE topic to make it configurable. - rename archetype to better name. Change-Id: Ic50b9d1f06a138230c76cc6c50ca8072dc5da148 Issue-ID: POLICY-159 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-16Merge "Remove eclipse warning for duplicate version"Jorge Hernandez1-1/+0
2017-08-15Policy-yaml changesTarun Tej Velaga36-3837/+4294
Changes to Policy-yaml and sdc projects based on changes from policy/engine. Issue-Id: POLICY-88 Change-Id: Ic1a58f00029b9a66db6980fc7732a2ac57390229 Signed-off-by: Tarun Tej Velaga <tt3868@att.com>
2017-08-15Remove eclipse warning for duplicate versionPamela Dragosh1-1/+0
Duplicating managed version for maven-surefire-plugin 2.19.1 Issue-Id: POLICY-168 Change-Id: Ie48c2470e8d3938fc75049a867c32add9a4001d6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-08-14Remove eclipse checkstyle warningsPamela Dragosh1-28/+42
Add this should remove Eclipse warnings: Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (execution: check-style, phase: process-sources) Issue-Id: POLICY-166 Change-Id: Id0a4c0070f6190cd874a71b264f21ea16b0b583e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-08-08move packages build + tweaking pom.xmlJorge Hernandez15-13/+26
Change-Id: Iac032aa8f379cc8d614ec7913b41a68cbda9674d Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-27Merge "[POLICY-91] POM dependencies cleanup"Jorge Hernandez7-200/+233