Commit 74f37195 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add constants for local disk status


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent ddfe2228
......@@ -205,6 +205,12 @@ MODIFIABLE_STORAGE_FIELDS = {
ST_LVM_PV: frozenset([SF_ALLOCATABLE]),
}
# Local disk status
# Note: Code depends on LDS_OKAY < LDS_UNKNOWN < LDS_FAULTY
(LDS_OKAY,
LDS_UNKNOWN,
LDS_FAULTY) = range(1, 4)
# disk template types
DT_DISKLESS = "diskless"
DT_PLAIN = "plain"
......
......@@ -54,6 +54,10 @@ class TestConstants(unittest.TestCase):
(constants.CONFIG_MAJOR, constants.CONFIG_MINOR,
constants.CONFIG_REVISION))
def testDiskStatus(self):
self.failUnless(constants.LDS_OKAY < constants.LDS_UNKNOWN)
self.failUnless(constants.LDS_UNKNOWN < constants.LDS_FAULTY)
class TestParameterNames(unittest.TestCase):
"""HV/BE parameter tests"""
......@@ -69,5 +73,6 @@ class TestParameterNames(unittest.TestCase):
"The %s parameter '%s' contains invalid characters" %
(kind, key))
if __name__ == '__main__':
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment