diff options
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 |