summaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo/src/test/java
AgeCommit message (Collapse)AuthorFilesLines
2017-09-26force maven dependency plugin version to latestJorge Hernandez6-34/+39
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>
2017-09-26Fix TestSO propertiesTemoc Rodriguez5-13/+22
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>
2017-09-25Fix Usecase Template for VoLTEdaniel1-0/+12
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>
2017-09-22Fix Use Case Testingdaniel4-5/+25
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>
2017-09-21Add VFC Response in Working Memory & JUNITRitu Sood1-0/+292
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>
2017-09-21Implement restful call to xacml pdp guardTemoc Rodriguez1-4/+6
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>
2017-09-15Modify AAI simulator to support new requestsCharles Cole5-7/+7
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>
2017-09-14Added changes for vDNS Use CaseHockla, Ali (ah999m)3-14/+313
-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-12Fix A&AI Named Query for vFWdaniel1-0/+17
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-11Add Support for Locking VNF Target Typesdaniel2-10/+9
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 Cole8-341/+25
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-08Added changes for vDNS Use Case - MSO InterfaceHockla, Ali (ah999m)3-4/+409
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-07Add in-mem db to ControlLoopXacmlGuardTestTemoc Rodriguez2-85/+94
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-06Add APPC LCM Interfacedaniel5-17/+937
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-01Add vFC and MSO SimulatorsCharles Cole5-0/+224
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 Cole4-238/+261
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-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 Hernandez2-29/+33
2017-08-28Removal of sys.out/err with logger messagesMagnusen, Drew (dm741q)2-29/+33
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 ControlLoopsdaniel1-1/+0
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-15Policy-yaml changesTarun Tej Velaga1-7/+7
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-07-20[POLICY-80] Adding the Policy Guard featuresMichael Borokhovich2-65/+14
Two Policy Guard features added: Frequency-limiter and Blacklist. Change-Id: I48184ab0ae9760c9ea7594cd7346b456aa964d48 Signed-off-by: Michael Borokhovich <michael@research.att.com>
2017-06-29[POLICY-22] Reorganizing drools-appsGao, Chenfei (cg287m)2-0/+764
Change-Id: I5f9bb3908f8d55c466dd847ae5e01a424e9ba364 Signed-off-by: Gao, Chenfei (cg287m) <chenfei.gao11@gmail.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>