aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/services
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/src/main/webapp/app/vid/scripts/services
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/src/main/webapp/app/vid/scripts/services')
-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
4 files changed, 52 insertions, 18 deletions
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);
}
}
};