Revision e5d8774b
b/lib/constants.py | ||
---|---|---|
841 | 841 |
OP_STATUS_SUCCESS, |
842 | 842 |
OP_STATUS_ERROR]) |
843 | 843 |
|
844 |
# OpCode priority |
|
845 |
OP_PRIO_LOWEST = +19 |
|
846 |
OP_PRIO_HIGHEST = -20 |
|
847 |
|
|
848 |
OP_PRIO_LOW = +10 |
|
849 |
OP_PRIO_NORMAL = 0 |
|
850 |
OP_PRIO_HIGH = -10 |
|
851 |
|
|
852 |
OP_PRIO_DEFAULT = OP_PRIO_NORMAL |
|
853 |
|
|
844 | 854 |
# Execution log types |
845 | 855 |
ELOG_MESSAGE = "message" |
846 | 856 |
ELOG_PROGRESS = "progress" |
b/test/ganeti.constants_unittest.py | ||
---|---|---|
26 | 26 |
import re |
27 | 27 |
|
28 | 28 |
from ganeti import constants |
29 |
from ganeti import locking |
|
29 | 30 |
|
30 | 31 |
import testutils |
31 | 32 |
|
... | ... | |
68 | 69 |
self.failUnless(constants.SSL_CERT_EXPIRATION_ERROR < |
69 | 70 |
constants.SSL_CERT_EXPIRATION_WARN) |
70 | 71 |
|
72 |
def testOpCodePriority(self): |
|
73 |
self.failUnless(constants.OP_PRIO_LOWEST > constants.OP_PRIO_LOW) |
|
74 |
self.failUnless(constants.OP_PRIO_LOW > constants.OP_PRIO_NORMAL) |
|
75 |
self.failUnlessEqual(constants.OP_PRIO_NORMAL, locking._DEFAULT_PRIORITY) |
|
76 |
self.failUnlessEqual(constants.OP_PRIO_DEFAULT, locking._DEFAULT_PRIORITY) |
|
77 |
self.failUnless(constants.OP_PRIO_NORMAL > constants.OP_PRIO_HIGH) |
|
78 |
self.failUnless(constants.OP_PRIO_HIGH > constants.OP_PRIO_HIGHEST) |
|
79 |
|
|
71 | 80 |
|
72 | 81 |
class TestParameterNames(unittest.TestCase): |
73 | 82 |
"""HV/BE parameter tests""" |
Also available in: Unified diff