#
# 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
#
# 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
+# pylint: disable=W0232,R0201
+
+# W0232, since we use these as singletons rather than object holding
+# data
+
+# R0201, for the same reason
+
+# TODO: FileStorage initialised with paths whereas the others not
"""Base class for LVM storage containers.
@cvar LIST_FIELDS: list of tuples consisting of three elements: SF_*
"""Base class for LVM storage containers.
@cvar LIST_FIELDS: list of tuples consisting of three elements: SF_*
# we don't have a function, but we had a single field
# declared, pass it unchanged
val = values[0]
# we don't have a function, but we had a single field
# declared, pass it unchanged
val = values[0]
- def _GetAllocatable(attr):
- if attr:
- return (attr[0] == "a")
- else:
- logging.warning("Invalid PV attribute: %r", attr)
- return False
+ if attr:
+ return (attr[0] == "a")
+ else:
+ logging.warning("Invalid PV attribute: %r", attr)
+ return False
+
(constants.SF_SIZE, ["pv_size"], _ParseSize),
(constants.SF_USED, ["pv_used"], _ParseSize),
(constants.SF_FREE, ["pv_free"], _ParseSize),
(constants.SF_SIZE, ["pv_size"], _ParseSize),
(constants.SF_USED, ["pv_used"], _ParseSize),
(constants.SF_FREE, ["pv_free"], _ParseSize),
- (constants.SF_ALLOCATABLE, ["pv_attr"], _GetAllocatable),
+ (constants.SF_ALLOCATABLE, ["pv_attr"], _LvmPvGetAllocatable),