Merge from ecomp 3374149f - AngularJS UI 87/91587/2
authorIttay Stern <ittay.stern@att.com>
Wed, 17 Jul 2019 10:26:12 +0000 (13:26 +0300)
committerIttay Stern <ittay.stern@att.com>
Thu, 18 Jul 2019 02:00:08 +0000 (02:00 +0000)
Issue-ID: VID-378

Change-Id: I6b3243b492009035c911f63b93258ea76938fcb9
Signed-off-by: Ittay Stern <ittay.stern@att.com>
15 files changed:
vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js
vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js
vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js
vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js
vid-app-common/src/main/webapp/app/vid/scripts/controller/testEnvironmentsController.js
vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js
vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html
vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js
vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js

index 5c58018..3d6ed67 100755 (executable)
@@ -77,7 +77,7 @@ appDS2
     TENANT_ID: "tenantID",
     TENANT_NAME: "tenantName",
     TRUE: "true",
-    UCPE_VMS: "uCPE-VMS",
+    UCPE_VMS: "JOSEFINA",
     VF_MODULE: "vfModule",
     VNF: "vnf",
     VNF_CODE: "vnfCode",
@@ -92,7 +92,7 @@ appDS2
     //COMPONENT_LIST_NAMED_QUERY_ID : "ed0a0f5b-cf79-4784-88b2-911cd726cd3d",
     CUSTOMER_ID_1: "icore9883749",
     DELETE_INSTANCE_ID_1: "ff305d54-75b4-ff1b-fff1-eb6b9e5460ff",
-    GATEWAY_ADDRESS_1: "10.10.125.1",
+    GATEWAY_ADDRESS_1: "10.0.0.10",
     GLOBAL_SUBSCRIBER_ID_1: "C12345",
     INSTANCE_ID_1: "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
     INSTANCE_ID_2: "ff305d54-75b4-ff1b-adb2-eb6b9e5460ff",
@@ -129,6 +129,7 @@ appDS2
     AAI_GET_SERVICES_BY_TYPE: "aai_get_models_by_service_type",
     AAI_GET_TENANTS: "aai_get_tenants/",
     AAI_SUB_DETAILS_PATH: "aai_sub_details/",
+    AAI_OMIT_SERVICE_INSTANCES : "&omitServiceInstances=",
     AAI_GET_VERSION_BY_INVARIANT_ID: "aai_get_version_by_invariant_id/",
     AAI_GET_PORT_MIRRORING_CONFIGS_DATA: "aai_getPortMirroringConfigsData",
     AAI_GET_PORT_MIRRORING_SOURCE_PORTS: "aai_getPortMirroringSourcePorts",
@@ -248,18 +249,19 @@ appDS2
       FLAG_ASYNC_INSTANTIATION: "FLAG_ASYNC_INSTANTIATION",
       FLAG_NETWORK_TO_ASYNC_INSTANTIATION: "FLAG_NETWORK_TO_ASYNC_INSTANTIATION",
       FLAG_ADD_MSO_TESTAPI_FIELD: "FLAG_ADD_MSO_TESTAPI_FIELD",
-      FLAG_COLLECTION_RESOURCE_SUPPORT: "FLAG_COLLECTION_RESOURCE_SUPPORT",
       FLAG_SHOW_ASSIGNMENTS: "FLAG_SHOW_ASSIGNMENTS",
       FLAG_SHOW_VERIFY_SERVICE: "FLAG_SHOW_VERIFY_SERVICE",
       FLAG_PNP_INSTANTIATION: "FLAG_PNP_INSTANTIATION",
-      FLAG_DUPLICATE_VNF: "FLAG_DUPLICATE_VNF",
       FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS: "FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS",
       FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS: "FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS",
       FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST: "FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST",
       FLAG_1810_CR_LET_SELECTING_COLLECTOR_TYPE_UNCONDITIONALLY: "FLAG_1810_CR_LET_SELECTING_COLLECTOR_TYPE_UNCONDITIONALLY",
       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_CREATE_ERROR_REPORTS: "FLAG_CREATE_ERROR_REPORTS",
