summaryrefslogtreecommitdiffstats
path: root/vid-app-common
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-07-17 13:26:12 +0300
committerIttay Stern <ittay.stern@att.com>2019-07-18 02:00:08 +0000
commit97cffb810fcf3d3f02d814827f24adc090cf8e2e (patch)
treefee8c342942a667f3128d1925649d6f83064427b /vid-app-common
parentdb98c7976e57f8bacbcc93b802b4d05b1db7b8cf (diff)
Merge from ecomp 3374149f - AngularJS UI
Issue-ID: VID-378 Change-Id: I6b3243b492009035c911f63b93258ea76938fcb9 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common')
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js12
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js4
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js2
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js18
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js5
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js20
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js22
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/controller/testEnvironmentsController.js4
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js23
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html11
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js26
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js2
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js26
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js23
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js19
15 files changed, 158 insertions, 59 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
index 5c5801805..3d6ed67ae 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
@@ -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",
}
};
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js
index 6b77cb0b6..a46013010 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js
@@ -187,7 +187,7 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) {
SERVICE_UUID : "Service UUID",
SERVICE_VERSION : "Service Version",
SUBSCRIBER_NAME : "Subscriber Name",
- MOBILITY : "Mobility",
+ EMANUEL : "Emanuel",
SUPPRESS_ROLLBACK : "Suppress Rollback on Failure",
SDN_C_PRELOAD : "SDN-C Pre-Load",
UPLOAD_SUPPLEMENTORY_DATA_FILE : "Upload Supplementary Data file",
@@ -488,7 +488,7 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) {
LINE_OF_BUSINESS: {
name: NAME.LINE_OF_BUSINESS,
id: ID.LINE_OF_BUSINESS,
- type: PARAMETER.MULTI_SELECT,
+ type: PARAMETER.SELECT,
isEnabled: true,
prompt: PROMPT.LINE_OF_BUSINESS,
isRequired: false
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js
index a93c01f7c..7c2385035 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js
@@ -125,6 +125,6 @@ appDS2.constant("VIDCONFIGURATION", (function() {
COMPONENT_LIST_NAMED_QUERY_ID : COMPONENT_LIST_NAMED_QUERY_ID,
SCHEDULER_CALLBACK_URL: SCHEDULER_CALLBACK_URL,
SCHEDULER_PORTAL_URL: SCHEDULER_PORTAL_URL,
- SDNC_SHOW_ASSIGNMENTS_URL: SDNC_SHOW_ASSIGNMENTS_URL
+ SDNC_SHOW_ASSIGNMENTS_URL: SDNC_SHOW_ASSIGNMENTS_URL
};
})())
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js
index 3c11594bf..6eed08033 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js
@@ -74,7 +74,7 @@
};
- $scope.isCR = !_.isEmpty($scope.service.model.collectionResource) && featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_COLLECTION_RESOURCE_SUPPORT);
+ $scope.isCR = !_.isEmpty($scope.service.model.collectionResources);
if ($scope.isCR)
prepareCr();
else
@@ -224,6 +224,13 @@
});
};
+ $scope.allowTransferToNewScreenAndShowButton = function (){
+ if(featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FLASH_REPLACE_VF_MODULE)) {
+ return $scope.isPermitted && !($scope.isMacro());
+ }
+ return false;
+ };
+
$scope.deleteService = function (serviceObject, serviceOrchestrationStatus) {
var serviceInstance = serviceObject.object;
@@ -1221,6 +1228,14 @@
$scope.resume = function (serviceObject, vfModule, vnfModel) {
populate_popup_vfModule(serviceObject, vfModule, vnfModel);
setCurrentVNFModelInfo(vnfModel);
+
+ var availableVolumeGroupList = [];
+ angular.forEach(vfModule.volumeGroups, function (volumeGroupInstance, key) {
+ availableVolumeGroupList.push({"instance": volumeGroupInstance});
+ });
+
+ DataService.setAvailableVolumeGroupList(availableVolumeGroupList);
+
DataService.setVfModuleInstanceName(vfModule.object[FIELD.ID.VF_MODULE_NAME]);
setCurrentServiceModelInfoFromScope();
@@ -1240,6 +1255,7 @@
else {
$scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
componentId: COMPONENT.VF_MODULE,
+ volumeGroups: vfModule.volumeGroups,
callbackFunction: deleteOrResumeCallback,
dialogMethod: COMPONENT.RESUME
});
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
index 62ef1a4f2..9cb905038 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
@@ -64,7 +64,8 @@
$scope.currentPageNum=1;
$scope.isSpinnerVisible = false;
$scope.isProgressVisible = false;
- if (sessionStorage.getItem("searchKey")!='undefined' && ($scope.rememberFilter)) {
+ var searchKey = sessionStorage.getItem("searchKey");
+ if (searchKey != 'undefined' && searchKey!=null && ($scope.rememberFilter)) {
var searchKey = JSON.parse(sessionStorage.getItem("searchKey"));
$scope.searchString = searchKey.searchString || '';
$scope.viewPerPage = searchKey.viewPerPage || defaultViewPerPage;
@@ -206,7 +207,7 @@
DataService.setShouldIncludeInAsyncInstantiationFlow(shouldTakeTheAsyncInstantiationFlow);
DataService.setALaCarte (true);
- DataService.setPnf(!angular.equals(serviceModel.pnfs, {}));
+ DataService.setPnf(!angular.equals(serviceModel.pnfs, {}));
$scope.createType = COMPONENT.A_LA_CARTE;
var broadcastType = COMPONENT.CREATE_COMPONENT;
if (AsdcService.isMacro(serviceModel) || DataService.getE2EService()) {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
index 191251860..ed03e3aec 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
@@ -720,7 +720,17 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
$scope.isConfigurationDataAvailiable = function (configuration) {
$log.debug(configuration);
return configuration.configData && (!configuration.configData.errorDescription);
- }
+ };
+
+ $scope.allowConfigurationActions = function (configuration) {
+ $log.debug(configuration);
+ return configuration.nodeStatus &&
+ _.some(
+ [FIELD.STATUS.AAI_ACTIVE, FIELD.STATUS.AAI_INACTIVE, FIELD.STATUS.AAI_CREATED],
+ function (s) {
+ return s.toLowerCase() === configuration.nodeStatus.toLowerCase();
+ });
+ };
$scope.isActivateDeactivateEnabled = function(btnType) {
if ($scope.serviceOrchestrationStatus) {
@@ -800,8 +810,11 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
$scope.isResumeShown = function (status) {
var vfModuleStatus = status.toLowerCase();
- var serviceStatus = $scope.serviceOrchestrationStatus && $scope.serviceOrchestrationStatus.toLowerCase();
- return _.includes(['pendingactivation', 'assigned'], vfModuleStatus) && !$scope.isActivateDeactivateEnabled("activate");
+ var vfModuleStatusHasAllowedResume = ['pendingactivation', 'assigned'];
+ if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_VF_MODULE_RESUME_STATUS_CREATE)) {
+ vfModuleStatusHasAllowedResume.push('created');
+ }
+ return _.includes(vfModuleStatusHasAllowedResume, vfModuleStatus) && !$scope.isActivateDeactivateEnabled("activate");
};
$scope.handleInitialResponseInventoryItems = function (response) {
@@ -1039,7 +1052,6 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
if( !$scope.hasFabricConfigurations ) {
portMirroringConfigurationIds.push(configObject[FIELD.ID.CONFIGURATION_ID]);
$scope.service.instance[FIELD.ID.CONFIGURATIONS].push(config);
- $scope.allowConfigurationActions = [FIELD.STATUS.AAI_ACTIVE, FIELD.STATUS.AAI_INACTIVE, FIELD.STATUS.AAI_CREATED].indexOf(config.nodeStatus) != -1;
} else {
if (config.nodeStatus.toLowerCase() !== FIELD.STATUS.ASSIGNED.toLowerCase()) {
$scope.allConfigurationsAssigned = false;
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js
index d1a6ca5e4..d7b7bab33 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js
@@ -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]);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/testEnvironmentsController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/testEnvironmentsController.js
index c81dc8721..94486905a 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/testEnvironmentsController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/testEnvironmentsController.js
@@ -101,11 +101,11 @@
};
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() {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js
index 84ad2d58c..53111950c 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js
@@ -22,11 +22,12 @@
'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;
})
@@ -47,10 +48,12 @@
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();
}
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html
index ca51a8def..241148dc8 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html
@@ -51,11 +51,18 @@
<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>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
index 956ae1db5..87f0f301d 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
@@ -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 ]);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
index af2483b68..e940183af 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
@@ -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()
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js
index dd0ef7fb1..b9bab0eaf 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js
@@ -22,19 +22,19 @@
var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCONFIGURATION, COMPONENT, DataService, featureFlags) {
var shouldExcludeMacroFromAsyncInstantiationFlow = function(serviceModel){
- if (!featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ASYNC_INSTANTIATION))
- return true;
- if (DataService.getE2EService())
- return true;
- if (!_.isEmpty(serviceModel.pnfs))
- return true;
- if (!_.isEmpty(serviceModel.collectionResource))
- return true;
- if (!_.isEmpty(serviceModel.networks) && !featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_NETWORK_TO_ASYNC_INSTANTIATION))
- return true;
- if(serviceModel.service.instantiationType === "ClientConfig")
- return true;
- return false;
+ if (!featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ASYNC_INSTANTIATION))
+ return true;
+ if (DataService.getE2EService())
+ return true;
+ if (!_.isEmpty(serviceModel.pnfs))
+ return true;
+ if (!_.isEmpty(serviceModel.collectionResources))
+ return true;
+ if (!_.isEmpty(serviceModel.networks) && !featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_NETWORK_TO_ASYNC_INSTANTIATION))
+ return true;
+ if(serviceModel.service.instantiationType === "ClientConfig")
+ return true;
+ return false;
};
return {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
index 83710ce16..17adf77ce 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
@@ -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);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js
index 6f6ff2d41..d5baa1a21 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js
@@ -551,6 +551,25 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS
requestParams.serviceInstanceId,
''
].join(COMPONENT.FORWARD_SLASH), payload);
+ },
+ activateFabricConfiguration: function(requestParams) {
+ var payload = buildPayloadForActivateFabricConfiguration(requestParams.model, requestParams.userId);
+
+ var url = COMPONENT.MSO_ACTIVATE_FABRIC_CONFIGURATION_INSTANCE.replace('@serviceInstanceId', requestParams.serviceInstanceId);
+ return sendPostRequest(url, payload);
+ },
+ deactivateAndCloudDelete : function (requestParams) {
+ var payload = {
+ tenantId: requestParams.tenantId,
+ lcpCloudRegionId: requestParams.lcpCloudRegionId,
+ userId: requestParams.userId
+ };
+
+ var url = COMPONENT.MSO_DEACTIVATE_AND_CLOUD_DELETE_INSTANCE.replace('@serviceInstanceId', requestParams.serviceInstanceId)
+ .replace('@vnfInstanceId', requestParams.vnfInstanceId)
+ .replace('@vfModuleInstanceId', requestParams.vfModuleInstanceId);
+
+ return sendPostRequestWithBody(url, payload);
}
}
};