aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main/webapp/app')
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js21
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js5
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js5
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js131
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js13
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js21
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js2
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js132
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js2
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitModalController.js9
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/statusDialogController.js2
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/subscriberSearch.js6
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js6
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js16
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js138
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.css62
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html78
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js77
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js59
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js6
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js12
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js6
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js38
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/propertyService.js9
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubs.htm3
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html6
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm40
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm6
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm4
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/test/testMso.js1
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/test/testViewEdit.js1
31 files changed, 745 insertions, 172 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 947e60030..077a78405 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
@@ -25,8 +25,8 @@ appDS2
.constant("COMPONENT", (function() {
return {
A_LA_CARTE : "a la carte",
+ CLOUD_REGION_ID : "cloudRegionID",
CLOUD_OWNER : "cloudOwner",
- CLOUD_REGION_ID : "cloudRegionID",
COMPONENT_STATUS : "ComponentStatus",
CREATE_COMPONENT : "createComponent",
IFRAME_DIALOG : "iframeDialog",
@@ -47,6 +47,7 @@ appDS2
MODEL_VERSION_1 : "1",
MSO_CREATE_REQ : "createInstance",
MSO_DELETE_REQ : "deleteInstance",
+ MSO_CREATE_CONFIGURATION_REQ : 'createConfiguration',
MSO_DELETE_CONFIGURATION_REQ : 'deleteConfiguration',
MSO_CHANGE_CONFIG_STATUS_REQ: "changeConfigurationStatus",
MSO_CHANGE_PORT_STATUS_REQ: "changePortStatus",
@@ -55,6 +56,8 @@ appDS2
MSO_ACTIVATE_ENVIRONMENT: "activateEnvironmentInstance",
MSO_ACTIVATE_SERVICE_REQ: "activateServiceInstance",
MSO_DEACTIVATE_SERVICE_REQ: "deactivateServiceInstance",
+ MSO_ACTIVATE_FABRIC_CONFIGURATION_REQ: "activateFabricConfigurationInstance",
+ MSO_DEACTIVATE_AND_CLOUD_DELETE: "deactivateAndCloudDelete",
NAME : "name",
NETWORK : "network",
CONFIGURATION : "configuration",
@@ -126,8 +129,8 @@ appDS2
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",
+ AAI_GET_PROVIDER_NETWORKS_ASSOCIATIONS : "aai/standardQuery/vlansByNetworks",
SEARCH_SERVICE_INSTANCES:"search_service_instances",
- AAI_GET_VNF_DATA_PATH: "aai_get_vnf_data/",
AAI_GET_VNF_BY_CUSTOMERID_AND_SERVICETYPE: "get_vnf_data_by_globalid_and_service_type/",
AAI_GET_SERVICES_BY_OWNING_ENTITY_ID: 'aai_get_services_by_owning_entity_id',
AAI_SUB_VIEWEDIT_PATH : "aai_sub_viewedit",
@@ -138,6 +141,7 @@ appDS2
AAI_GET_PNF_INSTANCES_LIST: "aai_get_pnf_instances",
AAI_GET_BY_URI: "aai_get_by_uri/",
AAI_GET_CONFIGURATION: "aai_get_configuration/",
+ AAI_GET_HOMING_DATA: "aai_get_homing_by_vfmodule/@vnfInstanceId/@vfModuleId",
AAI_GET_TEST_ENVIRONMENTS: "get_operational_environments?operationalEnvironmentType=",
GET_CATEGORY_PARAMETERS : "category_parameter",
PARAMETER_STANDARDIZATION_FAMILY: "PARAMETER_STANDARDIZATION",
@@ -146,7 +150,6 @@ appDS2
CREATE_INSTANCE_PATH : "/models/services/createInstance", AAI_GET_PNF_BY_NAME : "aai_get_pnfs/pnf/",
//1710 scheduler contants
POST_CREATE_NEW_VNF_CHANGE:"post_create_new_vnf_change",
- GET_POLICY:"get_policy",
WORKFLOW: "workflow",
GET_TIME_SLOTS:"get_time_slots",
SUBMIT_VNF_CHANGE_TIMESLOTS:"submit_vnf_change_timeslots",
@@ -166,6 +169,8 @@ appDS2
MSO_DELETE_SVC_INSTANCE_PATH : "mso_delete_svc_instance/",
MSO_ACTIVATE_INSTANCE: "mso/mso_activate_service_instance/@serviceInstanceId",
MSO_DEACTIVATE_INSTANCE: "mso/mso_deactivate_service_instance/@serviceInstanceId",
+ MSO_ACTIVATE_FABRIC_CONFIGURATION_INSTANCE: "mso/mso_activate_fabric_configuration/@serviceInstanceId",
+ MSO_DEACTIVATE_AND_CLOUD_DELETE_INSTANCE: "mso/mso_vfmodule_soft_delete/@serviceInstanceId/@vnfInstanceId/@vfModuleInstanceId",
MSO_CREATE_REALATIONSHIP : "mso_add_relationship",
MSO_REMOVE_RELATIONSHIP: "mso_remove_relationship",
SELECTED_SERVICE_SUB_PATH : "#/instances/subdetails?",
@@ -236,14 +241,18 @@ appDS2
FEATURE_FLAGS:{
FLAG_ASYNC_INSTANTIATION : "FLAG_ASYNC_INSTANTIATION",
- FLAG_VLAN_TAGGING_VIEW_EDIT: "FLAG_VLAN_TAGGING_VIEW_EDIT",
FLAG_NETWORK_TO_ASYNC_INSTANTIATION : "FLAG_NETWORK_TO_ASYNC_INSTANTIATION",
- FLAG_REGION_ID_FROM_REMOTE : "FLAG_REGION_ID_FROM_REMOTE",
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_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"
}
};
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 544a8114f..e00ede5e7 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
@@ -273,7 +273,8 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) {
AAI_CREATED: "Created",
AAI_DELETE: "Deleted",
AAI_ENABLED: "Enabled",
- AAI_DISABLED: "Disabled"
+ AAI_DISABLED: "Disabled",
+ ASSIGNED: "Assigned"
};
var STYLE = {
@@ -510,6 +511,6 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) {
PROMPT: PROMPT,
STATUS: STATUS,
STYLE: STYLE,
- ERROR: ERROR,
+ ERROR: ERROR
}
}]);
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 b2441fbe4..05c96ed6a 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
@@ -30,7 +30,7 @@ appDS2.constant("VIDCONFIGURATION", (function() {
* UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED: Determines the Property to Govern Presence of Upload Supplementary File on Volume Group Screen.
* Set to false, to disable the check.
*/
- var UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED = false;
+ var UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED = true;
/*
* List of valid VNF status combinations
*/
@@ -91,6 +91,8 @@ appDS2.constant("VIDCONFIGURATION", (function() {
*/
var MSO_POLLING_INTERVAL_MSECS = 200;
+ var SERVER_RESPONSE_TIMEOUT_MSECS = 300000;
+
var SCHEDULER_POLLING_INTERVAL_MSECS = 10000;
var SCHEDULER_MAX_POLLS = 10;
@@ -113,6 +115,7 @@ appDS2.constant("VIDCONFIGURATION", (function() {
ASDC_MODEL_STATUS : ASDC_MODEL_STATUS,
MSO_MAX_POLLS : MSO_MAX_POLLS,
MSO_POLLING_INTERVAL_MSECS : MSO_POLLING_INTERVAL_MSECS,
+ SERVER_RESPONSE_TIMEOUT_MSECS : SERVER_RESPONSE_TIMEOUT_MSECS,
SCHEDULER_MAX_POLLS : SCHEDULER_MAX_POLLS,
SCHEDULER_POLLING_INTERVAL_MSECS : SCHEDULER_POLLING_INTERVAL_MSECS,
VNF_STATUS_CHECK_ENABLED : VNF_STATUS_CHECK_ENABLED,
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 1b3ab09ca..06622cfbc 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
@@ -27,7 +27,7 @@
appDS2.requires.push('ui.tree');
- appDS2.controller("InstantiationController", function ($scope, $route, $location, $timeout, COMPONENT, VIDCONFIGURATION, FIELD, DataService, PropertyService, UtilityService, VnfService, $http, vidService, AaiService, PnfService, CrService, AsdcService, $q, featureFlags, _, CreationService, $window) {
+ appDS2.controller("InstantiationController", function ($scope, $route, $location, $timeout, $uibModal, COMPONENT, VIDCONFIGURATION, FIELD, DataService, PropertyService, UtilityService, VnfService, $http, vidService, AaiService, PnfService, CrService, AsdcService, $q, featureFlags, _, CreationService, $window, DeleteResumeService) {
$scope.popup = new Object();
$scope.defaultBaseUrl = "";
$scope.responseTimeoutMsec = 60000;
@@ -53,27 +53,8 @@
// takes a default value, retrieves the prop value from the file system and sets it
var polls = PropertyService.retrieveMsoMaxPolls();
PropertyService.setMsoMaxPolls(polls);
+ };
- PropertyService.setServerResponseTimeoutMsec(30000);
-
- /*
- * Common parameters that shows an example of how the view edit screen
- * is expected to pass some common service instance values to the
- * popups.
- */
-
-// DataService.setSubscriberName("Mobility");
-// DataService.setGlobalCustomerId("CUSTID12345")
-// DataService.setServiceType("Mobility Type 1");
-// DataService.setServiceInstanceName("Example Service Instance Name");
-// DataService.setServiceName("Mobility Service 1");
-// DataService.setServiceInstanceId("mmsc-test-service-instance");
-// DataService.setServiceUuid("XXXX-YYYY-ZZZZ");
-// DataService.setUserServiceInstanceName("USER_SERVICE_INSTANCE_NAME");
-
- }
-
- //PropertyService.setMsoBaseUrl("testmso");
$scope.convertModel = function (asdcModel) {
if (!asdcModel) return undefined;
@@ -305,20 +286,86 @@
DataService.setServiceUuid($scope.service.model.service.uuid);
}
- $scope.deleteVfModule = function (serviceObject, vfModule, vnf) {
+ var modalInstance;
- console.log("Removing VF-Module " + vfModule.name);
+ var openMsoModal = function (msoType, requestParams, callbackFunction, configuration) {
+ modalInstance = $uibModal.open({
+ templateUrl: 'app/vid/scripts/modals/mso-commit/mso-commit.html',
+ controller: "msoCommitModalController",
+ backdrop: false,
+ resolve: {
+ msoType: function () {
+ return msoType;
+ },
+ requestParams: function () {
+ requestParams.callbackFunction = callbackFunction;
+ return requestParams;
+ },
+ configuration: function () {
+ return configuration;
+ }
+ }
+ });
+ };
- populate_popup_vfModule(serviceObject, vfModule, vnf);
+ var openVfModuleWithHomingDataModal = function(action, vfModule) {
+ modalInstance = $uibModal.open({
+ controller: 'vfModuleActionModalController',
+ templateUrl: 'app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html',
+ backdrop: false,
+ resolve: {
+ action: function () {
+ return action;
+ },
+ vfModule: function() {
+ return vfModule;
+ }
+ }
+ });
- $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
- componentId: COMPONENT.VF_MODULE,
- callbackFunction: deleteOrResumeCallback,
- dialogMethod: COMPONENT.DELETE
+ modalInstance.result.then(function (data) {
+ if (data.msoType && data.requestParams) {
+ openMsoModal(data.msoType, data.requestParams, deleteOrResumeCallback, null);
+ }
});
+ };
- return;
+ function getLcpCloudRegionTenantList() {
+ AaiService.getLcpCloudRegionTenantList(DataService
+ .getGlobalCustomerId(), DataService.getServiceType(), function(
+ response) {
+ $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.deleteVfModule = function (serviceObject, vfModule, vnf) {
+ $scope.isSoftDeleteEnabled = true;
+
+ populate_popup_vfModule(serviceObject, vfModule, vnf);
+
+ if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE)) {
+
+ if (DataService.getLoggedInUserId()) {
+ openVfModuleWithHomingDataModal(COMPONENT.DELETE, vfModule);
+ }
+ else {
+ AaiService.getLoggedInUserID(function (response) {
+ var userID = response.data;
+ DataService.setLoggedInUserId(userID);
+ openVfModuleWithHomingDataModal(COMPONENT.DELETE, vfModule);
+ });
+ }
+ }
+ else {
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
+ componentId: COMPONENT.VF_MODULE,
+ callbackFunction: deleteOrResumeCallback,
+ dialogMethod: COMPONENT.DELETE
+ });
+ }
+ console.log("Removing VF-Module", vfModule);
};
function setCurrentServiceModelInfoFromScope() {
@@ -1175,11 +1222,27 @@
setCurrentVNFModelInfo(vnfModel);
DataService.setVfModuleInstanceName(vfModule.object[FIELD.ID.VF_MODULE_NAME]);
setCurrentServiceModelInfoFromScope();
- $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
- componentId: COMPONENT.VF_MODULE,
- callbackFunction: deleteOrResumeCallback,
- dialogMethod: COMPONENT.RESUME
- });
+
+ if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE)) {
+
+ if (DataService.getLoggedInUserId()) {
+ openVfModuleWithHomingDataModal(COMPONENT.RESUME, vfModule);
+ }
+ else {
+ AaiService.getLoggedInUserID(function (response) {
+ var userID = response.data;
+ DataService.setLoggedInUserId(userID);
+ openVfModuleWithHomingDataModal(COMPONENT.RESUME, vfModule);
+ });
+ }
+ }
+ else {
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
+ componentId: COMPONENT.VF_MODULE,
+ callbackFunction: deleteOrResumeCallback,
+ dialogMethod: COMPONENT.RESUME
+ });
+ }
};
$scope.deleteConfiguration = function (serviceObject, configuration) {
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 aee4c05fe..f0a6ebdf7 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
@@ -121,9 +121,6 @@
var polls = PropertyService.retrieveMsoMaxPolls();
PropertyService.setMsoMaxPolls(polls);
-
- //PropertyService.setMsoBaseUrl("testmso");
- PropertyService.setServerResponseTimeoutMsec(30000);
};
$scope.prevPage = function() {
@@ -186,14 +183,17 @@
"description": serviceModel.service.description,
"category":serviceModel.service.category
});
- DataService.setALaCarte (true);
+
+ var shouldTakeTheAsyncInstantiationFlow = AsdcService.shouldTakeTheAsyncInstantiationFlow(serviceModel);
+ DataService.setShouldIncludeInAsyncInstantiationFlow(shouldTakeTheAsyncInstantiationFlow);
+
+ DataService.setALaCarte (true);
DataService.setPnf(!angular.equals(serviceModel.pnfs, {}));
$scope.createType = COMPONENT.A_LA_CARTE;
var broadcastType = COMPONENT.CREATE_COMPONENT;
if (AsdcService.isMacro(serviceModel) || DataService.getE2EService()) {
DataService.setALaCarte(false);
- if(AsdcService.shouldExcludeMacroFromAsyncInstatiationFlow(serviceModel)){
- DataService.setShouldExcludeMacroFromAsyncInstatiationFlow(true);
+ if(!shouldTakeTheAsyncInstantiationFlow){
$scope.createType = COMPONENT.MACRO;
var convertedAsdcModel = UtilityService.convertModel(serviceModel);
@@ -210,7 +210,6 @@
"serviceRole": serviceModel.service.serviceRole,
"displayInputs": convertedAsdcModel.completeDisplayInputs
});
-
}
}
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js
index 5d17faa9e..96939a42f 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js
@@ -25,8 +25,14 @@
"use strict";
-appDS2.controller("ServiceProxyConfigController", ["COMPONENT", "$log", "FIELD", "PARAMETER", "DataService", "CreationService", "$scope", "$window", "$location", "AaiService", "$uibModal", "UtilityService", "$timeout",
- function (COMPONENT, $log, FIELD, PARAMETER, DataService, CreationService, $scope, $window, $location, AaiService, $uibModal, UtilityService, $timeout) {
+appDS2.controller(
+ "ServiceProxyConfigController", ["COMPONENT", "$log", "FIELD", "PARAMETER", "DataService",
+ "CreationService", "$scope", "$window", "$location", "AaiService", "$uibModal", "UtilityService", "$timeout",
+ "featureFlags",
+ function (COMPONENT, $log, FIELD, PARAMETER, DataService,
+ CreationService, $scope, $window, $location, AaiService, $uibModal, UtilityService, $timeout,
+ featureFlags
+ ) {
$scope.selectedMetadata = {};
@@ -159,7 +165,7 @@ appDS2.controller("ServiceProxyConfigController", ["COMPONENT", "$log", "FIELD",
backdrop: true,
resolve: {
msoType: function () {
- return COMPONENT.MSO_CREATE_REQ;
+ return COMPONENT.MSO_CREATE_CONFIGURATION_REQ;
},
requestParams: function () {
return requestParams;
@@ -252,6 +258,10 @@ appDS2.controller("ServiceProxyConfigController", ["COMPONENT", "$log", "FIELD",
loadCollectorProxies();
};
+ $scope.shouldLetSelectingCollectorType = function() {
+ return $scope.collectorType === 'vnf' || featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1810_CR_LET_SELECTING_COLLECTOR_TYPE_UNCONDITIONALLY);
+ };
+
function clearSourceProxySelection() {
$scope.sourceInstance = undefined;
}
@@ -274,9 +284,8 @@ appDS2.controller("ServiceProxyConfigController", ["COMPONENT", "$log", "FIELD",
function loadProxyInstances(service, serviceType, serviceProxy) {
$scope[service.instanceListScopePropertyName] = null;
- // $scope.collectorType = $scope.configurationByPolicy ? 'pnf' : 'vnf';
var configNodeTemplateFields = DataService.getPortMirroningConfigFields();
- if (service.name == "collectorInstanceName" && $scope.configurationByPolicy) {
+ if (service.name === 'collectorInstanceName' && $scope.configurationByPolicy) {
var configurationModel = DataService.getModelInfo(COMPONENT.VNF);
AaiService.getPnfInstancesList(
DataService.getGlobalCustomerId(),
@@ -294,7 +303,7 @@ appDS2.controller("ServiceProxyConfigController", ["COMPONENT", "$log", "FIELD",
})
.catch(function (error) {
$scope[service.noResults] = true;
- $log.error("No pnf instance found for " + service.name, error);
+ $log.error('No pnf instance found for ' + service.name, error);
});
} else {
AaiService.getVnfInstancesList(
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js
index e30bd3856..ce8eb637e 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js
@@ -73,7 +73,7 @@
controller: 'ServiceProxyConfigController',
templateUrl: 'app/vid/scripts/view-models/serviceProxyConfig.htm'
})
- .when('/servicePlanning', {
+ .when('/servicePlanning/:mode?', {
controller: 'iframeController',
templateUrl: 'app/vid/scripts/view-models/iframe.htm'
})
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 164c71c7e..ec4799b14 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
@@ -225,8 +225,9 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
$scope.createType = "a la carte";
var broadcastType = "createComponent";
+ DataService.setShouldIncludeInAsyncInstantiationFlow(AsdcService.shouldTakeTheAsyncInstantiationFlow(serviceModel));
+
if (AsdcService.isMacro(serviceModel)) {
- DataService.setShouldExcludeMacroFromAsyncInstatiationFlow(AsdcService.shouldExcludeMacroFromAsyncInstatiationFlow(serviceModel));
DataService.setALaCarte(false);
$scope.createType = "Macro";
var convertedAsdcModel = UtilityService.convertModel(serviceModel);
@@ -250,7 +251,6 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
"serviceRole": serviceModel.service.serviceRole
});
}
- ;
$scope.$broadcast(broadcastType, {
componentId: COMPONENT.SERVICE,
@@ -445,9 +445,6 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
var polls = PropertyService.retrieveMsoMaxPolls();
PropertyService.setMsoMaxPolls(polls);
- //PropertyService.setMsoBaseUrl("testmso");
- PropertyService.setServerResponseTimeoutMsec();
-
/*
* Common parameters that would typically be set when the page is
* displayed for a specific service instance id.
@@ -521,6 +518,8 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
return deferred.promise;
}
+ var serviceNetworkVlans = [];
+ var vnfNetworksAndVlans = [];
$scope.getComponentList = function (event, request) {
@@ -542,6 +541,9 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
//$scope.getAsdcModel($location.search().modelUuid);
+ //make sure view/edit don't open new deploy service popup
+ DataService.setShouldIncludeInAsyncInstantiationFlow(false);
+
return getModelVersionIdForServiceInstance({
globalCustomerId: $location.search().subscriberId,
serviceInstanceId: $location.search().serviceInstanceId,
@@ -550,10 +552,16 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
.then(resolveModelDataIfMissing)
.then($scope.prepareScopeWithModel)
.then(function () {
-
+ return AaiService.getVlansByNetworksMapping($scope.globalCustomerId, $scope.serviceType, $scope.serviceInstanceId, $scope.service.model.service.uuid);
+ })
+ .then(function (vlanByNetwork) {
+ serviceNetworkVlans = vlanByNetwork.serviceNetworks ? vlanByNetwork.serviceNetworks : [];
+ vnfNetworksAndVlans = vlanByNetwork.vnfNetworks ? vlanByNetwork.vnfNetworks : [];
+ $log.debug('vlanByNetwork', vlanByNetwork);
$scope.namedQueryId = VIDCONFIGURATION.COMPONENT_LIST_NAMED_QUERY_ID;
$scope.status = FIELD.STATUS.FETCHING_SERVICE_INST_DATA + $scope.serviceInstanceId;
+ $scope.hasFabricConfigurations = !UtilityService.isObjectEmpty($scope.service.model.fabricConfigurations);
return AaiService.runNamedQuery($scope.namedQueryId, $scope.globalCustomerId, $scope.serviceType, $scope.serviceInstanceId,
function (response) { //success
$scope.handleInitialResponseInventoryItems(response);
@@ -567,13 +575,13 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
$scope.errorMsg = FIELD.ERROR.FETCHING_SERVICE_INSTANCE_DATA + response.status;
$scope.errorDetails = response.data;
}
- )
- })
+ );
+ });
};
$scope.handleServerError = function (response, status) {
alert(response.statusText);
- }
+ };
function handleGetRelatedInstanceGroupsResponseForVnf(response, genericVnf) {
_.forEach(response.data, function (instanceGroup) {
@@ -582,7 +590,7 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
type: instanceGroup.type
};
genericVnf.instanceGroups.push(newInstanceGroup);
- })
+ });
}
@@ -618,14 +626,26 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
function navigateToViewEditPage() {
- window.location.href =
- COMPONENT.INSTANTIATE_ROOT_PATH + disData.globalCustomerId +
+ window.location.href = AsdcService.shouldTakeTheDrawingBoardViewEdit(vidService.getModel()) ?
+ drawingBoardViewEditUrl() : oldViewEditUrl();
+ }
+
+ function oldViewEditUrl() {
+ return COMPONENT.INSTANTIATE_ROOT_PATH + disData.globalCustomerId +
COMPONENT.SUBSCRIBERNAME_SUB_PATH + disData.subscriberName +
COMPONENT.SERVICETYPE_SUB_PATH + disData.serviceType +
COMPONENT.SERVICEINSTANCEID_SUB_PATH + disData.serviceInstanceId +
COMPONENT.MODELVERSIONID_SUB_PATH + disData.aaiModelVersionId +
COMPONENT.IS_PERMITTED_SUB_PATH + disData.isPermitted;
}
+
+ function drawingBoardViewEditUrl() {
+ return 'serviceModels.htm#/servicePlanning/EDIT?' +
+ 'serviceModelId=' + disData.aaiModelVersionId +
+ '&subscriberId=' + disData.globalCustomerId +
+ '&serviceType=' + disData.serviceType +
+ '&serviceInstanceId=' + disData.serviceInstanceId;
+ }
};
function handleErrorGettingModelVersion(err) {
@@ -751,6 +771,16 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
return false;
};
+ $scope.isActivateFabricConfiguration = function () {
+
+ if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS) && $scope.hasFabricConfigurations) {
+ if ($scope.serviceOrchestrationStatus) {
+ return $scope.serviceOrchestrationStatus.toLowerCase() === 'assigned';
+ }
+ }
+ return false;
+ };
+
$scope.isResumeShown = function (status) {
var vfModuleStatus = status.toLowerCase();
var serviceStatus = $scope.serviceOrchestrationStatus && $scope.serviceOrchestrationStatus.toLowerCase();
@@ -768,12 +798,16 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
$scope.counter = 100;
$scope.subscriberName = "";
+
+ $scope.allConfigurationsAssigned = true;
// just look up the subscriber name in A&AI here...
AaiService.getSubscriberName($scope.globalCustomerId, function (response) {
$scope.subscriberName = response.subscriberName;
DataService.setSubscriberName($scope.subscriberName);
$scope.serviceOrchestrationStatus = returnMatchingServiceSubscription(response.serviceSubscriptions[FIELD.ID.SERVICE_SUBSCRIPTION], $scope.serviceInstanceId);
-
+ if ($scope.serviceOrchestrationStatus.toLowerCase() !== FIELD.STATUS.ASSIGNED.toLowerCase()) {
+ $scope.allConfigurationsAssigned = false;
+ }
angular.forEach($scope.inventoryResponseItemList, function (inventoryResponseItem, key) {
$scope.inventoryResponseItem = inventoryResponseItem;
@@ -820,7 +854,8 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
"nodeStatus": l3NetworkObject[FIELD.ID.ORCHESTRATION_STATUS],
"object": l3NetworkObject,
"nodes": [],
- "subnets": []
+ "subnets": [],
+ "vlans": []
};
if (subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) {
//console.log ("subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS]=");
@@ -842,6 +877,12 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
}
});
}
+
+
+ var networkObj = _.find(serviceNetworkVlans, { 'networkId': l3Network.nodeId});
+ if (networkObj !== undefined && networkObj.vlans !== undefined) {
+ l3Network["vlans"] = networkObj.vlans;
+ }
$scope.service.instance[FIELD.ID.NETWORKS].push(l3Network);
}
@@ -860,14 +901,15 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
"vfModules": [],
"volumeGroups": [],
"instanceGroups": [],
- "availableVolumeGroups": []
+ "availableVolumeGroups": [],
+ "networks": []
};
- if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_VLAN_TAGGING_VIEW_EDIT)) {
-
- //TODO should be changed after integration
- genericVnf["instanceGroups"] = [{"name":"a2"}];
+ var vnfNetworkObj = _.find(vnfNetworksAndVlans, { 'vnfId': genericVnf.nodeId});
+ if (vnfNetworkObj !== undefined && vnfNetworkObj.networks !== undefined) {
+ genericVnf["networks"] = vnfNetworkObj.networks;
}
+
$scope.service.instance[FIELD.ID.VNFS].push(genericVnf);
getRelatedInstanceGroupsByVnfId(genericVnf);
@@ -977,18 +1019,25 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
"ports": [],
"configData" : null
};
+ 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;
-
- $scope.service.instance[FIELD.ID.CONFIGURATIONS].push(config);
+ } else {
+ if (config.nodeStatus.toLowerCase() !== FIELD.STATUS.ASSIGNED.toLowerCase()) {
+ $scope.allConfigurationsAssigned = false;
+ if ($scope.isActivateFabricConfiguration()) {
+ $scope.errorMsg = "Activate fabric configuration button is not available as some of the configuration objects are not in Assigned status. Check MSO logs for the reasons for this abnormal case.";
+ }
+ }
+ }
}
});
AaiService.getPortMirroringData(portMirroringConfigurationIds).then(function(result){
angular.forEach($scope.service.instance[FIELD.ID.CONFIGURATIONS], function(config){
- config['configData'] = result.data[config['nodeId']]
+ config['configData'] = result.data[config['nodeId']];
if (config.configData && config.configData.errorDescription) {
$scope.errorMsg = ($scope.errorMsg ? $scope.errorMsg + "\n" : "") +
@@ -1019,11 +1068,15 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
}
});
- });
-
-
+ var aaiNetworkIds = _.map(serviceNetworkVlans, 'networkId');
+ var serviceInstanceNetworkIds = _.map($scope.service.instance[FIELD.ID.NETWORKS], 'nodeId');
+ var isContains = aaiNetworkIds.every(function(val) { return serviceInstanceNetworkIds.indexOf(val) >= 0; });
+ if (aaiNetworkIds.length && !isContains) {
+ $log.error("vlansByNetworks contain network that not found in service instance", aaiNetworkIds, serviceInstanceNetworkIds);
+ }
- }
+ });
+ };
@@ -1195,6 +1248,27 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
}
};
+
+ var activateFabricConfigurationInstance = function (msoType) {
+ var requestParams = {
+ model: $scope.service.model,
+ service: $scope.service,
+ serviceInstanceId: $scope.serviceInstanceId
+ };
+
+ if (DataService.getLoggedInUserId()) {
+ requestParams.userId = DataService.getLoggedInUserId();
+ openMsoModal(COMPONENT.MSO_ACTIVATE_FABRIC_CONFIGURATION_REQ, requestParams);
+ } else {
+ AaiService.getLoggedInUserID(function (response) {
+ var userID = response.data;
+ DataService.setLoggedInUserId(userID);
+ requestParams.userId = userID;
+ openMsoModal(COMPONENT.MSO_ACTIVATE_FABRIC_CONFIGURATION_REQ, requestParams);
+ });
+ }
+ };
+
$scope.showAssignmentsSDNC = function () {
if ($scope.service && $scope.service.instance) {
@@ -1203,6 +1277,10 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
return null;
};
+ $scope.activateFabricConfigurationMSO = function () {
+ activateFabricConfigurationInstance(COMPONENT.MSO_ACTIVATE_FABRIC_CONFIGURATION_REQ);
+ };
+
$scope.activateMSOInstance = function () {
activateDeactivateServiceInstance(COMPONENT.MSO_ACTIVATE_SERVICE_REQ);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js
index e8fa529fc..63411708c 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/creationDialogController.js
@@ -31,7 +31,7 @@ var creationDialogController = function (COMPONENT, FIELD, PARAMETER, $scope, $h
var componentId = undefined;
$scope.shouldShowOldPopup = function () {
- return DataService.getALaCarte() || DataService.getShouldExcludeMacroFromAsyncInstatiationFlow()
+ return !DataService.getShouldIncludeInAsyncInstantiationFlow();
};
function receiveMessage(event) {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitModalController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitModalController.js
index 631d0122f..ae36ecded 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitModalController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitModalController.js
@@ -155,7 +155,7 @@ var msoCommitModalController = function(COMPONENT, FIELD, $scope, $http, $timeou
switch(msoType) {
case COMPONENT.MSO_DELETE_CONFIGURATION_REQ :
return MsoService.deleteConfiguration(requestParams, configuration);
- case COMPONENT.MSO_CREATE_REQ:
+ case COMPONENT.MSO_CREATE_CONFIGURATION_REQ:
return MsoService.createConfigurationInstance(requestParams);
case COMPONENT.MSO_CHANGE_CONFIG_STATUS_REQ:
return MsoService.toggleConfigurationStatus(requestParams, configuration);
@@ -169,6 +169,13 @@ var msoCommitModalController = function(COMPONENT, FIELD, $scope, $http, $timeou
return MsoService.activateInstance(requestParams);
case COMPONENT.MSO_DEACTIVATE_SERVICE_REQ:
return MsoService.deactivateInstance(requestParams);
+ case COMPONENT.MSO_ACTIVATE_FABRIC_CONFIGURATION_REQ:
+ return MsoService.activateFabricConfiguration(requestParams);
+ case COMPONENT.MSO_DEACTIVATE_AND_CLOUD_DELETE:
+ return MsoService.deactivateAndCloudDelete(requestParams);
+ case COMPONENT.MSO_CREATE_REQ:
+ case COMPONENT.MSO_DELETE_REQ:
+ return MsoService.createAndDeleteInstance(requestParams);
}
};
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/statusDialogController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/statusDialogController.js
index 0d067ff17..befe7c43d 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/statusDialogController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/statusDialogController.js
@@ -130,8 +130,6 @@ var statusDialogController = function(COMPONENT, FIELD, $scope, $http, $timeout,
var polls = PropertyService.retrieveMsoMaxPolls();
PropertyService.setMsoMaxPolls(polls);
- PropertyService.setServerResponseTimeoutMsec(30000);
-
$scope.isSpinnerVisible = true;
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/subscriberSearch.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/subscriberSearch.js
index 029860f83..89768f831 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/subscriberSearch.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/subscriberSearch.js
@@ -64,14 +64,12 @@ appDS2.controller("aaiSubscriberSearchController", [ "$scope", "$timeout", "$log
var polls = PropertyService.retrieveMsoMaxPolls();
PropertyService.setMsoMaxPolls(polls);
- PropertyService.setServerResponseTimeoutMsec(30000);
-
- // These two properties only added for testing
+ // These two properties only added for testing
properties.msoDefaultBaseUrl = $scope.baseUrl;
properties.responseTimeoutMsec = $scope.responseTimeoutMsec;
UtilityService.setProperties(properties);
- }
+ };
$scope.autoGetSubs = function() {
/*
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js b/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js
index d36b3823f..32c34e9a6 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js
@@ -375,7 +375,8 @@ var parameterBlockDirective = function($log, PARAMETER, UtilityService, $compile
}
element.replaceWith($compile(element.html(html))(scope));
- element.find("input, select").bind("change", function() {
+ element.find("input, select").unbind("change.namespace1");
+ element.find("input, select").bind("change.namespace1", function() {
callback(this, scope);
});
}
@@ -391,7 +392,8 @@ var parameterBlockDirective = function($log, PARAMETER, UtilityService, $compile
}
}
});
- element.find("input, select").bind("change", function() {
+ element.find("input, select").unbind("change.namespace2");
+ element.find("input, select").bind("change.namespace2", function() {
callback(this, scope);
});
}
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
index c6c9edf6e..9a758cc73 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
@@ -121,13 +121,19 @@
};
var extractVNFModel = function (csarVNF, sdcService, selectionVNF) {
+ /**
+ @param selectionVNF A vnf *instance* selected in "available VNF" drop-down box
+ @param csarVNF A VNF *MODEL* that has an invariantUuid same as selectionVNF (might be
+ a different version; i.e. selectionVNF.modelVersionId <> csarVNF.uuid)
+ @param sdcService The Service *MODEL* which has the related VNF `csarVNF`.
+ */
var versionCsarData = {
vnfInstanceId: "",
vnfName: csarVNF.name,
modelInfo: {
modelType: "vnf",
modelInvariantId: csarVNF.invariantUuid,
- modelVersionId: selectionVNF.modelVersionId,
+ modelVersionId: csarVNF.uuid,
modelName: csarVNF.name,
modelVersion: csarVNF.version,
modelCustomizationName: csarVNF.modelCustomizationName,
@@ -145,12 +151,10 @@
instanceId: selectionVNF["service-instance-node"]["0"].properties['service-instance-id'],
modelInfo: {
modelType: "service",
- modelInvariantId: selectionVNF["service-instance-node"]["0"].properties['model-invariant-id'],
- modelVersionId: selectionVNF.modelVersionId,
+ modelInvariantId: sdcService.invariantUuid,
+ modelVersionId: sdcService.uuid,
modelName: sdcService.name,
- modelVersion: sdcService.version,
- modelCustomizationName: selectionVNF["service-instance-node"]["0"].properties['model-customization-name'], //TODO: Missing
- modelCustomizationId: selectionVNF["service-instance-node"]["0"].properties['model-customization-id']
+ modelVersion: sdcService.version
}
}
}
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
new file mode 100644
index 000000000..00f175e08
--- /dev/null
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
@@ -0,0 +1,138 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+"use strict";
+
+var vfModuleActionModalController = function(COMPONENT, $scope, $uibModal, CreationService,
+ MsoService, AaiService, DeleteResumeService, DataService, $uibModalInstance, action, vfModule, featureFlags) {
+
+
+ var _this = this;
+
+ $scope.action = action;
+ $scope.vfModuleName = vfModule.name;
+ $scope.lcpAndTenant = null;
+ $scope.regionSelection = {lcpRegion: null, legacyRegion: null, tenant: null};
+ $scope.lcpRegionList = null;
+ $scope.isHomingData = false;
+ $scope.megaRegion = ['AAIAIC25', 'rdm3', 'rdm5a'];
+ $scope.isSoftDeleteEnabled = vfModule.nodeStatus.toLowerCase() !== 'assigned' && action === COMPONENT.DELETE;
+
+ $scope.isResumeEnabled = action === COMPONENT.RESUME;
+ if ($scope.isResumeEnabled) {
+ $scope.action = 'Instantiate';
+ }
+
+ initHomingData();
+
+ function getLcpCloudRegionTenantList() {
+ AaiService.getLcpCloudRegionTenantList(DataService
+ .getGlobalCustomerId(), DataService.getServiceType(), function(
+ response) {
+ $scope.lcpAndTenant = response;
+ $scope.isFeatureFlagCloudOwner = featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST);
+ $scope.lcpRegionList = _.uniqBy(response, 'cloudRegionId');
+ });
+ }
+
+ function initHomingData() {
+ AaiService.getHomingData(DataService.getVnfInstanceId(), DataService.getVfModuleInstanceId())
+ .then(function (res) {
+ if (res && res.data) {
+ $scope.regionSelection = {
+ lcpRegion: (res.data[COMPONENT.CLOUD_REGION_ID]) ? res.data[COMPONENT.CLOUD_REGION_ID] : null,
+ legacyRegion: null,
+ tenant: (res.data[COMPONENT.TENANT_ID]) ? res.data[COMPONENT.TENANT_ID] : null
+ };
+ $scope.isHomingData = $scope.regionSelection.lcpRegion !== null && res.data.tenant !== null;
+ $scope.isHomingData = $scope.isHomingData && (($scope.megaRegion).indexOf($scope.regionSelection.lcpRegion) === -1);
+ }
+
+ if (!$scope.isHomingData) {
+ getLcpCloudRegionTenantList();
+ }
+ })
+ .catch(function (error) {
+ getLcpCloudRegionTenantList();
+ });
+ };
+
+ function getLcpRegionId() {
+ if(_.isEmpty($scope.regionSelection.legacyRegion)) {
+ return $scope.regionSelection.lcpRegion
+ }
+ return $scope.regionSelection.legacyRegion;
+ }
+
+ $scope.deleteOrResume = function() {
+
+ var regionSelectionList = [({id: "lcpRegion", value: getLcpRegionId()})];
+ regionSelectionList.push({id: "tenant", value: $scope.regionSelection.tenant});
+
+ var requestParams = {};
+ var requestDetails;
+ var msoType;
+ if ($scope.isResumeEnabled) {
+ CreationService.initializeComponent(COMPONENT.VF_MODULE);
+ CreationService.setInventoryInfo();
+
+ requestDetails = CreationService.getMsoRequestDetails(regionSelectionList);
+ requestParams.url = CreationService.getMsoUrl();
+ msoType = COMPONENT.MSO_CREATE_REQ;
+ }
+ else {
+ DeleteResumeService.initializeComponent(COMPONENT.VF_MODULE);
+
+ requestDetails = DeleteResumeService.getMsoRequestDetails(regionSelectionList);
+ if(DeleteResumeService.isMacro === true) {
+ requestDetails.requestParameters.aLaCarte = false;
+ }
+ requestParams.url = DeleteResumeService.getMsoUrl();
+ msoType = COMPONENT.MSO_DELETE_REQ;
+ }
+
+ requestParams.requestDetails = requestDetails;
+ requestParams.userId = DataService.getLoggedInUserId();
+ $uibModalInstance.close({requestParams: requestParams, msoType: msoType});
+ };
+
+ $scope.softDelete = function() {
+
+ var requestParams = {
+ tenantId: $scope.regionSelection.tenant,
+ lcpCloudRegionId: getLcpRegionId(),
+ serviceInstanceId: DataService.getServiceInstanceId(),
+ vnfInstanceId: DataService.getVnfInstanceId(),
+ vfModuleInstanceId: DataService.getVfModuleInstanceId()
+ };
+
+ requestParams.userId = DataService.getLoggedInUserId();
+ $uibModalInstance.close({requestParams : requestParams, msoType: COMPONENT.MSO_DEACTIVATE_AND_CLOUD_DELETE});
+ };
+
+ $scope.cancel = function() {
+ $uibModalInstance.dismiss('cancel');
+ };
+
+};
+
+appDS2.controller("vfModuleActionModalController", [ "COMPONENT", "$scope", "$uibModal", "CreationService",
+ "MsoService", "AaiService", "DeleteResumeService", "DataService", "$uibModalInstance", "action", "vfModule", "featureFlags",
+ vfModuleActionModalController ]);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.css
new file mode 100644
index 000000000..8193bd355
--- /dev/null
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.css
@@ -0,0 +1,62 @@
+.modal-dialog * {
+ font-family: OpenSans-Regular, sans-serif;
+}
+.modal-dialog {
+ width: 540px;
+}
+.modal-body {
+ width: 95%;
+ margin: auto;
+}
+.modal-body label:after{
+ color: red;
+ content: "*";
+ padding-left: 5px;
+}
+.modal-dialog .modal-x {
+ float: right;
+ margin-top: 10px;
+ height: 15px;
+ cursor:pointer;
+}
+.modal-body .user-explanation span {
+ line-height: 25px;
+}
+.modal-body .user-explanation h4{
+ line-height: 30px;
+}
+.region-section .field{
+ margin-top: 15px;
+ display: flex;
+}
+.region-section .field label{
+ width: 30%;
+ line-height: 35px;
+}
+.region-section .field select{
+ height: auto;
+}
+.region-section span{
+ margin-top: 20px;
+}
+.spinner{
+ display: none;
+}
+.region-section.is-loading .spinner{
+ display: block;
+ margin: 20px;
+ text-align: center;
+}
+.region-section.is-loading .region-user-selection{
+ display: none;
+}
+.modal-footer button{
+ width: 110px;
+}
+.modal-footer .cancel-btn{
+ margin-right: 15px;
+ margin-left: 15px;
+}
+.modal-footer .soft-delete-btn {
+ margin-right: 15px;
+} \ No newline at end of file
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html
new file mode 100644
index 000000000..bb90ce1f6
--- /dev/null
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html
@@ -0,0 +1,78 @@
+<link rel="stylesheet" type="text/css" href="app/vid/styles/buttons.css"/>
+<link rel="stylesheet" type="text/css" href="app/vid/styles/modals.css"/>
+<link rel="stylesheet" type="text/css" href="app/vid/styles/networkNode.css"/>
+ <link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.css"/>
+
+<div class="modal-header">
+ <span class="title" data-tests-id="modalTitle">{{action}} VF-Module</span>
+ <span class="top-btn sprite modal-x" data-ng-click="cancel()"></span>
+</div>
+
+<form name="regionSectionForm" class="region-section" novalidate data-ng-class="{'is-loading': !lcpAndTenant && !isHomingData}">
+ <div class="modal-body" id="modal-body">
+ <div class="user-explanation">
+ <span data-ng-if="isSoftDeleteEnabled">
+ <h4>Please select from the following options for {{vfModuleName}}:</h4>
+ <b>Delete</b>: Permanently delete the VF-Module and its assignments.<br>
+ <b>Soft-Delete</b>: Delete the VF-Module from the cloud but retain all its assignments.
+ This will allow you to rebuild the same VF-module later on by clicking the Resume button.
+ </span>
+ <span data-ng-if="!isSoftDeleteEnabled && !isResumeEnabled">
+ Are you sure you want to permanently delete this VF-Module ({{vfModuleName}})?
+ </span>
+ <span data-ng-if="isResumeEnabled && isHomingData">
+ Are you sure you would like to resume instantiation of ({{vfModuleName}})?
+ </span>
+ </div>
+
+ <div class="spinner">
+ <img src="app/vid/images/spinner.gif">
+ </div>
+
+ <div class="region-user-selection" data-ng-if="!isHomingData">
+ <span data-ng-if="!isResumeEnabled">Please provide the following information as entered on instantiation:</span>
+ <span data-ng-if="isResumeEnabled">Instantiation of the VF module ({{vfModuleName}}) with the same information provided requires the following homing information: </span>
+ <div class="lcp-region field">
+ <label>LCP Region</label>
+ <select name="lcp-region" required class="form-item wide"
+ data-tests-id="lcpRegion" data-ng-model="regionSelection.lcpRegion"
+ data-ng-change="regionSelection.tenant = null; regionSelection.legacyRegion = null;">
+ <option class="lcp-region-placeholder" value="" selected>Select LCP Region</option>
+ <option ng-repeat="option in lcpRegionList" value="{{option.cloudRegionId}}"
+ data-ng-if="option.isPermitted && !isFeatureFlagCloudOwner">{{option.cloudRegionId}}
+ </option>
+
+ <option ng-repeat="option in lcpRegionList" value="{{option.cloudRegionId}}"
+ data-ng-if="option.isPermitted && isFeatureFlagCloudOwner">
+ {{option.cloudRegionId}} ({{option.cloudOwner.trim().toUpperCase().replace("ATT-", "")}})
+ </option>
+ </select>
+ </div>
+
+ <div class="legacy-region field" data-ng-if="(megaRegion).indexOf(regionSelection.lcpRegion) > -1">
+ <label>Legacy Region</label>
+ <input type="text" data-tests-id="lcpRegionText" required data-ng-model="regionSelection.legacyRegion"
+ placeholder="Enter legacy region">
+ </div>
+
+ <div class="tenant field">
+ <label>Tenant</label>
+ <select name="tenant" required class="form-item wide"
+ data-tests-id="tenant" data-ng-model="regionSelection.tenant">
+ <option class="tenant-placeholder" value="" selected>Select Tenant Name</option>
+ <option ng-repeat="option in lcpAndTenant" class="tenantOption" value="{{option.tenantId}}"
+ data-ng-if="option.isPermitted && option.cloudRegionId === regionSelection.lcpRegion">{{option.tenantName}}
+ </option>
+ </select>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal-footer">
+ <button class="soft-delete-btn blue" data-ng-if="isSoftDeleteEnabled" data-tests-id="softDeleteButton"
+ data-ng-click="softDelete()" ng-disabled="regionSectionForm.$invalid">Soft Delete</button>
+ <button class="delete-resume-btn blue" data-tests-id="confirmResumeDeleteButton" data-ng-click="deleteOrResume()"
+ ng-disabled="regionSectionForm.$invalid">{{action}}</button>
+ <button class="cancel-btn white" data-tests-id="cancel" data-ng-click="cancel()">Cancel</button>
+ </div>
+</form>
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 ceb5a7541..6ede6ef30 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
@@ -76,8 +76,8 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
}];
}
return {displayData: displayData};
- })
- }
+ });
+ };
function getJoinedQueryString(queries) {
return queries.filter(function (val) {return val;}).join("&");
@@ -347,27 +347,16 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
});
},
- getPortMirroringData : function (ids) {
+ getPortMirroringData: function (ids) {
var defer = $q.defer();
- if(featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_REGION_ID_FROM_REMOTE)){
- var url = COMPONENT.AAI_GET_PORT_MIRRORING_CONFIGS_DATA +'?configurationIds=' + ids.join(',');
- $http.get(url).then(function(res){
- defer.resolve(res);
- }).catch(function(err) {
- $log.error(err);
- defer.resolve({});
- });
- }else {
- var staticConfigurationData = {};
- angular.forEach(ids, function(id) {
- staticConfigurationData[id] = {
- "cloudRegionId": "mdt1"
- }
- });
- defer.resolve({
- "data": staticConfigurationData
- });
- }
+
+ var url = COMPONENT.AAI_GET_PORT_MIRRORING_CONFIGS_DATA + '?configurationIds=' + ids.join(',');
+ $http.get(url).then(function (res) {
+ defer.resolve(res);
+ }).catch(function (err) {
+ $log.error(err);
+ defer.resolve({});
+ });
return defer.promise;
@@ -385,6 +374,29 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
return defer.promise;
},
+ 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 + '?'
+ + 'globalCustomerId=' + globalCustomerId
+ + '&serviceType=' + serviceType
+ + '&serviceInstanceId=' + serviceInstanceId
+ + '&sdcModelUuid=' + sdcModelUuid
+ ;
+
+ $http.get(url).then(function(res){
+ defer.resolve(res.data);
+ }).catch(function(err) {
+ $log.error(err);
+ defer.resolve({});
+ });
+
+ } else {
+ defer.resolve({});
+ }
+ return defer.promise;
+ },
+
getSubscriptionServiceTypeList : function(globalCustomerId,
successCallbackFunction) {
$log
@@ -434,8 +446,8 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
for (var i = 0; i < aaiLcpCloudRegionTenants.length; i++) {
lcpCloudRegionTenants.push({
- "cloudOwner": aaiLcpCloudRegionTenants[i][COMPONENT.CLOUD_OWNER],
"cloudRegionId": aaiLcpCloudRegionTenants[i][COMPONENT.CLOUD_REGION_ID],
+ "cloudOwner": aaiLcpCloudRegionTenants[i][COMPONENT.CLOUD_OWNER],
"tenantName": aaiLcpCloudRegionTenants[i][COMPONENT.TENANT_NAME],
"tenantId": aaiLcpCloudRegionTenants[i][COMPONENT.TENANT_ID],
"isPermitted": aaiLcpCloudRegionTenants[i][COMPONENT.IS_PERMITTED]});
@@ -741,8 +753,25 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
"headers: " + header +
"config: " + config);
});
+ },
+
+ getHomingData: function(vnfInstanceId, vfModuleId) {
+ var url = COMPONENT.AAI_GET_HOMING_DATA.replace('@vnfInstanceId', vnfInstanceId)
+ .replace('@vfModuleId', vfModuleId);
+
+ var deferred = $q.defer();
+
+ $http.get(url)
+ .success(function (response) {
+ deferred.resolve({data: response});
+ }).error(function (data, status, headers, config) {
+ deferred.reject({message: data, status: status});
+ });
+
+ return deferred.promise;
+
}
- }
+ };
};
appDS2.factory("AaiService", ["$http", "$log", "PropertyService",
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 6bdc0ae9c..52adcc949 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
@@ -21,6 +21,22 @@
"use strict";
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;
+ };
+
return {
getModel: function (modelId, successCallbackFunction) {
$log.debug("AsdcService:getModel: modelId: " + modelId);
@@ -34,19 +50,30 @@ var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCON
(UtilityService.runHttpErrorHandler);
},
- shouldExcludeMacroFromAsyncInstatiationFlow: 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;
+ shouldTakeTheDrawingBoardViewEdit: function(serviceModel) {
+ if (serviceModel.service.vidNotions
+ && serviceModel.service.vidNotions.viewEditUI
+ && serviceModel.service.vidNotions.viewEditUI !== 'legacy'
+ ) return true;
+
+ return false;
+ },
+
+ shouldTakeTheAsyncInstantiationFlow: function(serviceModel) {
+ // First of all, respect serviceModel.service.vidNotions.instantiationUI
+ if (serviceModel.service.vidNotions
+ && serviceModel.service.vidNotions.instantiationUI
+ && serviceModel.service.vidNotions.instantiationUI !== 'legacy'
+ ) return true;
+
+ // If defined 'legacy' or not defined, other client-side
+ // logic still apply:
+
+ if (this.isMacro(serviceModel)
+ && !shouldExcludeMacroFromAsyncInstantiationFlow(serviceModel)
+ ) return true;
+
+ // otherwise...
return false;
},
@@ -63,15 +90,15 @@ var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCON
return UtilityService.arrayContains(VIDCONFIGURATION.MACRO_SERVICES, serviceModel.service.invariantUuid);
default:
console.debug("Unexpected serviceModel.service.instantiationType: " + serviceModel.service.instantiationType);
- return true;
+ return UtilityService.arrayContains(VIDCONFIGURATION.MACRO_SERVICES, serviceModel.service.invariantUuid);
}
} else {
$log.debug("isMscro=false, because serviceModel.service is undefined");
return false;
}
}
- }
-}
+ };
+};
appDS2.factory("AsdcService", ["$http", "$log", "PropertyService",
"UtilityService", "VIDCONFIGURATION","COMPONENT", "DataService", "featureFlags", AsdcService]);
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 b896847d6..7d07714d7 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
@@ -1117,8 +1117,14 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
if (j < parameter.optionList.length) {
continue;
}
+
+ var optionName = featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST) && cloudRegionTenantList[i].cloudOwner ?
+ cloudRegionTenantList[i].cloudRegionId + " (" + cloudRegionTenantList[i].cloudOwner.trim().toLowerCase().replace(/^att-/, "").toUpperCase() + ")" :
+ cloudRegionTenantList[i].cloudRegionId;
+
parameter.optionList.push({
id : cloudRegionTenantList[i].cloudRegionId,
+ name: optionName,
isPermitted : cloudRegionTenantList[i].isPermitted
});
}
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
index 0e1635512..6cc71b41c 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
@@ -270,15 +270,15 @@ var DataService = function($log, DataService) {
}
return _this.aLaCarte;
},
- setShouldExcludeMacroFromAsyncInstatiationFlow: function (val) {
- _this.shouldExcludeMacroFromAsyncInstatiationFlow = val;
+ setShouldIncludeInAsyncInstantiationFlow: function (val) {
+ _this.shouldIncludeInAsyncInstantiationFlow = val;
},
- getShouldExcludeMacroFromAsyncInstatiationFlow: function(){
- if (_this.shouldExcludeMacroFromAsyncInstatiationFlow === undefined) {
+ getShouldIncludeInAsyncInstantiationFlow: function(){
+ if (_this.shouldIncludeInAsyncInstantiationFlow === undefined) {
return false;
}
- return _this.shouldExcludeMacroFromAsyncInstatiationFlow;
- },
+ return _this.shouldIncludeInAsyncInstantiationFlow;
+ },
setMacro : function(aval) {
_this.macro = aval;
},
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js
index 416096a18..a8db5214a 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js
@@ -422,8 +422,14 @@ var DeleteResumeService = function($log, AaiService, AsdcService, DataService,
if (j < parameter.optionList.length) {
continue;
}
+
+ var optionName = featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST) && cloudRegionTenantList[i].cloudOwner ?
+ cloudRegionTenantList[i].cloudRegionId + " (" + cloudRegionTenantList[i].cloudOwner.trim().toLowerCase().replace(/^att-/, "").toUpperCase() + ")" :
+ cloudRegionTenantList[i].cloudRegionId;
+
parameter.optionList.push({
id : cloudRegionTenantList[i].cloudRegionId,
+ name: optionName,
isPermitted : cloudRegionTenantList[i].isPermitted
});
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 273f8e9e3..790f79880 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
@@ -80,6 +80,30 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS
};
+ var buildPayloadForActivateFabricConfiguration = function (model, userId) {
+ var requestDetails = {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": model.service.invariantUuid,
+ "modelVersionId": model.service.uuid,
+ "modelName": model.service.name,
+ "modelVersion": model.service.version
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": userId
+ },
+ "requestParameters": {
+ "aLaCarte": false
+ }
+ };
+
+ $log.debug("Service Activate Fabric Configuration payload", requestDetails);
+
+ return requestDetails;
+
+ };
+
var activateInstance = function(requestParams) {
var requestDetails = buildPayloadForServiceActivateDeactivate(requestParams.model, requestParams.userId);
@@ -94,12 +118,10 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS
requestDetails);
};
- var sendPostRequest = function(url, requestDetails) {
+ var sendPostRequestWithBody = function(url, requestBody) {
var deferred = $q.defer();
if (url) {
- $http.post(url, {
- requestDetails: requestDetails
- }, {
+ $http.post(url, requestBody, {
timeout: PropertyService.getServerResponseTimeoutMsec()
}).success(function (response) {
deferred.resolve({data: response});
@@ -111,9 +133,16 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS
return deferred.promise;
};
+ var sendPostRequest = function(url, requestDetails) {
+ return sendPostRequestWithBody(url, {requestDetails: requestDetails});
+ };
+
return {
createInstance : requestInstanceUpdate,
deleteInstance : requestInstanceUpdate,
+ createAndDeleteInstance: function(requestParams) {
+ return sendPostRequest("mso/" + requestParams.url, requestParams.requestDetails);
+ },
getOrchestrationRequest : function(requestId, successCallbackFunction) {
$log.debug("MsoService:getOrchestrationRequest: requestId: "
+ requestId);
@@ -312,7 +341,6 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS
"modelCustomizationName": requestParams.configurationModelInfo.modelCustomizationName
},
"cloudConfiguration": {
- // "tenantId": ????
"lcpCloudRegionId": requestParams.portMirroringConfigFields.lcpRegion.value
},
"requestInfo": {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/propertyService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/propertyService.js
index ad9bf7dfa..b576b29ed 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/propertyService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/propertyService.js
@@ -29,7 +29,6 @@ var PropertyService = function($location, $http, VIDCONFIGURATION ) {
var DEFAULT_MSO_MAX_POLLING_INTERVAL_MSEC = 60000;
var DEFAULT_MSO_MAX_POLLS = 10;
var DEFAULT_MSO_BASE_URL = "/" + BASE_PATH + "/mso";
- var DEFAULT_SERVER_RESPONSE_TIMEOUT_MSEC = 60000;
var MSO_POLLING_INTERVAL_MSECS = "mso_polling_interval_msecs";
var MSO_MAX_POLLS = "mso_max_polls";
@@ -40,7 +39,6 @@ var PropertyService = function($location, $http, VIDCONFIGURATION ) {
_this.msoMaxPollingIntervalMsec = DEFAULT_MSO_MAX_POLLING_INTERVAL_MSEC;
_this.msoMaxPolls = DEFAULT_MSO_MAX_POLLS;
_this.msoBaseUrl = DEFAULT_MSO_BASE_URL;
- _this.serverResponseTimeoutMsec = DEFAULT_SERVER_RESPONSE_TIMEOUT_MSEC;
return {
@@ -78,12 +76,9 @@ var PropertyService = function($location, $http, VIDCONFIGURATION ) {
_this.msoBaseUrl = msoBaseUrl;
},
getServerResponseTimeoutMsec : function() {
- return _this.serverResponseTimeoutMsec;
- },
- setServerResponseTimeoutMsec : function(serverResponseTimeoutMsec) {
- _this.serverResponseTimeoutMsec = serverResponseTimeoutMsec;
+ return VIDCONFIGURATION.SERVER_RESPONSE_TIMEOUT_MSECS;
}
};
-}
+};
appDS2.factory("PropertyService", PropertyService);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubs.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubs.htm
index 233bab1c8..37289f69e 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubs.htm
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubs.htm
@@ -68,7 +68,8 @@
<td style="width:30%">
<div class="fn-ebz-container">
<select style="width: 250px;" ng-model="selectedserviceinstancetype"
- ng-options="stype.sinstance as stype.sinstance for stype in serviceInstanceses">
+ ng-options="stype.sinstance as stype.sinstance for stype in serviceInstanceses"
+ data-tests-id="selectedServiceInstanceType">
<option value="">Select a Service Instance</option>
</select>
</div>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html
index 654226636..abc5b166f 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html
@@ -47,7 +47,7 @@
</thead>
<tbody ng-show="!collapseInProgress">
- <tr data-tests-id="active-table-cm-row" ng-repeat="changeManagement in vm.changeManagements | changeManagementsByStatuses:{statuses: ['COMPLETE'], notContains: true}">
+ <tr data-tests-id="active-table-cm-row" ng-repeat="changeManagement in vm.changeManagements | changeManagementsByStatuses:{statuses: ['COMPLETE','UNLOCKED'], notContains: true}">
<th scope="row">{{
changeManagement.vnfNameFromScheduler ||
changeManagement.instanceReferences.vnfInstanceId ||
@@ -140,8 +140,8 @@
<th></th>
<th></th>
</tr>
- <tr ng-repeat="changeManagement in vm.changeManagements | changeManagementsByStatuses:{statuses: ['COMPLETE']}">
- <th scope="row">{{
+ <tr ng-repeat="changeManagement in vm.changeManagements | changeManagementsByStatuses:{statuses: ['COMPLETE','UNLOCKED']}">
+ <th class="vnf-name" scope="row">{{
changeManagement.vnfNameFromScheduler ||
changeManagement.instanceReferences.vnfInstanceId ||
'No-Instance-Name'
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm
index 64f713251..d9a29e032 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm
@@ -34,7 +34,7 @@
<label>Status:</label><span class="status">{{status}}</span>
</div>
- <div ng-if="errorMsg != null" style="white-space: pre-line"><font color='red'>{{errorMsg}}
+ <div class="error-msg" ng-if="errorMsg != null" style="white-space: pre-line"><font color='red'>{{errorMsg}}
<pre>{{errorDetails | json}}</pre>
</font></div>
@@ -181,12 +181,17 @@
style="margin-right: 8px;">
Deactivate
</a>
- <a data-tests-id="activateButton" ng-disabled="!isActivateDeactivateEnabled('activate')"
+ <a ng-if="!isActivateFabricConfiguration()" data-tests-id="activateButton" ng-disabled="!isActivateDeactivateEnabled('activate')"
class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="activateMSOInstance()"
style="margin-right: 8px;">
Activate
</a>
- <a data-tests-id="showAssignmentsButton" ng-disabled="!isShowAssignmentsEnabled()"
+ <a ng-if="isActivateFabricConfiguration()" data-tests-id="activateFabricConfigurationButton" ng-disabled="!allConfigurationsAssigned"
+ class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="activateFabricConfigurationMSO()"
+ style="margin-right: 8px;">
+ Activate Fabric Configuration
+ </a>
+ <a data-tests-id="showAssignmentsButton" ng-if="isShowAssignmentsEnabled()"
class="pull-right btn btn-primary btn-xs" data-nodrag style="margin-right: 8px;"
target="_blank" ng-href="{{showAssignmentsSDNC()}}">
Show Assignments
@@ -377,6 +382,25 @@
</div>
</li>
</ol>
+
+ <ol ui-tree-nodes="" ng-model="vnf.networks"
+ ng-class="{hidden: collapsed}">
+ <li ng-repeat="network in vnf.networks" ui-tree-node>
+ <div ui-tree-handle class="tree-node tree-node-content">
+ NETWORK: {{network.name}} | TYPE: {{network.nodeType}} | ORCH
+ STATUS: {{network.nodeStatus}}
+ </div>
+ <ol ui-tree-nodes="" ng-model="network.vlans" ng-class="{hidden: collapsed}">
+ <li ng-repeat="vlan in network.vlans" ui-tree-node>
+ <div ui-tree-handle class="tree-node tree-node-content"
+ ng-class="'vlansTreeNode'">
+ VLAN: {{vlan.vlanIdInner}} | TYPE: VLAN
+ </div>
+
+ </li>
+ </ol>
+ </li>
+ </ol>
</li>
</ol>
@@ -400,6 +424,16 @@
<span class="glyphicon glyphicon-info-sign network-info"></span>
</a>
</div>
+
+ <ol ui-tree-nodes="" ng-model="network.vlans" ng-class="{hidden: collapsed}">
+ <li ng-repeat="vlan in network.vlans" ui-tree-node>
+ <div ui-tree-handle class="tree-node tree-node-content"
+ ng-class="'vlansTreeNode'">
+ VLAN: {{vlan.vlanIdInner}} | TYPE: VLAN
+ </div>
+
+ </li>
+ </ol>
</li>
</ol>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm
index 446387590..1158f4042 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm
@@ -80,9 +80,9 @@
<td width='33%' valign='middle'>
Jump to page:
<input class="fn-ebz-text" type="text" ng-model="currentPage" size="5" style="width: 47px;">
- Results per page: <span style="cursor: pointer" ng-click="viewPerPage = 10" ng-style="viewPerPage === 10 && {'textDecoration':'underline','text-color':'black'}">10</span>
- | <span style="cursor: pointer" ng-click="viewPerPage = 25" ng-style="viewPerPage === 25 && {'textDecoration':'underline','text-color':'black'}">25</span>
- | <span style="cursor: pointer" ng-click="viewPerPage = 50" ng-style="viewPerPage === 50 && {'textDecoration':'underline','text-color':'black'}">50</span>
+ Results per page: <span style="cursor: pointer" data-tests-id="view-per-page-10" ng-click="viewPerPage = 10" ng-style="viewPerPage === 10 && {'textDecoration':'underline','text-color':'black'}">10</span>
+ | <span style="cursor: pointer" data-tests-id="view-per-page-25" ng-click="viewPerPage = 25" ng-style="viewPerPage === 25 && {'textDecoration':'underline','text-color':'black'}">25</span>
+ | <span style="cursor: pointer" data-tests-id="view-per-page-50" ng-click="viewPerPage = 50" ng-style="viewPerPage === 50 && {'textDecoration':'underline','text-color':'black'}">50</span>
</td>
<td width='34%' align='right' valign='middle'>
<span style="cursor: pointer" ng-if="currentPage<totalPage"><button att-button size="small" ng-click="nextPage();">next page &gt;</button></span>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm
index e2261dc11..ec5cbdf44 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm
@@ -82,8 +82,8 @@ limitations under the License.
</div>
<div class="wrapper-list collector-{{collectorType}}">
- <div class="title-txt ng-hide-keep-block" ng-hide="collectorType==='pnf'"><b>Collector</b> Service Type</div>
- <select ng-model="collectorServiceType" ng-hide="collectorType==='pnf'" class="ng-hide-keep-block"
+ <div class="title-txt ng-hide-keep-block" ng-hide="!shouldLetSelectingCollectorType()"><b>Collector</b> Service Type</div>
+ <select ng-model="collectorServiceType" ng-hide="!shouldLetSelectingCollectorType()" class="ng-hide-keep-block"
ng-change="onCollectorServiceTypeSelected()" name="collectorServiceType" id="collectorServiceType"
ng-options="item['service-type'] disable when !(item['is-permitted']) for item in serviceTypes"
required data-tests-id="collectorServiceType">
diff --git a/vid-app-common/src/main/webapp/app/vid/test/testMso.js b/vid-app-common/src/main/webapp/app/vid/test/testMso.js
index f6ebed463..487988dc8 100755
--- a/vid-app-common/src/main/webapp/app/vid/test/testMso.js
+++ b/vid-app-common/src/main/webapp/app/vid/test/testMso.js
@@ -41,7 +41,6 @@ app.controller("testController", [ "$scope", "$timeout", "$cookieStore", "$log",
setTestMsoMode($cookieStore.get(TEST_MODE_COOKIE));
PropertyService.setMsoMaxPollingIntervalMsec(1000);
PropertyService.setMsoMaxPolls(7);
- PropertyService.setServerResponseTimeoutMsec(30000);
};
$scope.testMsoModeChanged = function() {
diff --git a/vid-app-common/src/main/webapp/app/vid/test/testViewEdit.js b/vid-app-common/src/main/webapp/app/vid/test/testViewEdit.js
index 7ddc3dec3..50162bfd7 100755
--- a/vid-app-common/src/main/webapp/app/vid/test/testViewEdit.js
+++ b/vid-app-common/src/main/webapp/app/vid/test/testViewEdit.js
@@ -90,7 +90,6 @@ var testViewEditController = function(COMPONENT, DataService, PropertyService,
PropertyService.setAsdcBaseUrl("testasdc");
PropertyService.setMsoMaxPollingIntervalMsec(1000);
PropertyService.setMsoMaxPolls(7);
- PropertyService.setServerResponseTimeoutMsec(30000);
};
$scope.testMsoModeChanged = function() {