Yaniv Bronhaim has uploaded a new change for review. Change subject: Adding network api module to supervdsm ......................................................................
Adding network api module to supervdsm Change-Id: I75197754b9c64ccc1a58632802ba0cc8d99c9eb9 Signed-off-by: Yaniv Bronhaim <[email protected]> --- M vdsm/supervdsmServer A vdsm/supervdsm_api/network.py 2 files changed, 37 insertions(+), 14 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/53496/1 diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer index 4de784e..b2fe3da 100755 --- a/vdsm/supervdsmServer +++ b/vdsm/supervdsmServer @@ -63,11 +63,9 @@ from vdsm import utils from vdsm import sysctl from vdsm.supervdsm import _SuperVdsmManager -from vdsm.tool import restore_nets from parted_utils import getDevicePartedInfo as _getDevicePartedInfo from vdsm.network import sourceroutethread -from vdsm.network.api import setupNetworks, setSafeNetworkConfig, change_numvfs from vdsm.tc import setPortMirroring, unsetPortMirroring from storage.multipath import getScsiSerial as _getScsiSerial @@ -216,14 +214,6 @@ raise Exception("Incorporate socketFile") @logDecorator - def restoreNetworks(self): - return restore_nets.restore() - - @logDecorator - def setupNetworks(self, networks, bondings, options): - return setupNetworks(networks, bondings, **options) - - @logDecorator def changeNumvfs(self, pci_path, numvfs, net_name): return change_numvfs(pci_path, numvfs, net_name) @@ -284,10 +274,6 @@ def validateAccess(self, user, groups, *args, **kwargs): return self._runAs(user, groups, _validateAccess, args=args, kwargs=kwargs) - - @logDecorator - def setSafeNetworkConfig(self): - return setSafeNetworkConfig() @logDecorator def udevTriggerMultipath(self, guid): diff --git a/vdsm/supervdsm_api/network.py b/vdsm/supervdsm_api/network.py new file mode 100644 index 0000000..96597b9 --- /dev/null +++ b/vdsm/supervdsm_api/network.py @@ -0,0 +1,37 @@ +# Copyright 2016 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# +from __future__ import absolute_import +from . import expose +from vdsm.tool.restore_nets import restore +import vdsm.network.api + + +@expose +def restoreNetworks(*args, **kwrags): + return restore(*args, **kwrags) + + +@expose +def setSafeNetworkConfig(): + return vdsm.network.api.setSafeNetworkConfig() + + +@expose +def setupNetworks(networks, bondings, options): + return vdsm.network.api.setupNetworks(networks, bondings, **options) -- To view, visit https://gerrit.ovirt.org/53496 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75197754b9c64ccc1a58632802ba0cc8d99c9eb9 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
