diff options
author | Ittay Stern <ittay.stern@att.com> | 2018-12-31 17:21:27 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-01-09 20:19:55 +0200 |
commit | 6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 (patch) | |
tree | 3bd672dff83e3218232cd8665680416b7fc26a5d /vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js | |
parent | 5ec29ff5e3864f1ba6ecac71f8bffbefa400cf27 (diff) |
Merge from ECOMP's repository
Main Features
--------------
- Async-Instantiation jobs mechanism major update; still WIP (package
`org.onap.vid.job`)
- New features in View/Edit: Activate fabric configuration; show
related networks; soft delete
- Support AAI service-tree traversal (`AAIServiceTree`)
- In-memory cache for SDC models and certain A&AI queries
(`CacheProviderWithLoadingCache`)
- Upgrade TOSCA Parser and add parsing options; fix malformed TOSCA
models
- Resolve Cloud-Owner values for MSO
- Pass X-ONAP headers to MSO
Infrastructure
--------------
- Remove codehaus' jackson mapper; use soley fasterxml 2.9.7
- Surefire invokes both TestNG and JUnit tests
- Support Kotlin source files
- AaiController2 which handles errors in a "Spring manner"
- Inline generated-sources and remove jsonschema2pojo
Quality
--------
- Cumulative bug fixes (A&AI API, UI timeouts, and many more)
- Many Sonar issues cleaned-up
- Some unused classes removed
- Minor changes in vid-automation project, allowing some API
verification to run
Hard Merges
------------
- HTTP Clients (MSO, A&AI, WebConfig, OutgoingRequestHeadersTest)
- Moved `package org.onap.vid.controllers` to `controller`, without
plural -- just to keep semantic sync with ECOMP.
Reference commit in ECOMP: 3d1141625
Issue-ID: VID-378
Change-Id: I9c8d1e74caa41815891d441fc0760bb5f29c5788
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js')
-rwxr-xr-x | vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js | 77 |
1 files changed, 53 insertions, 24 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 ceb5a754..6ede6ef3 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",
|