diff options
author | Ram Raja <rraja@redhat.com> | 2013-04-30 00:38:04 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-05-10 14:15:08 -0700 |
commit | 1e62ff42dfcf84ded563f710cb8da92fa0f41936 (patch) | |
tree | 5e0375d69af015878c7a96e643ddebe54af912eb /xlators/features/glupy/src/helloworld.py | |
parent | 40d026e10013f533c4fee33b87dabc4ca11c94b3 (diff) |
glupy: Importing Jeff's glupy project into glusterfs
Change-Id: I3891ef6eaf6ede7c8cbedc3298ce2501a69b2b05
BUG: 961856
Original-author: Jeff Darcy <jdarcy@redhat.com>
Signed-off-by: Ram Raja <rraja@redhat.com>
Reviewed-on: http://review.gluster.org/4906
Reviewed-by: Justin Clift <jclift@redhat.com>
Tested-by: Justin Clift <jclift@redhat.com>
Diffstat (limited to 'xlators/features/glupy/src/helloworld.py')
-rw-r--r-- | xlators/features/glupy/src/helloworld.py | 19 |
1 files changed, 19 insertions, 0 deletions
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 |