diff options
author | Jorge Hernandez <jh1730@att.com> | 2017-09-22 19:48:18 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-22 19:48:18 +0000 |
commit | cc73cc553b4f083c8f050e29d6aec8d112b07387 (patch) | |
tree | 6b9fe622282e9756fb27b9e1286248a930421f29 /controlloop/common/actors/actor.so | |
parent | 24782d90bd18992c4f31b18fd534c60a4a5a3ef8 (diff) | |
parent | 5ee687ecedd616c3e4b83622103232a06c4783c2 (diff) |
Merge "Fix Use Case Testing"
Diffstat (limited to 'controlloop/common/actors/actor.so')
-rw-r--r-- | controlloop/common/actors/actor.so/pom.xml | 6 | ||||
-rw-r--r-- | controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java | 13 |
2 files changed, 15 insertions, 4 deletions
diff --git a/controlloop/common/actors/actor.so/pom.xml b/controlloop/common/actors/actor.so/pom.xml index ff5b12167..f19011c6c 100644 --- a/controlloop/common/actors/actor.so/pom.xml +++ b/controlloop/common/actors/actor.so/pom.xml @@ -46,5 +46,11 @@ <version>2.5</version> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.onap.policy.drools-pdp</groupId> + <artifactId>policy-management</artifactId> + <version>1.1.0-SNAPSHOT</version> + <scope>provided</scope> + </dependency> </dependencies> </project> diff --git a/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java index a31007f32..a014c7a80 100644 --- a/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java +++ b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java @@ -41,6 +41,7 @@ import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.controlloop.actorServiceProvider.spi.Actor; import org.onap.policy.controlloop.policy.Policy; +import org.onap.policy.drools.system.PolicyEngine; import org.onap.policy.so.SOCloudConfiguration; import org.onap.policy.so.SOManager; import org.onap.policy.so.SOModelInfo; @@ -176,12 +177,16 @@ public class SOActorServiceProvider implements Actor { // // insert(aainqRequestWrapper); - String url = "http://localhost:6666"; - String username = "testUser"; - String password = "testPass"; + /* + * Obtain A&AI credentials from properties.environment file + * TODO: What if these are null? + */ + String aaiUrl = PolicyEngine.manager.getEnvironmentProperty("aai.url"); + String aaiUsername = PolicyEngine.manager.getEnvironmentProperty("aai.username"); + String aaiPassword = PolicyEngine.manager.getEnvironmentProperty("aai.password"); //***** send the request *****\\ - AAINQResponse aainqresponse = AAIManager.postQuery(url, username, password, // TO DO: get AAI URL, username, and password + AAINQResponse aainqresponse = AAIManager.postQuery(aaiUrl, aaiUsername, aaiPassword, aainqrequest, onset.requestID); // Check AAI response |