Revision cea881e5 lib/bdev.py
b/lib/bdev.py | ||
---|---|---|
32 | 32 |
from ganeti import errors |
33 | 33 |
from ganeti import constants |
34 | 34 |
from ganeti import objects |
35 |
from ganeti import compat |
|
35 | 36 |
|
36 | 37 |
|
37 | 38 |
# Size of reads in _CanReadDevice |
... | ... | |
388 | 389 |
pvs_info.reverse() |
389 | 390 |
|
390 | 391 |
pvlist = [ pv[1] for pv in pvs_info ] |
391 |
if utils.any(pvlist, lambda v: ":" in v):
|
|
392 |
if compat.any(pvlist, lambda v: ":" in v):
|
|
392 | 393 |
_ThrowError("Some of your PVs have the invalid character ':' in their" |
393 | 394 |
" name, this is not supported - please filter them out" |
394 | 395 |
" in lvm.conf using either 'filter' or 'preferred_names'") |
... | ... | |
462 | 463 |
""" |
463 | 464 |
if (not cls._VALID_NAME_RE.match(name) or |
464 | 465 |
name in cls._INVALID_NAMES or |
465 |
utils.any(cls._INVALID_SUBSTRINGS, lambda x: x in name)):
|
|
466 |
compat.any(cls._INVALID_SUBSTRINGS, lambda x: x in name)):
|
|
466 | 467 |
_ThrowError("Invalid LVM name '%s'", name) |
467 | 468 |
|
468 | 469 |
def Remove(self): |
Also available in: Unified diff