GLOBUS_NET_MANAGER_PYTHON(3)
β¨ NAME β¨
globus_net_manager_python β the Python Module π (yes bestie, it's literally the Net Manager Python Module, that's the whole vibe)
π SYNOPSIS π
okay so welcome to the Net Manager Python Module π«Ά β this is an example module that hands you basic Python language bindings to the Network Manager callout functionality. No cap.
π¦ DETAILED DESCRIPTION π¦
So here's the tea β: this module is an example, and to actually use it you define a Python module that implements some subset of the following functions:
def pre_listen(task_id, transport, attrs):
# return list of (scope, name, value) tuples or None
def post_listen(task_id, transport, local_contact, attrs):
# return a tuple containing (local_contact_out, [(scope, name, value),...])
def end_listen(task_id, transport, local_contact, attrs):
# return a list of (scope, name, value) tuples or None
def pre_accept(task_id, transport, local_contact, attrs):
# return list of (scope, name, value) tuples or None
def post_accept(task_id, transport, local_contact, remote_contact, attrs):
# return list of (scope, name, value) tuples or None
def pre_connect(task_id, transport, remote_contact, attrs):
# return a tuple containing (remote_contact_out, [(scope, name, value),...])
def post_connect(task_id, transport, local_contact, remote_contact, attrs):
# return list of (scope, name, value) tuples or None
def pre_close(task_id, transport, local_contact, remote_contact, attrs):
# return None
def post_close(task_id, transport, local_contact, remote_contact, attrs):
# return None
β¨ Little type check moment β¨ β the task_id, transport, local_contact, and remote_contact parameters to these functions are all string objects. And the attrs parameter? That one's a list of 3-tuples (scope, name, value). That's it, that's the shape π
π Using it with the GridFTP server
Want this running with the GridFTP server? Add a file containing the following to the GridFTP configuration directory /etc/gridftp.d:
$PYTHONPATH PATH
xnetmgr "manager=python;pymod=MODULE_NAME;"
Where 'PATH' is the directory containing your module and 'MODULE_NAME' is the name of the python module that you would use to import it (i.e. without the .py extension, bestie, don't @ me). So a module /usr/local/globus/routeman.py would require:
$PYTHONPATH /usr/local/globus
xnetmgr "manager=python;pymod=routeman;"
π§ Using it with the XIO module directly
If you're going straight to the XIO module, set the string options:
manager=python;pymod=routeman;
heads up bestie β you'll need to set the PYTHONPATH environment variable elsewhere. It's giving "figure it out yourself" energy, but that's just how it is π
π Configuring the network manager directly (no XIO)
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:
globus_net_manager_attr_init(
&attr,
"python",
"pymod",
"routeman");
...and pass this to the context functions. slay β¨
π AUTHOR π
Generated automatically by Doxygen for globus_net_manager from the source code. iconic behaviour, honestly πΈ
that's the whole page, bestie β globus_net_manager Version 1.7, from the globus_net_manager library functions manual. go forth and configure ur network manager π
π¦π
π¦ where this page comes from
- fedora 43: globus-net-manager-doc 1.7-13.fc43 Β· Apache-2.0
- fedora 44: globus-net-manager-doc 1.7-14.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-net-manager-doc 1.7-3build4 Β· Apache-2.0
- ubuntu stonking: libglobus-net-manager-doc 1.7-3build4 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms