summaryrefslogtreecommitdiffstats
path: root/api/examples/gfapi.py
Commit message (Collapse)AuthorAgeFilesLines
* gfapi.py: support dynamic loading of versioned librariesNiels de Vos2013-10-021-8/+11
| | | | | | | | | | | | | | | | | | Currently gfapi.py only loads libraries by filename ending in ".so". On an installed system without development packages, the <lib>.so filenames are not available. ctypes.util.find_library() can be used to detect the files dynamically. In addition to this, also fixing some minor indention errors and package the library into the Python site-packages path. Python applications and libraries can now access libgfapi through 'from glusterfs import gfapi'. Change-Id: I71e38dabd3ade5dcf24813bf2fc25cda91b571c6 BUG: 1005146 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/5835 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterfs: discard (hole punch) supportBrian Foster2013-06-131-2/+7
| | | | | | | | | | | | | | | | Add support for the DISCARD file operation. Discard punches a hole in a file in the provided range. Block de-allocation is implemented via fallocate() (as requested via fuse and passed on to the brick fs) but a separate fop is created within gluster to emphasize the fact that discard changes file data (the discarded region is replaced with zeroes) and must invalidate caches where appropriate. BUG: 963678 Change-Id: I34633a0bfff2187afeab4292a15f3cc9adf261af Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/5090 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gluster: add fallocate fop supportBrian Foster2013-06-131-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement support for the fallocate file operation. fallocate allocates blocks for a particular inode such that future writes to the associated region of the file are guaranteed not to fail with ENOSPC. This patch adds fallocate support to the following areas: - libglusterfs - mount/fuse - io-stats - performance/md-cache,open-behind - quota - cluster/afr,dht,stripe - rpc/xdr - protocol/client,server - io-threads - marker - storage/posix - libgfapi BUG: 949242 Change-Id: Ice8e61351f9d6115c5df68768bc844abbf0ce8bd Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/4969 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* api: update Python wrapperJeff Darcy2012-12-191-24/+395
| | | | | | | | | | | | | | This brings us back to functional parity with the C example, and also makes things more "Pythonic" (e.g. methods on Volume/File objects instead of bare functions). Change-Id: I46edfee46d91881e275de2f63e15d9f0a6448e80 BUG: 839950 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4286 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Peter Portante <pportant@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libgfapi: "tcp" is documented as the valid transport type instead of "socket".Avra Sengupta2012-11-281-1/+1
| | | | | | | | | Change-Id: I066e9be7755a535f385c102cdd1822adeda7f319 BUG: 860203 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4226 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Example of using libglfs from Python.Jeff Darcy2012-07-181-0/+29
Change-Id: I081582c457428d55db8ec1ed6d90f1e439f51f0d BUG: 839950 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3675 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>