From f7a815a2d0e7e9d7ed1ec2da587790bd3ddda9e5 Mon Sep 17 00:00:00 2001 From: Justin Clift Date: Fri, 21 Mar 2014 20:13:16 +0000 Subject: features/glupy: Rename Glupy python module to avoid namespace conflict * Rename gluster.py to glupy.py to avoid namespace conflict (#1018619) * Move the main Glupy files into glusterfs-extra-xlators rpm * Move the Glupy Translator examples into glusterfs-devel rpm * Add Glupy entry to the MAINTAINERS file BUG: 1018619 Change-Id: I48de598ba5ae8eec0e7e276bbcca1abb0e549cef Signed-off-by: Justin Clift Reviewed-on: http://review.gluster.org/6979 Reviewed-by: Kaleb KEITHLEY Reviewed-by: Jeff Darcy --- api/examples/Makefile.am | 6 +++++- api/examples/__init__.py.in | 1 + api/examples/setup.py.in | 5 ----- 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 api/examples/__init__.py.in (limited to 'api/examples') diff --git a/api/examples/Makefile.am b/api/examples/Makefile.am index 05f40ff53..f1a8d12b2 100644 --- a/api/examples/Makefile.am +++ b/api/examples/Makefile.am @@ -1,6 +1,10 @@ +# The bits needed for glfsxmp EXTRA_PROGRAMS = glfsxmp glfsxmp_SOURCES = glfsxmp.c glfsxmp_CFLAGS = $(GLFS_CFLAGS) -Wall glfsxmp_LDADD = $(GLFS_LIBS) -lrt -EXTRA_DIST = gfapi.py +# Install __init__.py (a generated file), and gfapi.py into +# the Python site-packages area +pygfapidir = $(pythondir)/gluster +pygfapi_PYTHON = __init__.py gfapi.py diff --git a/api/examples/__init__.py.in b/api/examples/__init__.py.in new file mode 100644 index 000000000..280beb2dc --- /dev/null +++ b/api/examples/__init__.py.in @@ -0,0 +1 @@ +__version__ = "@PACKAGE_VERSION@" diff --git a/api/examples/setup.py.in b/api/examples/setup.py.in index 44b738094..f22fa1f30 100644 --- a/api/examples/setup.py.in +++ b/api/examples/setup.py.in @@ -1,10 +1,5 @@ from distutils.core import setup -# generate a __init__.py for the package namespace -fo = open('__init__.py', 'w') -fo.write('__version__ = "@PACKAGE_VERSION@"\n') -fo.close() - DESC = """GlusterFS is a clustered file-system capable of scaling to several petabytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system. -- cgit From 0c1d78f5c52c69268ec3a1d8d5fcb1a1bf15f243 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 22 Mar 2014 01:33:06 -0700 Subject: gfapi: glfs_set_volfile_server() now entertains multiple calls Previous API: glfs_set_volfile_server (..., const char *host, ...) - single call New API's: glfs_set_volfile_server (..., const char *host1, ...) glfs_set_volfile_server (..., const char *host2, ...) Multiple calls to this function with different volfile servers, port or transport-type would create a list of volfile servers which would be polled during `volfile_fetch_attempts()` glfs_unset_volfile_server (..., const char *host, ...) to remove a server from the list (this is provided for future usage) Change-Id: I313efbd3efbd0214e2a71465f33195788df406cc BUG: 986429 Signed-off-by: Harshavardhana Reviewed-on: http://review.gluster.org/7317 Tested-by: Gluster Build System Reviewed-by: Niels de Vos Reviewed-by: Anand Avati --- api/examples/getvolfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/examples') diff --git a/api/examples/getvolfile.py b/api/examples/getvolfile.py index 82d9db055..184586c63 100755 --- a/api/examples/getvolfile.py +++ b/api/examples/getvolfile.py @@ -5,8 +5,8 @@ import ctypes.util api = ctypes.CDLL(ctypes.util.find_library("gfapi")) api.glfs_get_volfile.argtypes = [ctypes.c_void_p, - ctypes.c_void_p, - ctypes.c_ulong] + ctypes.c_void_p, + ctypes.c_ulong] api.glfs_get_volfile.restype = ctypes.c_long; def get_volfile (host, volume): -- cgit