summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-09-22 19:48:18 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-22 19:48:18 +0000
commitcc73cc553b4f083c8f050e29d6aec8d112b07387 (patch)
tree6b9fe622282e9756fb27b9e1286248a930421f29 /controlloop/common/model-impl
parent24782d90bd18992c4f31b18fd534c60a4a5a3ef8 (diff)
parent5ee687ecedd616c3e4b83622103232a06c4783c2 (diff)
Merge "Fix Use Case Testing"
Diffstat (limited to 'controlloop/common/model-impl')
-rw-r--r--controlloop/common/model-impl/so/pom.xml6
-rw-r--r--controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java12
2 files changed, 15 insertions, 3 deletions
diff --git a/controlloop/common/model-impl/so/pom.xml b/controlloop/common/model-impl/so/pom.xml
index faeb12130..a18030eb7 100644
--- a/controlloop/common/model-impl/so/pom.xml
+++ b/controlloop/common/model-impl/so/pom.xml
@@ -53,5 +53,11 @@
<artifactId>rest</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.onap.policy.drools-pdp</groupId>
+ <artifactId>policy-management</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java
index f967414c1..2f5ffdc3e 100644
--- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java
+++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java
@@ -25,6 +25,7 @@ import java.util.HashMap;
import java.util.Map;
import org.onap.policy.so.util.Serialization;
+import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.rest.RESTManager;
import org.onap.policy.rest.RESTManager.Pair;
import org.drools.core.WorkingMemory;
@@ -134,9 +135,14 @@ public final class SOManager {
@Override
public void run()
{
- String serverRoot = "http://localhost:6667"; // TODO
- String username = "username"; // TODO
- String password = "password"; // TODO
+
+ /*
+ * TODO: What if these are null?
+ */
+ String serverRoot = PolicyEngine.manager.getEnvironmentProperty("so.url");
+ String username = PolicyEngine.manager.getEnvironmentProperty("so.username");
+ String password = PolicyEngine.manager.getEnvironmentProperty("so.password");
+
String url = serverRoot + "/serviceInstances/v2/" + serviceInstanceId + "/vnfs/" + vnfInstanceId + "/vfModulesHTTPS/1.1";
String auth = username + ":" + password;