Move space reporting constant to constants.py
authorHelga Velroyen <helgav@google.com>
Tue, 23 Jul 2013 11:19:28 +0000 (13:19 +0200)
committerHelga Velroyen <helgav@google.com>
Tue, 23 Jul 2013 14:13:26 +0000 (16:13 +0200)
commitf79be8ec2243ea864148f085fe522eae4922acaa
tree6186189234e85d9a497810a81f179878f6e9fdf5
parent8660ba15826e91edbcdae6523b2460946a78e20b
Move space reporting constant to constants.py

This patch moves the constant which is used to determine
whether a storage type provides storage space reporting
from the utils package to the constants. This way, we
can also use it in haskell and it fits there semantically
better anyway.

Additionally, I added unit tests that make sure that the
constant is in sync with the actual implementation in the
backend. This will make sure that when new storage types
provide space reporting, those functions are actually used
in the backend.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
lib/constants.py
lib/utils/storage.py
test/py/ganeti.backend_unittest.py