4 appDS2.service('changeManagementService', ['$http', '$q', 'COMPONENT', 'VIDCONFIGURATION', changeManagementService]);
6 function changeManagementService($http, $q, COMPONENT, VIDCONFIGURATION) {
7 this.getWorkflows = function (vnfs) {
8 var deferred = $q.defer();
10 $http.get(COMPONENT.GET_WORKFLOW.replace("@vnfs", vnfs))
11 .success(function (response) {
12 deferred.resolve({data: response});
13 }).error(function (data, status, headers, config) {
14 deferred.reject({message: data, status: status});
17 return deferred.promise;
20 this.getMSOChangeManagements = function() {
21 var deferred = $q.defer();
23 $http.get(COMPONENT.GET_MSO_WORKFLOWS)
24 .success(function (response) {
25 deferred.resolve({data: response});
27 .error(function(data, status, headers, config) {
28 deferred.reject({message: data, status: status});
31 return deferred.promise;
34 this.getAllSDCServices = function () {
35 var deferred = $q.defer();
37 $http.get(COMPONENT.SERVICES_DIST_STATUS_PATH + VIDCONFIGURATION.ASDC_MODEL_STATUS)
38 .success(function (response) {
39 deferred.resolve({data: response});
41 .error(function(data, status, headers, config) {
42 deferred.reject({message: data, status: status});
45 return deferred.promise;
48 this.getSDCService = function(uuid) {
49 var deferred = $q.defer();
51 $http.get(COMPONENT.SERVICES_PATH + uuid)
52 .success(function (response) {
53 deferred.resolve({data: response});
55 .error(function(data, status, headers, config) {
56 deferred.reject({message: data, status: status});
59 return deferred.promise;
62 this.getSchedulerChangeManagements = function(){
63 var deferred = $q.defer();
65 $http.get(COMPONENT.GET_SCHEDULER_CHANGE_MANAGEMENTS)
66 .success(function (response) {
67 deferred.resolve({data: response});
69 .error(function(data, status, headers, config) {
70 deferred.reject({message: data, status: status});
73 return deferred.promise;