From: Alfredo Deza Date: Wed, 23 Apr 2014 20:21:17 +0000 (-0400) Subject: make util be aware of OSD paths X-Git-Tag: v1.5.0~9^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=de84685a4af3e75b297d77bc637f4dfd83f04d8f;p=ceph-deploy.git make util be aware of OSD paths Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/util/constants.py b/ceph_deploy/util/constants.py index 36c5f4f..39fad3f 100644 --- a/ceph_deploy/util/constants.py +++ b/ceph_deploy/util/constants.py @@ -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') diff --git a/ceph_deploy/util/paths/__init__.py b/ceph_deploy/util/paths/__init__.py index 129ef45..f395ba5 100644 --- a/ceph_deploy/util/paths/__init__.py +++ b/ceph_deploy/util/paths/__init__.py @@ -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 index 0000000..18d7502 --- /dev/null +++ b/ceph_deploy/util/paths/osd.py @@ -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)