add button to menual search of vnf change the vnf role to free text optional 56/95556/4
authorSara Weiss <sara.weiss@intl.att.com>
Thu, 12 Sep 2019 06:35:13 +0000 (09:35 +0300)
committerEylon Malin <eylon.malin@intl.att.com>
Thu, 12 Sep 2019 12:20:18 +0000 (12:20 +0000)
Issue-ID: VID-378
Signed-off-by: Sara Weiss <sara.weiss@intl.att.com>
Change-Id: I21a4b541f32626823d84f9d0d6fb0392275b7428
Signed-off-by: Sara Weiss <sara.weiss@intl.att.com>
vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css
vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java

index 0c6d1d7..f76d478 100755 (executable)
@@ -259,6 +259,7 @@ appDS2
       FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE: "FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE",
       FLAG_HANDLE_SO_WORKFLOWS: "FLAG_HANDLE_SO_WORKFLOWS",
       FLAG_CREATE_ERROR_REPORTS: "FLAG_CREATE_ERROR_REPORTS",
+      FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH: "FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH",
       FLAG_VF_MODULE_RESUME_STATUS_CREATE: "FLAG_VF_MODULE_RESUME_STATUS_CREATE",
       FLAG_1908_RELEASE_TENANT_ISOLATION: "FLAG_1908_RELEASE_TENANT_ISOLATION",
       FLAG_FLASH_REPLACE_VF_MODULE: "FLAG_FLASH_REPLACE_VF_MODULE",
