summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc: Update install and troubleshoot guideHEADmasterPrashanth Pai2018-09-242-16/+5
| | | | | | | | | * Mention that bindings have been tested with Python 3.x * Remove section about troubleshotting logging as it is disabled by default now. Change-Id: If7a4e398734efec2cc68e6abaec4510c554bff9e Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Merge "Update spec and prepare 1.2 release"v1.2Prashanth Pai2018-09-203-22/+71
|\
| * Update spec and prepare 1.2 releasePrashanth Pai2018-09-193-22/+71
| | | | | | | | | | Change-Id: Iabb38be823cba803a864ca4769e2cac595ebe75c Signed-off-by: Prashanth Pai <ppai@redhat.com>
* | Allow unmounting only on properly initialised fs objectPrashanth Pai2018-09-191-1/+1
|/ | | | | | | | | | | | Libgfapi program coredumps when glfs_fini() is called on an uninitialised fs object. This fix will check if fs has been properly initialised before calling glfs_fini() Glusterfs BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1630803 Change-Id: I27f834b0477a84c7a08ebc7a5e5bfab934220f77 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Support setting multiple hosts (volfile servers)Prashanth Pai2018-07-313-19/+37
| | | | | | | | Fixes https://github.com/gluster/libgfapi-python/issues/20 Change-Id: If12dfb3166d37071f8996c4d043950aeb27d0ae7 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Support mknod APIMichael Hanselmann2018-07-274-0/+44
| | | | | | | | Gluster supports the mknod(2) API to create special files such as character and block devices. Add it to the "gfapi.Volume" class. Change-Id: Ie62245441997111b0cf6e44b2a14a1ad7b6d7d56 Signed-off-by: Michael Hanselmann <public@hansmi.ch>
* Port to Python 3.xAdam Cecile2018-06-127-215/+311
| | | | | | | | | | | | | Based on PR sent by Adam C├ęcile (eLvErDe on GitHub): https://github.com/gluster/libgfapi-python/pull/21 Additional changes to original PR: * Make it pep8 compliant * Fix comment in getcwd() * Add functest36 env to tox.ini Change-Id: I45c4056333c12a82814cf8adcfa87e6687365366 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Allow functional tests to be run as non-root userPrashanth Pai2018-04-041-0/+3
| | | | | | | | | | Normal users do not have permissions to read or write to /var/run/glusterd.socket Skip those tests if run as non-root user. Change-Id: I1c1f805c362746036f5d8fe13e73ebad188388ea Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Disable logging by defaultAlpha2018-03-283-7/+13
| | | | | | | | | | Superusers should not be required to use this API with default settings. Provide a disable_logging method of Volume. Ensure that set_logging gets called with new values. Change-Id: Ia27a682c96d6ca28f85d43f9d8483f08d1dc6367 Signed-off-by: Alpha <alpha@pokesplash.net> Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Add get_volume_id() APIPrashanth Pai2018-01-113-0/+39
| | | | | Change-Id: Ia4c378c5b1657bb4ec23c7057c7cbc49c1b31484 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Expose mounting over unix socketPrashanth Pai2017-12-222-2/+12
| | | | | Change-Id: I17078b6d20372c3935f7bcd8c82f55f96096dd87 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Update install guide with RPM namePrashanth Pai2017-04-262-7/+7
| | | | | | | ...and fix some minor doc rendering. Change-Id: Ibec7a39bf2633026b106972d4d476d5734232b5f Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Merge "Update spec file"Prashanth Pai2016-09-072-53/+33
|\
| * Update spec filePrashanth Pai2016-08-302-53/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds python-glusterfs-api.spec to MANIFEST.in to include it when the source tarball is generated using `python setup.py sdist` Steps to build RPMs: $ python setup.py sdist $ rpmbuild -ta dist/gfapi-1.1.tar.gz Change-Id: I05e4e802acba3d2c11551dc1e340e7f8d47d7863 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* | Add install instructions for pipPrashanth Pai2016-08-161-1/+9
|/ | | | | | | The python bindings is now available for installation using pip. Change-Id: Ifc2def21e3b099b024a670422e444de82ca52cc6 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Release version 1.1v1.1Prashanth Pai2016-08-162-2/+2
| | | | | Change-Id: Ia134ba44f56fbb94c0b988c2353c59e1a25fbbc7 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Convert README.md to README.rstPrashanth Pai2016-08-164-12/+17
| | | | | Change-Id: Ib89be30f76b5a54addf8a60fee951d3a108bd014 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Fix classifiers field in setup.pyv1.0Prashanth Pai2016-08-161-10/+10
| | | | | | | | | Commas were missing and during upload to pypi, it used to fail with: Server response (400): Invalid classifier Change-Id: Id3123bb0cc1705fc5f282c7da07b553fa1971455 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Move source files into gfapi/ dirPrashanth Pai2016-08-109-20/+33
| | | | | | | | | | | | | | | | | Currently, many source files are directly placed under gluster/ dir: gluster/exceptions.py gluster/gfapi.py gluster/utils.py When multiple packages (RPMs) are sharing the same gluster namespace, these source files will conflict if there are source files with same names provided by other projects. Fix: Move all source files in gluster/* to gluster/gfapi/* Note that this patch does not break how existing users import gfapi. Change-Id: Idf9d07eefafe8333215d6c61201c97c982565ba9 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Simplify packagingPrashanth Pai2016-08-095-43/+18
| | | | | | | | | | | * Rename .unittests.sh to .unitests * Fix entries in MANIFEST.in file * Mover version declaration to gfapi.py TODO: Fix the spec file. That'll be sent as a separate change. Change-Id: I0cba8964c1ecc337128c8edc9f301fc1d023bd28 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* renamed unittests.sh to match func tests scriptThiago da silva2016-08-042-0/+4
| | | | | | | Also, added .gitreview to make it easy to setup git-review Change-Id: Ie3b3471b157e8fa8ccee73d0d91c03cdfef07d10 Signed-off-by: Thiago da silva <thiago@dhcp-41-115.bos.redhat.com>
* Implement copytree() and enhance walk(), rmtree()Prashanth Pai2016-08-033-133/+457
| | | | | | | | | | | This change: * Implements copytree() API which is very similar to the one provided by shutils built-in module in Python. * Enhances walk() and rmtree() implementation to leverage scandir() optimization. Change-Id: Iac5aef1a5c558fdeceac4e5128339141a3ebd4d1 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Merge "Expose glfs_readdirplus_r"Thiago da Silva2016-07-055-19/+328
|\
| * Expose glfs_readdirplus_rPrashanth Pai2016-06-305-19/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does the following: * Implements Volume.listdir_with_stat() API which internally invokes glfs_readdirplus_r to return directory entries along with stat for each entry. * Implements Volume.scandir() which is similar to os.scandir() present in Python 3.5 * Makes Dir class iterable. * Enables Dir class to raise OSError when glfs_readdir* calls fail. Previously, these failures were silently being ignored and treated as a case of EOF. Change-Id: Id918c39a7ef3882553e9bcd3fbf9455ee1c25a83 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* | Merge "Fix failing CentOS CI tests"Thiago da Silva2016-07-012-5/+5
|\ \ | |/ |/|
| * Fix failing CentOS CI testsPrashanth Pai2016-07-012-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | pep8 and functests were failing in CentOS CI as reported here: http://comments.gmane.org/gmane.comp.file-systems.gluster.devel/15697 Functional tests were failing because test_copy2() was invoking copy() method instead of copy2(). Further, tests were doing assertions on atime which gets changed every time the file is read. Change-Id: I692e9f44911c32c18b1f92c17b6b455ba2d196a1 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* | Merge "doc: Add troubleshooting section"Humble Devassy Chirammal2016-06-233-41/+54
|\ \ | |/ |/|
| * doc: Add troubleshooting sectionPrashanth Pai2016-06-173-41/+54
| | | | | | | | | | | | | | | | | | | | * Mention glusterfs versions which requires additional steps to allow non-root users to mount the volume. * Add note on tested platform and python versions. * Remove TODOs and add them as issues on GitHub Change-Id: I36a63ff2b9f98de82c2fd58542584565dab7dda0 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* | Fix license discrepanciesPrashanth Pai2016-06-1712-134/+91
|/ | | | | | | | | | The repo had mixed references to both Apache BSD license and GPL licenses. This change removes references to Apache license. The license of this project is now same as that of GlusterFS. Change-Id: I39b72f59d14af304729560dd1d59fe307cd1ac1d Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Document mounting as non-root userPrashanth Pai2016-06-161-1/+31
| | | | | Change-Id: I58baf2b6b24bf07707be133508b5d1213744562e Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Implement shutil.copy* methods and os.link()Prashanth Pai2016-06-154-2/+351
| | | | | Change-Id: I2de796e7d53732c5a967c6194a43378171fcb3d6 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Add validation decoratorsPrashanth Pai2016-06-156-16/+252
| | | | | | | | | | As glfs and glfd are pointers to memory locations, passing invalid values of glfs and glfd to the libgfapi C library can result in segfault. This patch introduces decorators that validate glfs and glfd before calling correspoding C APIs. Change-Id: I4e86bd8e436e23cd41f75f428d246939c820bb9c Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Improve sphinx rendering on RTDPrashanth Pai2016-06-106-58/+46
| | | | | Change-Id: I646b5d26bca6d4f0123c1b2140f80f24d268568e Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Fix typo in documentationPrashanth Pai2016-06-092-2/+2
| | | | | Change-Id: Ic6bcde358e718ef6cab3b37f1a318d2cada6e97f Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Revamp and complete API documentationPrashanth Pai2016-06-097-92/+888
| | | | | | | | | Created .rst files that sphinx can use to auto-generate entire API documentation from doc strings present in code. This can be easily rendered and hosted on ReadTheDocs website. Change-Id: If1a569bdeaaba21919ac77ba8bd4967dfec22603 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Implement os.utime() like API and zerofillPrashanth Pai2016-06-014-9/+160
| | | | | | | | | | | | This patch: * Implements Volume.utime() which is very similar to os.utime() present in Python. https://docs.python.org/2/library/os.html#os.utime * Implements File.zerofill() which exposes glfs_zerofill. * Fixes function prototype of fallocate and discard. Adds functional tests for the same. Change-Id: Icb8d3a571998c31d6bf9b139ca253af59f6fc3f4 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Merge "Re-enable glfs_dup() tests"Humble Devassy Chirammal2016-03-183-4/+0
|\
| * Re-enable glfs_dup() testsPrashanth Pai2016-03-153-4/+0
| | | | | | | | | | Change-Id: I96b6f2a501d52d66694e67990d6b65d4eb920fa2 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* | Merge "Add readinto() API"Humble Devassy Chirammal2016-03-183-0/+52
|\ \ | |/ |/|
| * Add readinto() APIPrashanth Pai2016-02-243-0/+52
| | | | | | | | | | | | | | | | | | | | readinto() This method is useful when you have to read a large file over multiple read calls. While read() allocates a buffer every time it's invoked, readinto() copies data to an already allocated buffer passed to it. Change-Id: Ic8a3aa0e544e09e05101c983b329c91864832e4a Signed-off-by: Prashanth Pai <ppai@redhat.com>
* | Fix and simplify tox.iniPrashanth Pai2016-03-106-65/+29
|/ | | | | | | | | | | | | | | * Remove deprecated tox options * Simplify tox.ini * Update .gitignore * Update test-requirements.txt * Fix pep8 issues All tests now run on centos7 without any modifications. Code coverage output is now displayed properly for both unit test and functional test runs. Change-Id: I877cc0ad2c560579c12d528af3ac9bf5eea28378 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Disable glfs_dup testsPrashanth Pai2016-02-234-2/+6
| | | | | | | This change also fixes a mismatch in glfs_seek() function signature. Change-Id: I3d336a2fbfec9ba921b253f6d97616485cadec98 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* Merge "functests: Change default host name to localhost"Humble Devassy Chirammal2016-02-173-4/+4
|\
| * functests: Change default host name to localhostPrashanth Pai2015-09-163-4/+4
| | | | | | | | | | | | | | | | | | Without this change, user (developer) will have to modify test.conf (tracked by git) every time he has to run functional tests or has to edit /etc/hosts and add entry for 'gfshost' Change-Id: I6d41a657b0cae614513e2925e73138da46ddaf04 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* | Merge "Fix parsing of binary data as str"Thiago da Silva2015-10-051-1/+1
|\ \
| * | Fix parsing of binary data as strPrashanth Pai2015-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change will return the raw string read as is which fixes case where arbitrary binary data (such as an array.array) is written and read back as string to be unmarshalled back as array.array This patch does not yet address writing array.array and arbitrary objects into binary files. That will be sent as a separate change. Change-Id: Ic135198cca2c0dc8e103176920056e9df0c00f2b Signed-off-by: Prashanth Pai <ppai@redhat.com>
* | | Provide use_errno to all gfapi foreign function prototypesAlpha2015-09-163-162/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated tests to include OSError messages Added error reasons to LibgfapiException exceptions BUG 1196161: https://bugzilla.redhat.com/show_bug.cgi?id=1196161 Change-Id: Iddf40751696874ffcaa50cd9d5ecc06c4993baf2 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* | | Merge "updated dev guide to tell users to update their test.conf file"Thiago da Silva2015-09-161-0/+1
|\ \ \
| * | | updated dev guide to tell users to update their test.conf fileZandrr2015-07-201-0/+1
| | | | | | | | | | | | | | | | Change-Id: I86176486ad729b2dec16c60cddbd803354cc64bb
* | | | add usage to readme for easier quickstartZandrr2015-09-161-0/+37
| |_|/ |/| | | | | | | | Change-Id: I6210a0f8e9ed746d430b8b71c4898e41bbfd475e