summaryrefslogtreecommitdiffstats
path: root/app/common/services/nbdServerService.js
blob: 835054c75aff17b82a20231f090cea8b98dae2a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
 * Network block device (NBD) Server service. Keeps all NBD connections.
 *
 * @module app/common/services/nbdServerService
 * @exports nbdServerService
 * @name nbdServerService

 */

window.angular && (function(angular) {
  'use strict';

  angular.module('app.common.services').service('nbdServerService', [
    'Constants',
    function(Constants) {
      this.nbdServerMap = {};

      this.addConnection = function(index, nbdServer, file) {
        this.nbdServerMap[index] = {'server': nbdServer, 'file': file};
      };
      this.getExistingConnections = function(index) {
        return this.nbdServerMap;
      }
    }
  ]);
})(window.angular);
OpenPOWER on IntegriCloud