import os
import logging
-import re
from ganeti import utils
from ganeti import errors
from ganeti import compat
-def FormatParamikoFingerprint(fingerprint):
- """Format paramiko PKey fingerprint.
-
- @type fingerprint: str
- @param fingerprint: PKey fingerprint
- @return: The string hex representation of the fingerprint
-
- """
- assert len(fingerprint) % 2 == 0
- return ":".join(re.findall(r"..", fingerprint.lower()))
-
-
def GetUserFiles(user, mkdir=False, dircheck=True, kind=constants.SSHK_DSA,
_homedir_fn=None):
"""Return the paths of a user's SSH files.