diff options
author | Wojciech Sliwka <wojciech.sliwka@nokia.com> | 2018-10-05 12:01:17 +0200 |
---|---|---|
committer | Wojciech Sliwka <wojciech.sliwka@nokia.com> | 2018-10-09 10:48:34 +0200 |
commit | 08f41afcbd8222e9376ab6d3873899999590b7cd (patch) | |
tree | 79a78ddd1cf1a4e632882359182aec3140613967 /vid-app-common/src/main/java | |
parent | f1b3b34751a21e284bc7f39e71354459cf6b7154 (diff) |
Correct flow for ScaleOut
Change-Id: I347fec1e15526fa9b43ab57612235b55dee3eeba
Issue-ID: VID-321
Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
Diffstat (limited to 'vid-app-common/src/main/java')
4 files changed, 17 insertions, 3 deletions
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 96fb15a43..0ecb9257e 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 d4ca86515..0b4ca1228 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 3cba12f67..834f80885 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 9cac3e4e2..59bd66771 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 @@ -124,6 +124,14 @@ public class MsoRestClientNew implements MsoInterface { } @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"; logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START); |