]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
fix function renaming
authorAlfredo Deza <alfredo@deza.pe>
Thu, 18 Jul 2013 18:20:36 +0000 (14:20 -0400)
committerAlfredo Deza <alfredo@deza.pe>
Thu, 18 Jul 2013 18:20:36 +0000 (14:20 -0400)
ceph_deploy/tests/unit/util/test_paths.py
ceph_deploy/util/paths.py [deleted file]

index e467e2512fd99ad95a4612fdc6998106b8345706..71bcc62fdfd879892240dc19471d4e67482bc20c 100644 (file)
@@ -4,7 +4,7 @@ from ceph_deploy.util import paths
 class TestMonPaths(object):
 
     def test_base_path(self):
-        result = paths.mon._base('mycluster')
+        result = paths.mon.base('mycluster')
         assert result.endswith('/mycluster-')
 
     def test_path(self):
diff --git a/ceph_deploy/util/paths.py b/ceph_deploy/util/paths.py
deleted file mode 100644 (file)
index 4da438f..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-from os.path import join
-
-from ceph_deploy.util import constants
-
-
-class mon(object):
-    """
-    Common paths for mon, based on the constant file paths defined in
-    ``ceph_deploy.util.constants``.
-    All classmethods return a string representation of the absolute path
-    construction.
-    """
-
-    @classmethod
-    def _base(cls, cluster):
-        cluster = "%s-" % cluster
-        return join(constants.mon_path, cluster)
-
-    @classmethod
-    def path(cls, cluster, hostname):
-        """
-        Example usage::
-
-            >>> mon.path('mycluster', 'hostname')
-            /var/lib/ceph/mon/mycluster-myhostname
-        """
-        return "%s%s" % (cls._base(cluster), hostname)
-
-    @classmethod
-    def done(cls, cluster, hostname):
-        """
-        Example usage::
-
-            >>> mon.done('mycluster', 'hostname')
-            /var/lib/ceph/mon/mycluster-myhostname/done
-        """
-        return join(cls.path(cluster, hostname), 'done')
-
-    @classmethod
-    def init(cls, cluster, hostname, init):
-        """
-        Example usage::
-
-            >>> mon.init('mycluster', 'hostname', 'init')
-            /var/lib/ceph/mon/mycluster-myhostname/init
-        """
-        return join(cls.path(cluster, hostname), init)
-
-    @classmethod
-    def keyring(cls, cluster, hostname):
-        """
-        Example usage::
-
-            >>> mon.keyring('mycluster', 'myhostname')
-            /var/lib/ceph/tmp/mycluster-myhostname.mon.keyring
-        """
-        keyring_file = '%s-%s.mon.keyring' % (cluster, hostname)
-        return join(constants.tmp_path, keyring_file)