Revision 33993ab8 lib/ssh.py

b/lib/ssh.py
26 26

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

  
30 31
from ganeti import utils
31 32
from ganeti import errors
32 33
from ganeti import constants
33 34

  
34 35

  
36
def FormatParamikoFingerprint(fingerprint):
37
  """Formats the fingerprint of L{paramiko.PKey.get_fingerprint()}
38

  
39
  @type fingerprint: str
40
  @param fingerprint: PKey fingerprint
41
  @return The string hex representation of the fingerprint
42

  
43
  """
44
  assert len(fingerprint) % 2 == 0
45
  return ":".join(re.findall(r"..", fingerprint.lower()))
46

  
47

  
35 48
def GetUserFiles(user, mkdir=False):
36 49
  """Return the paths of a user's ssh files.
37 50

  

Also available in: Unified diff