From 2f8598a556738fff6fe7586a38ac454f98a72ed3 Mon Sep 17 00:00:00 2001 From: Alexander Schreiber <als@google.com> Date: Mon, 15 Oct 2007 13:06:15 +0000 Subject: [PATCH] Trivial typing fixups. Reviewed-by: iustinp --- lib/backend.py | 18 ++++++++---------- lib/rpc.py | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/backend.py b/lib/backend.py index a8ccf50f1..215be6c6b 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -150,8 +150,7 @@ def LeaveCluster(): def GetNodeInfo(vgname): - """ gives back a hash with different informations - about the node + """Gives back a hash with different informations about the node. Returns: { 'vg_size' : xxx, 'vg_free' : xxx, 'memory_domain0': xxx, @@ -238,7 +237,7 @@ def GetVolumeList(vg_name): def ListVolumeGroups(): - """List the volume groups and their size + """List the volume groups and their size. Returns: Dictionary with keys volume name and values the size of the volume @@ -277,7 +276,7 @@ def NodeVolumes(): def BridgesExist(bridges_list): - """Check if a list of bridges exist on the current node + """Check if a list of bridges exist on the current node. Returns: True if all of them exist, false otherwise @@ -291,7 +290,7 @@ def BridgesExist(bridges_list): def GetInstanceList(): - """ provides a list of instances + """Provides a list of instances. Returns: A list of all running instances on the current node @@ -309,8 +308,7 @@ def GetInstanceList(): def GetInstanceInfo(instance): - """ gives back the informations about an instance - as a dictonary + """Gives back the informations about an instance as a dictionary. Args: instance: name of the instance (ex. instance1.example.com) @@ -367,7 +365,7 @@ def GetAllInstancesInfo(): def AddOSToInstance(instance, os_disk, swap_disk): - """Add an os to an instance. + """Add an OS to an instance. Args: instance: the instance object @@ -914,9 +912,9 @@ def _OSSearch(name, search_path=None): return None def _OSOndiskVersion(name, os_dir): - """Compute and return the api version of a given OS. + """Compute and return the API version of a given OS. - This function will try to read the api version of the os given by + This function will try to read the API version of the os given by the 'name' parameter and residing in the 'os_dir' directory. Return value will be either an integer denoting the version or None in the diff --git a/lib/rpc.py b/lib/rpc.py index d4fecdafd..efe847c5c 100644 --- a/lib/rpc.py +++ b/lib/rpc.py @@ -187,7 +187,7 @@ class MirrorContextFactory: class Client: """RPC Client class. - This class, given a (remote) ethod name, a list of parameters and a + This class, given a (remote) method name, a list of parameters and a list of nodes, will contact (in parallel) all nodes, and return a dict of results (key: node name, value: result). @@ -288,7 +288,7 @@ def call_bridges_exist(node, bridges_list): def call_instance_start(node, instance, extra_args): - """Stars an instance. + """Starts an instance. This is a single-node call. -- GitLab