def set_quota_volume(name, path, size, enable_quota=False):
 cmd = 'volume quota {0}'.format(name)
 if path:
  cmd += ' limit-usage {0}'.format(path)
 if size:
  cmd += ' {0}'.format(size)
 if enable_quota:
  if (not enable_quota_volume(name)):
   pass
 if (not _gluster(cmd)):
  return False
 return True

def set_quota_volume ( name , path , size , enable_quota = False ) : cmd = 'volume quota {0}' . format ( name ) if path : cmd += ' limit-usage {0}' . format ( path ) if size : cmd += ' {0}' . format ( size ) if enable_quota : if ( not enable_quota_volume ( name ) ) : pass if ( not _gluster ( cmd ) ) : return False return True
set quota to glusterfs volume .