-
from textwrap import dedent
from tasks.cephfs.cephfs_test_case import CephFSTestCase
import os
+
class TestPoolPerm(CephFSTestCase):
def test_pool_perm(self):
self.mount_a.run_shell(["touch", "test_file"])
- file_path = os.path.join(self.mount_a.mountpoint, "test_file")
+ file_path = os.path.join(self.mount_a.mountpoint, "test_file")
remote_script = dedent("""
import os
""")
# set data pool read only
- self.fs.mon_manager.raw_cluster_cmd_result('auth', 'caps', 'client.0', 'mon', 'allow r', 'osd', 'allow r pool=data')
+ self.fs.mon_manager.raw_cluster_cmd_result('auth', 'caps', 'client.0', 'mon', 'allow r', 'osd',
+ 'allow r pool=data')
self.mount_a.umount_wait()
self.mount_a.mount()
self.mount_a.run_python(remote_script.format(path=file_path, check_read=str(False)))
# set data pool write only
- self.fs.mon_manager.raw_cluster_cmd_result('auth', 'caps', 'client.0', 'mon', 'allow r', 'osd', 'allow w pool=data')
+ self.fs.mon_manager.raw_cluster_cmd_result('auth', 'caps', 'client.0', 'mon', 'allow r', 'osd',
+ 'allow w pool=data')
self.mount_a.umount_wait()
self.mount_a.mount()