blob: 835054c75aff17b82a20231f090cea8b98dae2a2 [file] [log] [blame]
beccabroek44da4712019-03-20 13:24:23 -05001/**
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);