... to make lint shut up.
Signed-off-by: Helga Velroyen <[email protected]>
---
autotools/build-bash-completion | 2 +-
daemons/import-export | 2 +-
lib/backend.py | 2 +-
lib/cli.py | 12 ++++++------
lib/client/gnt_cluster.py | 2 +-
lib/cmdlib/base.py | 6 +++---
lib/cmdlib/instance.py | 2 +-
lib/confd/client.py | 8 ++++----
lib/config.py | 2 +-
lib/daemon.py | 2 +-
lib/http/client.py | 6 +++---
lib/jqueue.py | 3 +++
lib/locking.py | 2 +-
lib/masterd/instance.py | 4 ++--
lib/mcpu.py | 2 +-
lib/netutils.py | 2 +-
lib/query.py | 18 +++++++++---------
lib/rapi/connector.py | 2 +-
lib/rapi/testutils.py | 10 +++++-----
lib/runtime.py | 2 +-
lib/server/masterd.py | 4 ++--
lib/server/rapi.py | 2 +-
lib/ssh.py | 2 +-
lib/storage/container.py | 4 +++-
lib/storage/drbd.py | 2 +-
lib/utils/io.py | 2 +-
lib/utils/text.py | 4 ++--
lib/watcher/__init__.py | 2 +-
qa/qa_config.py | 2 +-
test/py/cmdlib/testsupport/processor_mock.py | 2 ++
test/py/lockperf.py | 2 +-
test/py/mocks.py | 2 +-
tools/move-instance | 2 +-
33 files changed, 65 insertions(+), 58 deletions(-)
diff --git a/autotools/build-bash-completion b/autotools/build-bash-completion
index 731e93d..9ba58ed 100755
--- a/autotools/build-bash-completion
+++ b/autotools/build-bash-completion
@@ -252,7 +252,7 @@ def WriteCompReply(sw, args, cur="\"$cur\""):
sw.Write("return")
-class CompletionWriter:
+class CompletionWriter(object):
"""Command completion writer class.
"""
diff --git a/daemons/import-export b/daemons/import-export
index 21d1d34..f763b60 100755
--- a/daemons/import-export
+++ b/daemons/import-export
@@ -99,7 +99,7 @@ def SetupLogging():
return child_logger
-class StatusFile:
+class StatusFile(object):
"""Status file manager.
"""
diff --git a/lib/backend.py b/lib/backend.py
index e75cf3b..332e1aa 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -1722,7 +1722,7 @@ def InstanceShutdown(instance, timeout, reason,
store_reason=True):
logging.info("Instance %s not running, doing nothing", iname)
return
- class _TryShutdown:
+ class _TryShutdown(object):
def __init__(self):
self.tried_once = False
diff --git a/lib/cli.py b/lib/cli.py
index 83c70a6..258609e 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -345,7 +345,7 @@ _QFT_NAMES = {
}
-class _Argument:
+class _Argument(object):
def __init__(self, min=0, max=None): # pylint: disable=W0622
self.min = min
self.max = max
@@ -2108,7 +2108,7 @@ def GenericPollJob(job_id, cbs, report_cbs):
raise errors.OpExecError(result)
-class JobPollCbBase:
+class JobPollCbBase(object):
"""Base class for L{GenericPollJob} callbacks.
"""
@@ -2136,7 +2136,7 @@ class JobPollCbBase:
raise NotImplementedError()
-class JobPollReportCbBase:
+class JobPollReportCbBase(object):
"""Base class for L{GenericPollJob} reporting callbacks.
"""
@@ -2790,7 +2790,7 @@ def GenericInstanceCreate(mode, opts, args):
return 0
-class _RunWhileClusterStoppedHelper:
+class _RunWhileClusterStoppedHelper(object):
"""Helper class for L{RunWhileClusterStopped} to simplify state management
"""
@@ -3073,7 +3073,7 @@ def _GetColumnFormatter(fdef, override, unit):
raise NotImplementedError("Can't format column type '%s'" % fdef.kind)
-class _QueryColumnFormatter:
+class _QueryColumnFormatter(object):
"""Callable class for formatting fields of a query.
"""
@@ -3347,7 +3347,7 @@ def GenericListFields(resource, fields, separator,
header, cl=None):
return constants.EXIT_SUCCESS
-class TableColumn:
+class TableColumn(object):
"""Describes a column for L{FormatTable}.
"""
diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py
index d6a4b69..4d328d8 100644
--- a/lib/client/gnt_cluster.py
+++ b/lib/client/gnt_cluster.py
@@ -1369,7 +1369,7 @@ def _InstanceStart(opts, inst_list, start,
no_remember=False):
return True
-class _RunWhenNodesReachableHelper:
+class _RunWhenNodesReachableHelper(object):
"""Helper class to make shared internal state sharing easier.
@ivar success: Indicates if all action_cb calls were successful
diff --git a/lib/cmdlib/base.py b/lib/cmdlib/base.py
index c735a36..58bf3b6 100644
--- a/lib/cmdlib/base.py
+++ b/lib/cmdlib/base.py
@@ -31,7 +31,7 @@ from ganeti import utils
from ganeti.cmdlib.common import ExpandInstanceUuidAndName
-class ResultWithJobs:
+class ResultWithJobs(object):
"""Data container for LU results with jobs.
Instances of this class returned from L{LogicalUnit.Exec} will be recognized
@@ -426,7 +426,7 @@ class NoHooksLU(LogicalUnit): # pylint: disable=W0223
raise AssertionError("PreparePostHookNodes called for NoHooksLU")
-class Tasklet:
+class Tasklet(object):
"""Tasklet base class.
Tasklets are subcomponents for LUs. LUs can consist entirely of tasklets or
@@ -472,7 +472,7 @@ class Tasklet:
raise NotImplementedError
-class QueryBase:
+class QueryBase(object):
"""Base for query utility classes.
"""
diff --git a/lib/cmdlib/instance.py b/lib/cmdlib/instance.py
index 0508c6f..e2fedf7 100644
--- a/lib/cmdlib/instance.py
+++ b/lib/cmdlib/instance.py
@@ -2095,7 +2095,7 @@ class LUInstanceMultiAlloc(NoHooksLU):
return ResultWithJobs(jobs, **self._ConstructPartialResult())
-class _InstNicModPrivate:
+class _InstNicModPrivate(object):
"""Data structure for network interface modifications.
Used by L{LUInstanceSetParams}.
diff --git a/lib/confd/client.py b/lib/confd/client.py
index e37a3cd..190044b 100644
--- a/lib/confd/client.py
+++ b/lib/confd/client.py
@@ -106,7 +106,7 @@ class _Request(object):
self.rcvd = set()
-class ConfdClient:
+class ConfdClient(object):
"""Send queries to confd, and get back answers.
Since the confd model works by querying multiple master candidates, and
@@ -462,7 +462,7 @@ class ConfdClientRequest(objects.ConfdRequest):
raise errors.ConfdClientError("Invalid request type")
-class ConfdFilterCallback:
+class ConfdFilterCallback(object):
"""Callback that calls another callback, but filters duplicate results.
@ivar consistent: a dictionary indexed by salt; for each salt, if
@@ -567,7 +567,7 @@ class ConfdFilterCallback:
self._callback(up)
-class ConfdCountingCallback:
+class ConfdCountingCallback(object):
"""Callback that calls another callback, and counts the answers
"""
@@ -629,7 +629,7 @@ class ConfdCountingCallback:
self._callback(up)
-class StoreResultCallback:
+class StoreResultCallback(object):
"""Callback that simply stores the most recent answer.
@ivar _answers: dict of salt to (have_answer, reply)
diff --git a/lib/config.py b/lib/config.py
index de803a8..fd4df67 100644
--- a/lib/config.py
+++ b/lib/config.py
@@ -75,7 +75,7 @@ def _ValidateConfig(data):
data['version'])
-class TemporaryReservationManager:
+class TemporaryReservationManager(object):
"""A temporary resource reservation manager.
This is used to reserve resources in a job, before using them, making sure
diff --git a/lib/daemon.py b/lib/daemon.py
index a5cc182..673b9c7 100644
--- a/lib/daemon.py
+++ b/lib/daemon.py
@@ -457,7 +457,7 @@ class AsyncAwaker(GanetiBaseAsyncoreDispatcher):
self.out_socket.send(chr(0))
-class _ShutdownCheck:
+class _ShutdownCheck(object):
"""Logic for L{Mainloop} shutdown.
"""
diff --git a/lib/http/client.py b/lib/http/client.py
index 849a195..5fc43bd 100644
--- a/lib/http/client.py
+++ b/lib/http/client.py
@@ -174,7 +174,7 @@ def _StartRequest(curl, req):
return _PendingRequest(curl, req, resp_buffer.getvalue)
-class _PendingRequest:
+class _PendingRequest(object):
def __init__(self, curl, req, resp_buffer_read):
"""Initializes this class.
@@ -233,7 +233,7 @@ class _PendingRequest:
req.completion_cb(req)
-class _NoOpRequestMonitor: # pylint: disable=W0232
+class _NoOpRequestMonitor(object): # pylint: disable=W0232
"""No-op request monitor.
"""
@@ -245,7 +245,7 @@ class _NoOpRequestMonitor: # pylint: disable=W0232
Disable = acquire
-class _PendingRequestMonitor:
+class _PendingRequestMonitor(object):
_LOCK = "_lock"
def __init__(self, owner, pending_fn):
diff --git a/lib/jqueue.py b/lib/jqueue.py
index d4664ef..0dbc039 100644
--- a/lib/jqueue.py
+++ b/lib/jqueue.py
@@ -546,6 +546,7 @@ class _QueuedJob(object):
class _OpExecCallbacks(mcpu.OpExecCbBase):
+
def __init__(self, queue, job, op):
"""Initializes this class.
@@ -557,6 +558,8 @@ class _OpExecCallbacks(mcpu.OpExecCbBase):
@param op: OpCode
"""
+ super(_OpExecCallbacks, self).__init__()
+
assert queue, "Queue is missing"
assert job, "Job is missing"
assert op, "Opcode is missing"
diff --git a/lib/locking.py b/lib/locking.py
index 615e226..0b936d8 100644
--- a/lib/locking.py
+++ b/lib/locking.py
@@ -969,7 +969,7 @@ class _AcquireTimeout(Exception):
"""
-class LockSet:
+class LockSet(object):
"""Implements a set of locks.
This abstraction implements a set of shared locks for the same resource type,
diff --git a/lib/masterd/instance.py b/lib/masterd/instance.py
index 4d8b8a0..0ecc47e 100644
--- a/lib/masterd/instance.py
+++ b/lib/masterd/instance.py
@@ -659,7 +659,7 @@ def FormatProgress(progress):
return utils.CommaJoin(parts)
-class ImportExportLoop:
+class ImportExportLoop(object):
MIN_DELAY = 1.0
MAX_DELAY = 20.0
@@ -1140,7 +1140,7 @@ class _RemoteExportCb(ImportExportCbBase):
finished_fn()
-class ExportInstanceHelper:
+class ExportInstanceHelper(object):
def __init__(self, lu, feedback_fn, instance):
"""Initializes this class.
diff --git a/lib/mcpu.py b/lib/mcpu.py
index b29c272..de02278 100644
--- a/lib/mcpu.py
+++ b/lib/mcpu.py
@@ -139,7 +139,7 @@ class LockAttemptTimeoutStrategy(object):
return timeout
-class OpExecCbBase: # pylint: disable=W0232
+class OpExecCbBase(object): # pylint: disable=W0232
"""Base class for OpCode execution callbacks.
"""
diff --git a/lib/netutils.py b/lib/netutils.py
index f39ef77..fbf9958 100644
--- a/lib/netutils.py
+++ b/lib/netutils.py
@@ -157,7 +157,7 @@ def GetHostname(name=None, family=None):
(err[0], err[2]), errors.ECODE_RESOLVER)
-class Hostname:
+class Hostname(object):
"""Class implementing resolver and hostname functionality.
"""
diff --git a/lib/query.py b/lib/query.py
index fa0027f..d09032d 100644
--- a/lib/query.py
+++ b/lib/query.py
@@ -201,7 +201,7 @@ def GetAllFields(fielddefs):
return [fdef for (fdef, _, _, _) in fielddefs]
-class _FilterHints:
+class _FilterHints(object):
"""Class for filter analytics.
When filters are used, the user of the L{Query} class usually doesn't know
@@ -387,7 +387,7 @@ def _MakeComparisonChecks(fn):
]
-class _FilterCompilerHelper:
+class _FilterCompilerHelper(object):
"""Converts a query filter to a callable usable for filtering.
"""
@@ -655,7 +655,7 @@ def _CompileFilter(fields, hints, qfilter):
return _FilterCompilerHelper(fields)(hints, qfilter)
-class Query:
+class Query(object):
def __init__(self, fieldlist, selected, qfilter=None, namefield=None):
"""Initializes this class.
@@ -1087,7 +1087,7 @@ def _GetItemTimestampFields(datatype):
]
-class NodeQueryData:
+class NodeQueryData(object):
"""Data container for node data queries.
"""
@@ -1406,7 +1406,7 @@ def _BuildNodeFields():
return _PrepareFieldList(fields, [])
-class InstanceQueryData:
+class InstanceQueryData(object):
"""Data container for instance data queries.
"""
@@ -2236,7 +2236,7 @@ def _BuildInstanceFields():
return _PrepareFieldList(fields, aliases)
-class LockQueryData:
+class LockQueryData(object):
"""Data container for lock data queries.
"""
@@ -2298,7 +2298,7 @@ def _BuildLockFields():
], [])
-class GroupQueryData:
+class GroupQueryData(object):
"""Data container for node group data queries.
"""
@@ -2658,7 +2658,7 @@ _CLUSTER_SIMPLE_FIELDS = {
}
-class ClusterQueryData:
+class ClusterQueryData(object):
def __init__(self, cluster, nodes, drain_flag, watcher_pause):
"""Initializes this class.
@@ -2730,7 +2730,7 @@ def _BuildClusterFields():
("name", "cluster_name")])
-class NetworkQueryData:
+class NetworkQueryData(object):
"""Data container for network data queries.
"""
diff --git a/lib/rapi/connector.py b/lib/rapi/connector.py
index 46b89da..d0cf6ad 100644
--- a/lib/rapi/connector.py
+++ b/lib/rapi/connector.py
@@ -43,7 +43,7 @@ _DISK_PATTERN = r"\d+"
CONNECTOR = {}
-class Mapper:
+class Mapper(object):
"""Map resource to method.
"""
diff --git a/lib/rapi/testutils.py b/lib/rapi/testutils.py
index cdc34dc..3eba07f 100644
--- a/lib/rapi/testutils.py
+++ b/lib/rapi/testutils.py
@@ -145,7 +145,7 @@ def _FormatHeaders(headers):
return "\n".join(headers)
-class FakeCurl:
+class FakeCurl(object):
"""Fake cURL object.
"""
@@ -206,7 +206,7 @@ class FakeCurl:
writefn(resp_body)
-class _RapiMock:
+class _RapiMock(object):
"""Mocking out the RAPI server parts.
"""
@@ -249,7 +249,7 @@ class _RapiMock:
return (resp_msg.start_line.code, resp_msg.headers, resp_msg.body)
-class _TestLuxiTransport:
+class _TestLuxiTransport(object):
"""Mocked LUXI transport.
Raises L{errors.RapiTestResult} for all method calls, no matter the
@@ -282,7 +282,7 @@ class _TestLuxiTransport:
raise errors.RapiTestResult
-class _LuxiCallRecorder:
+class _LuxiCallRecorder(object):
"""Records all called LUXI client methods.
"""
@@ -327,7 +327,7 @@ def _TestWrapper(fn, *args, **kwargs):
return NotImplemented
-class InputTestClient:
+class InputTestClient(object):
"""Test version of RAPI client.
Instances of this class can be used to test input arguments for RAPI client
diff --git a/lib/runtime.py b/lib/runtime.py
index bb586f1..9f61393 100644
--- a/lib/runtime.py
+++ b/lib/runtime.py
@@ -68,7 +68,7 @@ def GetGid(group, _getgrnam):
raise errors.ConfigurationError("Group '%s' not found (%s)" % (group, err))
-class GetentResolver:
+class GetentResolver(object):
"""Resolves Ganeti uids and gids by name.
@ivar masterd_uid: The resolved uid of the masterd user
diff --git a/lib/server/masterd.py b/lib/server/masterd.py
index 1130e90..d71d1ca 100644
--- a/lib/server/masterd.py
+++ b/lib/server/masterd.py
@@ -143,7 +143,7 @@ class
MasterClientHandler(daemon.AsyncTerminatedMessageStream):
self.server.request_workers.AddTask((self.server, message, self))
-class _MasterShutdownCheck:
+class _MasterShutdownCheck(object):
"""Logic for master daemon shutdown.
"""
@@ -267,7 +267,7 @@ class MasterServer(daemon.AsyncStreamServer):
self.context.jobqueue.Shutdown()
-class ClientOps:
+class ClientOps(object):
"""Class holding high-level client operations."""
def __init__(self, server):
self.server = server
diff --git a/lib/server/rapi.py b/lib/server/rapi.py
index 7cdb0aa..fb6abdc 100644
--- a/lib/server/rapi.py
+++ b/lib/server/rapi.py
@@ -205,7 +205,7 @@ class
RemoteApiHandler(http.auth.HttpServerRequestAuthentication,
return serializer.DumpJson(result)
-class RapiUsers:
+class RapiUsers(object):
def __init__(self):
"""Initializes this class.
diff --git a/lib/ssh.py b/lib/ssh.py
index c694341..9599b7f 100644
--- a/lib/ssh.py
+++ b/lib/ssh.py
@@ -106,7 +106,7 @@ def GetAllUserFiles(user, mkdir=False, dircheck=True,
_homedir_fn=None):
for (kind, (privkey, pubkey, _)) in result))
-class SshRunner:
+class SshRunner(object):
"""Wrapper for SSH commands.
"""
diff --git a/lib/storage/container.py b/lib/storage/container.py
index d77d80b..24108ae 100644
--- a/lib/storage/container.py
+++ b/lib/storage/container.py
@@ -43,7 +43,7 @@ def _ParseSize(value):
return int(round(float(value), 0))
-class _Base:
+class _Base(object):
"""Base class for storage abstraction.
"""
@@ -95,6 +95,8 @@ class FileStorage(_Base): # pylint: disable=W0223
@param paths: List of file storage paths
"""
+ super(FileStorage, self).__init__()
+
self._paths = paths
def List(self, name, fields):
diff --git a/lib/storage/drbd.py b/lib/storage/drbd.py
index 3073b69..68c9cec 100644
--- a/lib/storage/drbd.py
+++ b/lib/storage/drbd.py
@@ -711,7 +711,7 @@ class DRBD8Dev(base.BlockDev):
base.ThrowError("drbd%d: DRBD disk missing network info in"
" DisconnectNet()", self.minor)
- class _DisconnectStatus:
+ class _DisconnectStatus(object):
def __init__(self, ever_disconnected):
self.ever_disconnected = ever_disconnected
diff --git a/lib/utils/io.py b/lib/utils/io.py
index 808751c..3f7116c 100644
--- a/lib/utils/io.py
+++ b/lib/utils/io.py
@@ -71,7 +71,7 @@ def ErrnoOrStr(err):
return detail
-class FileStatHelper:
+class FileStatHelper(object):
"""Helper to store file handle's C{fstat}.
Useful in combination with L{ReadFile}'s C{preread} parameter.
diff --git a/lib/utils/text.py b/lib/utils/text.py
index 1fdba0e..7b64614 100644
--- a/lib/utils/text.py
+++ b/lib/utils/text.py
@@ -246,7 +246,7 @@ def ShellCombineCommands(cmdlist):
return ["/bin/sh", "-c", " && ".join(ShellQuoteArgs(c) for c in cmdlist)]
-class ShellWriter:
+class ShellWriter(object):
"""Helper class to write scripts with indentation.
"""
@@ -530,7 +530,7 @@ def FormatSeconds(secs):
return " ".join(parts)
-class LineSplitter:
+class LineSplitter(object):
"""Splits data chunks into lines separated by newline.
Instances provide a file-like interface.
diff --git a/lib/watcher/__init__.py b/lib/watcher/__init__.py
index bb39b25..28f3a63 100644
--- a/lib/watcher/__init__.py
+++ b/lib/watcher/__init__.py
@@ -158,7 +158,7 @@ class Instance(object):
cli.SubmitOpCode(op, cl=cl)
-class Node:
+class Node(object):
"""Data container representing cluster node.
"""
diff --git a/qa/qa_config.py b/qa/qa_config.py
index b23379c..a3e86ab 100644
--- a/qa/qa_config.py
+++ b/qa/qa_config.py
@@ -666,7 +666,7 @@ def get(name, default=None):
return GetConfig().get(name, default=default)
-class Either:
+class Either(object):
def __init__(self, tests):
"""Initializes this class.
diff --git a/test/py/cmdlib/testsupport/processor_mock.py
b/test/py/cmdlib/testsupport/processor_mock.py
index 5d39b47..80dbe62 100644
--- a/test/py/cmdlib/testsupport/processor_mock.py
+++ b/test/py/cmdlib/testsupport/processor_mock.py
@@ -33,6 +33,8 @@ class LogRecordingCallback(mcpu.OpExecCbBase):
"""
def __init__(self, processor):
+ super(LogRecordingCallback, self).__init__()
+
self.processor = processor
def Feedback(self, *args):
diff --git a/test/py/lockperf.py b/test/py/lockperf.py
index 5128c33..be31149 100755
--- a/test/py/lockperf.py
+++ b/test/py/lockperf.py
@@ -54,7 +54,7 @@ def ParseOptions():
return (opts, args)
-class State:
+class State(object):
def __init__(self, thread_count):
"""Initializes this class.
diff --git a/test/py/mocks.py b/test/py/mocks.py
index d06d671..d1c53e3 100644
--- a/test/py/mocks.py
+++ b/test/py/mocks.py
@@ -104,7 +104,7 @@ class FakeContext(object):
self.glm = FakeGLM()
-class FakeGetentResolver:
+class FakeGetentResolver(object):
"""Fake runtime.GetentResolver"""
def __init__(self):
diff --git a/tools/move-instance b/tools/move-instance
index 621495a..420fe21 100755
--- a/tools/move-instance
+++ b/tools/move-instance
@@ -133,7 +133,7 @@ class Abort(Error):
"""
-class RapiClientFactory:
+class RapiClientFactory(object):
"""Factory class for creating RAPI clients.
@ivar src_cluster_name: Source cluster name
--
1.9.1.423.g4596e3a