This adds a little utility function to ask the SSH file
manager for a key of one particular node.

This patch also updates some documentation of the previous
function.

Signed-off-by: Helga Velroyen <[email protected]>
---
 test/py/testutils_ssh.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/test/py/testutils_ssh.py b/test/py/testutils_ssh.py
index fb53f92..34e9d85 100644
--- a/test/py/testutils_ssh.py
+++ b/test/py/testutils_ssh.py
@@ -289,12 +289,25 @@ class FakeSshFileManager(object):
   def GetAuthorizedKeysOfNode(self, node):
     """Returns the authorized keys of the given node.
 
+    @type node: string
+    @param node: name of the node
     @rtype: list of str
     @returns: a list of authorized keys that are stored on that node
 
     """
     return self._authorized_keys[node]
 
+  def GetKeyOfNode(self, node):
+    """Returns the SSH key of the given node.
+
+    @type node: string
+    @param node: name of the node
+    @rtype: string
+    @returns: the SSH key of the node
+
+    """
+    return self._all_node_data[node].key
+
   def SetOrAddNode(self, name, uuid, key, pot_mc, mc, master):
     """Adds a new node to the state of the file manager.
 
-- 
2.6.0.rc2.230.g3dd15c0

Reply via email to