Revision 7260cfbe lib/storage.py
b/lib/storage.py | ||
---|---|---|
23 | 23 |
|
24 | 24 |
""" |
25 | 25 |
|
26 |
# pylint: disable-msg=W0232,R0201 |
|
27 |
|
|
28 |
# W0232, since we use these as singletons rather than object holding |
|
29 |
# data |
|
30 |
|
|
31 |
# R0201, for the same reason |
|
32 |
|
|
33 |
# TODO: FileStorage initialised with paths whereas the others not |
|
26 | 34 |
|
27 | 35 |
import logging |
28 | 36 |
|
... | ... | |
50 | 58 |
""" |
51 | 59 |
raise NotImplementedError() |
52 | 60 |
|
53 |
def Modify(self, name, changes): |
|
61 |
def Modify(self, name, changes): # pylint: disable-msg=W0613
|
|
54 | 62 |
"""Modifies an entity within the storage unit. |
55 | 63 |
|
56 | 64 |
@type name: string |
... | ... | |
76 | 84 |
raise NotImplementedError() |
77 | 85 |
|
78 | 86 |
|
79 |
class FileStorage(_Base): |
|
87 |
class FileStorage(_Base): # pylint: disable-msg=W0223
|
|
80 | 88 |
"""File storage unit. |
81 | 89 |
|
82 | 90 |
""" |
... | ... | |
153 | 161 |
return values |
154 | 162 |
|
155 | 163 |
|
156 |
class _LvmBase(_Base): |
|
164 |
class _LvmBase(_Base): # pylint: disable-msg=W0223
|
|
157 | 165 |
"""Base class for LVM storage containers. |
158 | 166 |
|
159 | 167 |
@cvar LIST_FIELDS: list of tuples consisting of three elements: SF_* |
... | ... | |
248 | 256 |
|
249 | 257 |
if callable(mapper): |
250 | 258 |
# we got a function, call it with all the declared fields |
251 |
val = mapper(*values) |
|
259 |
val = mapper(*values) # pylint: disable-msg=W0142
|
|
252 | 260 |
elif len(values) == 1: |
253 | 261 |
# we don't have a function, but we had a single field |
254 | 262 |
# declared, pass it unchanged |
... | ... | |
324 | 332 |
yield fields |
325 | 333 |
|
326 | 334 |
|
327 |
class LvmPvStorage(_LvmBase): |
|
335 |
class LvmPvStorage(_LvmBase): # pylint: disable-msg=W0223
|
|
328 | 336 |
"""LVM Physical Volume storage unit. |
329 | 337 |
|
330 | 338 |
""" |
Also available in: Unified diff