summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* changing gluster dir to glusterfsThiago da Silva2014-03-186-111/+111
| | | | | | | | | | making this change to avoid package conflicts with gluster-swift and glusterfs-api rpm. Eventually we will remove the python code from glusterfs-api rpm and create a new rpm package from libgfapi-python. Change-Id: I1b20cd747e500aed17fba89f96e62423325b5230 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* adding information about tox and virtualenvThiago da Silva2014-03-171-4/+6
| | | | | | | | | | There's currently an issue with the latest version of tox and this is keeping people from running the tests. Installing the previous version is a workaround until the problem with tox is solved Change-Id: I3d8a842038f6265daf42c5624ef209bf248570a6 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* adding functions needed by gluster-swiftThiago da Silva2014-03-133-152/+520
| | | | | | | These new functions are required to be used by gluster-swift Change-Id: Ifb68f2b4494bf375feabb130831f9e076dc5b94a Signed-off-by: Thiago da Silva <thiago@redhat.com>
* added Apache license comment to source codeThiago da Silva2014-03-064-3/+46
| | | | | | | Added same license as gluster-swift Change-Id: Ib190b4e6def5d2ab87b71a04142f6344060d8a6d Signed-off-by: Thiago da Silva <thiago@redhat.com>
* adding new methods to Volume classThiago da Silva2014-03-063-13/+307
| | | | | | | | | | These are mostly helper methods similar to functions provided by the python os module helpfer functions added: exists, getsize, isdir, isfile, islink glfs functions added: removexattr, stat Change-Id: I3581a96224151481292a4e506d8c52b8acf79e49 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* Adding installation instructions to READMEThiago da Silva2014-02-281-3/+20
| | | | | | | | This text was previously provided by Justing Clift in a pull request. Submitting now as a gerrit review. Change-Id: I2f2bcd894c5eb58318d85b5856366ff31e2a423e Signed-off-by: Thiago da Silva <thiago@redhat.com>
* changed write and read functions to support binary dataThiago da Silva2014-02-243-6/+52
| | | | | | | | | | | | | | | | | | | | | | | | both functions were only supporting text data and needed to be changed to support binary data. The issue was found while testing libgfapi-python with smallfile (https://github.com/bengland2/smallfile). When calling gflfs_write, ctypes has no problem converting strings to the correct C data type, but is unable to handle bytearray: b = bytearray(1024) with vol.create(path, os.O_WRONLY | os.O_EXCL, 0644) as fd: fd.write(b) It would throw this error: exception: argument 2: <type 'exceptions.TypeError'>: Don't know how to convert parameter 2 reference: http://docs.python.org/2/library/ctypes.html#calling-functions-continued Change-Id: Ia2bb47343880cbf7121fed9510e4cfa085fe23bd Signed-off-by: Thiago da Silva <thiago@redhat.com>
* Add Gerrit documentationLuis Pabon2014-02-131-23/+169
| | | | | Change-Id: I48df12b8627ef2b0c4dfedadcb90864e4a537019 Signed-off-by: Luis Pabon <lpabon@redhat.com>
* add mode parameter to mkdir methodThiago da Silva2014-01-294-6/+6
| | | | | | | | add mode parameter to mkdir to allow setting the dir access mode when the directory is being created Change-Id: I6f1ed0c8800fb65a30448e6082cf55b8220a06d4 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* running functest with sudo for nowThiago da Silva2014-01-241-1/+1
| | | | | | | | Need to fix issue with libgfapi allowing only apps with root access to mount volume Change-Id: I21a06e6941969b34b3974dd786855bfe5cf3856b Signed-off-by: Thiago da Silva <thiago@redhat.com>
* first libgfapi-python functional testsThiago da Silva2014-01-228-221/+330
| | | | | | | | adding a few functional tests and removing old tests from source code Change-Id: Iefcb091d614f2825592943cfb42847b5865322c6 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* remove unused libraries importThiago da Silva2014-01-171-3/+0
| | | | | | | | xdr and glfs were not being used, so they are being removed for now Change-Id: I8db793f66f2f2a6442f3a6b6f53617d52cc52a92 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* added support for with statements in open and creatThiago da Silva2014-01-163-85/+110
| | | | | | | | | when creating or opening a File, caller should now use python's with statement as specified on PEP 343: http://www.python.org/dev/peps/pep-0343/ Change-Id: Id98613e310bea01a427769d3ad7b0dea97245b04 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* unit testsThiago da Silva2014-01-145-4/+382
| | | | | | | added unit tests for existing methods Change-Id: Iecd31bc1dea44ea38168120bd05ca505c4ff5c59 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* make code pep8 compliantThiago da Silva2014-01-101-141/+153
| | | | | | | | all changes in this patch were made to make the code pep8 compliant Change-Id: Ie05e370126ad4f48c4a4891c44b4440628fcb775 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* adding error handling to api callsThiago da Silva2014-01-091-369/+423
| | | | | | | | | Added error handling to all api calls. On error from gfapi, a OSError or IOError exception is raised Change-Id: I9944ae6796da49e7678089c60138a67dff30887e Signed-off-by: Thiago da Silva <thiago@redhat.com>
* fixing tests and indentation errorsThiago da Silva2014-01-061-6/+6
| | | | | | | | fixed rename and rmdir tests with correct if statements and removed tabs from test_fallocate Change-Id: I02edd7511ba134395cba94b8f2d32b73dd936a0f Signed-off-by: Thiago da Silva <thiago@redhat.com>
* Add missing file for pep8 to be able to runLuis Pabon2013-12-051-0/+11
| | | | | Change-Id: I6545f0786779185bc1805643f8db0de2ac21995a Signed-off-by: Luis Pabon <lpabon@redhat.com>
* initial repo tree with gfapi.pyThiago da Silva2013-10-305-0/+558
| | | | | | | | This initial commit is a copy from gluster/api/examples/gfapi.py from the glusterfs repo Signed-off-by: Thiago da Silva <thiago@redhat.com> Change-Id: I4442528d5bc2ec52ed2970b818d8cb9327e36168
* Initialize repoLuis Pabon2013-10-293-0/+12
Signed-off-by: Luis Pabon <lpabon@redhat.com>