aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.so/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-03-02 16:17:36 -0500
committerJim Hahn <jrh3@att.com>2020-03-03 01:12:53 +0000
commit9bd821d6a2b49dacb7286d58f11d5cd1cc7e0aa2 (patch)
treeed9218821be37c3f060eb3dc64b7f89327f70164 /models-interactions/model-actors/actor.so/src/main
parentd5fc0bddf4f1e02d47a95d070c000ff0a6557edd (diff)
Fix path issues
A&AI tenant query is prepending the target entity with "/", but it should not. Fixed it. Modified A&AI and SO actors to get path prefixes from parameters. Fixed a bug in an A&AI simulator response (extra "}" at the end. Issue-ID: POLICY-2349 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I71f8b1e5fb8a4bd29b4f616a7757d366c7d58127
Diffstat (limited to 'models-interactions/model-actors/actor.so/src/main')
-rw-r--r--models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java
index fb8fe6072..4c35f9abe 100644
--- a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java
+++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java
@@ -107,7 +107,7 @@ public class VfModuleCreate extends SoOperation {
resetGetCount();
Pair<String, SoRequest> pair = makeRequest();
- String path = pair.getLeft();
+ String path = getPath() + pair.getLeft();
SoRequest request = pair.getRight();
Entity<SoRequest> entity = Entity.entity(request, MediaType.APPLICATION_JSON);
@@ -115,8 +115,6 @@ public class VfModuleCreate extends SoOperation {
logMessage(EventType.OUT, CommInfrastructure.REST, url, request);
- // TODO should this use "path" or the full "url"?
-
return handleResponse(outcome, url, callback -> getClient().post(callback, path, entity, null));
}
@@ -208,8 +206,8 @@ public class VfModuleCreate extends SoOperation {
buildConfigurationParameters().ifPresent(request.getRequestDetails()::setConfigurationParameters);
// compute the path
- String path = "/serviceInstantiation/v7/serviceInstances/" + vnfServiceItem.getServiceInstanceId() + "/vnfs/"
- + vnfItem.getVnfId() + "/vfModules/scaleOut";
+ String path = "/serviceInstances/" + vnfServiceItem.getServiceInstanceId() + "/vnfs/" + vnfItem.getVnfId()
+ + "/vfModules/scaleOut";
return Pair.of(path, request);
}