summaryrefslogtreecommitdiffstats
path: root/controlloop/common
AgeCommit message (Collapse)AuthorFilesLines
2017-09-28Merge "Add missing auth headers to guard request"Jorge Hernandez5-119/+406
2017-09-28Add missing auth headers to guard requestTemoc Rodriguez5-119/+406
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-28Merge "Fix major sonar issues"Pamela Dragosh2-1/+4
2017-09-28Merge "Use MSB for service discovery"Pamela Dragosh8-0/+451
2017-09-28Merge "Fix major sonar issues"Jorge Hernandez1-8/+8
2017-09-28Merge "Add functionality for VFC request retries"Jorge Hernandez1-2/+5
2017-09-28Merge "Cleanup for VFC Actor code"Jorge Hernandez2-27/+30
2017-09-27Merge "Added @Override annotation to method signature"Jorge Hernandez1-0/+2
2017-09-27Merge "Create common object to consolidate AAI response"Jorge Hernandez18-989/+0
2017-09-27Added changes for SO Request retriesHockla, Ali (ah999m)1-2/+7
This change will allow the control loop to increment the operation attempts in the case of an SO failure in order to retry the operation if defined in the yaml. Issue-ID: POLICY-268 Change-Id: I1fee2ce64524e58fc3068f19c5cf31ed91159e0f Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2017-09-27Add functionality for VFC request retriesRitu Sood1-2/+5
This allows the control loop to track operation attempts in case of VFC failures. This will allow retries of the operation if required in the YAML file. Issue-ID: POLICY-270 Change-Id: Ieeaf6770a8d03fa4eecc976535301d9236d19972 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
2017-09-27Cleanup for VFC Actor codeRitu Sood2-27/+30
Fix some sonar critical issues and other clean up Issue-ID: POLICY-57 Change-Id: Iec9b94ff238ea6a65cfe39fd5cdfb200c773c1a9 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
2017-09-27Fix major sonar issuesshashikanth2-1/+4
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|rules=squid%3AS1161 Added "@Override" annotation above this method signature. Issue-Id:POLICY-239 Change-Id: I578d0e740a6c04ba02df400a3abc99f9b774908a Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
2017-09-27Added @Override annotation to method signatureshashikanth1-0/+2
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|rules=squid%3AS1161 Added the "@Override" annotation above this method signature. Issue-Id:POLICY-239 Change-Id: Ibb71db82d78b0df02d5d6416ac3f3f00a3780695 Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
2017-09-27Fix major sonar issuesshashikanth1-8/+8
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|rules=squid%3AS1132 Fixed string literal comparison for for SO and VF Module Create and few optimizations. Issue-Id:POLICY-239 Change-Id: I8e228463ebc7f3114e5caba9b423552bb84dd52d Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
2017-09-27Create common object to consolidate AAI responseJoseph Chou18-989/+0
Remove duplicate/obsolete code (NQF199) Change-Id: Ibe0d4d958a1fe5ae0bae93f740e8b32196a3b07b Issue-ID: POLICY-228 Signed-off-by: Joseph Chou <jc2555@att.com>
2017-09-27Fix Use Case Templatedaniel3-7/+13
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-26Use MSB for service discoverywangxinyuan101133328-0/+451
Change-Id: I524946a1c352b5e9225b7fb37d35fa03a3f77e82 Issue-ID: POLICY-172 Signed-off-by: wangxinyuan10113332 <wang.xinyuan1@zte.com.cn>
2017-09-25Merge "Create common object to consolidate AAI response"Jorge Hernandez25-0/+1651
2017-09-25Merge "Fix Usecase Template for VoLTE"Jorge Hernandez2-3/+16
2017-09-25Fix Usecase Template for VoLTEdaniel2-3/+16
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-25override guard url when simulator feature enabledJorge Hernandez1-0/+1
Change-Id: I6af04238d043b95960a29484bcfbb08d2eab5b13 Issue-ID: POLICY-256 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-25add guard simulator to pdp-d feature for labsJorge Hernandez2-0/+2
Change-Id: Id1852e55c3b03cf2c9e3800e40067806c6b9be5e Issue-ID: POLICY-256 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-25Create common object to consolidate AAI responseJoseph Chou25-0/+1651
Add Junit test to improve sonar coverage Change-Id: I32688dad756d2cba80559cd1d090e334ebf77aa3 Issue-ID: POLICY-228 Signed-off-by: Joseph Chou <jc2555@att.com>
2017-09-25Merge "Added the Override annotation"Jorge Hernandez3-4/+5
2017-09-25Merge "Fix Blocker/Critical sonar issues"Jorge Hernandez2-4/+8
2017-09-25Added the Override annotationrama-huawei3-4/+5
Added diamond symbol on RHS side Change-Id: I3945e5f2217f74b71fa143b128f271e48b4882a7 Issue-ID: POLICY-239 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-25Merge "Added Override annotation"Jorge Hernandez1-0/+1
2017-09-25Merge "Added private constructor"Jorge Hernandez1-1/+4
2017-09-25Merge "Fix for Sonar major issues"Jorge Hernandez1-1/+2
2017-09-25Merge "Fix for Sonar major issues"Jorge Hernandez1-1/+1
2017-09-25Added Override annotationramanjaneya1-0/+1
Issue-ID: POLICY-239 Change-Id: Ia84e5656744289be52cf22b1b68d870a03b85404 Signed-off-by: ramanjaneya <ramanjaneya.palleti@huawei.com>
2017-09-25Added private constructorramanjaneya1-1/+4
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>
2017-09-22Merge "Added private constructor"Pamela Dragosh1-0/+3
2017-09-22Merge "Add simple JUnit test for LCMResponse"Pamela Dragosh2-2/+110
2017-09-22Add simple JUnit test for LCMResponsePamela Dragosh2-2/+110
This covers all the methods Issue-ID: POLICY-32 Change-Id: I6da6c54c257f6254f5116c99a64c02dbf0c77e05 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-09-22Merge "Fix Use Case Testing"Jorge Hernandez8-11/+69
2017-09-22Added private constructorramanjaneya1-0/+4
Issue-ID: POLICY-239 Change-Id: I2ed90fc27c70ae03a772913bf3fefd28b692cec7 Signed-off-by: ramanjaneya <ramanjaneya.palleti@huawei.com>
2017-09-22Added private constructorramanjaneya1-0/+3
Issue-ID: POLICY-239 Change-Id: I261d3aa1b9f67c3e78e1016a84ed64924e306f43 Signed-off-by: ramanjaneya <ramanjaneya.palleti@huawei.com>
2017-09-22Fix Use Case Testingdaniel8-11/+69
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-22Create common object to consolidate AAI responseJoseph Chou4-76/+16
Create base object for AAI GET query Change-Id: I874b10f89054d8adcc28b1e601e9ff15ee884784 Issue-ID: POLICY-228 Signed-off-by: Joseph Chou <jc2555@att.com>
2017-09-22Merge "Add VFC Response in Working Memory & JUNIT"Pamela Dragosh8-16/+58
2017-09-21Add guard simulator and multiple AAI responsesCharles Cole8-6/+142
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-21Merge "ONAP AAI GET QUERY code to support ONAP project"Jorge Hernandez3-39/+124
2017-09-21ONAP AAI GET QUERY code to support ONAP projectJoseph Chou3-39/+124
check in code to use simulator url Issue-ID: POLICY-103 Change-Id: I352140dd3cb3159fc2c5738bf02dbb6272de48bc Signed-off-by: Joseph Chou <jc2555@att.com>
2017-09-21Merge "Implement restful call to xacml pdp guard"Jorge Hernandez3-56/+105
2017-09-21pdp-d feature to simulate aai/mso/vfc in labJorge Hernandez11-214/+599
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-21Implement restful call to xacml pdp guardTemoc Rodriguez3-56/+105
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-21Add VFC Response in Working Memory & JUNITRitu Sood8-16/+58
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-20Merge "Fix for Sonar major issues"Jorge Hernandez1-1/+2