Revision 78062de9 lib/ssh.py

b/lib/ssh.py
26 26

  
27 27
import os
28 28
import logging
29
import re
30 29

  
31 30
from ganeti import utils
32 31
from ganeti import errors
......
37 36
from ganeti import compat
38 37

  
39 38

  
40
def FormatParamikoFingerprint(fingerprint):
41
  """Format paramiko PKey fingerprint.
42

  
43
  @type fingerprint: str
44
  @param fingerprint: PKey fingerprint
45
  @return: The string hex representation of the fingerprint
46

  
47
  """
48
  assert len(fingerprint) % 2 == 0
49
  return ":".join(re.findall(r"..", fingerprint.lower()))
50

  
51

  
52 39
def GetUserFiles(user, mkdir=False, dircheck=True, kind=constants.SSHK_DSA,
53 40
                 _homedir_fn=None):
54 41
  """Return the paths of a user's SSH files.

Also available in: Unified diff