Revision 05325a35 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
6788 | 6788 |
def _CheckNodeFreeMemory(lu, node, reason, requested, hypervisor_name): |
6789 | 6789 |
"""Checks if a node has enough free memory. |
6790 | 6790 |
|
6791 |
This function check if a given node has the needed amount of free |
|
6791 |
This function checks if a given node has the needed amount of free
|
|
6792 | 6792 |
memory. In case the node has less memory or we cannot get the |
6793 |
information from the node, this function raise an OpPrereqError |
|
6793 |
information from the node, this function raises an OpPrereqError
|
|
6794 | 6794 |
exception. |
6795 | 6795 |
|
6796 | 6796 |
@type lu: C{LogicalUnit} |
... | ... | |
6828 | 6828 |
|
6829 | 6829 |
|
6830 | 6830 |
def _CheckNodesFreeDiskPerVG(lu, nodenames, req_sizes): |
6831 |
"""Checks if nodes have enough free disk space in the all VGs.
|
|
6831 |
"""Checks if nodes have enough free disk space in all the VGs.
|
|
6832 | 6832 |
|
6833 |
This function check if all given nodes have the needed amount of |
|
6833 |
This function checks if all given nodes have the needed amount of
|
|
6834 | 6834 |
free disk. In case any node has less disk or we cannot get the |
6835 |
information from the node, this function raise an OpPrereqError |
|
6835 |
information from the node, this function raises an OpPrereqError
|
|
6836 | 6836 |
exception. |
6837 | 6837 |
|
6838 | 6838 |
@type lu: C{LogicalUnit} |
... | ... | |
6853 | 6853 |
def _CheckNodesFreeDiskOnVG(lu, nodenames, vg, requested): |
6854 | 6854 |
"""Checks if nodes have enough free disk space in the specified VG. |
6855 | 6855 |
|
6856 |
This function check if all given nodes have the needed amount of |
|
6856 |
This function checks if all given nodes have the needed amount of
|
|
6857 | 6857 |
free disk. In case any node has less disk or we cannot get the |
6858 |
information from the node, this function raise an OpPrereqError |
|
6858 |
information from the node, this function raises an OpPrereqError
|
|
6859 | 6859 |
exception. |
6860 | 6860 |
|
6861 | 6861 |
@type lu: C{LogicalUnit} |
... | ... | |
9137 | 9137 |
"""Generate the entire disk layout for a given template type. |
9138 | 9138 |
|
9139 | 9139 |
""" |
9140 |
#TODO: compute space requirements |
|
9141 |
|
|
9142 | 9140 |
vgname = lu.cfg.GetVGName() |
9143 | 9141 |
disk_count = len(disk_info) |
9144 | 9142 |
disks = [] |
Also available in: Unified diff