diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 10219127c139d1c8ddf2f34bf665238bdd87bcf3..aa3740f12603cfb6c057c7d9885a0846b7ce6da2 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -6788,9 +6788,9 @@ def _ShutdownInstanceDisks(lu, instance, disks=None, ignore_primary=False): 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} @@ -6828,11 +6828,11 @@ def _CheckNodeFreeMemory(lu, node, reason, requested, hypervisor_name): 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} @@ -6853,9 +6853,9 @@ def _CheckNodesFreeDiskPerVG(lu, nodenames, req_sizes): 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} @@ -9137,8 +9137,6 @@ def _GenerateDiskTemplate( """Generate the entire disk layout for a given template type. """ - #TODO: compute space requirements - vgname = lu.cfg.GetVGName() disk_count = len(disk_info) disks = [] diff --git a/lib/objects.py b/lib/objects.py index dd83bd25f09e26dfa8e5f4cccf2a01954ac288d1..983535357e0de265a04b1ff620ad248832c42875 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -1023,7 +1023,7 @@ class Instance(TaggableObject): 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. @@ -1051,7 +1051,7 @@ class Instance(TaggableObject): 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. diff --git a/lib/rpc.py b/lib/rpc.py index 6f8326c6518e629720ac84d04efaa3947248e261..b72ac23e98bb911e1ca43651c2dd5bd6c02cff87 100644 --- a/lib/rpc.py +++ b/lib/rpc.py @@ -150,7 +150,7 @@ class RpcResult(object): """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 @@ -405,6 +405,8 @@ class _RpcProcessor: @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, \ diff --git a/qa/qa_utils.py b/qa/qa_utils.py index f7d2698f0aeef3f2e7d882fd4ee3bd02c1ba7292..873459d46c03612d6a665b3cd4f93a37b7755586 100644 --- a/qa/qa_utils.py +++ b/qa/qa_utils.py @@ -166,6 +166,8 @@ def AssertCommand(cmd, fail=False, node=None): @param node: if passed, it should be the node on which the command should be executed, instead of the master node (can be either a dict or a string) + @return: the return code of the command + @raise qa_error.Error: if the command fails when it shouldn't or vice versa """ if node is None: