]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
make util be aware of OSD paths
authorAlfredo Deza <alfredo.deza@inktank.com>
Wed, 23 Apr 2014 20:21:17 +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/util/constants.py
ceph_deploy/util/paths/__init__.py
ceph_deploy/util/paths/osd.py [new file with mode: 0644]

index 36c5f4f9c8119fb3cb03fa6262469d47f38c8b0f..39fad3f774447000f6bbdf04f8ac1000f64cca27 100644 (file)
@@ -11,3 +11,5 @@ tmp_path = join(base_path, 'tmp')
 mon_path = join(base_path, 'mon')
 
 mds_path = join(base_path, 'mds')
+
+osd_path = join(base_path, 'osd')
index 129ef4550170c1401dceabaf8591fd5850ae2e1e..f395ba58dec7991e59122bd1b0526b337526feaf 100644 (file)
@@ -1 +1,2 @@
 import mon
+import osd
diff --git a/ceph_deploy/util/paths/osd.py b/ceph_deploy/util/paths/osd.py
new file mode 100644 (file)
index 0000000..18d7502
--- /dev/null
@@ -0,0 +1,13 @@
+"""
+Comosd paths for osd, based on the constant file paths defined in
+``ceph_deploy.util.constants``.
+All functions return a string representation of the absolute path
+construction.
+"""
+from os.path import join
+from ceph_deploy.util import constants
+
+
+def base(cluster):
+    cluster = "%s-" % cluster
+    return join(constants.osd_path, cluster)