Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 9
0
def create_path(osd_id):
    system.mkdir_p('/var/lib/ceph/osd/%s-%s' % (conf.cluster, osd_id))
Esempio n. 10
0
def create_path(osd_id):
    system.mkdir_p('/var/lib/ceph/osd/%s-%s' % (conf.cluster, osd_id))