aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/simulators/src/main/java/org
AgeCommit message (Collapse)AuthorFilesLines
2018-09-24Fix checkstyle declarationsPamela Dragosh2-12/+17
I fixed what I thought would be tolerable for this release. Same issue as policy/common I had to defined the checkstyle in each repo where the suppressions were needed. Issue-ID: POLICY-1135 Change-Id: I8f30bee7e9cddc692ddad3cf88acedb2e6b4781b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-21new sonar issues in drools-applicationsJim Hahn1-3/+5
Don't return null lists from AAI. Transient TargetLock. Extract aai.url, et. al., constants. Don't allocate extra unneeded variable. Re-order fields in xacml attributes. Extract "vserver" constant from simulator. Replace thread sleep with join. Change-Id: Iee1bd182862632af1f131cca5db5b526f5865b9f Issue-ID: POLICY-1129 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-28use new SO API for scale-outJim Hahn1-15/+12
Updated licenses and serialization IDs. Moved hashCode() and equals() methods to be in same location as in the original code so it can be more easily compared. Changed vDNS yaml timeout and retry to 1200 and 0, respectively, to match the original values. Removed extra newline from yaml, to match original yaml. Reformatted source to wrap lines at 120 characters and removing trailing white space. Change-Id: I3f5e59a1f44750347de49164f587d4ffefdee8b4 Issue-ID: POLICY-962 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-24use new vf-walk code in SO requestJim Hahn1-105/+45
Methods were added to AaiNqResponseWrapper to extract VF modules and generate the new VF module name. This step modifies the SO code to use those methods. It was also determined that the SO code needs the VF module container object, not just the VF module, itself. As a result, AaiNqResponseWrapper was modified to return a list of the containers instead of a list of the VF modules. Also modified the AAI simulator to return two VF modules in the response to the vserver named query. As part of that, a method was added to the simulator so that JSON responses can be read from files rather than having to convert them to Java Strings. Modified simulator to work even if vnf-id is null. Change-Id: I68fdf07ea80ee0daf9e16403e35b11710315a8a8 Issue-ID: POLICY-1037 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-15add prov-status check to AAI queriesJim Hahn1-6/+6
Also had to add prov-status field to AaiGetVnfResponse class. Removed bogus comment from test. Verify response is not null in test. Verify no requery by vnf name in test. Add prov-status to template.demo tests. Add prov-status to sample json for archetype-cl's. Change-Id: I3f36a2bb6de8265ce5b10103690d6d8813c15b1a Issue-ID: POLICY-964 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-07-30Copy policy-endpoints from drools-pdp to commonmmis1-2/+2
Replaced references to classes deleted from drools-pdp with references to the corresponding in policy-common Issue-ID: POLICY-967 Change-Id: Ia9d2ac704e6b7c434e5a9e7aee6d7dcf9198e4f2 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-04-30AAI simulator fixeseikrwaq2-27/+44
AAI simulator fixes for multi onset messages in parallel Change-Id: Ia32dacf6caaded7fc45232ba4be8f49f3ccfd614 Issue-ID: POLICY-525 Signed-off-by: eikrwaq <waqas.ikram@ericsson.com>
2018-03-27Merge "Add timeout to SO to wait for success"Jorge Hernandez1-10/+28
2018-03-26Removed checkstyle warningsmmis1-2/+2
Removed checkstyle warnings from policy/drools-applications/controlloop/common/model-impl/aai including renaming classes: AAI* -> Aai* PNF* -> Pnf* and renaming some methods in those classes Issue-ID: POLICY-705 Change-Id: I2d59a668728aa58a2c9fbe78c44e924e6cfb4531 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-03-25Add timeout to SO to wait for successliamfallon1-10/+28
The timeout implementation assumes that a finished request is a HTTP-200 together with either a request state of COMPLETE or FAILED in the embedded request in the response in the JSON. This is the same as what is done earlier in this class and in, for example, VFC. Unit test for timeout has also been added. Change-Id: I637dbecb8d230b8060f7ced76d92d11ec482503e Issue-ID: POLICY-448 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-03-22Removed checkstyle warningsmmis5-186/+456
Removed checkstyle warnings in: policy/controlloop/common/guard policy/controlloop/common/msb policy/controlloop/simulators including renaming of the following classes: MSBServiceFactory -> MsbServiceFactory MSBServiceManager -> MsbServiceManager MSBServiceException -> MsbServiceException Issue-ID: POLICY-705 Change-Id: I11d62a74fcb77e764121df119cb0bd9b844b485b Signed-off-by: mmis <michael.morris@ericsson.com>
2018-03-02Reduce Technical Debt on drools-applicationsliamfallon2-44/+48
This commit mops up the technical debt issues in drools-applications that are reaistic to fix witout major surgery on the code. note: warnings on non compliant Java class names that are used in yaml serializaiton and deserailization are ignored. note: warnings on complexity figures for equals() methods are ignored. Issue-ID: POLICY-455 Change-Id: I99ccda4bd9932ceb5ccbcfd2778730234b55d7a5 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-01-22Fix Tech Debt/JUnit on VFC actorliamfallon1-12/+12
Unit test for VFC actor added. Some minor chages to actor service provider class to remove technical debt. Change-Id: I54ee24bcfa1c82f4a18c0035bdff186d4d3ebdf7 Issue-ID: POLICY-455 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-01-15Merge "Cleanup of A&AI message model module."Jorge Hernandez1-3/+3
2017-12-15Add guard junitsTemoc Rodriguez1-4/+5
Added a few junit files which test most functionality in the guard submodule. Some minor bugs were found by the junits and fixed those newly found bugs. Added persistence.xml for use by junits in guard. Issue-ID: POLICY-490 Change-Id: Ied7e276cfd417e1f396b5a6685a2e9acc9efd109 Signed-off-by: Temoc Rodriguez <cr056n@att.com>
2017-12-14Cleanup of A&AI message model module.Liam Fallon1-3/+3
Fields have been made fields private in POJOs, and wrote JUnit unit tests to bring up code coverage. AAIManager also changed to use non-static methods so that it can be stubbed with Mockito. Change-Id: I871427ced5db8a1dfd6495fef4e6d84adf264e65 Signed-off-by: Liam Fallon <liam.fallon@ericsson.com> Issue-ID: POLICY-455 Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
2017-12-06Technical Debt in AAI.Liam Fallon1-3/+3
Eliminate the technical debt identified in the drools-applications/controlloop/common/model-impl/aai module by Sonar Change-Id: I72125baacc217386a4984be04bfc023439eddd13 Signed-off-by: Liam Fallon <liam.fallon@ericsson.com> Issue-ID: POLICY-455 Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
2017-11-13Update SO to use is-base-vf-module=falseHockla, Ali (ah999m)1-3/+2
Issue-ID: POLICY-447 Change-Id: I63cd5d20670f224aa4b9220b99ee40aad4f3e50c Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-11-10Fix SO Request mismatch and udpate AAI NQ responseHockla, Ali (ah999m)1-1/+3
Issue-ID: POLICY-438 Change-Id: I1d27d0e5f7d253aa3cba82f5f4b515c01be35d8b Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-11-08Fix SO Request bodyHockla, Ali (ah999m)1-6/+6
- 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>
2017-11-08Fix SO url to remove suffix HTTPS/1.1Hockla, Ali (ah999m)1-1/+1
Issue-ID: POLICY-437 Change-Id: I19679d9782f78ff73e3a90d0c8c95b2b6e9d319f Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-10-30Update SO url from v2 to v5Hockla, Ali (ah999m)1-1/+1
Issue-ID: POLICY-401 Change-Id: Id1be63d2f61bc0d9d8f15df7573af2c7307c1c31 Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-10-30Fix Final Failure on AAI Queriesdaniel1-1/+1
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>
2017-10-24Change vnf-id to vnf-namedaniel1-1/+5
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>
2017-10-23Fix handling of aai 'get' errorsCharles Cole1-7/+23
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>
2017-10-18Add support for AAI Named Query error handlingCharles Cole1-1/+6
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>
2017-10-17Update SO Interface AAI NQ response from v8 to v11Hockla, Ali (ah999m)1-2/+3
- 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>
2017-09-28Fix Sonar criticalsCharles Cole1-1/+8
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>
2017-09-27Fix Use Case Templatedaniel2-0/+8
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>
2017-09-21Add guard simulator and multiple AAI responsesCharles Cole5-4/+77
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>
2017-09-21pdp-d feature to simulate aai/mso/vfc in labJorge Hernandez1-31/+39
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>
2017-09-18Fixing VFC simulator for junit testsRitu Sood1-4/+13
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>
2017-09-15Modify AAI simulator to support new requestsCharles Cole2-6/+50
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)2-6/+13
-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-1/+1
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-11Move the simulators to a new packageCharles Cole4-0/+175
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>