def _CheckNodeFreeMemory(lu, node, reason, requested, hypervisor_name):
"""Checks if a node has enough free memory.
- This function check if a given node has the needed amount of free
+ This function checks if a given node has the needed amount of free
memory. In case the node has less memory or we cannot get the
- information from the node, this function raise an OpPrereqError
+ information from the node, this function raises an OpPrereqError
exception.
@type lu: C{LogicalUnit}
def _CheckNodesFreeDiskPerVG(lu, nodenames, req_sizes):
- """Checks if nodes have enough free disk space in the all VGs.
+ """Checks if nodes have enough free disk space in all the VGs.
- This function check if all given nodes have the needed amount of
+ This function checks if all given nodes have the needed amount of
free disk. In case any node has less disk or we cannot get the
- information from the node, this function raise an OpPrereqError
+ information from the node, this function raises an OpPrereqError
exception.
@type lu: C{LogicalUnit}
def _CheckNodesFreeDiskOnVG(lu, nodenames, vg, requested):
"""Checks if nodes have enough free disk space in the specified VG.
- This function check if all given nodes have the needed amount of
+ This function checks if all given nodes have the needed amount of
free disk. In case any node has less disk or we cannot get the
- information from the node, this function raise an OpPrereqError
+ information from the node, this function raises an OpPrereqError
exception.
@type lu: C{LogicalUnit}
"""Generate the entire disk layout for a given template type.
"""
- #TODO: compute space requirements
-
vgname = lu.cfg.GetVGName()
disk_count = len(disk_info)
disks = []
return tuple(all_nodes)
secondary_nodes = property(_ComputeSecondaryNodes, None, None,
- "List of secondary nodes")
+ "List of names of secondary nodes")
def _ComputeAllNodes(self):
"""Compute the list of all nodes.
return tuple(all_nodes)
all_nodes = property(_ComputeAllNodes, None, None,
- "List of all nodes of the instance")
+ "List of names of all the nodes of the instance")
def MapLVsByNode(self, lvmap=None, devs=None, node=None):
"""Provide a mapping of nodes to LVs this instance owns.
"""RPC Result class.
This class holds an RPC result. It is needed since in multi-node
- calls we can't raise an exception just because one one out of many
+ calls we can't raise an exception just because one out of many
failed, and therefore we use this class to encapsulate the result.
@ivar data: the data payload, for successful results, or None
@param body: dictionary with request bodies per host
@type read_timeout: int or None
@param read_timeout: Read timeout for request
+ @rtype: dictionary
+ @return: a dictionary mapping host names to rpc.RpcResult objects
"""
assert read_timeout is not None, \