diff options
author | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2020-03-03 19:41:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-03-03 19:41:16 +0000 |
commit | 3f06effedc552c31e2608f5b8871301ba5b23033 (patch) | |
tree | 893ed3ba8150da12a8518931e7f283d0e26d0967 /models-interactions/model-actors/actor.so | |
parent | 106c7fdc3e64431e64d66a7546033f6c21f9bfb4 (diff) | |
parent | 9bd821d6a2b49dacb7286d58f11d5cd1cc7e0aa2 (diff) |
Merge "Fix path issues"
Diffstat (limited to 'models-interactions/model-actors/actor.so')
3 files changed, 6 insertions, 8 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); } diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java index 98c645b16..8bd607f32 100644 --- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java +++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java @@ -202,7 +202,7 @@ public class VfModuleCreateTest extends BasicSoOperation { // @formatter:off assertEquals( - "/serviceInstantiation/v7/serviceInstances/my-service-instance-id/vnfs/my-vnf-id/vfModules/scaleOut", + "/serviceInstances/my-service-instance-id/vnfs/my-vnf-id/vfModules/scaleOut", pair.getLeft()); // @formatter:on diff --git a/models-interactions/model-actors/actor.so/src/test/resources/service.yaml b/models-interactions/model-actors/actor.so/src/test/resources/service.yaml index b1ac162a4..4bf074fc5 100644 --- a/models-interactions/model-actors/actor.so/src/test/resources/service.yaml +++ b/models-interactions/model-actors/actor.so/src/test/resources/service.yaml @@ -21,11 +21,11 @@ httpClients: - clientName: my-client hostname: localhost port: 80 - basePath: base-url + basePath: base-url/ managed: true actors: SO: clientName: my-client operations: VF Module Create: - path: create
\ No newline at end of file + path: serviceInstantiation/v7
\ No newline at end of file |