support daisy installer
[doctor.git] / doctor_tests / common / utils.py
index 2e823ac..01889d9 100644 (file)
@@ -47,13 +47,17 @@ def match_rep_in_file(regex, full_path):
     return None
 
 
+def get_doctor_test_root_dir():
+    current_dir = os.path.split(os.path.realpath(__file__))[0]
+    return os.path.dirname(current_dir)
+
+
 class SSHClient(object):
     def __init__(self, ip, username, password=None, pkey=None,
                  key_filename=None, log=None, look_for_keys=False,
                  allow_agent=False):
         self.client = paramiko.SSHClient()
-        self.client.load_system_host_keys()
-        self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+        self.client.set_missing_host_key_policy(paramiko.WarningPolicy())
         self.client.connect(ip, username=username, password=password,
                             pkey=pkey, key_filename=key_filename,
                             look_for_keys=look_for_keys,