index 528d3d5..28b3eea 100644 (file)
 (function () {
     'use strict';
 
-    appDS2.controller("newChangeManagementModalController", ["$uibModalInstance", "$uibModal",'$q', "AaiService", "changeManagementService", "Upload",
-        "$log", "$scope", "_", "COMPONENT", "VIDCONFIGURATION","DataService","featureFlags", newChangeManagementModalController]);
+    appDS2.controller("newChangeManagementModalController", ["$uibModalInstance", "$uibModal", '$q', "AaiService", "changeManagementService", "Upload",
+        "$log", "$scope", "_", "COMPONENT", "VIDCONFIGURATION", "DataService", "featureFlags", newChangeManagementModalController]);
 
-    function newChangeManagementModalController($uibModalInstance, $uibModal,$q, AaiService, changeManagementService, Upload, $log, $scope, _, COMPONENT, VIDCONFIGURATION, DataService, featureFlags) {
+    function newChangeManagementModalController($uibModalInstance, $uibModal, $q, AaiService, changeManagementService, Upload, $log, $scope, _, COMPONENT, VIDCONFIGURATION, DataService, featureFlags) {
 
 
         var vm = this;
         vm.hasScheduler = !!VIDCONFIGURATION.SCHEDULER_PORTAL_URL;
-        vm.errorMsg='';
+        vm.errorMsg = '';
+
+        vm.isSearchedVNF = false;
 
         vm.wizardStep = 1;
-        vm.nextStep = function(){
+        vm.nextStep = function () {
             vm.wizardStep++;
-            $(".modal-dialog").animate({"width":"1200px"},400,'linear');
+            $(".modal-dialog").animate({"width": "1200px"}, 400, 'linear');
         };
-        vm.prevStep = function(){
+        vm.prevStep = function () {
             vm.wizardStep--;
-            $(".modal-dialog").animate({"width":"600px"},400,'linear');
+            $(".modal-dialog").animate({"width": "600px"}, 400, 'linear');
         };
 
         vm.softwareVersionRegex = "[-a-zA-Z0-9\.]+";
 
         var attuid;
 
-        $scope.showReportWindow = function() {
+        $scope.showReportWindow = function () {
             const modalWindow = $uibModal.open({
                 templateUrl: 'app/vid/scripts/modals/report-modal/report-modal.html',
                 controller: 'reportModalController',
 
         };
 
-        $scope.isShowErrorReport = function() {
+        $scope.isShowErrorReport = function () {
             return featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_CREATE_ERROR_REPORTS);
         };
 
+        $scope.isNewFilterChangeManagmentEnabled = function () {
+            return (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH));
+        };
+
+        vm.isDisabledVNFmodelVersion = function (vnfTypePristine) {
+            if ($scope.isNewFilterChangeManagmentEnabled()) {
+                return !vm.isSearchedVNF;
+            } else return vnfTypePristine;
+        };
+
         function fetchAttUid() {
             var defer = $q.defer();
             if (attuid) {
                 .catch(function (error) {
                     $log.error(error);
                     vm.errorMsg = err;
-                });      
+                });
         };
 
         var registerVNFNamesWatcher = function () {
                                             availableVersions.push(extractVNFModel(vnf, response.data.service, newVNFName));
 
                                             //for scale out screen
-                                            if(service.uuid === newVNFName["service-instance-node"][0].properties["model-version-id"]) {
+                                            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){
+                                                var modulesAaiIds = _.filter(newVNFName.relatedTo, function (item) {
                                                     return item["node-type"] === "vf-module";
-                                                }).map(function(item){
+                                                }).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.maxCountInstances) {
+                                                    if (mdl.properties && mdl.properties.maxCountInstances) {
 
                                                         //how many vf modules of the same customizationId belong to that vnf instance
-                                                        mdl.currentCount = _.filter(vm.vfModules, function(item){
+                                                        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.maxCountInstances - mdl.currentCount > 0;
-                                                    }else{
+                                                    } else {
                                                         mdl.scalable = false;
                                                     }
                                                 });
                                         }
                                     });
                                     var versions = _.uniqBy(availableVersions, 'modelInfo.modelVersion');
-                                    newVNFName.availableVersions = _.sortBy(_.uniq(versions, response.data.service, true),"modelInfo.modelVersion");
+                                    newVNFName.availableVersions = _.sortBy(_.uniq(versions, response.data.service, true), "modelInfo.modelVersion");
                                 }).catch(function (error) {
                                 $log.error(error);
                                 vm.errorMsg = error;
             result.requestDetails = [];
             _.forEach(changeManagement.vnfNames, function (vnf) {
 
-                try{
-                    var requestInfoData ={};
-                    var requestParametersData ={};
+                try {
+                    var requestInfoData = {};
+                    var requestParametersData = {};
                     var moduleToScale = _.find(vnf.vfModules, {"scale": true});
-                    if (vnf.availableVersions && vnf.availableVersions.length!=0){
+                    if (vnf.availableVersions && vnf.availableVersions.length != 0) {
 
-                        requestInfoData ={
+                        requestInfoData = {
                             source: vnf.availableVersions[0].requestInfo.source,
                             suppressRollback: vnf.availableVersions[0].requestInfo.suppressRollback,
                             requestorId: vnf.availableVersions[0].requestInfo.requestorId
                         };
 
-                        if(workflowType=='Update'){
+                        if (workflowType == 'Update') {
                             requestParametersData = {
                                 usePreload: vnf.availableVersions[0].requestParameters.usePreload
                             };
-                        }else if(workflowType=="Replace"){
+                        } else if (workflowType == "Replace") {
                             requestParametersData = {
                                 rebuildVolumeGroups: vnf.availableVersions[0].requestParameters.usePreload
                             };
-                        }else if(workflowType=="VNF In Place Software Update"){
+                        } else if (workflowType == "VNF In Place Software Update") {
                             var payloadObj = {
-                                'existing_software_version':vm.getInternalWorkFlowParameter(workflowType, 'text', 'Existing software version').value,
-                                'new_software_version':vm.getInternalWorkFlowParameter(workflowType, 'text', 'New software version').value,
-                                'operations_timeout':vm.getInternalWorkFlowParameter(workflowType, 'text', 'Operations timeout').value
+                                'existing_software_version': vm.getInternalWorkFlowParameter(workflowType, 'text', 'Existing software version').value,
+                                'new_software_version': vm.getInternalWorkFlowParameter(workflowType, 'text', 'New software version').value,
+                                'operations_timeout': vm.getInternalWorkFlowParameter(workflowType, 'text', 'Operations timeout').value
                             };
                             requestParametersData = {
                                 payload: JSON.stringify(payloadObj)
                             };
-                        }else if(workflowType=="VNF Config Update"){
+                        } else if (workflowType == "VNF Config Update") {
                             requestParametersData = {
                                 payload: vm.getInternalWorkFlowParameter("VNF Config Update", "FILE", "Attach configuration file").value
                             };
-                        }else if(workflowType=="VNF Scale Out"){
-                            if(!moduleToScale) return null;
+                        } else if (workflowType == "VNF Scale Out") {
+                            if (!moduleToScale) return null;
 
-                            if(moduleToScale.userParams) {
+                            if (moduleToScale.userParams) {
                                 requestParametersData = {
                                     userParams: moduleToScale.userParams
                                     //,usePreload: true
                                 };
-                            }else{
+                            } else {
                                 requestParametersData = {
                                     userParams: []
                                     //,usePreload: false
                                 };
                             }
                         }
-                        $log.info('SchedulerWidgetCtrl:extractChangeManagementCallbackDataStr info:: workflowType '+ workflowType);
-                        $log.info('SchedulerWidgetCtrl:extractChangeManagementCallbackDataStr info:: requestParametersData '+ requestParametersData);
+                        $log.info('SchedulerWidgetCtrl:extractChangeManagementCallbackDataStr info:: workflowType ' + workflowType);
+                        $log.info('SchedulerWidgetCtrl:extractChangeManagementCallbackDataStr info:: requestParametersData ' + requestParametersData);
 
-                    }else if(workflowType=="VNF In Place Software Update"){
+                    } else if (workflowType == "VNF In Place Software Update") {
                         var payloadObj = {
-                            'existing_software_version':vm.getInternalWorkFlowParameter(workflowType, 'text', 'Existing software version').value,
-                            'new_software_version':vm.getInternalWorkFlowParameter(workflowType, 'text', 'New software version').value,
-                            'operations_timeout':vm.getInternalWorkFlowParameter(workflowType, 'text', 'Operations timeout').value
+                            'existing_software_version': vm.getInternalWorkFlowParameter(workflowType, 'text', 'Existing software version').value,
+                            'new_software_version': vm.getInternalWorkFlowParameter(workflowType, 'text', 'New software version').value,
+                            'operations_timeout': vm.getInternalWorkFlowParameter(workflowType, 'text', 'Operations timeout').value
                         };
                         requestParametersData = {
                             payload: JSON.stringify(payloadObj)
                         };
-                    }else if(workflowType=="VNF Config Update"){
+                    } else if (workflowType == "VNF Config Update") {
                         requestParametersData = {
                             payload: vm.getInternalWorkFlowParameter("VNF Config Update", "FILE", "Attach configuration file").value
                         };
                     }
 
                     var data;
-                    if(workflowType=="VNF Scale Out") {
+                    if (workflowType == "VNF Scale Out") {
                         data = {
                             vnfName: vnf.name,
                             vnfInstanceId: vnf.id,
                             cloudConfiguration: vnf.cloudConfiguration,
                             requestInfo: requestInfoData,
                             relatedInstanceList: [],
-                            requestParameters:requestParametersData,
+                            requestParameters: requestParametersData,
                             configurationParameters: JSON.parse(vm.getInternalWorkFlowParameter("VNF Scale Out", "text", "Configuration Parameters").value)
                         };
                         requestInfoData.instanceName = vnf.name + "_" + (moduleToScale.currentCount + 1);
-                    }else{
+                    } else {
                         data = {
                             vnfName: vnf.name,
                             vnfInstanceId: vnf.id,
                             cloudConfiguration: vnf.cloudConfiguration,
                             requestInfo: requestInfoData,
                             relatedInstanceList: [],
-                            requestParameters:requestParametersData
+                            requestParameters: requestParametersData
                         };
                     }
 
                     var serviceInstanceId = '';
                     _.forEach(vnf['service-instance-node'], function (instanceNode) {
-                        if(instanceNode['node-type'] === 'service-instance'){
+                        if (instanceNode['node-type'] === 'service-instance') {
                             serviceInstanceId = instanceNode.properties['service-instance-id'];
                         }
                     });
 
-                    if (vnf.availableVersions && vnf.availableVersions.length!=0){
+                    if (vnf.availableVersions && vnf.availableVersions.length != 0) {
                         _.forEach(vnf.availableVersions[0].relatedInstanceList, function (related) {
                             var rel = related.relatedInstance;
                             var relatedInstance = {
 
                             data.relatedInstanceList.push({relatedInstance: relatedInstance});
                         });
-                        if(workflowType=="VNF Scale Out") {
+                        if (workflowType == "VNF Scale Out") {
                             //push vnf to related as well as the service instance
                             var relatedInstance = {
                                 instanceId: vnf.id,
                             data.relatedInstanceList.push({relatedInstance: relatedInstance});
                         }
                     }
-                }catch(err){
+                } catch (err) {
                     $log.error('SchedulerCtrl::extractChangeManagementCallbackDataStr error: ' + err);
                     vm.errorMsg = err;
                 }
 
         function getWorkflowParametersFromForm() {
             let workflowParameters =
-                {requestDetails:{
-                        cloudConfiguration:{},
-                        requestParameters:{userParams:[{}]}
-                    }};
+                {
+                    requestDetails: {
+                        cloudConfiguration: {},
+                        requestParameters: {userParams: [{}]}
+                    }
+                };
             workflowParameters.requestDetails.cloudConfiguration = vm.changeManagement.vnfNames[0].cloudConfiguration;
 
             let parameters = vm.getRemoteWorkFlowParameters(vm.changeManagement.workflow);
-            parameters.forEach((parameter)=>{
-                let inputField = document.getElementById('so-workflow-parameter-'+parameter.soFieldName);
-            workflowParameters.requestDetails.requestParameters.userParams[0][parameter.soFieldName]=inputField.value;
-        });
+            parameters.forEach((parameter) => {
+                let inputField = document.getElementById('so-workflow-parameter-' + parameter.soFieldName);
+                workflowParameters.requestDetails.requestParameters.userParams[0][parameter.soFieldName] = inputField.value;
+            });
 
             return workflowParameters;
         }
 
         vm.openModal = function () {
-            if(vm.hasScheduler) { //scheduling supported
+            if (vm.hasScheduler) { //scheduling supported
                 vm.scheduleWorkflow();
             } else {
                 //no scheduling support
         };
 
         vm.executeWorkflow = function () {
-            if ( vm.localWorkflows && vm.localWorkflows.length > 0 ) {
+            if (vm.localWorkflows && vm.localWorkflows.length > 0) {
                 vm.triggerLocalWorkflow();
             } else {
                 let source = vm.getRemoteWorkflowSource(vm.changeManagement.workflow);
-                if( source === "NATIVE"){
+                if (source === "NATIVE") {
                     vm.triggerLocalWorkflow();
-                }else {
+                } else {
                     vm.triggerRemoteWorkflow();
                 }
             }
                 });
         };
 
-        vm.loadVNFTypes = function () {
+        vm.serviceTypeChanged = function () {
+            if (!$scope.isNewFilterChangeManagmentEnabled()) {
+                vm.searchVNFs();
+            }
+        };
+
+        vm.searchVNFs = function () {
             vm.vnfTypes = [];
             vm.vnfTypesTemp = [];
             vm.serviceInstances = [];
 
             vm.vnfs = [];
             vm.vfModules = [];
+            let vnfRole = $scope.isNewFilterChangeManagmentEnabled() ? vm.changeManagement.vnfType : null;
+            let cloudRegion = null;
+
 
             AaiService.getVnfsByCustomerIdAndServiceType(
                 vm.changeManagement.subscriberId,
-                vm.changeManagement.serviceType["service-type"]
-            ).then(function (response) {
+                vm.changeManagement.serviceType["service-type"],
+                vnfRole,
+                cloudRegion,
+        ).
+            then(function (response) {
+                    vm.isSearchedVNF = true;
                     var vnfsData = response.data.results;
                     if (vnfsData) {
                         for (var i = 0; i < vnfsData.length; i++) {
                         });
 
                         _.forEach(filteredVnfs, function (vnf) {
-                            vm.vnfTypes.push(vnf.properties['nf-role']);
+                            vm.vnfTypes.push(vnf.properties['nf-role'])
                         });
                     }
                 }
             });
         }
 
-        var getVersionNameForId = function(versionId) {
+        var getVersionNameForId = function (versionId) {
             var version = _.find(fromVNFVersions, {"key": versionId});
             return version.value;
         };
 
                     var serviceInstancesIds =
                         _.filter(vnf['related-to'], {'node-type': 'service-instance'})
-                            .map(function (serviceInstance) { return serviceInstance.id });
+                            .map(function (serviceInstance) {
+                                return serviceInstance.id
+                            });
 
-                    var serviceInstances = _.filter(vm.serviceInstances, function(serviceInstance) {
+                    var serviceInstances = _.filter(vm.serviceInstances, function (serviceInstance) {
                         return _.includes(serviceInstancesIds, serviceInstance.id);
                     });
 
                     }).then(function () {
                         vm.loadRemoteWorkFlowsParameters();
                     });
-            }else{
+            } else {
                 return vm.loadLocalWorkFlows()
                     .then(vm.loadLocalWorkFlowsParameters)
                     .then(function () {
         };
 
         vm.loadLocalWorkFlowsParameters = function () {
-            vm.localWorkflows.forEach(function(workflow) {
+            vm.localWorkflows.forEach(function (workflow) {
                 vm.loadLocalWorkFlowParameters(workflow);
             });
         };
         };
 
         vm.loadRemoteWorkFlowsParameters = function () {
-            vm.remoteWorkflows.forEach(function(workflow) {
-                if (workflow.source ==='SDC' || workflow.source === 'sdc' ){
+            vm.remoteWorkflows.forEach(function (workflow) {
+                if (workflow.source === 'SDC' || workflow.source === 'sdc') {
                     vm.loadRemoteWorkFlowParameters(workflow);
                 } else {
                     vm.loadLocalWorkFlowParameters(workflow.name);
         vm.loadRemoteWorkFlowParameters = function (workflow) {
             let parameters = [];
             workflow.workflowInputParameters
-                .filter( function (param) {
-                    return param.soPayloadLocation === "userParams";
+                .filter(function (param) {
+                    return param.soPayloadLocation === "userParams"
                 })
                 .forEach(function (param) {
                         let workflowParams = vm.repackAttributes(param);
             vm.remoteWorkflowsParameters.set(workflow.name, parameters);
         };
 
-        vm.repackAttributes = function (workflowParam){
+        vm.repackAttributes = function (workflowParam) {
             return {
                 name: workflowParam.label,
                 required: workflowParam.required,
                 soFieldName: workflowParam.soFieldName,
                 maxLength: '500',
                 pattern: '.*'
-            };
+            }
         };
 
         vm.getRemoteWorkFlowParameters = function (workflow) {
             if (workflow && vm.remoteWorkflowsParameters.has(workflow)) {
-                return vm.remoteWorkflowsParameters.get(workflow);
+                return vm.remoteWorkflowsParameters.get(workflow)
             }
             return [];
         };
 
-        vm.hasPatternError = function(form, itemName){
+        vm.hasPatternError = function (form, itemName) {
             return form[itemName].$error.pattern;
         };
 
-        vm.hasAsyncFnError = function(form, itemName){
+        vm.hasAsyncFnError = function (form, itemName) {
             return form[itemName].$error.validateAsyncFn;
         };
 
-        vm.getIdFor = function(type, id, name){
+        vm.getIdFor = function (type, id, name) {
             return "internal-workflow-parameter-" + type + "-" + id + "-" + (name ? name.split(' ').join('-').toLowerCase() : "");
         };
 
         vm.getInternalWorkFlowParameters = function (workflow, type) {
-            if (workflow && vm.localWorkflowsParameters.has(workflow) && vm.localWorkflowsParameters.get(workflow).filter(parameter => parameter.type==type) != []) {
-                return vm.localWorkflowsParameters.get(workflow).filter(parameter => parameter.type==type);
+            if (workflow && vm.localWorkflowsParameters.has(workflow) && vm.localWorkflowsParameters.get(workflow).filter(parameter => parameter.type == type) != []) {
+                return vm.localWorkflowsParameters.get(workflow).filter(parameter => parameter.type == type);
             }
             return [];
         };
 
         vm.getInternalWorkFlowParameter = function (workflow, type, parameterName) {
-            if (workflow && vm.localWorkflowsParameters.has(workflow) && vm.localWorkflowsParameters.get(workflow).filter(parameter => parameter.type==type) != []) {
-                return vm.localWorkflowsParameters.get(workflow).filter(parameter => parameter.type==type).filter(parameter => parameter.name === parameterName)[0]
+            if (workflow && vm.localWorkflowsParameters.has(workflow) && vm.localWorkflowsParameters.get(workflow).filter(parameter => parameter.type == type) != []) {
+                return vm.localWorkflowsParameters.get(workflow).filter(parameter => parameter.type == type).filter(parameter => parameter.name === parameterName)[0]
             }
         };
 
         };
 
         vm.getCachedWorkflowDetails = function (workflow) {
-            return vm.remoteWorkflows.filter( function (remoteWorkflow) {
+            return vm.remoteWorkflows.filter(function (remoteWorkflow) {
                 return remoteWorkflow.name === workflow;
             });
 
             var file = files[0];
             var reader = new FileReader();
 
-            reader.onloadend = function(evt) {
+            reader.onloadend = function (evt) {
                 if (evt.target.readyState === FileReader.DONE) {
                     $scope.$apply(function () {
                         $scope.moduleArr[0].userParams = JSON.parse(evt.target.result);
index 8575093..19b5f2b 100644 (file)
@@ -22,6 +22,7 @@
     border: 1px solid #D2D2D2;
     display: flex;
 }
+
 .scale-out-modules .table-row > div {
     padding: 0 12px;
     color: #5A5A5A;
     border-right: 1px solid #D2D2D2;
     line-height: 30px;
 }
+
 .scale-out-modules .table-row > div:last-child {
     border-right: none;
 }
+
 .scale-out-modules .table-row > div:nth-child(1) {
     flex: 40px 0 0;
     font-size: 22px;
 }
+
 .scale-out-modules .table-row > div:nth-child(2) {
     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: 110px 0 0;
 }
+
 .scale-out-modules .table-row > div:nth-child(6), .scale-out-modules .table-row > div:nth-child(7) {
     flex: 130px 0 0;
 }
+
 .scale-out-modules .table-row.open > div {
     line-height: 29px;
     border-top: 1px #009FDB solid;
     border-bottom: 1px #009FDB solid;
 }
+
 .scale-out-modules .table-row.open > div:last-child {
     box-shadow: 0px 0px 0px 0px red, 1px 0px 0px 0px #009FDB;
 }
+
 .scale-out-modules .table-row.open > div:nth-child(1) {
     border-color: green;
 }
+
 .scale-out-modules .table-row.open > div:nth-child(2) {
     color: #009FDB;
 }
+
 .scale-out-modules .table-header {
     border-bottom: none;
 }
+
 .scale-out-modules .table-header > div {
     background-color: #F2F2F2;
     color: black;
     font-size: 12px;
 }
+
 .scale-out-modules .modules-table:not(.open) + .table-row {
     border-top: none;
 }
+
 .scale-out-modules .modules-table {
     display: none;
     margin-top: 10px;
     margin-bottom: 15px;
 }
+
 .scale-out-modules .modules-table .table-row {
     margin-left: 60px;
 }
-.scale-out-modules .modules-table .table-row  > div:nth-child(1) {
+
+.scale-out-modules .modules-table .table-row > div:nth-child(1) {
     flex: 300px 1 0;
     font-size: 13px;
 }
-.scale-out-modules .modules-table .table-row  > div:nth-child(2) {
+
+.scale-out-modules .modules-table .table-row > div:nth-child(2) {
     flex: 90px 0 0;
 }
-.scale-out-modules .modules-table .table-row  > div:nth-child(3) {
+
+.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 {
+
+.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) {
+
+.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) {
+
+.scale-out-modules .modules-table .table-row > div:nth-child(5) {
     flex: 280px 0 0;
 }
+
 .scale-out-modules .modules-table.open {
     display: block;
 }
 
+.search-vnf {
+    position: absolute;
+    bottom: 0;
+}
+
+.form-group {
+    position: relative;
+}
+
+.nf-role-input {
+    width: 50%
+}
 
 /*LESS*/
 /*
index de0ec40..f06d883 100644 (file)
   ============LICENSE_END=========================================================
   -->
 
-<link rel="stylesheet" type="text/css" href="app/vid/styles/modal-create-new.css" />
+<link rel="stylesheet" type="text/css" href="app/vid/styles/modal-create-new.css"/>
 <div class="modal-header">
     <h3 class="modal-title" id="modal-title">New VNF Change</h3>
     <span ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">&times;</span>
     <div ng-if="vm.errorMsg!==''"><font color='red'>{{vm.errorMsg.message}}</font></div>
 </div>
-<form class="form-create" data-tests-id="newChangeManagementForm" name="newChangeManagement" ng-submit="vm.openModal();vm.close();" novalidate>
-    <div class="modal-body step1" ng-show="vm.wizardStep === 1" >
+<form class="form-create" data-tests-id="newChangeManagementForm" name="newChangeManagement"
+      ng-submit="vm.openModal();vm.close();" novalidate>
+    <div class="modal-body step1" ng-show="vm.wizardStep === 1">
+
         <div class="form-group">
             <label class="control-label">Subscriber</label>
-            <select class="form-control" ng-model="vm.changeManagement.subscriberId" ng-change="vm.loadServiceTypes()" name="subscriber" id="subscriber" data-tests-id="subscriberName" required>
+            <select class="form-control" ng-model="vm.changeManagement.subscriberId" ng-change="vm.loadServiceTypes()"
+                    name="subscriber" id="subscriber" data-tests-id="subscriberName" required>
                 <option value="" disabled>Select subscriber</option>
-                <option data-tests-id="subscriberNameOption" class="subscriberNameOption" ng-repeat="item in vm.subscribers" ng-value="item['global-customer-id']" ng-disabled="!(item['is-permitted'])">{{item['subscriber-name']}}</option>
+                <option data-tests-id="subscriberNameOption" class="subscriberNameOption"
+                        ng-repeat="item in vm.subscribers" ng-value="item['global-customer-id']"
+                        ng-disabled="!(item['is-permitted'])">{{item['subscriber-name']}}
+                </option>
             </select>
         </div>
+
         <div class="form-group">
             <label class="control-label">Service type</label>
-            <select class="form-control" ng-model="vm.changeManagement.serviceType" ng-change="vm.loadVNFTypes()" name="serviceType" id="serviceType" ng-options="item['service-type'] disable when !(item['is-permitted']) for item in vm.serviceTypes" required data-ng-disabled="newChangeManagement.subscriber.$pristine" data-tests-id="serviceType">
+            <select class="form-control" ng-model="vm.changeManagement.serviceType"
+                    ng-change="vm.serviceTypeChanged()"
+                    name="serviceType" id="serviceType"
+                    ng-options="item['service-type'] disable when !(item['is-permitted']) for item in vm.serviceTypes"
+                    required data-ng-disabled="newChangeManagement.subscriber.$pristine"
+                    data-tests-id="serviceType">
                 <option value="" disabled>Select service type</option>
             </select>
         </div>
-        <div class="form-group">
-            <label class="control-label">NF Role</label>
-            <select class="form-control" ng-model="vm.changeManagement.vnfType" ng-change="vm.loadVNFVersions()" name="vnfType" id="vnfType" ng-options="item for item in vm.vnfTypes" required data-ng-disabled="newChangeManagement.serviceType.$pristine">
-                <option value="" disabled>NF Role</option>
-            </select>
+
+
+        <div ng-if="!isNewFilterChangeManagmentEnabled()">
+
+            <div class="form-group">
+                <label class="control-label">NF Role</label>
+                <select class="form-control" ng-model="vm.changeManagement.vnfType" ng-change="vm.loadVNFVersions()"
+                        name="vnfType" id="vnfType" ng-options="item for item in vm.vnfTypes" required
+                        data-ng-disabled="newChangeManagement.serviceType.$pristine">
+                    <option value="" disabled>NF Role</option>
+                </select>
+            </div>
+
+        </div>
+
+
+        <div ng-if="isNewFilterChangeManagmentEnabled()">
+
+            <div class="form-group form-row">
+                <div class="col nf-role-input">
+                    <label class="control-label">NF Role</label>
+                    <input class="form-control" ng-model="vm.changeManagement.vnfType"
+                           name="vnfType" id="vnfTypeInput"
+                           data-ng-disabled="newChangeManagement.serviceType.$pristine">
+                </div>
+
+                <div class="col">
+                    <button class="search-vnf" type="button" id="searchVNF" name="searchVNFs" class="btn btn-primary"
+                            ng-click="vm.searchVNFs()"
+                            ng-disabled="newChangeManagement.subscriber.$pristine || newChangeManagement.serviceType.$pristine">
+                        Search VNFs
+                    </button>
+                </div>
+            </div>
+
         </div>
+
+
         <div class="form-group">
             <label class="control-label">Source VNF Model Version</label>
-            <select class="form-control" ng-model="vm.changeManagement.fromVNFVersion" ng-change="vm.loadVNFNames()" name="fromVNFVersion" id="fromVNFVersion" ng-options="item.key as item.value for item in vm.fromVNFVersions" required data-ng-disabled="newChangeManagement.vnfType.$pristine">
+            <select class="form-control" ng-model="vm.changeManagement.fromVNFVersion" ng-change="vm.loadVNFNames()"
+                    name="fromVNFVersion" id="fromVNFVersion"
+                    ng-options="item.key as item.value for item in vm.fromVNFVersions" required
+                    data-ng-disabled="vm.isDisabledVNFmodelVersion(newChangeManagement.vnfType.$pristine); ">
                 <option value="" disabled>Select VNF Model Version</option>
             </select>
         </div>
+
+
         <div class="form-group">
             <label class="control-label">Available VNF</label>
-            <multiselect ng-model="vm.changeManagement.vnfNames" ng-change="vm.loadWorkFlows()" name="vnfName" id="vnfName" options="vm.vnfNames" display-prop="name" id-prop="id" required data-ng-disabled="newChangeManagement.fromVNFVersion.$pristine"></multiselect>
+            <multiselect ng-model="vm.changeManagement.vnfNames" ng-change="vm.loadWorkFlows()" name="vnfName"
+                         id="vnfName" options="vm.vnfNames" display-prop="name" id-prop="id" required
+                         data-ng-disabled="newChangeManagement.fromVNFVersion.$pristine"></multiselect>
         </div>
-        <div ng-show="vm.changeManagement.vnfNames && vm.changeManagement.vnfNames.length > 0" class="form-group vnf-versions-container">
+        <div ng-show="vm.changeManagement.vnfNames && vm.changeManagement.vnfNames.length > 0"
+             class="form-group vnf-versions-container">
             <table class="table table-bordered">
                 <tbody>
                 <tr ng-repeat="vnfName in vm.changeManagement.vnfNames">
                     <td class="col-md-2"><span class="vnf-versions-name">{{vnfName.name}}</span></td>
                     <td class="col-md-2">
-                        <select ng-model="vnfName.version" ng-change="vm.selectVersionForVNFName(vnfName)" class="vnf-versions-select-as-text" id="{{vnfName['invariant-id']}}-target-version-select">
+                        <select ng-model="vnfName.version" ng-change="vm.selectVersionForVNFName(vnfName)"
+                                class="vnf-versions-select-as-text"
+                                id="{{vnfName['invariant-id']}}-target-version-select">
                             <option value="" disabled="" selected="selected">Select Target VNF Model Version</option>
-                            <option ng-repeat="version in vnfName.availableVersions">{{version.modelInfo.modelVersion}}</option>
+                            <option ng-repeat="version in vnfName.availableVersions">
+                                {{version.modelInfo.modelVersion}}
+                            </option>
                         </select>
                     </td>
                     <td class="col-md-1 vnf-versions-file">
-                        <input ng-model="vnfName.filePath" onchange="angular.element(this).scope().selectFileForVNFName(this)" type="file" id="{{vnfName['invariant-id']}}" class="vnf-files-select" />
+                        <input ng-model="vnfName.filePath"
+                               onchange="angular.element(this).scope().selectFileForVNFName(this)" type="file"
+                               id="{{vnfName['invariant-id']}}" class="vnf-files-select"/>
                         <span class="vnf-versions-file">Select File<span class="caret"></span></span></td>
                 </tr>
                 </tbody>
         </div>
         <div class="form-group">
             <label class="control-label">Workflow</label>
-            <select class="form-control" ng-model="vm.changeManagement.workflow" name="workflow" id="workflow" ng-options="item for item in vm.workflows" required data-ng-disabled="newChangeManagement.vnfName.$pristine">
+            <select class="form-control" ng-model="vm.changeManagement.workflow" name="workflow" id="workflow"
+                    ng-options="item for item in vm.workflows" required
+                    data-ng-disabled="newChangeManagement.vnfName.$pristine">
                 <option value="" disabled>Select workflow</option>
             </select>
         </div>
 
-        <div class="form-group" ng-if="vm.changeManagement.workflow" ng-repeat="item in vm.getInternalWorkFlowParameters(vm.changeManagement.workflow, 'FILE')">
+        <div class="form-group" ng-if="vm.changeManagement.workflow"
+             ng-repeat="item in vm.getInternalWorkFlowParameters(vm.changeManagement.workflow, 'FILE')">
             <label class="control-label">{{item.name}}</label>
             <div class="file-wrapper">
-                <input id="{{vm.getIdFor('file',item.id,item.name)}}" ng-change="vm.onChange(item)" class="file-input" type="file" ngf-select ng-model="item.value" ngf-validate-async-fn="vm.uploadConfigFile($file)" ng-attr-name="{{'internal-workflow-parameter-file-name-' + item.id}}" accept="{{item.acceptableFileType}}" ngf-pattern="{{item.acceptableFileType}}" ng-required="{{item.required}}"/>
-                <label id="{{vm.getIdFor('file',item.id,item.name)}}-label" class="file-input-label">{{item.value&&item.value.name||"Select File"}} </label>
+                <input id="{{vm.getIdFor('file',item.id,item.name)}}" ng-change="vm.onChange(item)" class="file-input"
+                       type="file" ngf-select ng-model="item.value" ngf-validate-async-fn="vm.uploadConfigFile($file)"
+                       ng-attr-name="{{'internal-workflow-parameter-file-name-' + item.id}}"
+                       accept="{{item.acceptableFileType}}" ngf-pattern="{{item.acceptableFileType}}"
+                       ng-required="{{item.required}}"/>
+                <label id="{{vm.getIdFor('file',item.id,item.name)}}-label" class="file-input-label">
+                    {{item.value&&item.value.name||"Select File"}} </label>
                 <label ng-attr-for="{{vm.getIdFor('file',item.id,item.name)}}"><span class="icon-browse"></span></label>
             </div>
-            <label id="errorLabel" class="icon-alert error" ng-if="vm.hasPatternError(newChangeManagement, 'internal-workflow-parameter-file-name-' + item.id)">{{item.msgOnPatternError}}</label>
-            <label id="errorContentLabel" class="icon-alert error" ng-if="vm.hasAsyncFnError(newChangeManagement, 'internal-workflow-parameter-file-name-' + item.id)">{{item.msgOnContentError}}</label>
+            <label id="errorLabel" class="icon-alert error"
+                   ng-if="vm.hasPatternError(newChangeManagement, 'internal-workflow-parameter-file-name-' + item.id)">{{item.msgOnPatternError}}</label>
+            <label id="errorContentLabel" class="icon-alert error"
+                   ng-if="vm.hasAsyncFnError(newChangeManagement, 'internal-workflow-parameter-file-name-' + item.id)">{{item.msgOnContentError}}</label>
         </div>
 
-        <div class="form-group" ng-if="vm.changeManagement.workflow" ng-repeat="item in vm.getInternalWorkFlowParameters(vm.changeManagement.workflow, 'text')">
+        <div class="form-group" ng-if="vm.changeManagement.workflow"
+             ng-repeat="item in vm.getInternalWorkFlowParameters(vm.changeManagement.workflow, 'text')">
             <label ng-attr-for="{{vm.getIdFor('text',item.id,item.name)}}" class="control-label">{{item.name}}</label>
-            <input ng-model="item.value" type="text" id="{{vm.getIdFor('text',item.id,item.name)}}" pattern="{{item.pattern}}" ng-required="{{item.required}}">
+            <input ng-model="item.value" type="text" id="{{vm.getIdFor('text',item.id,item.name)}}"
+                   pattern="{{item.pattern}}" ng-required="{{item.required}}">
         </div>
 
-        <div class="form-group" ng-if="vm.changeManagement.workflow" ng-repeat="item in vm.getRemoteWorkFlowParameters(vm.changeManagement.workflow)">
+        <div class="form-group" ng-if="vm.changeManagement.workflow"
+             ng-repeat="item in vm.getRemoteWorkFlowParameters(vm.changeManagement.workflow)">
             <label for="so-workflow-parameter-{{item.id}}" class="control-label">{{item.name}}</label>
-            <input  ng-model="item.value" type="text" id="so-workflow-parameter-{{item.id}}" pattern="{{item.pattern}}" maxlength="{{item.maxLength}}" ng-required="{{item.required}}" soFieldName="{{item.soFieldName}}">
+            <input ng-model="item.value" type="text" id="so-workflow-parameter-{{item.id}}" pattern="{{item.pattern}}"
+                   maxlength="{{item.maxLength}}" ng-required="{{item.required}}" soFieldName="{{item.soFieldName}}">
         </div>
     </div>
 
             <div>Invariant UUID</div>
         </div>
 
-        <div class="table-row" ng-repeat-start="vnf in vm.changeManagement.vnfNames" ng-click="vnf.isOpen=!!!vnf.isOpen">
+        <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>{{moduleArr.length}}</div>
                 <div ng-if="!moduleArr[0].scalable">N/A</div>
                 <div ng-if="moduleArr[0].scalable">
-                    <input type="checkbox" ng-model="moduleArr[0].scale" />
+                    <input type="checkbox" ng-model="moduleArr[0].scale"/>
                 </div>
                 <div>{{moduleArr[0].uuid}}</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)" />
+                    <input type="file" accept="application/json"
+                           onchange="angular.element(this).scope().setPreload(this)"/>
                 </div>
             </div>
         </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>
+            <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) || vm.hasScheduler" 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) && !vm.hasScheduler" ng-click="vm.nextStep();" type="button" id="next" name="next" class="btn btn-primary" data-ng-disabled="newChangeManagement.$invalid">Next</button>
-            <button ng-if="isShowErrorReport() && vm.errorMsg!==''" ng-click="showReportWindow()" type="button" class="btn btn-danger" >Create report</button>
+            <button ng-if="!vm.isScaleOut() || (vm.isScaleOut() && vm.wizardStep === 2) || vm.hasScheduler"
+                    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) && !vm.hasScheduler" ng-click="vm.nextStep();"
+                    type="button" id="next" name="next" class="btn btn-primary"
+                    data-ng-disabled="newChangeManagement.$invalid">Next
+            </button>
+            <button ng-if="isShowErrorReport() && vm.errorMsg!==''" ng-click="showReportWindow()" type="button"
+                    class="btn btn-danger">Create report
+            </button>
         </div>
     </div>
 </form>
\ No newline at end of file
index 0d0fa6d..994a3e4 100755 (executable)
@@ -32,19 +32,20 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
 
     function getPnfByName(pnfName) {
         var deferred = $q.defer();
-        var url = COMPONENT.AAI_GET_PNF_BY_NAME+ encodeURIComponent(pnfName)  ;
-        var config = { timeout: PropertyService.getServerResponseTimeoutMsec() };
+        var url = COMPONENT.AAI_GET_PNF_BY_NAME + encodeURIComponent(pnfName);
+        var config = {timeout: PropertyService.getServerResponseTimeoutMsec()};
 
         $http.get(url, config)
             .success(function (response) {
                 deferred.resolve({data: response});
             })
-            .error(function(data, status, headers, config) {
+            .error(function (data, status, headers, config) {
                 deferred.reject({message: data, status: status});
             });
 
         return deferred.promise;
     }
+
     function getGlobalCustomerIdFromServiceInstanceResponse(response) {
         var globalCustomerId = "";
         if (angular.isArray(response.data[FIELD.ID.RESULT_DATA])) {
@@ -63,16 +64,16 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
     }
 
     function searchServiceInstances(query) {
-        return $http.get( COMPONENT.SEARCH_SERVICE_INSTANCES  + query, {}, {
-            timeout : PropertyService.getServerResponseTimeoutMsec()
+        return $http.get(COMPONENT.SEARCH_SERVICE_INSTANCES + query, {}, {
+            timeout: PropertyService.getServerResponseTimeoutMsec()
         }).then(function (response) {
             var displayData = response.data[FIELD.ID.SERVICE_INSTANCES];
             if (!displayData || !displayData.length) {
                 displayData = [{
-                    globalCustomerId   : null,
-                    subscriberName     : null,
-                    serviceType                : FIELD.PROMPT.NO_SERVICE_SUB,
-                    serviceInstanceId  : FIELD.PROMPT.NO_SERVICE_INSTANCE
+                    globalCustomerId: null,
+                    subscriberName: null,
+                    serviceType: FIELD.PROMPT.NO_SERVICE_SUB,
+                    serviceInstanceId: FIELD.PROMPT.NO_SERVICE_INSTANCE
                 }];
             }
             return {displayData: displayData};
@@ -80,11 +81,13 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
     };
 
     function getJoinedQueryString(queries) {
-        return queries.filter(function (val) {return val;}).join("&");
+        return queries.filter(function (val) {
+            return val;
+        }).join("&");
     }
 
     return {
-        getSubscriberName : function(globalCustomerId,
+        getSubscriberName: function (globalCustomerId,
                                      successCallbackFunction) {
             $log
                 .debug("AaiService:getSubscriberName: globalCustomerId: "
@@ -93,9 +96,9 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
                 COMPONENT.AAI_SUB_DETAILS_PATH
                 + globalCustomerId + COMPONENT.ASSIGN + Math.random(),
                 {
-                    timeout : PropertyService
+                    timeout: PropertyService
                         .getServerResponseTimeoutMsec()
-                }).then(function(response) {
+                }).then(function (response) {
                 var result = {};
                 if (response.data) {
                     result.subscriberName = response.data[FIELD.ID.SUBNAME];
@@ -106,7 +109,7 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             (UtilityService.runHttpErrorHandler);
         },
 
-        runNamedQuery : function (namedQueryId, globalCustomerId, serviceType, serviceInstanceId, successCallback, errorCallback) {
+        runNamedQuery: function (namedQueryId, globalCustomerId, serviceType, serviceInstanceId, successCallback, errorCallback) {
 
             var url = COMPONENT.AAI_SUB_VIEWEDIT_PATH +
                 COMPONENT.FORWARD_SLASH + encodeURIComponent(namedQueryId) +
@@ -116,72 +119,72 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             return $http.get(url, {}, {
 
 
-                timeout : PropertyService.getServerResponseTimeoutMsec()
-            }).then(function(response) {
+                timeout: PropertyService.getServerResponseTimeoutMsec()
+            }).then(function (response) {
                 if (response.data != null) {
                     successCallback(response);
                 } else {
                     errorCallback(response);
                 }
-            }, function(response) {
+            }, function (response) {
                 errorCallback(response);
             });
         },
 
 
-        getVNFInformationByServiceTypeAndId : function (globalCustomerId, serviceType, serviceInstanceId, successCallback, errorCallback) {
+        getVNFInformationByServiceTypeAndId: function (globalCustomerId, serviceType, serviceInstanceId, successCallback, errorCallback) {
 
             var url = COMPONENT.AAI_GET_VNF_INFO +
                 COMPONENT.FORWARD_SLASH + encodeURIComponent(globalCustomerId) +
                 COMPONENT.FORWARD_SLASH + encodeURIComponent(serviceType) +
                 COMPONENT.FORWARD_SLASH + encodeURIComponent(serviceInstanceId);
             $http.get(url, {}, {
-                timeout : PropertyService.getServerResponseTimeoutMsec()
-            }).then(function(response) {
+                timeout: PropertyService.getServerResponseTimeoutMsec()
+            }).then(function (response) {
                 if (response.data != null) {
                     successCallback(response);
                 } else {
                     errorCallback(response);
                 }
-            }, function(response) {
+            }, function (response) {
                 errorCallback(response);
             });
         },
 
-        getPNFInformationByServiceTypeAndId : function (globalCustomerId, serviceType, serviceInstanceId, successCallback, errorCallback) {
+        getPNFInformationByServiceTypeAndId: function (globalCustomerId, serviceType, serviceInstanceId, successCallback, errorCallback) {
 
             var url = COMPONENT.AAI_GET_PNF_INSTANCE +
                 COMPONENT.FORWARD_SLASH + encodeURIComponent(globalCustomerId) +
                 COMPONENT.FORWARD_SLASH + encodeURIComponent(serviceType) +
                 COMPONENT.FORWARD_SLASH + encodeURIComponent(serviceInstanceId);
             $http.get(url, {}, {
-                timeout : PropertyService.getServerResponseTimeoutMsec()
-            }).then(function(response) {
+                timeout: PropertyService.getServerResponseTimeoutMsec()
+            }).then(function (response) {
                 if (response.data != null) {
                     successCallback(response);
                 } else {
                     errorCallback(response);
                 }
-            }, function(response) {
+            }, function (response) {
                 errorCallback(response);
             });
         },
 
-        getCRInformationByInstanceId : function (serviceInstanceId) {
+        getCRInformationByInstanceId: function (serviceInstanceId) {
 
             var deferred = $q.defer();
 
             var url = COMPONENT.AAI_GET_CR_INSTANCE +
                 COMPONENT.FORWARD_SLASH + encodeURIComponent(serviceInstanceId);
             $http.get(url, {}, {
-                timeout : PropertyService.getServerResponseTimeoutMsec()
-            }).then(function(response) {
+                timeout: PropertyService.getServerResponseTimeoutMsec()
+            }).then(function (response) {
                 if (response.data != null) {
                     deferred.resolve(response);
                 } else {
                     deferred.resolve(response);
                 }
-            }, function(response) {
+            }, function (response) {
                 deferred.resolve(response);
             });
             return deferred.promise;
@@ -211,19 +214,19 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             return deferred.promise;
         },
 
-        getSubDetails : function(selectedSubscriber, selectedServiceInstance, successCallback, errorCallback) {
+        getSubDetails: function (selectedSubscriber, selectedServiceInstance, successCallback, errorCallback) {
             var subscriber;
             var displayData;
-            $http.get( COMPONENT.AAI_SUB_DETAILS_PATH  + selectedSubscriber, {}, {
+            $http.get(COMPONENT.AAI_SUB_DETAILS_PATH + selectedSubscriber, {}, {
 
 
-                timeout : PropertyService.getServerResponseTimeoutMsec()
-            }).then(function(response) {
+                timeout: PropertyService.getServerResponseTimeoutMsec()
+            }).then(function (response) {
                 displayData = [];
                 subscriber = response.data;
                 var subscriberName = subscriber[FIELD.ID.SUBNAME];
                 if (subscriber[FIELD.ID.SERVICE_SUBSCRIPTIONS] != null) {
-                    angular.forEach(subscriber[FIELD.ID.SERVICE_SUBSCRIPTIONS][FIELD.ID.SERVICE_SUBSCRIPTION], function(serviceSubscription, key) {
+                    angular.forEach(subscriber[FIELD.ID.SERVICE_SUBSCRIPTIONS][FIELD.ID.SERVICE_SUBSCRIPTION], function (serviceSubscription, key) {
                         var serviceInstanceId = [];
                         var serviceType = "";
                         if (serviceSubscription[FIELD.ID.SERVICETYPE] != null) {
@@ -232,15 +235,16 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
                             serviceType = FIELD.PROMPT.NO_SERVICE_SUB;
                         }
                         if (serviceSubscription[FIELD.ID.SERVICE_INSTANCES] != null) {
-                            angular.forEach(serviceSubscription[FIELD.ID.SERVICE_INSTANCES][FIELD.ID.SERVICE_INSTANCE], function(instValue, instKey) {
+                            angular.forEach(serviceSubscription[FIELD.ID.SERVICE_INSTANCES][FIELD.ID.SERVICE_INSTANCE], function (instValue, instKey) {
                                 // put them together, i guess
-                                var inst = { "serviceInstanceId": instValue[FIELD.ID.SERVICE_INSTANCE_ID],
+                                var inst = {
+                                    "serviceInstanceId": instValue[FIELD.ID.SERVICE_INSTANCE_ID],
                                     "aaiModelInvariantId": instValue[FIELD.ID.MODEL_INVAR_ID],
                                     "aaiModelVersionId": instValue[FIELD.ID.MODEL_VERSION_ID],
                                     "serviceInstanceName": instValue[FIELD.ID.SERVICE_INSTANCE_NAME]
                                 };
                                 if (selectedServiceInstance != null) {
-                                    if ((instValue[FIELD.ID.SERVICE_INSTANCE_ID] == selectedServiceInstance ) || (instValue[FIELD.ID.SERVICE_INSTANCE_NAME] == selectedServiceInstance)) {
+                                    if ((instValue[FIELD.ID.SERVICE_INSTANCE_ID] == selectedServiceInstance) || (instValue[FIELD.ID.SERVICE_INSTANCE_NAME] == selectedServiceInstance)) {
                                         serviceInstanceId.push(inst);
                                     }
                                 } else {
@@ -248,101 +252,108 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
                                 }
                             });
                         } else {
-                            serviceInstanceId = [ FIELD.PROMPT.NO_SERVICE_INSTANCE ];
+                            serviceInstanceId = [FIELD.PROMPT.NO_SERVICE_INSTANCE];
                         }
-                        angular.forEach(serviceInstanceId, function(subVal, subKey) {
+                        angular.forEach(serviceInstanceId, function (subVal, subKey) {
                             displayData.push({
-                                globalCustomerId       : selectedSubscriber,
-                                subscriberName         : subscriberName,
-                                serviceType            : serviceType,
-                                serviceInstanceId      : subVal.serviceInstanceId,
-                                aaiModelInvariantId            : subVal.aaiModelInvariantId,
-                                aaiModelVersionId
-                                    : subVal.aaiModelVersionId,
-                                serviceInstanceName    : subVal.serviceInstanceName,
+                                globalCustomerId: selectedSubscriber,
+                                subscriberName: subscriberName,
+                                serviceType: serviceType,
+                                serviceInstanceId: subVal.serviceInstanceId,
+                                aaiModelInvariantId: subVal.aaiModelInvariantId,
+                                aaiModelVersionId: subVal.aaiModelVersionId,
+                                serviceInstanceName: subVal.serviceInstanceName,
                                 isPermitted: serviceSubscription[FIELD.ID.IS_PERMITTED]
                             });
                         });
                     });
                 } else {
                     displayData.push({
-                        globalCustomerId       : selectedSubscriber,
-                        subscriberName         : subscriberName,
-                        serviceType            : FIELD.PROMPT.NO_SERVICE_SUB,
-                        serviceInstanceId      : FIELD.PROMPT.NO_SERVICE_INSTANCE
+                        globalCustomerId: selectedSubscriber,
+                        subscriberName: subscriberName,
+                        serviceType: FIELD.PROMPT.NO_SERVICE_SUB,
+                        serviceInstanceId: FIELD.PROMPT.NO_SERVICE_INSTANCE
                     });
                 }
                 successCallback(displayData, subscriberName);
-            }, function(response) {
-                errorCallback(response);});
+            }, function (response) {
+                errorCallback(response);
+            });
         },
 
-        getSubList : function(successCallback, errorCallback ) {
+        getSubList: function (successCallback, errorCallback) {
 
-            $http.get( FIELD.ID.AAI_GET_FULL_SUBSCRIBERS, {}, {
+            $http.get(FIELD.ID.AAI_GET_FULL_SUBSCRIBERS, {}, {
 
 
-                timeout : PropertyService.getServerResponseTimeoutMsec()
-            }).then(function(response) {
+                timeout: PropertyService.getServerResponseTimeoutMsec()
+            }).then(function (response) {
                 var customerList = [];
                 if (response.data.customer != null) {
-                    angular.forEach(response.data.customer, function(subVal, subKey) {
-                        var cust = { "globalCustomerId": subVal[FIELD.ID.GLOBAL_CUSTOMER_ID], "subscriberName": subVal[FIELD.ID.SUBNAME],
-                            "isPermitted": subVal[FIELD.ID.IS_PERMITTED], };
+                    angular.forEach(response.data.customer, function (subVal, subKey) {
+                        var cust = {
+                            "globalCustomerId": subVal[FIELD.ID.GLOBAL_CUSTOMER_ID],
+                            "subscriberName": subVal[FIELD.ID.SUBNAME],
+                            "isPermitted": subVal[FIELD.ID.IS_PERMITTED],
+                        };
                         customerList.push(cust);
                     });
                     successCallback(customerList);
                 } else {
                     errorCallback(response);
                 }
-            },function(response) {
+            }, function (response) {
                 errorCallback(response);
             });
         },
 
-        getServiceInstance : getServiceInstance,
-        getPnfByName : getPnfByName,
+        getServiceInstance: getServiceInstance,
+        getPnfByName: getPnfByName,
 
-        getGlobalCustomerIdByInstanceIdentifier : function(serviceInstanceIdentifier, findBy) {
+        getGlobalCustomerIdByInstanceIdentifier: function (serviceInstanceIdentifier, findBy) {
             serviceInstanceIdentifier.trim();
 
             return getServiceInstance(serviceInstanceIdentifier, findBy)
                 .then(function (response) {
                     return getGlobalCustomerIdFromServiceInstanceResponse(response);
-            });
+                });
         },
 
-        getMultipleValueParamQueryString: function(values, paramSubPath) {
+        getMultipleValueParamQueryString: function (values, paramSubPath) {
             if (values.length) {
-                return paramSubPath + values.filter(function (val) {return val;}).join("&" + paramSubPath);
+                return paramSubPath + values.filter(function (val) {
+                    return val;
+                }).join("&" + paramSubPath);
             }
         },
 
         getJoinedQueryString: getJoinedQueryString,
 
-        getServices2 : function(successCallback, errorCallback ) {
+        getServices2: function (successCallback, errorCallback) {
 
-            $http.get( FIELD.ID.AAI_GET_SERVICES, {}, {
+            $http.get(FIELD.ID.AAI_GET_SERVICES, {}, {
 
 
-                timeout : PropertyService.getServerResponseTimeoutMsec()
-            }).then(function(response) {
+                timeout: PropertyService.getServerResponseTimeoutMsec()
+            }).then(function (response) {
                 var customerList = [];
                 if (response.data != null) {
                     var serviceIdList = [];
-                    angular.forEach(response.data, function(value, key) {
-                        angular.forEach(value, function(subVal, key) {
-                            var newVal = { "id" : subVal[FIELD.ID.SERVICE_ID], "description" : subVal[FIELD.ID.SERVICE_DESCRIPTION] ,
-                                "isPermitted" : subVal[FIELD.ID.IS_PERMITTED]
-
-                            };serviceIdList.push(newVal);
+                    angular.forEach(response.data, function (value, key) {
+                        angular.forEach(value, function (subVal, key) {
+                            var newVal = {
+                                "id": subVal[FIELD.ID.SERVICE_ID], "description": subVal[FIELD.ID.SERVICE_DESCRIPTION],
+                                "isPermitted": subVal[FIELD.ID.IS_PERMITTED]
+
+                            };
+                            serviceIdList.push(newVal);
                         });
                     });
                     successCallback(serviceIdList);
                 } else {
                     errorCallback(response);
                 }
-            },function(response) {
+            }, function (response) {
                 errorCallback(response);
             });
         },
@@ -362,19 +373,19 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
 
         },
 
-        getPortMirroringSourcePorts : function (ids) {
+        getPortMirroringSourcePorts: function (ids) {
             var defer = $q.defer();
-            var url = COMPONENT.AAI_GET_PORT_MIRRORING_SOURCE_PORTS +'?configurationIds=' +  ids.join(',');
-            $http.get(url).then(function(res){
+            var url = COMPONENT.AAI_GET_PORT_MIRRORING_SOURCE_PORTS + '?configurationIds=' + ids.join(',');
+            $http.get(url).then(function (res) {
                 defer.resolve(res);
-            }).catch(function(err) {
+            }).catch(function (err) {
                 $log.error(err);
                 defer.resolve({});
             });
             return defer.promise;
         },
 
-        getVlansByNetworksMapping : function (globalCustomerId, serviceType, serviceInstanceId, sdcModelUuid) {
+        getVlansByNetworksMapping: function (globalCustomerId, serviceType, serviceInstanceId, sdcModelUuid) {
             var defer = $q.defer();
             if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS)) {
                 var url = COMPONENT.AAI_GET_PROVIDER_NETWORKS_ASSOCIATIONS + '?'
@@ -384,9 +395,9 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
                     + '&sdcModelUuid=' + sdcModelUuid
                 ;
 
-                $http.get(url).then(function(res){
+                $http.get(url).then(function (res) {
                     defer.resolve(res.data);
-                }).catch(function(err) {
+                }).catch(function (err) {
                     $log.error(err);
                     defer.resolve({});
                 });
@@ -397,29 +408,30 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             return defer.promise;
         },
 
-        getSubscriptionServiceTypeList : function(globalCustomerId,
+        getSubscriptionServiceTypeList: function (globalCustomerId,
                                                   successCallbackFunction) {
             $log
                 .debug("AaiService:getSubscriptionServiceTypeList: globalCustomerId: "
                     + globalCustomerId);
-            if ( UtilityService.hasContents(globalCustomerId) ) {
+            if (UtilityService.hasContents(globalCustomerId)) {
                 $http.get(
                     COMPONENT.AAI_SUB_DETAILS_PATH
                     + globalCustomerId + COMPONENT.ASSIGN + Math.random() + COMPONENT.AAI_OMIT_SERVICE_INSTANCES + true,
                     {
-                        timeout : PropertyService
+                        timeout: PropertyService
                             .getServerResponseTimeoutMsec()
-                    }).then(function(response) {
+                    }).then(function (response) {
                     if (response.data && response.data[FIELD.ID.SERVICE_SUBSCRIPTIONS]) {
                         var serviceTypes = [];
                         var serviceSubscriptions = response.data[FIELD.ID.SERVICE_SUBSCRIPTIONS][FIELD.ID.SERVICE_SUBSCRIPTION];
 
                         for (var i = 0; i < serviceSubscriptions.length; i++) {
                             serviceTypes.push({
-                                "name":serviceSubscriptions[i][FIELD.ID.SERVICETYPE],
+                                "name": serviceSubscriptions[i][FIELD.ID.SERVICETYPE],
                                 "isPermitted": serviceSubscriptions[i][FIELD.ID.IS_PERMITTED],
                                 "id": i
-                            });}
+                            });
+                        }
                         successCallbackFunction(serviceTypes);
                     } else {
                         successCallbackFunction([]);
@@ -428,20 +440,20 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
                 (UtilityService.runHttpErrorHandler);
             }
         },
-        getLcpCloudRegionTenantList : function(globalCustomerId, serviceType,
+        getLcpCloudRegionTenantList: function (globalCustomerId, serviceType,
                                                successCallbackFunction) {
             let self = this;
             $log
                 .debug("AaiService:getLcpCloudRegionTenantList: globalCustomerId: "
                     + globalCustomerId);
-            var url =   COMPONENT.AAI_GET_TENANTS
+            var url = COMPONENT.AAI_GET_TENANTS
                 + globalCustomerId + COMPONENT.FORWARD_SLASH + serviceType + COMPONENT.ASSIGN + Math.random();
 
             $http.get(url,
                 {
-                    timeout : PropertyService
+                    timeout: PropertyService
                         .getServerResponseTimeoutMsec()
-                }).then(function(response) {
+                }).then(function (response) {
                 var lcpCloudRegionTenants = [];
                 var aaiLcpCloudRegionTenants = response.data;
 
@@ -456,24 +468,25 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
                         "cloudRegionOptionId": cloudRegionOptionId,
                         "tenantName": aaiLcpCloudRegionTenants[i][COMPONENT.TENANT_NAME],
                         "tenantId": aaiLcpCloudRegionTenants[i][COMPONENT.TENANT_ID],
-                        "isPermitted": aaiLcpCloudRegionTenants[i][COMPONENT.IS_PERMITTED]});
+                        "isPermitted": aaiLcpCloudRegionTenants[i][COMPONENT.IS_PERMITTED]
+                    });
                 }
 
                 successCallbackFunction(lcpCloudRegionTenants);
-            }).catch(function(error) {
+            }).catch(function (error) {
                 (UtilityService.runHttpErrorHandler(error.data, error.status));
             })
         },
-        getSubscribers : function(successCallbackFunction) {
+        getSubscribers: function (successCallbackFunction) {
             $log
                 .debug("AaiService:getSubscribers");
-            var url =  FIELD.ID.AAI_GET_SUBSCRIBERS + COMPONENT.ASSIGN + Math.random();
+            var url = FIELD.ID.AAI_GET_SUBSCRIBERS + COMPONENT.ASSIGN + Math.random();
 
             $http.get(url,
                 {
-                    timeout : PropertyService
+                    timeout: PropertyService
                         .getServerResponseTimeoutMsec()
-                }).then(function(response) {
+                }).then(function (response) {
                 if (response.data) {
                     successCallbackFunction(response.data.customer);
                 } else {
@@ -482,16 +495,16 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             })["catch"]
             (UtilityService.runHttpErrorHandler);
         },
-        getProvOptionsFromSystemProp : function(successCallbackFunction) {
+        getProvOptionsFromSystemProp: function (successCallbackFunction) {
             $log
                 .debug("AaiService:getProvOptionsFromSystemProp");
-            var url =  COMPONENT.GET_SYSTEM_PROP_VNF_PROV_STATUS_PATH;
+            var url = COMPONENT.GET_SYSTEM_PROP_VNF_PROV_STATUS_PATH;
 
             $http.get(url,
                 {
-                    timeout : PropertyService
+                    timeout: PropertyService
                         .getServerResponseTimeoutMsec()
-                }).then(function(response) {
+                }).then(function (response) {
                 if (response.data) {
                     successCallbackFunction(response);
                 } else {
@@ -500,7 +513,7 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             })["catch"]
             (UtilityService.runHttpErrorHandler);
         },
-        getLoggedInUserID : function(successCallbackFunction, catchCallbackFunction) {
+        getLoggedInUserID: function (successCallbackFunction, catchCallbackFunction) {
             $log
                 .debug("AaiService:getLoggedInUserID");
             var url = COMPONENT.GET_USER_ID;
@@ -510,25 +523,25 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
                     transformResponse: [function (data) {
                         return data;
                     }],
-                    timeout : PropertyService
+                    timeout: PropertyService
                         .getServerResponseTimeoutMsec()
-                }).then(function(response) {
+                }).then(function (response) {
                 if (response.data) {
                     successCallbackFunction(response);
                 } else {
                     successCallbackFunction([]);
                 }
-            })["catch"] (function(response, status) {
+            })["catch"](function (response, status) {
                 if (catchCallbackFunction) {
                     catchCallbackFunction();
                 }
                 UtilityService.runHttpErrorHandler(response, status);
             })
         },
-        getServices : function(successCallbackFunction) {
+        getServices: function (successCallbackFunction) {
             $log
                 .debug("AaiService:getServices");
-            var url =  COMPONENT.AAI_GET_SERVICES + COMPONENT.ASSIGN + Math.random();
+            var url = COMPONENT.AAI_GET_SERVICES + COMPONENT.ASSIGN + Math.random();
 
             $http.get(url,
                 {
@@ -547,21 +560,22 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
         getAicZones: function (successCallbackFunction) {
             $log
                 .debug("getAicZones:getAicZones");
-            var url = COMPONENT.AAI_GET_AIC_ZONES +COMPONENT.ASSIGN + Math.random();
+            var url = COMPONENT.AAI_GET_AIC_ZONES + COMPONENT.ASSIGN + Math.random();
 
             $http.get(url,
                 {
-                    timeout : PropertyService
+                    timeout: PropertyService
                         .getServerResponseTimeoutMsec()
-                }).then(function(response) {
+                }).then(function (response) {
                 if (response.data) {
                     successCallbackFunction(response);
                 } else {
                     successCallbackFunction([]);
                 }
             })["catch"]
-            (UtilityService.runHttpErrorHandler);},
-        getAicZoneForPNF: function (globalCustomerId,serviceType,serviceInstanceId,successCallbackFunction) {
+            (UtilityService.runHttpErrorHandler);
+        },
+        getAicZoneForPNF: function (globalCustomerId, serviceType, serviceInstanceId, successCallbackFunction) {
             $log
                 .debug("getAicZones:getAicZones");
             var url = COMPONENT.AAI_GET_AIC_ZONE_FOR_PNF
@@ -570,23 +584,24 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
                 .replace('@serviceType', serviceType);
             $http.get(url,
                 {
-                    timeout : PropertyService
+                    timeout: PropertyService
                         .getServerResponseTimeoutMsec()
-                }).then(function(response) {
+                }).then(function (response) {
                 successCallbackFunction(response.data);
             })["catch"]
-            (UtilityService.runHttpErrorHandler);},
+            (UtilityService.runHttpErrorHandler);
+        },
 
-        getServiceModels : function(globalCustomerId,serviceType,successCallbackFunction) {
+        getServiceModels: function (globalCustomerId, serviceType, successCallbackFunction) {
             $log
                 .debug("AaiService:getServices");
-            var url =   COMPONENT.AAI_GET_SERVICES + COMPONENT.FORWARD_SLASH+globalCustomerId+ COMPONENT.FORWARD_SLASH +serviceType+COMPONENT.ASSIGN + Math.random();
+            var url = COMPONENT.AAI_GET_SERVICES + COMPONENT.FORWARD_SLASH + globalCustomerId + COMPONENT.FORWARD_SLASH + serviceType + COMPONENT.ASSIGN + Math.random();
 
             $http.get(url,
                 {
-                    timeout : PropertyService
+                    timeout: PropertyService
                         .getServerResponseTimeoutMsec()
-                }).then(function(response) {
+                }).then(function (response) {
                 if (response.data) {
                     successCallbackFunction(response);
                 } else {
@@ -595,16 +610,16 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             })["catch"]
             (UtilityService.runHttpErrorHandler);
         },
-        getServiceModelsByServiceType : function(namedQueryId,globalCustomerId,serviceType,successCallbackFunction) {
+        getServiceModelsByServiceType: function (namedQueryId, globalCustomerId, serviceType, successCallbackFunction) {
             $log
                 .debug("AaiService:getServiceModelsByServiceType");
-            var url =   COMPONENT.AAI_GET_SERVICES_BY_TYPE+COMPONENT.FORWARD_SLASH+namedQueryId+COMPONENT.FORWARD_SLASH+globalCustomerId+COMPONENT.FORWARD_SLASH +serviceType+COMPONENT.ASSIGN + Math.random();
+            var url = COMPONENT.AAI_GET_SERVICES_BY_TYPE + COMPONENT.FORWARD_SLASH + namedQueryId + COMPONENT.FORWARD_SLASH + globalCustomerId + COMPONENT.FORWARD_SLASH + serviceType + COMPONENT.ASSIGN + Math.random();
 
             $http.get(url,
                 {
-                    timeout : PropertyService
+                    timeout: PropertyService
                         .getServerResponseTimeoutMsec()
-                }).then(function(response) {
+                }).then(function (response) {
                 if (response.data) {
                     successCallbackFunction(response);
                 } else {
@@ -614,16 +629,27 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             (UtilityService.runHttpErrorHandler);
         },
 
-               getVnfsByCustomerIdAndServiceType: function(globalSubscriberId, serviceType){
+        getVnfsByCustomerIdAndServiceType: function (globalSubscriberId, serviceType, vnfRole, cloudRegion) {
             var deferred = $q.defer();
 
+            let url = globalSubscriberId + COMPONENT.FORWARD_SLASH + serviceType
+
+            if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH)){
+                if (vnfRole) {
+                    url + COMPONENT.FORWARD_SLASH + vnfRole
+                }
+                if (cloudRegion) {
+                    url + COMPONENT.FORWARD_SLASH + cloudRegion;
+                }
+            }
+
+
             if (UtilityService.hasContents(globalSubscriberId) &&
-                               UtilityService.hasContents(serviceType) ) {
+                UtilityService.hasContents(serviceType)) {
 
-                $http.get(COMPONENT.AAI_GET_VNF_BY_CUSTOMERID_AND_SERVICETYPE + globalSubscriberId + COMPONENT.FORWARD_SLASH
-                                       + serviceType )
+                $http.get(COMPONENT.AAI_GET_VNF_BY_CUSTOMERID_AND_SERVICETYPE + url)
                     .success(function (response) {
-                        if(response) {
+                        if (response) {
                             deferred.resolve({data: response});
                         } else {
                             deferred.resolve({data: []});
@@ -636,15 +662,15 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             return deferred.promise;
         },
 
-        getVnfVersionsByInvariantId: function(modelInvariantId){
+        getVnfVersionsByInvariantId: function (modelInvariantId) {
             var deferred = $q.defer();
 
             if (UtilityService.hasContents(modelInvariantId)) {
                 var body = {"versions": modelInvariantId};
-                $http.post(( COMPONENT.AAI_GET_VERSION_BY_INVARIANT_ID),body)
+                $http.post((COMPONENT.AAI_GET_VERSION_BY_INVARIANT_ID), body)
 
                     .success(function (response) {
-                        if(response) {
+                        if (response) {
                             deferred.resolve({data: response});
                         } else {
                             deferred.resolve({data: []});
@@ -658,15 +684,14 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
         },
 
 
-
-        getSubscriberServiceTypes: function(subscriberUuid) {
+        getSubscriberServiceTypes: function (subscriberUuid) {
             var deferred = $q.defer();
             $log.debug("AaiService:getSubscriberServiceTypes: subscriberUuid: " + subscriberUuid);
 
             if (UtilityService.hasContents(subscriberUuid)) {
                 $http.get(COMPONENT.AAI_SUB_DETAILS_PATH + subscriberUuid + COMPONENT.ASSIGN + Math.random())
                     .success(function (response) {
-                        if(response && [FIELD.ID.SERVICE_SUBSCRIPTIONS]) {
+                        if (response && [FIELD.ID.SERVICE_SUBSCRIPTIONS]) {
                             deferred.resolve({data: response[FIELD.ID.SERVICE_SUBSCRIPTIONS][FIELD.ID.SERVICE_SUBSCRIPTION]});
                         } else {
                             deferred.resolve({data: []});
@@ -678,30 +703,30 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
 
             return deferred.promise;
         },
-        getVnfInstancesList: function(globalSubscriberId, serviceType, modelVersionId ,modelInvariantId, cloudRegionId)  {
+        getVnfInstancesList: function (globalSubscriberId, serviceType, modelVersionId, modelInvariantId, cloudRegionId) {
             var deferred = $q.defer();
             $http.get([COMPONENT.AAI_GET_VNF_INSTANCES_LIST,
-                    globalSubscriberId,
-                    serviceType,
-                    modelVersionId,
-                    modelInvariantId,
-                    cloudRegionId]
+                globalSubscriberId,
+                serviceType,
+                modelVersionId,
+                modelInvariantId,
+                cloudRegionId]
                 .join(COMPONENT.FORWARD_SLASH))
                 .success(function (response) {
                     deferred.resolve(response);
                 }).error(function (data, status) {
-                    deferred.reject({message: data, status: status});
+                deferred.reject({message: data, status: status});
             });
             return deferred.promise;
         },
         getPnfInstancesList: function (globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegionId, equipVendor, equipModel) {
             var deferred = $q.defer();
             $http.get([COMPONENT.AAI_GET_PNF_INSTANCES_LIST,
-                    globalCustomerId, serviceType,
-                    modelVersionId, modelInvariantId,
-                    cloudRegionId,
-                    equipVendor, equipModel
-                ].join(COMPONENT.FORWARD_SLASH))
+                globalCustomerId, serviceType,
+                modelVersionId, modelInvariantId,
+                cloudRegionId,
+                equipVendor, equipModel
+            ].join(COMPONENT.FORWARD_SLASH))
                 .success(function (response) {
                     deferred.resolve(response);
                 }).error(function (data, status) {
@@ -709,19 +734,19 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             });
             return deferred.promise;
         },
-        getByUri: function(uri)  {
+        getByUri: function (uri) {
             var deferred = $q.defer();
 
             $http.get(COMPONENT.AAI_GET_BY_URI + uri)
                 .success(function (response) {
                     deferred.resolve({data: []});
                 }).error(function (data, status, headers, config) {
-                    deferred.reject({message: data, status: status});
-                });
+                deferred.reject({message: data, status: status});
+            });
 
             return deferred.promise;
         },
-        getConfiguration: function(configurationId)  {
+        getConfiguration: function (configurationId) {
             var deferred = $q.defer();
 
             $http.get(COMPONENT.AAI_GET_CONFIGURATION + configurationId)
@@ -765,7 +790,7 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             return ('option-' + cloudOwner + '-' + cloudRegionId).toLowerCase();
         },
 
-        getHomingData: function(vnfInstanceId, vfModuleId)  {
+        getHomingData: function (vnfInstanceId, vfModuleId) {
             let self = this;
             var url = COMPONENT.AAI_GET_HOMING_DATA.replace('@vnfInstanceId', vnfInstanceId)
                 .replace('@vfModuleId', vfModuleId);
@@ -791,7 +816,7 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
 
         },
 
-        removeVendorFromCloudOwner: function(cloudOwner) {
+        removeVendorFromCloudOwner: function (cloudOwner) {
             // Handle the case where cloud owner is formatted
             // like "{vendor}-{cloud-name}"
             return cloudOwner.trim().replace(/^[^-]*-/, '');
index dbc603c..2d888bf 100644 (file)
@@ -40,7 +40,8 @@ import static org.hamcrest.core.IsNot.not;
 
 public class ChangeManagementTest extends VidBaseTestCase {
 
-    public static final  String SCHEDULED_ID = "0b87fe60-50b0-4bac-a0a7-49e951b0ba9e";
+    public static final String SCHEDULED_ID = "0b87fe60-50b0-4bac-a0a7-49e951b0ba9e";
+
     @Test
     public void testLeftPanelChangeManagementButton() {
         Assert.assertTrue(Wait.byText(Constants.SideMenu.VNF_CHANGES));
@@ -79,8 +80,10 @@ public class ChangeManagementTest extends VidBaseTestCase {
         SelectOption.waitForOptionInSelect(subscriberName, "subscriberName");
         ChangeManagementPage.selectSubscriberById(subscriberId);
         Wait.angularHttpRequestsLoaded();
+
         SelectOption.byIdAndVisibleText(Constants.ChangeManagement.newModalServiceTypeInputId, serviceType);
         Wait.angularHttpRequestsLoaded();
+
         SelectOption.byIdAndVisibleText(Constants.ChangeManagement.newModalVNFTypeInputId, vnfType);
         Wait.angularHttpRequestsLoaded();
         SelectOption.byIdAndVisibleText(Constants.ChangeManagement.newModalFromVNFVersionInputId, vnfSourceVersion);
@@ -161,16 +164,16 @@ public class ChangeManagementTest extends VidBaseTestCase {
         SimulatorApi.clearAll();
         SimulatorApi.registerExpectation(SimulatorApi.RegistrationStrategy.APPEND,
                 "changeManagement/ecompportal_getSessionSlotCheckInterval.json"
-                        , "changeManagement/get_aai_sub_details.json"
-                        , "changeManagement/get_sdc_catalog_services_2f80c596.json"
-                        , "changeManagement/get_service-design-and-creation.json"
-                        , "changeManagement/get_vnf_data_by_globalid_and_service_type.json"
-                        , "changeManagement/service-design-and-creation.json"
-                        , "changeManagement/mso_get_manual_task.json"
-                        , "changeManagement/mso_post_manual_task.json"
-                        , "changeManagement/mso_get_change_managements_scaleout.json"
+                , "changeManagement/get_aai_sub_details.json"
+                , "changeManagement/get_sdc_catalog_services_2f80c596.json"
+                , "changeManagement/get_service-design-and-creation.json"
+                , "changeManagement/get_vnf_data_by_globalid_and_service_type.json"
+                , "changeManagement/service-design-and-creation.json"
+                , "changeManagement/mso_get_manual_task.json"
+                , "changeManagement/mso_post_manual_task.json"
+                , "changeManagement/mso_get_change_managements_scaleout.json"
         );
-        SimulatorApi.registerExpectationFromPreset(new PresetAAIGetSubscribersGet(),SimulatorApi.RegistrationStrategy.APPEND);
+        SimulatorApi.registerExpectationFromPreset(new PresetAAIGetSubscribersGet(), SimulatorApi.RegistrationStrategy.APPEND);
 
         registerDefaultTablesData();
         resetGetServicesCache();
@@ -178,9 +181,9 @@ public class ChangeManagementTest extends VidBaseTestCase {
 
     private void registerDefaultTablesData() {
         SimulatorApi.registerExpectation(
-                new String[] {"changeManagement/get_scheduler_details_short.json",
+                new String[]{"changeManagement/get_scheduler_details_short.json",
                         "changeManagement/mso_get_change_managements.json"
-                        ,"changeManagement/delete_scheduled_task.json"},
+                        , "changeManagement/delete_scheduled_task.json"},
                 ImmutableMap.of(
                         "<SCHEDULE_ID>", SCHEDULED_ID,
                         "<IN_PROGRESS_DATE>", "Fri, 08 Sep 2017 19:34:32 GMT"), SimulatorApi.RegistrationStrategy.APPEND
@@ -259,7 +262,7 @@ public class ChangeManagementTest extends VidBaseTestCase {
     @Test
     public void clickOnScheduledJob_SuccessfulMessageAppear() {
 
-        SimulatorApi.registerExpectationFromPreset(new PresetDeleteSchedulerChangeManagement(),SimulatorApi.RegistrationStrategy.APPEND);
+        SimulatorApi.registerExpectationFromPreset(new PresetDeleteSchedulerChangeManagement(), SimulatorApi.RegistrationStrategy.APPEND);
 
         ChangeManagementPage.openChangeManagementPage();
         GeneralUIUtils.ultimateWait();
@@ -279,13 +282,14 @@ public class ChangeManagementTest extends VidBaseTestCase {
 
     }
 
-    private void clickAndAssertOnCancelButton(String scheduledID){
-        Wait.waitByTestId("icon-status-"+ scheduledID, 5);
-        Click.byTestId("icon-status-"+ scheduledID);
+    private void clickAndAssertOnCancelButton(String scheduledID) {
+        Wait.waitByTestId("icon-status-" + scheduledID, 5);
+        Click.byTestId("icon-status-" + scheduledID);
         GeneralUIUtils.ultimateWait();
         WebElement cancelPendingConfirmationMessage = Get.byTestId("btn-cancel-workflow");
-        assertThat(cancelPendingConfirmationMessage.getText(),containsString("Are you sure you want to delete workflow"));
+        assertThat(cancelPendingConfirmationMessage.getText(), containsString("Are you sure you want to delete workflow"));
     }
+
     private void clickAndAssertClickOnCancelWorkflowButtonOnPendingPopUp() {
 
         try {
@@ -293,14 +297,14 @@ public class ChangeManagementTest extends VidBaseTestCase {
             GeneralUIUtils.ultimateWait();
             Assert.assertTrue(Exists.byClassAndText(Constants.generalModalTitleClass, "Success"));
         } finally {
-            if (Exists.byClassAndText("modal-title", "Pending")){
+            if (Exists.byClassAndText("modal-title", "Pending")) {
                 Click.byClass("pull-right modal-close");
             }
         }
-        Click.byClassAndVisibleText("btn","OK");
+        Click.byClassAndVisibleText("btn", "OK");
     }
 
-    private void assertCorrectJobDeleted (String vnfName){
+    private void assertCorrectJobDeleted(String vnfName) {
         WebElement canceledScheduledJobRow = GeneralUIUtils.getWebElementByTestID("pending-table-cm-row");
         String scheduledVnfName = ((RemoteWebElement) canceledScheduledJobRow).findElementsByTagName("td").get(1).getText();
         String scheduledState = ((RemoteWebElement) canceledScheduledJobRow).findElementsByTagName("td").get(5).getText();
@@ -308,14 +312,14 @@ public class ChangeManagementTest extends VidBaseTestCase {
         Assert.assertEquals("Deleted", scheduledState);
     }
 
-    private void assertAndCheckStatusCellOnDeletedSheduledJob(String scheduledId, String classString){
+    private void assertAndCheckStatusCellOnDeletedSheduledJob(String scheduledId, String classString) {
         boolean isNotDisplayed = GeneralUIUtils.waitForElementInVisibilityByTestId("icon-status-" + scheduledId, 5);
         Assert.assertTrue(isNotDisplayed);
     }
 
-    public void updateSimulatorWithParametersOfScheduledJod(String jasonFile){
+    public void updateSimulatorWithParametersOfScheduledJod(String jasonFile) {
         SimulatorApi.registerExpectation(
-                new String[] {"changeManagement/"+jasonFile},
+                new String[]{"changeManagement/" + jasonFile},
                 ImmutableMap.of("<SCHEDULE_ID>", SCHEDULED_ID), SimulatorApi.RegistrationStrategy.APPEND
         );
     }
@@ -330,7 +334,7 @@ public class ChangeManagementTest extends VidBaseTestCase {
 
     @FeatureTogglingTest(value = Features.FLAG_HANDLE_SO_WORKFLOWS, flagActive = false)
     @Test
-    public void testWorkflowVNFInPlaceSoftwareUpdateInWorkflowsListWhenExpected()  {
+    public void testWorkflowVNFInPlaceSoftwareUpdateInWorkflowsListWhenExpected() {
         List<String> workflows = getListOfWorkflowsFor(VNF_DATA_WITH_IN_PLACE.vnfName);
         assertThat(workflows, hasItem(VNF_DATA_WITH_IN_PLACE.workflowName));
     }
@@ -438,19 +442,18 @@ public class ChangeManagementTest extends VidBaseTestCase {
 
     @DataProvider
     public static Object[][] dataForUpdateWorkflowPartialWithInPlace() {
-        return new Object[][] {
-                { "1111", "22222", "33333" }
+        return new Object[][]{
+                {"1111", "22222", "33333"}
                 , {"8", "3t3MhTRqkyjB85o5NC9OacAw", "B.bJ6f7KYI6Wz-----DMR0.fyNM9r4"}
                 , {"78058488", "n", "WkH"}
         };
     }
-    
-    // Deleted testVidToMsoCallbackDataWithInPlaceSWUpdate test. It was using assertThatVidToMsoCallbackDataIsOk which is no longer valid.
 
+    // Deleted testVidToMsoCallbackDataWithInPlaceSWUpdate test. It was using assertThatVidToMsoCallbackDataIsOk which is no longer valid.
 
 
     // Deleted testUploadConfigUpdateFile test. It was using assertThatVidToMsoCallbackDataIsOk which is no longer valid.
-
+    @FeatureTogglingTest(value = Features.FLAG_NEW_FILTER_CHANGE_MANAGMENT, flagActive = false)
     @Test
     public void testUploadConfigUpdateNonCsvFile() {
         String fileName = "non-valid.json";
@@ -470,7 +473,7 @@ public class ChangeManagementTest extends VidBaseTestCase {
 
     @DataProvider
     public static Object[][] invalidCsvFiles() {
-        return new Object[][] {
+        return new Object[][]{
                 {"emptyFile.csv"},
                 {"withoutPayload.csv"},
                 {"withoutConfigurationParameters.csv"},
@@ -544,15 +547,15 @@ public class ChangeManagementTest extends VidBaseTestCase {
     public void testFinishedSectionIncludeUnlockedItem() {
         ChangeManagementPage.openChangeManagementPage();
         Click.byId(Constants.ChangeManagement.dashboardFinishedTabId);
-        Assert.assertThat(Get.byClassAndText("vnf-name","Unlocked instance"),is(notNullValue()));
+        Assert.assertThat(Get.byClassAndText("vnf-name", "Unlocked instance"), is(notNullValue()));
     }
 
     @Test
-    public void testMainDashboardTableContent () {
+    public void testMainDashboardTableContent() {
         ChangeManagementPage.openChangeManagementPage();
         GeneralUIUtils.ultimateWait();
         List<WebElement> webElements = Get.multipleElementsByTestId(Constants.ChangeManagement.activeTableRowId);
-        assertThat("List of pending workflows is empty",webElements,is(not(empty())));
+        assertThat("List of pending workflows is empty", webElements, is(not(empty())));
         //TODO: After scheduler will be ready than we will examine if the content is valid.
     }
 
@@ -567,11 +570,10 @@ public class ChangeManagementTest extends VidBaseTestCase {
         GeneralUIUtils.ultimateWait();
 
 
-
         List<WebElement> elements = Get.byClass(Constants.ChangeManagement.pendingIconClass);
         Assert.assertTrue(elements != null && elements.size() > 0);
 
-        ((JavascriptExecutor)getDriver()).executeScript("arguments[0].scrollIntoView();", elements.get(0));
+        ((JavascriptExecutor) getDriver()).executeScript("arguments[0].scrollIntoView();", elements.get(0));
 
 
         elements.get(0).click();
@@ -592,7 +594,7 @@ public class ChangeManagementTest extends VidBaseTestCase {
     public void testOpenFailedStatusModal() {
         ChangeManagementPage.openChangeManagementPage();
 
-        if(!Exists.byClass(Constants.ChangeManagement.failedIconClass)) {
+        if (!Exists.byClass(Constants.ChangeManagement.failedIconClass)) {
             //TODO: Create a job which will shown with status fail.
         }
 
@@ -612,7 +614,7 @@ public class ChangeManagementTest extends VidBaseTestCase {
     public void testOpenInProgressStatusModal() {
         ChangeManagementPage.openChangeManagementPage();
 
-        if(!Exists.byClass(Constants.ChangeManagement.processIconClass)) {
+        if (!Exists.byClass(Constants.ChangeManagement.processIconClass)) {
             //TODO: Create a job which will shown with status in-progress.
         }
 
@@ -632,7 +634,7 @@ public class ChangeManagementTest extends VidBaseTestCase {
     public void testOpenAlertStatusModal() {
         ChangeManagementPage.openChangeManagementPage();
 
-        if(!Exists.byClass(Constants.ChangeManagement.alertIconClass)) {
+        if (!Exists.byClass(Constants.ChangeManagement.alertIconClass)) {
             //TODO: Create a job which will shown with status alert.
         }
 
@@ -652,7 +654,7 @@ public class ChangeManagementTest extends VidBaseTestCase {
     public void testOpenPendingStatusModal() {
         ChangeManagementPage.openChangeManagementPage();
 
-        if(!Exists.byClass(Constants.ChangeManagement.pendingIconClass)) {
+        if (!Exists.byClass(Constants.ChangeManagement.pendingIconClass)) {
             //TODO: Create a job which will shown with status pending.
         }
 
@@ -696,13 +698,13 @@ public class ChangeManagementTest extends VidBaseTestCase {
         GeneralUIUtils.ultimateWait();
         List<WebElement> pendingRows = Get.multipleElementsByTestId(Constants.ChangeManagement.pendingTableRowId);
         List<WebElement> activeRows = Get.multipleElementsByTestId(Constants.ChangeManagement.activeTableRowId);
-        assertThat("The pending table has no content",pendingRows, is(not(empty())));
-        assertThat("The active table has no content",activeRows, is(not(empty())));
+        assertThat("The pending table has no content", pendingRows, is(not(empty())));
+        assertThat("The active table has no content", activeRows, is(not(empty())));
         Click.byTestId(Constants.ChangeManagement.refreshBtnTestId);
         GeneralUIUtils.ultimateWait();
         pendingRows = Get.multipleElementsByTestId(Constants.ChangeManagement.pendingTableRowId);
-        assertThat("The pending table has no content",pendingRows, is(not(empty())));
-        assertThat("The active table has no content",activeRows, is(not(empty())));
+        assertThat("The pending table has no content", pendingRows, is(not(empty())));
+        assertThat("The active table has no content", activeRows, is(not(empty())));
         //return the register requests to the default state
         registerDefaultTablesData();
     }