+      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 6b77cb0..a460130 100755 (executable)
@@ -187,7 +187,7 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) {
        SERVICE_UUID : "Service UUID",\r
        SERVICE_VERSION : "Service Version",\r
        SUBSCRIBER_NAME : "Subscriber Name",\r
-       MOBILITY :  "Mobility",\r
+       EMANUEL :  "Emanuel",\r
        SUPPRESS_ROLLBACK : "Suppress Rollback on Failure",\r
        SDN_C_PRELOAD : "SDN-C Pre-Load",\r
        UPLOAD_SUPPLEMENTORY_DATA_FILE : "Upload Supplementary Data file",\r
@@ -488,7 +488,7 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) {
         LINE_OF_BUSINESS: {\r
             name: NAME.LINE_OF_BUSINESS,\r
             id: ID.LINE_OF_BUSINESS,\r
-            type: PARAMETER.MULTI_SELECT,\r
+            type: PARAMETER.SELECT,\r
             isEnabled: true,\r
             prompt: PROMPT.LINE_OF_BUSINESS,\r
             isRequired: false\r
index a93c01f..7c23850 100755 (executable)
@@ -125,6 +125,6 @@ appDS2.constant("VIDCONFIGURATION", (function() {
        COMPONENT_LIST_NAMED_QUERY_ID : COMPONENT_LIST_NAMED_QUERY_ID,\r
         SCHEDULER_CALLBACK_URL: SCHEDULER_CALLBACK_URL,\r
         SCHEDULER_PORTAL_URL: SCHEDULER_PORTAL_URL,\r
-               SDNC_SHOW_ASSIGNMENTS_URL: SDNC_SHOW_ASSIGNMENTS_URL\r
+           SDNC_SHOW_ASSIGNMENTS_URL: SDNC_SHOW_ASSIGNMENTS_URL\r
     };\r
 })())\r
index 3c11594..6eed080 100755 (executable)
@@ -74,7 +74,7 @@
             };\r
 \r
 \r
-            $scope.isCR = !_.isEmpty($scope.service.model.collectionResource) && featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_COLLECTION_RESOURCE_SUPPORT);\r
+            $scope.isCR = !_.isEmpty($scope.service.model.collectionResources);\r
             if ($scope.isCR)\r
                 prepareCr();\r
             else\r
             });\r
         };\r
 \r
