code: def set_quota_volume(name, path, size, enable_quota=False):
      '''
      Set quota to glusterfs volume.
  
      name
          Name of the gluster volume
  
      path
          Folder path for restriction in volume ("/")
  
      size
          Hard-limit size of the volume (MB/GB)
  
      enable_quota
          Enable quota before set up restriction
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' glusterfs.set_quota_volume <volume> <path> <size> enable_quota=True
      '''
      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 Truf set_quota_volume(name, path, size, enable_quota=False):
      '''
      Set quota to glusterfs volume.
  
      name
          Name of the gluster volume
  
      path
          Folder path for restriction in volume ("/")
  
      size
          Hard-limit size of the volume (MB/GB)
  
      enable_quota
          Enable quota before set up restriction
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' glusterfs.set_quota_volume <volume> <path> <size> enable_quota=True
      '''
      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
docs: Set quota to glusterfs volume.
  
      name
          Name of the gluster volume
  
      path
          Folder path for restriction in volume ("/")
  
      size
          Hard-limit size of the volume (MB/GB)
  
      enable_quota
          Enable quota before set up restriction
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' glusterfs.set_quota_volume <volume> <path> <size> enable_quota=True