Dan Kenigsberg has uploaded a new change for review. Change subject: nwfilter, vmChannels: pep8 fixes ......................................................................
nwfilter, vmChannels: pep8 fixes Change-Id: Icf34f7d99d969cc08e3aa2da779769ae796300d1 Signed-off-by: Dan Kenigsberg <[email protected]> --- M Makefile.am M vdsm/nwfilter.py M vdsm/vmChannels.py 3 files changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/9434/1 diff --git a/Makefile.am b/Makefile.am index e15d709..26ce402 100644 --- a/Makefile.am +++ b/Makefile.am @@ -74,6 +74,7 @@ vdsm/momIF.py \ vdsm/neterrors.py \ vdsm/netinfo.py \ + vdsm/nwfilter.py \ vdsm/parted_utils.py \ vdsm/rest/BindingREST.py \ vdsm/rest/Controller.py \ @@ -110,6 +111,7 @@ vdsm/vdsm \ vdsm/vdsmDebugPlugin.py \ vdsm/vm.py \ + vdsm/vmChannels.py \ vdsm_api \ vdsm_cli \ vdsm_hooks/fileinject \ diff --git a/vdsm/nwfilter.py b/vdsm/nwfilter.py index 4129f83..7fcff29 100755 --- a/vdsm/nwfilter.py +++ b/vdsm/nwfilter.py @@ -25,6 +25,7 @@ from vdsm import libvirtconnection + def main(): """ Defines network filters on libvirt @@ -33,6 +34,7 @@ NoMacSpoofingFilter().defineNwFilter(conn) conn.close() + class NwFilter(object): """ Base class for custom network filters diff --git a/vdsm/vmChannels.py b/vdsm/vmChannels.py index 92f67a0..5879afa 100644 --- a/vdsm/vmChannels.py +++ b/vdsm/vmChannels.py @@ -22,6 +22,7 @@ import time import select + class Listener(threading.Thread): """ An events driven listener which handle messages from virtual machines. @@ -68,7 +69,7 @@ """ Add new channels to unconnected channels list. """ for (fileno, obj) in self._add_channels.items(): self.log.debug("fileno %d was added to unconnected channels.", - fileno) + fileno) self._unconnected[fileno] = obj self._add_channels.clear() @@ -139,13 +140,16 @@ self.log.info("Setting channels' timeout to %d seconds.", seconds) self._timeout = seconds - def register(self, fileno, connect_callback, read_callback, timeout_callback, opaque): + def register(self, fileno, connect_callback, read_callback, + timeout_callback, opaque): """ Register a new file descriptor to the listener. """ self.log.debug("Add fileno %d to listener's channels.", fileno) with self._update_lock: - self._add_channels[fileno] = { 'connect_cb': connect_callback, + self._add_channels[fileno] = { + 'connect_cb': connect_callback, 'read_cb': read_callback, 'timeout_cb': timeout_callback, - 'opaque': opaque, 'read_time': 0.0 } + 'opaque': opaque, 'read_time': 0.0, + } def unregister(self, fileno): """ Unregister an exist file descriptor from the listener. """ -- To view, visit http://gerrit.ovirt.org/9434 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf34f7d99d969cc08e3aa2da779769ae796300d1 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
