diff options
author | 2016-06-10 07:36:43 +0200 | |
---|---|---|
committer | 2016-06-10 08:03:58 +0000 | |
commit | 70e243d1c48f9554bd4e28e80f7ff766db6fe857 (patch) | |
tree | 6c2f91854470d0e61f267ee05ea3067b34e05629 /vbd/gui/module/src/main/resources/vpp/services/bdm.vpp.service.js | |
parent | 973d8c2ecbb02cf6e4971060b6edec3617bce96f (diff) |
HONEYCOMB-7: Remove VBD form HC
VBD is now subproject of ODL:
https://git.opendaylight.org/gerrit/#/admin/projects/honeycomb/vbd
Change-Id: I1bf01a01cca50fe5e3f4f82a53c6b15ec5c7091d
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'vbd/gui/module/src/main/resources/vpp/services/bdm.vpp.service.js')
-rw-r--r-- | vbd/gui/module/src/main/resources/vpp/services/bdm.vpp.service.js | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/vbd/gui/module/src/main/resources/vpp/services/bdm.vpp.service.js b/vbd/gui/module/src/main/resources/vpp/services/bdm.vpp.service.js deleted file mode 100644 index a86fa06fc..000000000 --- a/vbd/gui/module/src/main/resources/vpp/services/bdm.vpp.service.js +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -define(['app/vpp/vpp.module'], function(vpp) { - vpp.register.factory('bdmVppService', function(VPPRestangular) { - var s = {}; - - var Vpp = function(nodeId, vppId) { - this['node-id'] = nodeId || null; - this['supporting-node'] = [ - { - 'topology-ref': 'topology-netconf', - 'node-ref': vppId - } - ]; - this['netconf-node-topology:pass-through'] = {}; - }; - - s.createObj = function(nodeId, vppId) { - return new Vpp(nodeId, vppId); - }; - - s.add = function(vpp, bridgeDomainId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bridgeDomainId).one('node').one(vpp['node-id']); - var dataObj = {'node': [vpp]}; - - restObj.customPUT(dataObj).then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.get = function(bridgeDomainId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bridgeDomainId); - - return restObj.get().then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.getOne = function(bridgeDomainId, vppId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bridgeDomainId).one('node').one(vppId); - - return restObj.get().then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.delete = function(bridgeDomainId, vppId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bridgeDomainId).one('node').one(vppId); - - return restObj.remove().then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.checkAndWriteVpp = function(bridgeDomainId, vppId, successCallback, errorCallback) { - s.getOne(bridgeDomainId, vppId, - function() { - successCallback(); - }, function() { - var vppObject = s.createObj(vppId, vppId); - - s.add(vppObject, bridgeDomainId, function() { - successCallback(); - }, function() { - errorCallback(); - }); - } - ); - }; - - s.checkAndDeleteVpp = function(bridgeDomainId, vppId, successCallback, errorCallback) { - s.getOne(bridgeDomainId, vppId, - function(data) { - if(!data['termination-point']) { - s.delete(bridgeDomainId, vppId, - function(){ - successCallback(); - }, - function() { - errorCallback(); - } - ); - } - }, - function() { - errorCallback(); - } - ); - }; - - return s; - }); -});
\ No newline at end of file |