Aravinda VK has posted comments on this change.
Change subject: [WIP]gluster: Get size information of a gluster volume ......................................................................
Patch Set 4:
(2 comments)
.................................................... File vdsm/gluster/api.py Line 287: status = self.svdsmProxy.glusterServicesGet(serviceNames) Line 288: return {'services': status} Line 289: Line 290: @exportAsVerb Line 291: def volumeSize(self, volumeName, options=None): Done Line 292: """ Line 293: f_blocks = Total number of blocks Line 294: f_bfree = Total number of blocks free Line 295: f_bavail = Total number of blocks available for non root user
.................................................... File vdsm/gluster/gfapi.py Line 29: GLUSTER_VOL_HOST = 'localhost' Line 30: GLUSTER_VOL_PORT = 24007 Line 31: GLUSTER_VOL_PATH = "/" Line 32: Line 33: class Stat (Structure): Yes. It is compatible. But here we need to pass information about C datatype which maps to a field in Python Structure. I am not sure how we can use os.statvfs_result with ctypes. Will check. Line 34: _fields_ = [ Line 35: ('f_bsize', c_ulong), Line 36: ('f_frsize', c_ulong), Line 37: ('f_blocks', c_ulong),