summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java8
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java8
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js19
5 files changed, 24 insertions, 15 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 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
@@ -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);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
index f1440fc3..6029ed2d 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
@@ -269,11 +269,15 @@
var data;
if(workflowType=="VNF Scale Out") {
data = {
+ vnfName: vnf.name,
+ vnfInstanceId: vnf.id,
modelInfo: {
modelType: 'vfModule',
modelInvariantId: moduleToScale.invariantUuid,
modelName: moduleToScale.modelCustomizationName,
modelVersion: moduleToScale.version,
+ modelCustomizationName: moduleToScale.modelCustomizationName,
+ modelCustomizationId: moduleToScale.customizationUuid,
modelVersionId: moduleToScale.uuid
},
cloudConfiguration: vnf.cloudConfiguration,
@@ -335,6 +339,7 @@
var relatedInstance = {
instanceId: vnf.id,
modelInfo: {
+ modelCustomizationId: vnf.availableVersions[0].modelInfo.modelCustomizationId,
modelCustomizationName: vnf.availableVersions[0].modelInfo.modelCustomizationName,
modelInvariantId: vnf.availableVersions[0].modelInfo.modelInvariantId,
modelName: vnf.availableVersions[0].modelInfo.modelName,
@@ -377,18 +382,8 @@
//no scheduling support
var dataToSo = extractChangeManagementCallbackDataStr(vm.changeManagement);
if(dataToSo) {
-
- if(vm.changeManagement.workflow==="VNF Scale Out") {
- dataToSo = JSON.parse(dataToSo);
- dataToSo = {requestDetails: dataToSo.requestDetails[0]};
- changeManagementService.postChangeManagementScaleOutNow(dataToSo,
- vm.changeManagement.vnfNames[0]["service-instance-node"][0].properties["service-instance-id"],
- vm.changeManagement.vnfNames[0].id);
- }else{
- //TODO: foreach
- var vnfName = vm.changeManagement.vnfNames[0].name;
- changeManagementService.postChangeManagementNow(dataToSo, vnfName);
- }
+ var vnfName = vm.changeManagement.vnfNames[0].name;
+ changeManagementService.postChangeManagementNow(dataToSo, vnfName);
}
}
};