Revision 4f5277e7
b/lib/hypervisor/hv_base.py | ||
---|---|---|
49 | 49 |
# _CHECK values |
50 | 50 |
|
51 | 51 |
# must be afile |
52 |
_FILE_CHECK = (os.path.isabs, "must be an absolute path",
|
|
52 |
_FILE_CHECK = (utils.IsNormAbsPath, "must be an absolute normal path",
|
|
53 | 53 |
os.path.isfile, "not found or not a file") |
54 | 54 |
|
55 | 55 |
# must be a directory |
56 |
_DIR_CHECK = (os.path.isabs, "must be an absolute path",
|
|
56 |
_DIR_CHECK = (utils.IsNormAbsPath, "must be an absolute normal path",
|
|
57 | 57 |
os.path.isdir, "not found or not a directory") |
58 | 58 |
|
59 | 59 |
# nice wrappers for users |
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
56 | 56 |
constants.HV_ACPI: hv_base.NO_CHECK, |
57 | 57 |
constants.HV_SERIAL_CONSOLE: hv_base.NO_CHECK, |
58 | 58 |
constants.HV_VNC_BIND_ADDRESS: \ |
59 |
(False, lambda x: (utils.IsValidIP(x) or os.path.isabs(x)),
|
|
59 |
(False, lambda x: (utils.IsValidIP(x) or utils.IsAbsNormPath(x)),
|
|
60 | 60 |
"the VNC bind address must be either a valid IP address or an absolute" |
61 | 61 |
" pathname", None, None), |
62 | 62 |
constants.HV_VNC_TLS: hv_base.NO_CHECK, |
Also available in: Unified diff