From f9746df64239a26f08720c8100f663604d3fa7c9 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Mon, 22 Jul 2019 19:59:59 +0300 Subject: Don't double-wrap RequestDetails for (de)activateFabricConfiguration Issue-ID: VID-267 Change-Id: I215bf008442b3bdfd4e80c1ba23e6a86e9d6f52b Signed-off-by: Ittay Stern --- .../src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java | 4 ++-- vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java | 5 +++-- .../src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java | 7 +++++++ 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'vid-app-common/src/main') diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java index ae3c74d86..4cb495e2f 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java @@ -580,13 +580,13 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic { @Override public MsoResponseWrapper2 deactivateAndCloudDelete(String serviceInstanceId, String vnfInstanceId, String vfModuleInstanceId, RequestDetails requestDetails) { String path = getDeactivateAndCloudDeletePath(serviceInstanceId, vnfInstanceId, vfModuleInstanceId); - return new MsoResponseWrapper2<>(msoClientInterface.post(path, new RequestDetailsWrapper<>(requestDetails), RequestReferencesContainer.class)); + return new MsoResponseWrapper2<>(msoClientInterface.post(path, requestDetails, RequestReferencesContainer.class)); } @Override public MsoResponseWrapper2 activateFabricConfiguration(String serviceInstanceId, RequestDetails requestDetails) { String path = getActivateFabricConfigurationPath(serviceInstanceId); - return new MsoResponseWrapper2<>(msoClientInterface.post(path, new RequestDetailsWrapper<>(requestDetails), RequestReferencesContainer.class)); + return new MsoResponseWrapper2<>(msoClientInterface.post(path, requestDetails, RequestReferencesContainer.class)); } @Override diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java index cab75bfed..46bd2731d 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java @@ -121,7 +121,8 @@ public interface MsoInterface { HttpResponse get(String path, Class responseClass); - HttpResponse post(String path, RequestDetailsWrapper requestDetailsWrapper, - Class responseClass); + HttpResponse post(String path, RequestDetailsWrapper requestDetailsWrapper, Class responseClass); + + HttpResponse post(String path, RequestDetails requestDetails, Class responseClass); } diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java index 06ca7a9d3..64182e088 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java @@ -478,6 +478,13 @@ public class MsoRestClientNew extends RestMsoImplementation implements MsoInterf return client.post(path, commonHeaders, requestDetailsWrapper, responseClass); } + @Override + public HttpResponse post(String endpoint, RequestDetails requestDetails, Class responseClass) { + String path = baseUrl + endpoint; + + return client.post(path, commonHeaders, requestDetails, responseClass); + } + public HttpResponse getWorkflowListByModelId(String endpoint){ String path = baseUrl + endpoint; -- cgit 1.2.3-korg