From 1e62ff42dfcf84ded563f710cb8da92fa0f41936 Mon Sep 17 00:00:00 2001 From: Ram Raja Date: Tue, 30 Apr 2013 00:38:04 +0530 Subject: glupy: Importing Jeff's glupy project into glusterfs Change-Id: I3891ef6eaf6ede7c8cbedc3298ce2501a69b2b05 BUG: 961856 Original-author: Jeff Darcy Signed-off-by: Ram Raja Reviewed-on: http://review.gluster.org/4906 Reviewed-by: Justin Clift Tested-by: Justin Clift --- xlators/features/glupy/src/helloworld.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 xlators/features/glupy/src/helloworld.py (limited to 'xlators/features/glupy/src/helloworld.py') diff --git a/xlators/features/glupy/src/helloworld.py b/xlators/features/glupy/src/helloworld.py new file mode 100644 index 00000000000..8fe4037118e --- /dev/null +++ b/xlators/features/glupy/src/helloworld.py @@ -0,0 +1,19 @@ +import sys +from gluster import * + +class xlator (Translator): + + def __init__(self, c_this): + Translator.__init__(self, c_this) + + def lookup_fop(self, frame, this, loc, xdata): + print "Python xlator: Hello!" + dl.wind_lookup(frame, POINTER(xlator_t)(), loc, xdata) + return 0 + + def lookup_cbk(self, frame, cookie, this, op_ret, op_errno, inode, buf, + xdata, postparent): + print "Python xlator: Hello again!" + dl.unwind_lookup(frame, cookie, this, op_ret, op_errno, inode, buf, + xdata, postparent) + return 0 -- cgit