summaryrefslogtreecommitdiffstats
path: root/controlloop/common/simulators
AgeCommit message (Collapse)AuthorFilesLines
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-09Fix SO Request structureHockla, Ali (ah999m)1-0/+1
Issue-ID: POLICY-438 Change-Id: I05e634782004fff5540b3e6fabb9e22846438cb1 Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-11-09Merge "Fix SO Request body"Jorge Hernandez2-9/+9
2017-11-08Merge "Update SNAPSHOT version"Jorge Hernandez1-1/+1
2017-11-08Fix SO Request bodyHockla, Ali (ah999m)2-9/+9
- 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)2-2/+2
Issue-ID: POLICY-437 Change-Id: I19679d9782f78ff73e3a90d0c8c95b2b6e9d319f Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-11-08Update SNAPSHOT versionPamela Dragosh1-1/+1
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>
2017-11-07SNAPSHOT present in policy core and msb depsv1.1.0Jorge Hernandez1-3/+3
Change-Id: I61c8d698f8cf984c648e510997498d41e7d9744a Issue-ID: POLICY-433 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-10-30Update SO url from v2 to v5Hockla, Ali (ah999m)2-2/+2
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-28Add missing auth headers to guard requestTemoc Rodriguez2-2/+20
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>
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 Cole7-5/+141
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 Hernandez4-214/+252
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 Sood2-5/+16
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-15Fix sonar criticalPamela Dragosh1-2/+1
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>
2017-09-15Fix sonar criticalsPamela Dragosh1-4/+4
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>
2017-09-15Modify AAI simulator to support new requestsCharles Cole6-15/+99
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)5-66/+154
-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-13Merge "Fix A&AI Named Query for vFW"Jorge Hernandez1-1/+1
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-12Fixing VFC Model response classRitu Sood1-2/+0
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-11Move the simulators to a new packageCharles Cole8-0/+437
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>