From 08f41afcbd8222e9376ab6d3873899999590b7cd Mon Sep 17 00:00:00 2001 From: Wojciech Sliwka Date: Fri, 5 Oct 2018 12:01:17 +0200 Subject: Correct flow for ScaleOut Change-Id: I347fec1e15526fa9b43ab57612235b55dee3eeba Issue-ID: VID-321 Signed-off-by: Wojciech Sliwka --- .../src/main/java/org/onap/vid/mso/MsoBusinessLogic.java | 2 +- .../src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java | 8 ++++++-- vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java | 2 ++ .../src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java | 8 ++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) (limited to 'vid-app-common/src/main/java/org/onap/vid') diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java index 96fb15a4..0ecb9257 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java @@ -28,7 +28,7 @@ public interface MsoBusinessLogic { MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId); - MsoResponseWrapper scaleOutVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId); + MsoResponseWrapper scaleOutVfModuleInstance(org.onap.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId); MsoResponseWrapper createConfigurationInstance(org.onap.vid.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String serviceInstanceId); 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 d4ca8651..0b4ca122 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 @@ -175,7 +175,7 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic { } @Override - public MsoResponseWrapper scaleOutVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) { + public MsoResponseWrapper scaleOutVfModuleInstance(org.onap.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) { String methodName = "scaleOutVfModuleInstance"; logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START); @@ -184,8 +184,12 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic { String partial_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); String vf_module_endpoint = partial_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId); + RequestDetailsWrapper wrapper = new RequestDetailsWrapper(); + requestDetails.setVnfName(null); + requestDetails.setVnfInstanceId(null); + wrapper.requestDetails = requestDetails; - return msoClientInterface.createVfModuleInstance(requestDetails, vf_module_endpoint); + return msoClientInterface.scaleOutVFModuleInstance(wrapper, vf_module_endpoint); } @Override public MsoResponseWrapper createConfigurationInstance(org.onap.vid.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String serviceInstanceId) { 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 3cba12f6..834f8088 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 @@ -74,6 +74,8 @@ public interface MsoInterface { MsoResponseWrapper createConfigurationInstance(org.onap.vid.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String endpoint); + MsoResponseWrapper scaleOutVFModuleInstance(RequestDetailsWrapper requestDetailsWrapper, String endpoint); + MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String endpoint); MsoResponseWrapper unassignSvcInstance(RequestDetails requestDetails, String endpoint); 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 9cac3e4e..59bd6677 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 @@ -123,6 +123,14 @@ public class MsoRestClientNew implements MsoInterface { return createInstance(requestDetails, path); } + @Override + public MsoResponseWrapper scaleOutVFModuleInstance(RequestDetailsWrapper requestDetailsWrapper, String endpoint) { + String methodName = "scaleOutVFModuleInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START); + String path = baseUrl + endpoint; + return createInstance(requestDetailsWrapper, path); + } + @Override public MsoResponseWrapper createConfigurationInstance(org.onap.vid.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String endpoint) { String methodName = "createConfigurationInstance"; -- cgit 1.2.3-korg