Example #1
0
 def test_existing_dir_does_not_raise_w_chown(self, monkeypatch, tmpdir):
     user = pwd.getpwnam(getpass.getuser())
     uid, gid = user[2], user[3]
     monkeypatch.setattr(system, 'get_ceph_user_ids', lambda: (uid, gid,))
     path = str(tmpdir)
     system.mkdir_p(path)
     assert os.path.isdir(path)
Example #2
0
 def test_new_dir_w_chown(self, monkeypatch, tmpdir):
     user = pwd.getpwnam(getpass.getuser())
     uid, gid = user[2], user[3]
     monkeypatch.setattr(system, 'get_ceph_user_ids', lambda: (uid, gid,))
     path = os.path.join(str(tmpdir), 'new')
     system.mkdir_p(path)
     assert os.path.isdir(path)
Example #3
0
def create_osd_path(osd_id, tmpfs=False):
    path = '/var/lib/ceph/osd/%s-%s' % (conf.cluster, osd_id)
    system.mkdir_p('/var/lib/ceph/osd/%s-%s' % (conf.cluster, osd_id))
    if tmpfs:
        mount_tmpfs(path)
Example #4
0
def create_osd_path(osd_id, tmpfs=False):
    path = '/var/lib/ceph/osd/%s-%s' % (conf.cluster, osd_id)
    system.mkdir_p('/var/lib/ceph/osd/%s-%s' % (conf.cluster, osd_id))
    if tmpfs:
        mount_tmpfs(path)
Example #5
0
 def test_new_dir_no_chown(self, tmpdir):
     path = os.path.join(str(tmpdir), 'new')
     system.mkdir_p(path, chown=False)
     assert os.path.isdir(path)
Example #6
0
 def test_existing_dir_does_not_raise_no_chown(self, tmpdir):
     path = str(tmpdir)
     system.mkdir_p(path, chown=False)
     assert os.path.isdir(path)
Example #7
0
 def test_new_dir_no_chown(self, tmpdir):
     path = os.path.join(str(tmpdir), 'new')
     system.mkdir_p(path, chown=False)
     assert os.path.isdir(path)
Example #8
0
 def test_existing_dir_does_not_raise_no_chown(self, tmpdir):
     path = str(tmpdir)
     system.mkdir_p(path, chown=False)
     assert os.path.isdir(path)
Example #9
0
def create_path(osd_id):
    system.mkdir_p('/var/lib/ceph/osd/%s-%s' % (conf.cluster, osd_id))
Example #10
0
def create_path(osd_id):
    system.mkdir_p('/var/lib/ceph/osd/%s-%s' % (conf.cluster, osd_id))