globus_net_manager_python (3) - Linux Manuals
NAME
Python Module -
Net Manager Python Module. Net Manager Python Module.
The Net Manager Python module is an example module that provides basic Python language bindings to the Network Manager callout functionality. To use this example, define a python module that implements the some subset of the following functions:
1 def pre_listen(task_id, transport, attrs): 2 # return list of (scope, name, value) tuples or None 3 def post_listen(task_id, transport, local_contact, attrs): 4 # return a tuple containing (local_contact_out, [(scope, name, value),...]) 5 def end_listen(task_id, transport, local_contact, attrs): 6 # return a list of (scope, name, value) tuples or None 7 def pre_accept(task_id, transport, local_contact, attrs): 8 # return list of (scope, name, value) tuples or None 9 def post_accept(task_id, transport, local_contact, remote_contact, attrs): 10 # return list of (scope, name, value) tuples or None 11 def pre_connect(task_id, transport, remote_contact, attrs): 12 # return a tuple containing (remote_contact_out, [(scope, name, value),...]) 13 def post_connect(task_id, transport, local_contact, remote_contact, attrs): 14 # return list of (scope, name, value) tuples or None 15 def pre_close(task_id, transport, local_contact, remote_contact, attrs): 16 # return None 17 def post_close(task_id, transport, local_contact, remote_contact, attrs): 18 # return None
To use this with the GridFTP server, add a file containing the following to the GridFTP configuration directory /etc/grid
To use this with the XIO module directly, set the string options manager=python;pymod=routeman;. You'll need to set the PYTHONPATH environment variable elsewhere.
To configure the network manager to use this module directly without XIO, set the 'pymod' attribute in the 'python' scope to the name of the python module to import and use. For example:
Generated automatically by Doxygen for globus_net_manager from the source code.
$PYTHONPATH PATH
xnetmgr "manager=python;pymod=MODULE_NAME;"
$PYTHONPATH /usr/local/globus
xnetmgr "manager=python;pymod=routeman;"
globus_net_manager_attr_init(
&attr,
"python",
"pymod",
"routeman");
Author