]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
add helper functions to remotes
authorAlfredo Deza <alfredo.deza@inktank.com>
Wed, 23 Apr 2014 20:21:00 +0000 (16:21 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Wed, 23 Apr 2014 20:25:58 +0000 (16:25 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/hosts/remotes.py

index 33425feb679b7890b3251e6afe0d09c7aab86217..e3f716a0f0f019be1b196742d81fffabbeac13be 100644 (file)
@@ -117,10 +117,22 @@ def append_to_file(file_path, contents):
         f.write(contents)
 
 
+def readline(path):
+    with open(path) as _file:
+        return _file.readline().strip('\n')
+
 def path_exists(path):
     return os.path.exists(path)
 
 
+def get_realpath(path):
+    return os.path.realpath(path)
+
+
+def listdir(path):
+    return os.listdir(path)
+
+
 def makedir(path, ignored=None):
     ignored = ignored or []
     try: