From 9d0996986cd2ba9031ed2775aa23e9e47e909672 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Thu, 18 Mar 2010 14:26:12 +0000 Subject: [PATCH] SimpleConfigReader: add docstrings All non-oneliner functions, after this patch, have their docstring. Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/ssconf.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/ssconf.py b/lib/ssconf.py index 07a264a06..ffb2ddfe8 100644 --- a/lib/ssconf.py +++ b/lib/ssconf.py @@ -186,6 +186,16 @@ class SimpleConfigReader(object): return master_candidate, drained, offline def GetInstanceByLinkIp(self, ip, link): + """Get instance name from its link and ip address. + + @type ip: string + @param ip: ip address + @type link: string + @param link: nic link + @rtype: string + @return: instance name + + """ if not link: link = self.GetDefaultNicLink() if not link in self._ip_to_inst_by_link: @@ -227,6 +237,14 @@ class SimpleConfigReader(object): return self._mc_primary_ips def GetInstancesIps(self, link): + """Get list of nic ips connected to a certain link. + + @type link: string + @param link: nic link + @rtype: list + @return: list of ips connected to that link + + """ if not link: link = self.GetDefaultNicLink() -- GitLab