Petr Horáček has uploaded a new change for review. Change subject: net: native ovs [4]: move RollbackIncomplete to net api ......................................................................
net: native ovs [4]: move RollbackIncomplete to net api Move RollbackIncomplete exception to network/api.py, so it can be used by other netswitches. Change-Id: I45a4ab3cbb9aa999a955e9cc6e73ad3ab2930cf7 Bug-Url: https://bugzilla.redhat.com/1195208 Signed-off-by: Petr Horáček <phora...@redhat.com> --- M lib/vdsm/network/api.py M lib/vdsm/network/configurators/__init__.py 2 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/55311/1 diff --git a/lib/vdsm/network/api.py b/lib/vdsm/network/api.py index a1e101b..0c07be4 100644 --- a/lib/vdsm/network/api.py +++ b/lib/vdsm/network/api.py @@ -38,7 +38,6 @@ from . canonicalize import canonicalize_networks from . import netswitch -from .configurators import RollbackIncomplete _SYSFS_SRIOV_NUMVFS = '/sys/bus/pci/devices/{}/sriov_numvfs' @@ -147,6 +146,15 @@ six.reraise(excType, value, tb) +class RollbackIncomplete(Exception): + """This exception is raised in order to signal API.Global that a call to + setupNetworks has failed and there are leftovers that need to be cleaned + up. + Note that it is never raised by the default ifcfg configurator. + """ + pass + + def setupNetworks(networks, bondings, options): """Add/Edit/Remove configuration for networks and bondings. diff --git a/lib/vdsm/network/configurators/__init__.py b/lib/vdsm/network/configurators/__init__.py index 69e97e7..fdbda55 100644 --- a/lib/vdsm/network/configurators/__init__.py +++ b/lib/vdsm/network/configurators/__init__.py @@ -28,19 +28,11 @@ from vdsm.netlink import monitor from .dhclient import DhcpClient +from ..api import RollbackIncomplete from ..errors import ConfigNetworkError, ERR_FAILED_IFUP from . import qos from ..models import Bond, Bridge, hierarchy_vlan_tag, hierarchy_backing_device from ..sourceroute import StaticSourceRoute - - -class RollbackIncomplete(Exception): - """This exception is raised in order to signal API.Global that a call to - setupNetworks has failed and there are leftovers that need to be cleaned - up. - Note that it is never raised by the default ifcfg configurator. - """ - pass class Configurator(object): -- To view, visit https://gerrit.ovirt.org/55311 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45a4ab3cbb9aa999a955e9cc6e73ad3ab2930cf7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <phora...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches