From ee14d800632b09b859cde35de6c77a2212a789c9 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Wed, 26 Oct 2011 12:37:11 +0200 Subject: [PATCH] config: Add unlocked function to get all node objects This will be used for resolving node names. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/config.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/config.py b/lib/config.py index 7ca7c5593..b39441917 100644 --- a/lib/config.py +++ b/lib/config.py @@ -1488,9 +1488,16 @@ class ConfigWriter: would GetNodeInfo return for the node """ - my_dict = dict([(node, self._UnlockedGetNodeInfo(node)) - for node in self._UnlockedGetNodeList()]) - return my_dict + return self._UnlockedGetAllNodesInfo() + + def _UnlockedGetAllNodesInfo(self): + """Gets configuration of all nodes. + + @note: See L{GetAllNodesInfo} + + """ + return dict([(node, self._UnlockedGetNodeInfo(node)) + for node in self._UnlockedGetNodeList()]) @locking.ssynchronized(_config_lock, shared=1) def GetNodeGroupsFromNodes(self, nodes): -- GitLab