aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.vfc/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-03-27 12:35:23 -0400
committerJim Hahn <jrh3@att.com>2020-03-30 09:01:15 -0400
commit61a84fecc1eae8640fec2860f4b50102ed0baa64 (patch)
tree32ba4cf68bd9f6c4f97e92f665ab2de7ad788dc6 /models-interactions/model-actors/actor.vfc/src/main
parent3a374cbc9f4bef8856c3e78be1a6b4c5274cd744 (diff)
Test new actors against simulators
Also modified HttpParams to allow "path" to be blank to support any cases that really have no "path" to append to the context URI base path. Issue-ID: POLICY-2405 Change-Id: I49eebde6759659d2804b5a11c1504c37674bd0c4 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.vfc/src/main')
-rw-r--r--models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/Restart.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/Restart.java b/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/Restart.java
index 2c5cf8eda..e3df16d9b 100644
--- a/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/Restart.java
+++ b/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/Restart.java
@@ -20,6 +20,7 @@
package org.onap.policy.controlloop.actor.vfc;
+import java.util.Map;
import java.util.concurrent.CompletableFuture;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.MediaType;
@@ -47,7 +48,10 @@ public class Restart extends VfcOperation {
String path = getPath() + pair.getLeft();
String url = getClient().getBaseUrl() + path;
- return handleResponse(outcome, url, callback -> getClient().post(callback, path, entity, null));
+ Map<String, Object> headers = makeHeaders();
+ headers.put("Accept", MediaType.APPLICATION_JSON);
+
+ return handleResponse(outcome, url, callback -> getClient().post(callback, path, entity, headers));
}
/**
@@ -58,7 +62,7 @@ public class Restart extends VfcOperation {
protected Pair<String, VfcRequest> makeRequest() {
VfcRequest request = super.constructVfcRequest();
- String requestUrl = "/ns/" + request.getNsInstanceId() + "/heal";
+ String requestUrl = "/" + request.getNsInstanceId() + "/heal";
return Pair.of(requestUrl, request);
}
}