Project

General

Profile

test_volclient.py

Rishabh Dave, 10/15/2019 05:53 AM

Download (501 Bytes)

 
1
from __future__ import print_function
2
from ceph_volume_client import CephFSVolumeClient, VolumePath
3
from sys import version_info as sys_version_info
4
from rados import OSError as rados_OSError
5
import logging
6

    
7
log = logging.getLogger("ceph_volume_client")
8
log.addHandler(logging.StreamHandler())
9
log.setLevel(logging.DEBUG)
10

    
11
vc = CephFSVolumeClient("admin", "./ceph.conf", "ceph", None, None)
12
vc.connect()
13

    
14
vp = VolumePath("grpid", "volid")
15
vc.create_volume(vp, 10, data_isolated=True)
16

    
17
vc.disconnect()