aboutsummaryrefslogtreecommitdiffstats
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/asdc/parser/ToscaParserImpl2.java1
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java26
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/VfModule.java11
-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.java17
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java1
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java10
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/rest/RestInterface.java2
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js2
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js19
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js10
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js90
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css33
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html21
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js11
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js21
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/view-models/deleteResumeDialog.htm8
-rw-r--r--vid-app-common/src/main/webapp/app/vid/styles/modal-create-new.css2
19 files changed, 233 insertions, 56 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
index 2200b7988..e75bb3063 100644
--- a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
+++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
@@ -269,6 +269,7 @@ public class ToscaParserImpl2 {
vfModule.setDescription(group.getDescription());
vfModule.setInvariantUuid(group.getMetadata().getValue(Constants.vfModuleModelInvariantUUID));
vfModule.setUuid(group.getMetadata().getValue(Constants.vfModuleModelUUID));
+ vfModule.setProperties(group.getProperties());
return vfModule;
}
diff --git a/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java
index bbca06e9b..deebb2b70 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java
@@ -235,7 +235,31 @@ public class MsoController extends RestrictedBaseController {
return (new ResponseEntity<>(w.getResponse(), HttpStatus.OK));
}
- /**
+ /**
+ * Delete E2e svc instance.
+ *
+ * @param serviceInstanceId the service instance id
+ * @param request the request
+ * @return the response entity
+ * @throws Exception the exception
+ */
+ @RequestMapping(value = "/mso_delete_e2e_svc_instance/{serviceInstanceId}", method = RequestMethod.POST)
+ public ResponseEntity<String> deleteE2eSvcInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
+ HttpServletRequest request, @RequestBody LinkedHashMap<String, Object> mso_request) throws Exception {
+
+ String methodName = "deleteE2eSvcInstance";
+ LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+ MsoResponseWrapper w = msoBusinessLogic.deleteE2eSvcInstance(mso_request.get("requestDetails"), serviceInstanceId);
+
+ LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse());
+ // always return OK, the MSO status code is embedded in the body
+
+ return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+
+ }
+
+ /**
* Delete svc instance.
*
* @param serviceInstanceId the service instance id
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java b/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java
index 9ddff8d8f..f7b4d88f1 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java
@@ -29,6 +29,7 @@ import java.util.Map.Entry;
import org.onap.vid.asdc.beans.tosca.Group;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.sdc.toscaparser.api.Property;
/**
* The Class VfModule.
@@ -68,6 +69,9 @@ public class VfModule {
/** The model customization name. */
private String modelCustomizationName;
+ /** The model properties. */
+ private Map<String, Property> properties;
+
/**
* Instantiates a new vf module.
*/
@@ -246,6 +250,7 @@ public class VfModule {
vfModule.setVersion(group.getMetadata().getVfModuleModelVersion());
vfModule.setCustomizationUuid(group.getMetadata().getVfModuleModelCustomizationUUID());
vfModule.setModelCustomizationName (modelCustomizationName);
+ //?vfModule.setProperties(group.getProperties());
if (group.getProperties().containsKey("volume_group")) {
if (group.getProperties().get("volume_group") != null) {
@@ -305,4 +310,10 @@ public class VfModule {
}*/
return vfModule;
}
+ public Map<String, Property> getProperties() {
+ return properties;
+ }
+ public void setProperties(Map<String, Property> properties) {
+ this.properties = properties;
+ }
}
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 f38a7fc6d..80d60d9ca 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
@@ -18,6 +18,8 @@ public interface MsoBusinessLogic {
MsoResponseWrapper createE2eSvcInstance(Object msoRequest) throws Exception;
+ MsoResponseWrapper deleteE2eSvcInstance(Object requestDetails, String serviceInstanceId) throws Exception;
+
MsoResponseWrapper createVnf(RequestDetails requestDetails, String serviceInstanceId) throws Exception;
MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception;
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 10ac231bf..7cea0301b 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
@@ -197,6 +197,23 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic {
}
@Override
+ public MsoResponseWrapper deleteE2eSvcInstance(Object requestDetails, String serviceInstanceId) throws Exception {
+ String methodName = "deleteE2eSvcInstance";
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+ String endpoint;
+ try {
+ endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_E2E_SVC_INSTANCE);
+ } catch (Exception exception) {
+ throw exception;
+ }
+
+ String svc_endpoint = endpoint + "/" + serviceInstanceId;
+
+ return msoClientInterface.deleteE2eSvcInstance(requestDetails, svc_endpoint);
+ }
+
+ @Override
public MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception {
String methodName = "deleteSvcInstance";
logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
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 a84775638..350be4415 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
@@ -20,6 +20,7 @@ public interface MsoInterface {
//For VoLTE E2E services
MsoResponseWrapper createE2eSvcInstance(Object requestDetails, String endpoint) throws Exception;
+ MsoResponseWrapper deleteE2eSvcInstance(Object requestDetails, String endpoint) throws Exception;
/**
* will create a virtual network function using MSO service.
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java b/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java
index 1b4c52733..7924a7d7d 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java
@@ -170,7 +170,7 @@ public class RestMsoImplementation implements RestInterface {
}
@Override
- public <T> void Delete(T t, RequestDetails r, String sourceID, String path, RestObject<T> restObject) {
+ public <T> void Delete(T t, Object r, String sourceID, String path, RestObject<T> restObject) {
String methodName = "Delete";
String url="";
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 c3deec325..14761cad3 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
@@ -85,6 +85,14 @@ public class MsoRestClientNew extends RestMsoImplementation implements MsoInterf
}
@Override
+ public MsoResponseWrapper deleteE2eSvcInstance(Object requestDetails, String endpoint) throws Exception {
+ String methodName = "deleteE2eSvcInstance";
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+ return deleteInstance(requestDetails, endpoint);
+ }
+
+ @Override
public MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception {
String methodName = "deleteSvcInstance";
logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
@@ -165,7 +173,7 @@ public class MsoRestClientNew extends RestMsoImplementation implements MsoInterf
* @return the mso response wrapper
* @throws Exception the exception
*/
- public MsoResponseWrapper deleteInstance(RequestDetails request, String path) throws Exception {
+ public MsoResponseWrapper deleteInstance(Object request, String path) throws Exception {
String methodName = "deleteInstance";
logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RestInterface.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RestInterface.java
index 9fc95fcec..38cd51517 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RestInterface.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RestInterface.java
@@ -37,7 +37,7 @@ public interface RestInterface {
* @param restObject the rest object
* @throws Exception the exception
*/
- <T> void Delete(T t, RequestDetails r, String sourceID, String path, RestObject<T> restObject) throws Exception;
+ <T> void Delete(T t, Object r, String sourceID, String path, RestObject<T> restObject) throws Exception;
/**
* Post.
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js
index 716a99c00..84cb5ad72 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js
@@ -107,7 +107,7 @@ appDS2.constant("VIDCONFIGURATION", (function() {
var SCHEDULER_PORTAL_URL = "";
- var SCALE_OUT_CONTROLLERS = ["", "SDN-C", "APP-C"];
+ var SCALE_OUT_CONTROLLERS = ["", "SDNC", "APPC"];
return {
ASDC_MODEL_STATUS : ASDC_MODEL_STATUS,
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
index cbb93571c..b52b463bc 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
@@ -111,14 +111,29 @@
$scope.createType = COMPONENT.A_LA_CARTE;
$scope.deployService = function(service) {
-
-
+
+
console.log("Instantiating SDC service " + service.uuid);
$http.get(COMPONENT.SERVICES_PATH + service.uuid)
.then(function successCallback(getServiceResponse) {
var serviceModel = getServiceResponse.data;
+
+ //VID-233 bug fix when models doesn't exists
+ if(typeof(serviceModel)==="string"){ //not an object
+ $scope.status = FIELD.STATUS.FAILED_SERVICE_MODELS_ASDC;
+ $scope.error = true;
+ $scope.isSpinnerVisible = false;
+ $scope.isProgressVisible = true;
+ return;
+ } else{ //clean error message
+ $scope.status = "";
+ $scope.error = false;
+ $scope.isSpinnerVisible = false;
+ $scope.isProgressVisible = false;
+ }
+
DataService.setServiceName(serviceModel.service.name);
//VOLTE services need input list generated and macro style
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js
index 9715484d4..cdda3a143 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js
@@ -21,7 +21,7 @@
"use strict";
var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $timeout, $log,
- DeleteResumeService, CreationService, UtilityService) {
+ DeleteResumeService, CreationService, DataService, UtilityService) {
$scope.isDialogVisible = false;
$scope.summaryControl = {};
@@ -32,6 +32,7 @@ var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $t
$scope.$on(COMPONENT.DELETE_RESUME_COMPONENT, function(event, request) {
+ $scope.isE2EService = false;
$scope.isDataVisible = false;
$scope.isSpinnerVisible = false;
$scope.isErrorVisible = false;
@@ -41,6 +42,7 @@ var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $t
$scope.dialogMethod = request.dialogMethod;
callbackFunction = request.callbackFunction;
componentId = request.componentId;
+ $scope.isServiceInstance = componentId === "service";
DeleteResumeService.initializeComponent(request.componentId);
@@ -69,6 +71,8 @@ var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $t
}
$scope.confirm = function() {
+ DataService.setE2EService($scope.isE2EService); //VoLTE support
+
var requiredFields = $scope.userProvidedControl.getRequiredFields();
if (requiredFields === "") {
$scope.isErrorVisible = false;
@@ -96,7 +100,7 @@ var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $t
var requestDetails = DeleteResumeService.getMsoRequestDetails($scope.userProvidedControl.getList());
- if(DeleteResumeService.isMacro === true){
+ if(!DataService.getE2EService() && DeleteResumeService.isMacro === true){
requestDetails.requestParameters.aLaCarte = false;
}
@@ -144,5 +148,5 @@ var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $t
}
appDS2.controller("deleteResumeDialogController", [ "COMPONENT", "FIELD", "$scope", "$http",
- "$timeout", "$log", "DeleteResumeService","CreationService", "UtilityService",
+ "$timeout", "$log", "DeleteResumeService","CreationService", "DataService", "UtilityService",
deleteResumeDialogController]);
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 26b1819bf..e4ff1a06b 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
@@ -14,11 +14,11 @@
vm.wizardStep = 1;
vm.nextStep = function(){
vm.wizardStep++;
- $(".modal-dialog").animate({"width":"1000px"},400,'linear');
+ $(".modal-dialog").animate({"width":"1200px"},400,'linear');
};
vm.prevStep = function(){
vm.wizardStep--;
- $(".modal-dialog").animate({"width":"6000px"},400,'linear');
+ $(".modal-dialog").animate({"width":"600px"},400,'linear');
};
vm.softwareVersionRegex = "[-a-zA-Z0-9\.]+";
@@ -60,11 +60,35 @@
_.each(response.data.vnfs, function (vnf) {
if (newVNFName["invariant-id"] === vnf.invariantUuid) {
availableVersions.push(extractVNFModel(vnf, response.data.service, newVNFName));
- newVNFName.vfModules = vnf.vfModules;
//for scale out screen
- newVNFName.category = response.data.service.category;
- newVNFName.groupModules = _.groupBy(newVNFName.vfModules, "customizationUuid");
+ if(service.uuid === newVNFName["service-instance-node"][0].properties["model-version-id"]) {
+ newVNFName.vfModules = vnf.vfModules;
+ newVNFName.category = response.data.service.category;
+ newVNFName.groupModules = _.groupBy(newVNFName.vfModules, "customizationUuid");
+
+ //list vfmodules ids in AAI that belong to that vnf instance
+ var modulesAaiIds = _.filter(newVNFName.relatedTo, function(item){
+ return item["node-type"] === "vf-module";
+ }).map(function(item){
+ return item.id;
+ });
+
+ _.forEach(newVNFName.vfModules, function (mdl, key) {
+ mdl.scale = false; //defaults to not scale unless user changes it
+ if(mdl.properties && mdl.properties.max_vf_module_instances) {
+
+ //how many vf modules of the same customizationId belong to that vnf instance
+ mdl.currentCount = _.filter(vm.vfModules, function(item){
+ return modulesAaiIds.indexOf(item.id) > -1 && item.properties["model-customization-id"] === mdl.customizationUuid;
+ }).length;
+
+ mdl.scalable = mdl.properties.max_vf_module_instances.value - mdl.currentCount > 0;
+ }else{
+ mdl.scalable = false;
+ }
+ });
+ }
}
});
var versions = _.uniqBy(availableVersions, 'modelInfo.modelVersion');
@@ -194,18 +218,19 @@
payload: changeManagement.configUpdateFile
}
}else if(workflowType=="VNF Scale Out"){
+ if(!moduleToScale) return null;
if(moduleToScale.userParams) {
requestParametersData = {
controllerType: changeManagement.controllerType,
- userParams: moduleToScale.userParams,
- usePreload: true
+ userParams: moduleToScale.userParams
+ //,usePreload: true
}
}else{
requestParametersData = {
controllerType: changeManagement.controllerType,
- userParams: [],
- usePreload: false
+ userParams: []
+ //,usePreload: false
}
}
}
@@ -230,22 +255,20 @@
var data;
if(workflowType=="VNF Scale Out") {
- var name = moduleToScale.modelCustomizationName.split('-')[0]; //example: vSAMP12..base..module-0
- name = name + "-" + vnf.groupModules[moduleToScale.customizationUuid].length;
-
data = {
modelInfo: {
modelType: 'vfModule',
modelInvariantId: moduleToScale.invariantUuid,
- modelName: name,
+ modelName: moduleToScale.modelCustomizationName,
modelVersion: moduleToScale.version,
- modelCustomizationId: moduleToScale.customizationUuid
+ modelVersionId: moduleToScale.uuid
},
cloudConfiguration: vnf.cloudConfiguration,
requestInfo: requestInfoData,
relatedInstanceList: [],
requestParameters:requestParametersData
- }
+ };
+ requestInfoData.instanceName = vnf.name + "_" + (moduleToScale.currentCount + 1);
}else{
data = {
vnfName: vnf.name,
@@ -263,7 +286,7 @@
requestInfo: requestInfoData,
relatedInstanceList: [],
requestParameters:requestParametersData
- }
+ };
}
var serviceInstanceId = '';
@@ -293,7 +316,22 @@
data.relatedInstanceList.push({relatedInstance: relatedInstance});
});
- }
+ if(workflowType=="VNF Scale Out") {
+ //push vnf to related as well as the service instance
+ var relatedInstance = {
+ instanceId: vnf.id,
+ modelInfo: {
+ modelCustomizationName: vnf.availableVersions[0].modelInfo.modelCustomizationName,
+ modelInvariantId: vnf.availableVersions[0].modelInfo.modelInvariantId,
+ modelName: vnf.availableVersions[0].modelInfo.modelName,
+ modelType: vnf.availableVersions[0].modelInfo.modelType,
+ modelVersion: vnf.availableVersions[0].modelInfo.modelVersion,
+ modelVersionId: vnf.availableVersions[0].modelInfo.modelVersionId
+ }
+ };
+ data.relatedInstanceList.push({relatedInstance: relatedInstance});
+ }
+ }
}catch(err){
$log.error('SchedulerCtrl::extractChangeManagementCallbackDataStr error: ' + err);
}
@@ -322,9 +360,18 @@
} else {
//no scheduling support
var dataToSo = extractChangeManagementCallbackDataStr(vm.changeManagement);
- //TODO: foreach
- var vnfName = vm.changeManagement.vnfNames[0].name;
- changeManagementService.postChangeManagementNow(dataToSo, vnfName);
+ 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);
+ }
+ }
}
};
@@ -356,6 +403,7 @@
// var promiseArrOfGetVnfs = preparePromiseArrOfGetVnfs(instances);
vm.vnfs = [];
+ vm.vfModules = [];
AaiService.getVnfsByCustomerIdAndServiceType(
vm.changeManagement.subscriberId,
@@ -374,6 +422,8 @@
}
} else if (nodeType === "service-instance") {
vm.serviceInstances.push(vnfsData[i]);
+ } else if (nodeType === "vf-module") {
+ vm.vfModules.push(vnfsData[i]);
}
}
}
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css
index 34a6af45d..1f743ab7e 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css
@@ -3,7 +3,7 @@
display: flex;
}
.scale-out-modules .table-row > div {
- text-indent: 12px;
+ padding: 0 12px;
color: #5A5A5A;
font-size: 13px;
border-right: 1px solid #D2D2D2;
@@ -17,16 +17,16 @@
font-size: 22px;
}
.scale-out-modules .table-row > div:nth-child(2) {
- flex: 220px 1 0;
+ flex: 200px 1 0;
}
.scale-out-modules .table-row > div:nth-child(3) {
flex: 200px 1 0;
}
.scale-out-modules .table-row > div:nth-child(4), .scale-out-modules .table-row > div:nth-child(5) {
- flex: 150px 0 0;
+ flex: 110px 0 0;
}
.scale-out-modules .table-row > div:nth-child(6), .scale-out-modules .table-row > div:nth-child(7) {
- flex: 120px 0 0;
+ flex: 130px 0 0;
}
.scale-out-modules .table-row.open > div {
line-height: 29px;
@@ -62,7 +62,7 @@
margin-left: 60px;
}
.scale-out-modules .modules-table .table-row > div:nth-child(1) {
- flex: 539px 0 0;
+ flex: 300px 1 0;
font-size: 13px;
}
.scale-out-modules .modules-table .table-row > div:nth-child(2) {
@@ -71,11 +71,15 @@
.scale-out-modules .modules-table .table-row > div:nth-child(3) {
flex: 90px 0 0;
}
+.scale-out-modules .modules-table .table-row > div:nth-child(3) input {
+ width: 60px;
+ margin-top: 10px;
+}
.scale-out-modules .modules-table .table-row > div:nth-child(4) {
flex: 180px 0 0;
}
.scale-out-modules .modules-table .table-row > div:nth-child(5) {
- flex: 110px 0 0;
+ flex: 280px 0 0;
}
.scale-out-modules .modules-table.open {
display: block;
@@ -93,7 +97,7 @@
display:flex;
> div {
- text-indent:12px;
+ padding: 0 12px;
color: #5A5A5A;
font-size:13px;
border-right:1px solid #D2D2D2;
@@ -108,16 +112,16 @@
font-size:22px;
}
&:nth-child(2){
- flex:220px 1 0;
+ flex:200px 1 0;
}
&:nth-child(3){
flex:200px 1 0;
}
&:nth-child(4), &:nth-child(5){
- flex:150px 0 0;
+ flex:110px 0 0;
}
&:nth-child(6), &:nth-child(7){
- flex:120px 0 0;
+ flex:130px 0 0;
}
}
@@ -162,7 +166,7 @@
& > div{
&:nth-child(1){
- flex:539px 0 0;
+ flex:300px 1 0;
font-size:13px;
}
&:nth-child(2){
@@ -170,12 +174,17 @@
}
&:nth-child(3){
flex:90px 0 0;
+
+ input {
+ width: 60px;
+ margin-top: 10px;
+ }
}
&:nth-child(4){
flex:180px 0 0;
}
&:nth-child(5){
- flex:110px 0 0;
+ flex:280px 0 0;
}
}
}
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
index bf3579ea4..9954d5aee 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
@@ -106,9 +106,9 @@
<div>Invariant UUID</div>
</div>
- <div class="table-row" ng-repeat-start="vnf in vm.changeManagement.vnfNames" ng-if="vnf['prov-status'] === 'PROV'" ng-click="vnf.isOpen=!!!vnf.isOpen">
- <div>+</div>
- <div>{{vnf['service-instance-node'].properties['service-instance-name']}}</div>
+ <div class="table-row" ng-repeat-start="vnf in vm.changeManagement.vnfNames" ng-click="vnf.isOpen=!!!vnf.isOpen">
+ <div>{{vnf.isOpen ? '-' : '+'}}</div>
+ <div>{{vnf['service-instance-node'][0].properties['service-instance-name']}}</div>
<div>{{vnf.name}}</div>
<div>{{vnf['availableVersions'][0].modelInfo.modelVersion}}</div>
<div>{{vnf.category}}</div>
@@ -127,13 +127,13 @@
<div class="table-row" ng-repeat="(custUUID, moduleArr) in vnf.groupModules">
<div>{{moduleArr[0].modelCustomizationName}}</div>
<div>{{moduleArr.length}}</div>
- <div ng-if="moduleArr[0].properties.minCountInstances == moduleArr[0].properties.maxCountInstances">N/A</div>
- <div ng-if="moduleArr[0].properties.minCountInstances != moduleArr[0].properties.maxCountInstances">
- <input type="number" ng-model="moduleArr[0].scale" step="1"
- ng-min="moduleArr[0].properties.minCountInstances" ng-max="moduleArr[0].properties.maxCountInstances - moduleArr.length" />
+ <div ng-if="!moduleArr[0].scalable">N/A</div>
+ <div ng-if="moduleArr[0].scalable">
+ <input type="checkbox" ng-model="moduleArr[0].scale" />
</div>
<div>{{moduleArr[0].uuid}}</div>
- <div>
+ <div ng-if="!moduleArr[0].scalable">N/A</div>
+ <div ng-if="moduleArr[0].scalable">
<input type="file" accept="application/json" onchange="angular.element(this).scope().setPreload(this)" />
</div>
</div>
@@ -142,10 +142,13 @@
</div>
<div class="modal-footer">
+ <div class="pull-left">
+ <button ng-if="vm.wizardStep === 2" ng-click="vm.prevStep();" type="button" id="back" name="back" class="btn btn-primary">Back</button>
+ </div>
<div class="pull-right">
+ <button type="button" id="cancel" name="cancel" class="btn btn-white" ng-click="vm.close()">Cancel</button>
<button ng-if="!vm.isScaleOut() || (vm.isScaleOut() && vm.wizardStep === 2)" type="submit" id="submit" name="submit" class="btn btn-primary" data-ng-disabled="newChangeManagement.$invalid">{{vm.hasScheduler ? "Schedule" : "Confirm"}}</button>
<button ng-if="vm.isScaleOut() && vm.wizardStep === 1" ng-click="vm.nextStep();" type="button" id="next" name="next" class="btn btn-primary" data-ng-disabled="newChangeManagement.$invalid">Next</button>
- <button type="button" id="cancel" name="cancel" class="btn btn-white" ng-click="vm.close()">Cancel</button>
</div>
</div>
</form>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js
index f170c4182..03e41b2c1 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js
@@ -87,5 +87,16 @@
return {data: []};
});
};
+
+ this.postChangeManagementScaleOutNow = function (requestData, serviceInstanceId, vnfId) {
+ var url = "mso/mso_create_vfmodule_instance/"+serviceInstanceId+"/vnfs/"+vnfId;
+ return $http.post(url, requestData)
+ .success(function (response) {
+ return {data: response};
+ })
+ .catch(function (err) {
+ return {data: []};
+ });
+ };
}
})();
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js
index 90daf3550..3255bc9a3 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js
@@ -266,8 +266,10 @@ var DeleteResumeService = function($log, AaiService, AsdcService, DataService,
+ DataService.getServiceInstanceId() + "/networks/"
+ DataService.getNetworkInstanceId();
case COMPONENT.SERVICE:
- return "mso_delete_svc_instance/"
- + DataService.getServiceInstanceId();
+ if(DataService.getE2EService() === true)
+ return "mso_delete_e2e_svc_instance/"+ DataService.getServiceInstanceId();
+ else
+ return "mso_delete_svc_instance/"+ DataService.getServiceInstanceId();
case COMPONENT.VNF:
return "mso_delete_vnf_instance/"
+ DataService.getServiceInstanceId() + "/vnfs/"
@@ -291,9 +293,22 @@ var DeleteResumeService = function($log, AaiService, AsdcService, DataService,
value : value
});
};
-
+
+ var getMsoE2ERequest = function(parameterList) {
+ return {
+ "globalSubscriberId": DataService.getSubscriberName(),
+ "serviceType": DataService.getServiceType()
+ };
+ };
+
var getMsoRequestDetails = function(parameterList) {
console.log("getMsoRequestDetails invoked");
+
+ //VoLTE logic goes here
+ if(DataService.getE2EService() === true) {
+ return getMsoE2ERequest(parameterList);
+ }
+
var inventoryInfo = ComponentService.getInventoryInfo(
_this.componentId, DataService.getInventoryItem());
var modelInfo = DataService.getModelInfo(_this.componentId);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deleteResumeDialog.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deleteResumeDialog.htm
index ccd54a612..efaca5bd3 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deleteResumeDialog.htm
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deleteResumeDialog.htm
@@ -32,7 +32,13 @@
</div>
<parameter-block control="summaryControl"></parameter-block>
-
+
+ <!-- tell VID if it's an E2E VoLTE service-->
+ <div style="margin-left: 15px" ng-show="isServiceInstance">
+ <input type="checkbox" ng-model="isE2EService" />
+ This is an E2E (VoLTE) service instance
+ </div>
+
<div ngx-visible="{{isDataVisible}}">
<h4>
diff --git a/vid-app-common/src/main/webapp/app/vid/styles/modal-create-new.css b/vid-app-common/src/main/webapp/app/vid/styles/modal-create-new.css
index 7d8af00b9..fb97a9476 100644
--- a/vid-app-common/src/main/webapp/app/vid/styles/modal-create-new.css
+++ b/vid-app-common/src/main/webapp/app/vid/styles/modal-create-new.css
@@ -4,7 +4,7 @@
}
.modal-content {
- width: 587px;
+ /*width: 587px;*/
border-radius: 8px;
background-color: #ffffff;
font-family: "OpenSans-Regular";