1/**
2 * Network block device (NBD) Server service. Keeps all NBD connections.
3 *
4 * @module app/common/services/nbdServerService
5 * @exports nbdServerService
6 * @name nbdServerService
7
8 */
9
10window.angular && (function(angular) {
11  'use strict';
12
13  angular.module('app.common.services').service('nbdServerService', [
14    'Constants',
15    function(Constants) {
16      this.nbdServerMap = {};
17
18      this.addConnection = function(index, nbdServer, file) {
19        this.nbdServerMap[index] = {'server': nbdServer, 'file': file};
20      };
21      this.getExistingConnections = function(index) {
22        return this.nbdServerMap;
23      }
24    }
25  ]);
26})(window.angular);
27