aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/services
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-08-01 19:32:05 +0300
committerEylon Malin <eylon.malin@intl.att.com>2019-08-01 19:32:05 +0300
commit6126ea252a460c22e89bc8ad5ab68ec62e45fbe5 (patch)
treeaec0e7ea938ccabd02cad98b54a77312d2a17fd6 /vid-app-common/src/main/webapp/app/vid/scripts/services
parent95ea3bac38467090417056254ef6e4b3165e27d7 (diff)
handling cloud owner and lcp region in create port mirroring configuration
Issue-ID: VID-482 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com> Change-Id: Id7aed0f44927b27b69287f513d24552cf2afc003
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/services')
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js15
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js8
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js13
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js3
4 files changed, 15 insertions, 24 deletions
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 1949f5aa2..1a296ca5d 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
@@ -779,13 +779,13 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
var cloudOwner;
var lcpRegionOptionId = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
- var cloudOwnerAndLcpCloudRegion = getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId);
+ var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId);
if (cloudOwnerAndLcpCloudRegion.cloudRegionId === FIELD.KEY.LCP_REGION_TEXT) {
lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT,
parameterList);
cloudOwner = undefined;
} else {
- var cloudOwnerAndLcpCloudRegion = getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId);
+ var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId);
lcpRegion = cloudOwnerAndLcpCloudRegion.cloudRegionId;
cloudOwner = cloudOwnerAndLcpCloudRegion.cloudOwner;
}
@@ -1155,15 +1155,6 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
return parameter;
};
- var getCloudOwnerAndLcpCloudRegionFromOptionId = function (cloudRegionOptionId) {
- var cloudRegionTenantList = DataService.getCloudRegionTenantList();
- var cloudRegionTenant = _.find(cloudRegionTenantList, {"cloudRegionOptionId": cloudRegionOptionId});
- return {
- cloudOwner: cloudRegionTenant.cloudOwner,
- cloudRegionId: cloudRegionTenant.cloudRegionId
- }
- };
-
var getTenantList = function(cloudRegionOptionId) {
var cloudRegionTenantList = DataService.getCloudRegionTenantList();
var parameter = "";
@@ -1257,7 +1248,7 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
.updateList([ FIELD.PARAMETER.TENANT_DISABLED ]);
}
- var cloudOwnerAndLcpCloudRegion = getCloudOwnerAndLcpCloudRegionFromOptionId(list[0].value);
+ var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(list[0].value);
if (cloudOwnerAndLcpCloudRegion.cloudRegionId === FIELD.KEY.LCP_REGION_TEXT) {
parameterListControl
.updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_VISIBLE ]);
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 26adcf43b..84413f890 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
@@ -37,6 +37,14 @@ var DataService = function($log, DataService) {
setCloudRegionTenantList : function(cloudRegionTenantList) {
_this.cloudRegionTenantList = cloudRegionTenantList;
},
+ getCloudOwnerAndLcpCloudRegionFromOptionId : function (cloudRegionOptionId) {
+ var cloudRegionTenantList = this.getCloudRegionTenantList();
+ var cloudRegionTenant = _.find(cloudRegionTenantList, {"cloudRegionOptionId": cloudRegionOptionId});
+ return {
+ cloudOwner: cloudRegionTenant.cloudOwner,
+ cloudRegionId: cloudRegionTenant.cloudRegionId
+ }
+ },
getGlobalCustomerId : function() {
return _this.globalCustomerId;
},
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 aac0ed468..559174ddf 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
@@ -293,7 +293,7 @@ var DeleteResumeService = function($log, AaiService, AsdcService, DataService,
var cloudOwner;
var lcpRegionOptionId = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
- var cloudOwnerAndLcpCloudRegion = getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId);
+ var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId);
if (cloudOwnerAndLcpCloudRegion.cloudRegionId === FIELD.KEY.LCP_REGION_TEXT) {
lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT,
parameterList);
@@ -416,15 +416,6 @@ var DeleteResumeService = function($log, AaiService, AsdcService, DataService,
return parameter;
};
- var getCloudOwnerAndLcpCloudRegionFromOptionId = function (cloudRegionOptionId) {
- var cloudRegionTenantList = DataService.getCloudRegionTenantList();
- var cloudRegionTenant = _.find(cloudRegionTenantList, {"cloudRegionOptionId": cloudRegionOptionId});
- return {
- cloudOwner: cloudRegionTenant.cloudOwner,
- cloudRegionId: cloudRegionTenant.cloudRegionId
- }
- };
-
var getTenantList = function(cloudRegionOptionId) {
var parameter = "";
var cloudRegionTenantList = DataService.getCloudRegionTenantList();
@@ -478,7 +469,7 @@ var DeleteResumeService = function($log, AaiService, AsdcService, DataService,
.updateList([ FIELD.PARAMETER.TENANT_DISABLED ]);
}
- var cloudOwnerAndLcpCloudRegion = getCloudOwnerAndLcpCloudRegionFromOptionId(list[0].value);
+ var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(list[0].value);
if (cloudOwnerAndLcpCloudRegion.cloudRegionId === FIELD.KEY.LCP_REGION_TEXT) {
parameterListControl
.updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_VISIBLE ]);
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 d5baa1a21..3f902e86e 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
@@ -341,7 +341,8 @@ var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityS
"modelCustomizationName": requestParams.configurationModelInfo.modelCustomizationName
},
"cloudConfiguration": {
- "lcpCloudRegionId": requestParams.portMirroringConfigFields.lcpRegion.value
+ "lcpCloudRegionId": requestParams.portMirroringConfigFields.cloudRegionId,
+ "cloudOwner" : requestParams.portMirroringConfigFields.cloudOwner
},
"requestInfo": {
"instanceName": requestParams.portMirroringConfigFields.instanceName.value,