diff options
author | Amichai Hemli <ah0398@intl.att.com> | 2018-10-09 11:23:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-10-09 11:23:31 +0000 |
commit | 14c0e1ba34802d3baa76eb360964bd8a11030cc0 (patch) | |
tree | 8fed45c1e6642940a7ab6483bfd52b57fbc53eff /vid-app-common/src/main/java | |
parent | 66962852e3a62ea7b14f2ac2d5af53fe77177306 (diff) | |
parent | 08f41afcbd8222e9376ab6d3873899999590b7cd (diff) |
Merge "Correct flow for ScaleOut"
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); |