aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
diff options
context:
space:
mode:
authorSara Weiss <sara.weiss@intl.att.com>2019-09-18 13:55:55 +0300
committerIttay Stern <ittay.stern@att.com>2019-09-23 17:43:46 +0300
commite59d8d560376a34e0eab902a673b5b3c3add5b0d (patch)
tree0b5b0360453b125e2f758263b94a83cde7e7ef74 /vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
parent9a2cd4170c33326dc6a0829675fa4cef231efdd9 (diff)
add 'cloud region' optional field to change management
Issue-ID: VID-596 Change-Id: Ieb89980f7e802fe2508950a0e1a23188145fd85e Signed-off-by: Sara Weiss <sara.weiss@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js')
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js32
1 files changed, 21 insertions, 11 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 994a3e4ac..0e1beefb6 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
@@ -86,6 +86,23 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
}).join("&");
}
+ function getConfigParams(vnfRole, cloudRegion) {
+ if (!featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH)) {
+ return null
+ }
+
+ let data = {
+ vnfRole: vnfRole,
+ cloudRegion: cloudRegion,
+ };
+
+ let config = {
+ params: data
+ };
+
+ return config;
+ }
+
return {
getSubscriberName: function (globalCustomerId,
successCallbackFunction) {
@@ -630,24 +647,17 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
},
getVnfsByCustomerIdAndServiceType: function (globalSubscriberId, serviceType, vnfRole, cloudRegion) {
- var deferred = $q.defer();
+ let deferred = $q.defer();
let url = globalSubscriberId + COMPONENT.FORWARD_SLASH + serviceType
- if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH)){
- if (vnfRole) {
- url + COMPONENT.FORWARD_SLASH + vnfRole
- }
- if (cloudRegion) {
- url + COMPONENT.FORWARD_SLASH + cloudRegion;
- }
- }
-
+ const path = COMPONENT.AAI_GET_VNF_BY_CUSTOMERID_AND_SERVICETYPE + url;
+ let config = getConfigParams(vnfRole, cloudRegion);
if (UtilityService.hasContents(globalSubscriberId) &&
UtilityService.hasContents(serviceType)) {
- $http.get(COMPONENT.AAI_GET_VNF_BY_CUSTOMERID_AND_SERVICETYPE + url)
+ $http.get(path, config)
.success(function (response) {
if (response) {
deferred.resolve({data: response});