summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/so/src
diff options
context:
space:
mode:
authordaniel <dc443y@att.com>2017-09-21 14:29:07 -0500
committerdaniel <dc443y@att.com>2017-09-22 11:48:29 -0500
commit5ee687ecedd616c3e4b83622103232a06c4783c2 (patch)
tree7d3936478b18796abe41bbcb3074f9634513da33 /controlloop/common/model-impl/so/src
parent5cbb85e6bbd2ade9f35931980b55bc6bc48da9a2 (diff)
Fix Use Case Testing
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>
Diffstat (limited to 'controlloop/common/model-impl/so/src')
-rw-r--r--controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java12
1 files changed, 9 insertions, 3 deletions
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;