+        $scope.allowTransferToNewScreenAndShowButton = function (){\r
+          if(featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FLASH_REPLACE_VF_MODULE)) {\r
+              return $scope.isPermitted && !($scope.isMacro());\r
+          }\r
+          return false;\r
+        };\r
+\r
         $scope.deleteService = function (serviceObject, serviceOrchestrationStatus) {\r
 \r
             var serviceInstance = serviceObject.object;\r
         $scope.resume = function (serviceObject, vfModule, vnfModel) {\r
             populate_popup_vfModule(serviceObject, vfModule, vnfModel);\r
             setCurrentVNFModelInfo(vnfModel);\r
+\r
+            var availableVolumeGroupList = [];\r
+            angular.forEach(vfModule.volumeGroups, function (volumeGroupInstance, key) {\r
+                availableVolumeGroupList.push({"instance": volumeGroupInstance});\r
+            });\r
+\r
+            DataService.setAvailableVolumeGroupList(availableVolumeGroupList);\r
+\r
             DataService.setVfModuleInstanceName(vfModule.object[FIELD.ID.VF_MODULE_NAME]);\r
             setCurrentServiceModelInfoFromScope();\r
 \r
             else {\r
                 $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
                     componentId: COMPONENT.VF_MODULE,\r
+                    volumeGroups: vfModule.volumeGroups,\r
                     callbackFunction: deleteOrResumeCallback,\r
                     dialogMethod: COMPONENT.RESUME\r
                 });\r
index 62ef1a4..9cb9050 100755 (executable)
@@ -64,7 +64,8 @@
                     $scope.currentPageNum=1;\r
                     $scope.isSpinnerVisible = false;\r
                     $scope.isProgressVisible = false;\r
-                    if (sessionStorage.getItem("searchKey")!='undefined' && ($scope.rememberFilter)) {\r
+                                       var searchKey = sessionStorage.getItem("searchKey");\r
+                    if (searchKey != 'undefined' && searchKey!=null && ($scope.rememberFilter)) {\r
                         var searchKey = JSON.parse(sessionStorage.getItem("searchKey"));\r
                         $scope.searchString = searchKey.searchString || '';\r
                         $scope.viewPerPage = searchKey.viewPerPage || defaultViewPerPage;\r
                     DataService.setShouldIncludeInAsyncInstantiationFlow(shouldTakeTheAsyncInstantiationFlow);\r
 \r
                     DataService.setALaCarte (true);\r
-          DataService.setPnf(!angular.equals(serviceModel.pnfs, {}));\r
+                    DataService.setPnf(!angular.equals(serviceModel.pnfs, {}));\r
                                        $scope.createType = COMPONENT.A_LA_CARTE;\r
                                        var broadcastType = COMPONENT.CREATE_COMPONENT;\r
                     if (AsdcService.isMacro(serviceModel) || DataService.getE2EService()) {\r
index 1912518..ed03e3a 100755 (executable)
@@ -720,7 +720,17 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
         $scope.isConfigurationDataAvailiable = function (configuration) {\r
             $log.debug(configuration);\r
             return configuration.configData && (!configuration.configData.errorDescription);\r
-        }\r
+        };\r
+\r
+        $scope.allowConfigurationActions = function (configuration) {\r
+            $log.debug(configuration);\r
+            return configuration.nodeStatus &&\r
+                _.some(\r
+                    [FIELD.STATUS.AAI_ACTIVE, FIELD.STATUS.AAI_INACTIVE, FIELD.STATUS.AAI_CREATED],\r
+                    function (s) {\r
+                        return s.toLowerCase() === configuration.nodeStatus.toLowerCase();\r
+                    });\r
+        };\r
 \r
         $scope.isActivateDeactivateEnabled = function(btnType) {\r
             if ($scope.serviceOrchestrationStatus) {\r
@@ -800,8 +810,11 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
 \r
         $scope.isResumeShown = function (status) {\r
             var vfModuleStatus = status.toLowerCase();\r
-            var serviceStatus = $scope.serviceOrchestrationStatus && $scope.serviceOrchestrationStatus.toLowerCase();\r
-            return _.includes(['pendingactivation', 'assigned'], vfModuleStatus) && !$scope.isActivateDeactivateEnabled("activate");\r
+            var vfModuleStatusHasAllowedResume = ['pendingactivation', 'assigned'];\r
+            if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_VF_MODULE_RESUME_STATUS_CREATE)) {\r
+                vfModuleStatusHasAllowedResume.push('created');\r
+            }\r
+            return _.includes(vfModuleStatusHasAllowedResume, vfModuleStatus) && !$scope.isActivateDeactivateEnabled("activate");\r
         };\r
 \r
         $scope.handleInitialResponseInventoryItems = function (response) {\r
@@ -1039,7 +1052,6 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
                                 if( !$scope.hasFabricConfigurations ) {\r
                                 portMirroringConfigurationIds.push(configObject[FIELD.ID.CONFIGURATION_ID]);\r
                                     $scope.service.instance[FIELD.ID.CONFIGURATIONS].push(config);\r
-                                $scope.allowConfigurationActions = [FIELD.STATUS.AAI_ACTIVE, FIELD.STATUS.AAI_INACTIVE, FIELD.STATUS.AAI_CREATED].indexOf(config.nodeStatus) != -1;\r
                                 } else {\r
                                    if (config.nodeStatus.toLowerCase() !== FIELD.STATUS.ASSIGNED.toLowerCase()) {\r
                                        $scope.allConfigurationsAssigned = false;\r
index d1a6ca5..d7b7bab 100644 (file)
@@ -20,8 +20,8 @@
 
 "use strict";
 
-var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $timeout, $log,
-    DeleteResumeService, CreationService, DataService, UtilityService) {
+var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $timeout, $log, DataService,
+                                             DeleteResumeService, CreationService, UtilityService) {
 
     $scope.isDialogVisible = false;
     $scope.summaryControl = {};
@@ -29,11 +29,12 @@ var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $t
 
     var callbackFunction = undefined;
     var componentId = undefined;
+    var volumeGroups = undefined;
     $scope.dialogMethod = COMPONENT.DELETE;
 
     $scope.$on(COMPONENT.DELETE_RESUME_COMPONENT, function(event, request) {
 
-    $scope.isE2EService = false;
+        $scope.isE2EService = false;
         $scope.isDataVisible = false;
         $scope.isSpinnerVisible = false;
         $scope.isErrorVisible = false;
@@ -44,7 +45,7 @@ var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $t
         $scope.serviceStatus = request.serviceStatus;
         callbackFunction = request.callbackFunction;
         componentId = request.componentId;
-
+        volumeGroups = request.volumeGroups ? request.volumeGroups : [];
         DeleteResumeService.initializeComponent(request.componentId);
 
         $scope.componentName = DeleteResumeService.getComponentDisplayName();
@@ -116,8 +117,17 @@ var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $t
             CreationService.initializeComponent(componentId);
             CreationService.setInventoryInfo();
 
-            var requestDetails = CreationService.getMsoRequestDetails($scope.userProvidedControl.getList());
+            var parameterList = $scope.userProvidedControl.getList();
+
+            if (volumeGroups && volumeGroups.length > 0) {
+                var volumeGroupList = FIELD.PARAMETER.AVAILABLE_VOLUME_GROUP;
+                volumeGroupList.value = _.map(volumeGroups, function (volumeGroup) {
+                    return volumeGroup.name;
+                });
+                parameterList.push(volumeGroupList);
+            }
 
+            var requestDetails = CreationService.getMsoRequestDetails(parameterList);
 
             $scope.$broadcast(COMPONENT.MSO_CREATE_REQ, {
                 url : CreationService.getMsoUrl(),
@@ -147,5 +157,5 @@ var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $t
 }
 
 appDS2.controller("deleteResumeDialogController", [ "COMPONENT", "FIELD", "$scope", "$http",
-               "$timeout", "$log", "DeleteResumeService","CreationService", "DataService", "UtilityService",
+    "$timeout", "$log", "DataService", "DeleteResumeService","CreationService", "UtilityService",
     deleteResumeDialogController]);
index c81dc87..9448690 100644 (file)
         };
 
         vm.isEnvActive = function(testEnv) {
-            return testEnv.operationalEnvironmentStatus==='Activate';
+            return testEnv.operationalEnvironmentStatus==='ACTIVE';
         };
 
         vm.getEnvStatus = function (testEnv) {
-            return this.isEnvActive(testEnv) ? "Active" : "Inactive";
+            return testEnv.operationalEnvironmentStatus;
         };
 
         vm.createNewTestEnvironment = function() {
index 84ad2d5..5311195 100644 (file)
     'use strict';
 
     appDS2.controller("newTestEnvironmentModalController", ["$uibModalInstance", "$uibModal", "AaiService", "TestEnvironmentsService","OwningEntityService",
-        "$log", "$scope", "_", "COMPONENT","$rootScope", newTestEnvironmentsModalController]);
+        "$log", "$scope", "_", "COMPONENT","$rootScope", "featureFlags", newTestEnvironmentsModalController]);
 
-    function newTestEnvironmentsModalController($uibModalInstance, $uibModal, AaiService, TestEnvironmentsService,OwningEntityService, $log, $scope, _, COMPONENT, $rootScope) {
+    function newTestEnvironmentsModalController($uibModalInstance, $uibModal, AaiService, TestEnvironmentsService, OwningEntityService, $log, $scope, _, COMPONENT, $rootScope, featureFlags ) {
         var vm = this;
         vm.newEnvironment = {};
+        vm.releaseVersions = {};
 
         var init = function () {
             vm.newEnvironment.operationalEnvironmentType = "VNF";
@@ -35,7 +36,7 @@
         };
 
         var loadEcompEnvironmentsList = function () {
-            TestEnvironmentsService.loadAAIestEnvironments("ECOMP")
+            TestEnvironmentsService.loadAAIestEnvironments("ONAP")
             .then(function(response) {
                 vm.environments = response.operationalEnvironment;
             })
 
         var loadCategoryParameters = function () {
             OwningEntityService.getOwningEntityProperties(function(response){
-               vm.environmentsTypesList = response["operational-environment-type"].map(function (x){
-                    return x.name;});
-               vm.workloadContextList = response["workload-context"].map(function (x){
-                   return x.name;});
+                vm.environmentsTypesList = response["operational-environment-type"].map(function (environmentType){
+                    return environmentType.name;});
+                vm.workloadContextList = response["workload-context"].map(function (context){
+                    return context.name;});
+                vm.releaseVersions = response["release"].map(function (releaseOptions){
+                    return releaseOptions.name;});
             },COMPONENT.TENANT_ISOLATION_FAMILY);
         }
 
@@ -68,8 +71,8 @@
 
         vm.createEnvironment = function () {
             if($scope.newTestEnvironment.$valid) {
-                vm.newEnvironment.workloadContext = vm.newEnvironment.operationalEnvironmentType + '_' + vm.newEnvironment.workloadContext;
                 var requestDetails = vm.newEnvironment;
+                delete vm.newEnvironment['release'];
                 $rootScope.$broadcast(COMPONENT.MSO_CREATE_ENVIRONMENT, {
                     url : COMPONENT.OPERATIONAL_ENVIRONMENT_CREATE,
                     requestDetails : requestDetails
@@ -78,7 +81,9 @@
             }
         };
 
-
+        vm.isShowReleaseEnabled = function () {
+            return featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1908_RELEASE_TENANT_ISOLATION)
+        };
 
         init();
     }
index ca51a8d..241148d 100644 (file)
                 <option data-tests-id="environment-type-option" class="environmentTypeOption" ng-repeat="item in vm.environmentsTypesList" ng-value="item">{{item}}</option>
             </select>
         </div>
+        <div class="form-group" ng-if="vm.isShowReleaseEnabled()">
+            <label class="control-label" for="operationalEnvironmentType">Release</label>
+            <select class="form-control"  ng-class="{'grayedOut': !vm.newEnvironment.operationalEnvironmentType}"  ng-model="vm.newEnvironment.release" name="operationalEnvironmentType" id="operationalRelease" data-tests-id="operational-release" required>
+                <option value="" disabled selected hidden>Select release</option>
+                <option data-tests-id="environment-type-option" class="environmentTypeOption" ng-repeat="item in vm.releaseVersions" ng-value="item">{{item}}</option>
+            </select>
+        </div>
         <div class="form-group">
             <label class="control-label" for="workloadContext">Workload Context</label>
-            <select class="form-control" ng-class="{'grayedOut': !vm.newEnvironment.workloadContext}" ng-model="vm.newEnvironment.workloadContext" name="workloadContext" id="workloadContext" data-tests-id="workload-context" required>
+            <select class="form-control" ng-class="{'grayedOut': !vm.newEnvironment.workloadContext}" ng-disabled="vm.isShowReleaseEnabled() && !vm.newEnvironment.release" ng-model="vm.newEnvironment.workloadContext" name="workloadContext" id="workloadContext" data-tests-id="workload-context" required>
                 <option value="" disabled selected hidden>Select workload context</option>
-                <option data-tests-id="workload-context-option" class="workloadContextOption" ng-repeat="item in vm.workloadContextList" ng-value="item">{{vm.newEnvironment.operationalEnvironmentType + '_' + item}}</option>
+                <option data-tests-id="workload-context-option" class="workloadContextOption" ng-repeat="item in vm.workloadContextList" ng-value="item">{{vm.isShowReleaseEnabled() ? vm.newEnvironment.operationalEnvironmentType + '_' + item + '_' + vm.newEnvironment.release : vm.newEnvironment.operationalEnvironmentType + '_' + item }}</option>
             </select>
         </div>
         <div data-tests-id="test-new-environment-error" class="connect-error" ng-if="vm.aaiConnectError">{{vm.aaiConnectError}}</div>
index 956ae1d..87f0f30 100644 (file)
@@ -20,7 +20,7 @@
 
 "use strict";
 
-var vfModuleActionModalController = function(COMPONENT, $scope, $uibModal, CreationService,
+var vfModuleActionModalController = function(COMPONENT, FIELD, $scope, $uibModal, CreationService,
     MsoService, AaiService, DeleteResumeService, DataService, $uibModalInstance, action, vfModule, featureFlags) {
 
 
@@ -28,11 +28,12 @@ var vfModuleActionModalController = function(COMPONENT, $scope, $uibModal, Creat
 
     $scope.action = action;
     $scope.vfModuleName = vfModule.name;
+    $scope.volumeGroups = vfModule.volumeGroups;
     $scope.lcpAndTenant = null;
     $scope.regionSelection = {lcpRegion: null, legacyRegion: null, tenant: null};
     $scope.lcpRegionList = null;
     $scope.isHomingData = false;
-    $scope.megaRegion = ['AAIAIC25', 'rdm3', 'rdm5a'];
+    $scope.megaRegion = ['AAIAIC25'];
     $scope.isSoftDeleteEnabled = vfModule.nodeStatus.toLowerCase() !== 'assigned' && action === COMPONENT.DELETE;
 
     $scope.isResumeEnabled = action === COMPONENT.RESUME;
@@ -49,6 +50,7 @@ var vfModuleActionModalController = function(COMPONENT, $scope, $uibModal, Creat
             $scope.lcpAndTenant = response;
             $scope.isFeatureFlagCloudOwner = featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST);
             $scope.lcpRegionList = _.uniqBy(response, 'cloudRegionId');
+            $scope.vendorInCloudOwnerRegex = /^[^-]*-/;
         });
     }
 
@@ -83,8 +85,8 @@ var vfModuleActionModalController = function(COMPONENT, $scope, $uibModal, Creat
 
     $scope.deleteOrResume = function()  {
 
-        var regionSelectionList = [({id: "lcpRegion", value: getLcpRegionId()})];
-        regionSelectionList.push({id: "tenant", value: $scope.regionSelection.tenant});
+        var msoParameterList = [({id: "lcpRegion", value: getLcpRegionId()})];
+        msoParameterList.push({id: "tenant", value: $scope.regionSelection.tenant});
 
         var requestParams = {};
         var requestDetails;
@@ -93,14 +95,24 @@ var vfModuleActionModalController = function(COMPONENT, $scope, $uibModal, Creat
             CreationService.initializeComponent(COMPONENT.VF_MODULE);
             CreationService.setInventoryInfo();
 
-            requestDetails = CreationService.getMsoRequestDetails(regionSelectionList);
+            var availableVolumeGroupList = $scope.volumeGroups;
+
+            if (availableVolumeGroupList && availableVolumeGroupList.length > 0) {
+                var volumeGroupList = FIELD.PARAMETER.AVAILABLE_VOLUME_GROUP;
+                volumeGroupList.value = _.map(availableVolumeGroupList, function (volumeGroup) {
+                    return volumeGroup.name;
+                });
+                msoParameterList.push(volumeGroupList);
+            }
+
+            requestDetails = CreationService.getMsoRequestDetails(msoParameterList);
             requestParams.url = CreationService.getMsoUrl();
             msoType = COMPONENT.MSO_CREATE_REQ;
         }
         else {
             DeleteResumeService.initializeComponent(COMPONENT.VF_MODULE);
 
-            requestDetails = DeleteResumeService.getMsoRequestDetails(regionSelectionList);
+            requestDetails = DeleteResumeService.getMsoRequestDetails(msoParameterList);
             if(DeleteResumeService.isMacro === true)  {
                 requestDetails.requestParameters.aLaCarte = false;
             }
@@ -137,6 +149,6 @@ var vfModuleActionModalController = function(COMPONENT, $scope, $uibModal, Creat
 
 };
 
-appDS2.controller("vfModuleActionModalController", [ "COMPONENT", "$scope", "$uibModal", "CreationService",
+appDS2.controller("vfModuleActionModalController", [ "COMPONENT", "FIELD", "$scope", "$uibModal", "CreationService",
      "MsoService", "AaiService", "DeleteResumeService", "DataService", "$uibModalInstance", "action", "vfModule", "featureFlags",
     vfModuleActionModalController ]);
index af2483b..e940183 100755 (executable)
@@ -405,7 +405,7 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
             if ( UtilityService.hasContents(globalCustomerId) ) {
                 $http.get(
                     COMPONENT.AAI_SUB_DETAILS_PATH
-                    + globalCustomerId + COMPONENT.ASSIGN + Math.random(),
+                    + globalCustomerId + COMPONENT.ASSIGN + Math.random() + COMPONENT.AAI_OMIT_SERVICE_INSTANCES + true,
                     {
                         timeout : PropertyService
                             .getServerResponseTimeoutMsec()
index dd0ef7f..b9bab0e 100755 (executable)
 \r
 var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCONFIGURATION, COMPONENT, DataService, featureFlags) {\r
     var shouldExcludeMacroFromAsyncInstantiationFlow = function(serviceModel){\r
-            if (!featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ASYNC_INSTANTIATION))\r
-                return true;\r
-                       if (DataService.getE2EService())\r
-                               return true;\r
-            if (!_.isEmpty(serviceModel.pnfs))\r
-                return true;\r
-            if (!_.isEmpty(serviceModel.collectionResource))\r
-                return true;\r
-            if (!_.isEmpty(serviceModel.networks) && !featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_NETWORK_TO_ASYNC_INSTANTIATION))\r
-                return true;\r
-            if(serviceModel.service.instantiationType === "ClientConfig")\r
-                return true;\r
-            return false;\r
+        if (!featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ASYNC_INSTANTIATION))\r
+            return true;\r
+        if (DataService.getE2EService())\r
+            return true;\r
+        if (!_.isEmpty(serviceModel.pnfs))\r
+            return true;\r
+        if (!_.isEmpty(serviceModel.collectionResources))\r
+            return true;\r
+        if (!_.isEmpty(serviceModel.networks) && !featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_NETWORK_TO_ASYNC_INSTANTIATION))\r
+            return true;\r
+        if(serviceModel.service.instantiationType === "ClientConfig")\r
+            return true;\r
+        return false;\r
     };\r
 \r
     return {\r
index 83710ce..17adf77 100755 (executable)
@@ -258,8 +258,18 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
                         getLcpRegionParameter(), FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
                         FIELD.PARAMETER.TENANT_DISABLED ]);
                     parameterList = parameterList.concat([ getLineOfBusinessParameter() ]);
+
+
+                    if(_this.componentId === COMPONENT.VNF){
+                        parameterList[parameterList.length -1].isRequired = true;
+                    }
+
                     parameterList = parameterList.concat([ getPlatformParameter() ]);
 
+                    if(_this.componentId === COMPONENT.NETWORK){
+                        parameterList[parameterList.length -1].isRequired = false;
+                    }
+
                     break;
                 case COMPONENT.VF_MODULE:
                     parameterList = parameterList.concat([
@@ -713,10 +723,8 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
                 var lineOfBusiness = getValueFromList(FIELD.ID.LINE_OF_BUSINESS, parameterList);
 
                 if(lineOfBusiness) {
-                    var lineOfBusinessNamesString = _.map(lineOfBusiness, "name").join(", ");
-
                     requestDetails.lineOfBusiness = {
-                        lineOfBusinessName: lineOfBusinessNamesString
+                        lineOfBusinessName: lineOfBusiness
                     }
                 }
 
@@ -738,9 +746,15 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
                     }
                 }
 
+                var platform = getValueFromList(FIELD.ID.PLATFORM, parameterList);
+                if(platform !== null && platform !== ""){
                 requestDetails.platform = {
-                    platformName: getValueFromList(FIELD.ID.PLATFORM, parameterList)
+                        platformName: platform
                 };
+                }
+
+
+
                 break;
             case COMPONENT.VF_MODULE:
                 requestDetails.requestParameters.usePreload = getValueFromList(
@@ -1194,6 +1208,7 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
                 return parameterList[i].value;
             }
         }
+        return null;
     };
     var updateUserParameterList = function(updatedId, parameterListControl) {
         console.log ("updateUserParameterList() updatedId=" + updatedId);
index 6f6ff2d..d5baa1a 100755 (executable)
@@ -551,6 +551,25 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS
                 requestParams.serviceInstanceId,\r
                 ''\r
             ].join(COMPONENT.FORWARD_SLASH), payload);\r
+        },\r
+        activateFabricConfiguration: function(requestParams) {\r
+            var payload = buildPayloadForActivateFabricConfiguration(requestParams.model, requestParams.userId);\r
+\r
+            var url = COMPONENT.MSO_ACTIVATE_FABRIC_CONFIGURATION_INSTANCE.replace('@serviceInstanceId', requestParams.serviceInstanceId);\r
+            return sendPostRequest(url, payload);\r
+        },\r
+        deactivateAndCloudDelete : function (requestParams)  {\r
+            var payload = {\r
+                tenantId: requestParams.tenantId,\r
+                lcpCloudRegionId: requestParams.lcpCloudRegionId,\r
+                userId: requestParams.userId\r
+            };\r
+\r
+            var url = COMPONENT.MSO_DEACTIVATE_AND_CLOUD_DELETE_INSTANCE.replace('@serviceInstanceId', requestParams.serviceInstanceId)\r
+                        .replace('@vnfInstanceId', requestParams.vnfInstanceId)\r
+                        .replace('@vfModuleInstanceId', requestParams.vfModuleInstanceId);\r
+\r
+            return sendPostRequestWithBody(url, payload);\r
         }\r
     }\r
 };\r