]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: make mount point more configurable
authorRamana Raja <rraja@redhat.com>
Tue, 19 Apr 2016 04:11:22 +0000 (09:41 +0530)
committerRamana Raja <rraja@redhat.com>
Wed, 4 May 2016 13:24:08 +0000 (18:54 +0530)
The mount points of the test clients were created based on the auth
ID they used. So two clients using the same auth ID could not create
different mount points in a straight forward way. Expose the
directory name of the mount point as a public attribute allowing
client mount points to be easily changed whenever needed.

Signed-off-by: Ramana Raja <rraja@redhat.com>
tasks/cephfs/mount.py

index e8d66b02a958e8700c37b1515cd52727ea7a3450..a77cfd7154f379e8546a402ac64fa53c2092cb4b 100644 (file)
@@ -23,6 +23,7 @@ class CephFSMount(object):
         self.test_dir = test_dir
         self.client_id = client_id
         self.client_remote = client_remote
+        self.mountpoint_dir_name = 'mnt.{id}'.format(id=self.client_id)
 
         self.test_files = ['a', 'b', 'c']
 
@@ -30,7 +31,8 @@ class CephFSMount(object):
 
     @property
     def mountpoint(self):
-        return os.path.join(self.test_dir, 'mnt.{id}'.format(id=self.client_id))
+        return os.path.join(
+            self.test_dir, '{dir_name}'.format(dir_name=self.mountpoint_dir_name))
 
     def is_mounted(self):
         raise NotImplementedError()