Revision 13669ecd lib/backend.py
b/lib/backend.py | ||
---|---|---|
56 | 56 |
from ganeti import constants |
57 | 57 |
from ganeti.storage import bdev |
58 | 58 |
from ganeti.storage import drbd |
59 |
from ganeti.storage import filestorage |
|
59 | 60 |
from ganeti import objects |
60 | 61 |
from ganeti import ssconf |
61 | 62 |
from ganeti import serializer |
... | ... | |
693 | 694 |
return (bootid, storage_info, hv_info) |
694 | 695 |
|
695 | 696 |
|
697 |
# pylint: disable=W0613 |
|
698 |
def _GetFileStorageSpaceInfo(path, *args): |
|
699 |
"""Wrapper around filestorage.GetSpaceInfo. |
|
700 |
|
|
701 |
The purpose of this wrapper is to call filestorage.GetFileStorageSpaceInfo |
|
702 |
and ignore the *args parameter to not leak it into the filestorage |
|
703 |
module's code. |
|
704 |
|
|
705 |
@see: C{filestorage.GetFileStorageSpaceInfo} for description of the |
|
706 |
parameters. |
|
707 |
|
|
708 |
""" |
|
709 |
return filestorage.GetFileStorageSpaceInfo(path) |
|
710 |
|
|
711 |
|
|
696 | 712 |
# FIXME: implement storage reporting for all missing storage types. |
697 | 713 |
_STORAGE_TYPE_INFO_FN = { |
698 | 714 |
constants.ST_BLOCK: None, |
699 | 715 |
constants.ST_DISKLESS: None, |
700 | 716 |
constants.ST_EXT: None, |
701 |
constants.ST_FILE: None,
|
|
717 |
constants.ST_FILE: _GetFileStorageSpaceInfo,
|
|
702 | 718 |
constants.ST_LVM_PV: _GetVgSpindlesInfo, |
703 | 719 |
constants.ST_LVM_VG: _GetVgInfo, |
704 | 720 |
constants.ST_RADOS: None, |
Also available in: Unified diff