[X2Go-Commits] [x2gobroker] 02/02: API Documentation: Sanitize __doc__ strings to make Epydoc happy. Provide Makefile.docupload and provide html API documentation at http://code.x2go.org/doc/python-x2gobroker/
git-admin at x2go.org
git-admin at x2go.org
Wed Mar 30 14:24:33 CEST 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2gobroker.
commit 47189d90848473c28f05356896ad9501dcd9006f
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Wed Mar 30 14:24:21 2016 +0200
API Documentation: Sanitize __doc__ strings to make Epydoc happy. Provide Makefile.docupload and provide html API documentation at http://code.x2go.org/doc/python-x2gobroker/
---
Makefile.docupload | 25 ++++++++++++++++++++++
debian/changelog | 3 +++
x2gobroker/agent.py | 8 +++----
x2gobroker/brokers/base_broker.py | 38 +++++++++++++++++++--------------
x2gobroker/brokers/inifile_broker.py | 6 +++---
x2gobroker/brokers/zeroconf_broker.py | 2 +-
x2gobroker/loggers.py | 2 +-
x2gobroker/utils.py | 2 +-
8 files changed, 60 insertions(+), 26 deletions(-)
diff --git a/Makefile.docupload b/Makefile.docupload
new file mode 100644
index 0000000..f1c0f4a
--- /dev/null
+++ b/Makefile.docupload
@@ -0,0 +1,25 @@
+#!/usr/bin/make -f
+# Makefile.docupload file - for python-x2gobroker
+# Copyright 2010-2016 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>, GPLv3+ applies to this file
+
+VERSION=`head -n1 debian/changelog | sed 's,.*(\(.*\)).*,\1,' | cut -d"-" -f1`
+DOC_HOST=code.x2go.org
+DOC_PATH=/srv/sites/x2go.org/code/doc/python-x2gobroker
+DOC_USER=x2go-admin
+
+doc: docbuild docupload
+
+docbuild:
+ mkdir -p $(CURDIR)/.epydoc/html
+ #mkdir -p .epydoc/pdf
+ #mkdir -p .epydoc/pdf.tmp
+ rm -Rf .epydoc/html/*
+ epydoc --debug -n "Python X2Go Broker" -u http://www.x2go.org -v --html --no-private -o $(CURDIR)/.epydoc/html $(CURDIR)/x2gobroker/
+ #epydoc --debug --pdf --no-private -o .epydoc/pdf.tmp x2go/
+ #mv .epydoc/pdf.tmp/api.pdf .epydoc/pdf/Python-X2Go_API.pdf
+ #rm -Rf .epydoc/pdf.tmp
+
+
+docupload:
+ ssh -l${DOC_USER} ${DOC_HOST} rm -Rfv ${DOC_PATH}/*
+ scp -r .epydoc/html/* ${DOC_USER}@${DOC_HOST}:${DOC_PATH}/
diff --git a/debian/changelog b/debian/changelog
index 8084451..ae3e9c0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,9 @@ x2gobroker (0.0.3.1-0x2go1) UNRELEASED; urgency=low
calls (not postinst).
* x2gobroker/brokers/base_brokers.py: Remove Perl code in comment that
confuses the Epydoc tool.
+ * API Documentation: Sanitize __doc__ strings to make Epydoc happy. Provide
+ Makefile.docupload and provide html API documentation at
+ http://code.x2go.org/doc/python-x2gobroker/
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Sun, 19 Jul 2015 21:58:43 +0200
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index 6545dcf..c18b747 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
@@ -96,11 +96,11 @@ def call_broker_agent(username, task, cmdline_args=[], remote_agent=None, logger
@param cmdline_args: additional command line parameters for the broker agent
@type cmdline_args: C{list}
@param remote_agent: if not C{None} call a remote broker agent via SSH
- @type remoate_agent: C{dict}
+ @type remote_agent: C{dict}
@param logger: logger instance to report log messages to
@type logger: C{obj}
- @raise: L{X2GoBrokerAgentException}
+ @raise X2GoBrokerAgentException: if the call to the remote broker agents fails.
"""
if remote_agent in (u'LOCAL', None):
@@ -123,7 +123,7 @@ def _call_local_broker_agent(username, task, cmdline_args=[], logger=None):
@param logger: logger instance to report log messages to
@type logger: C{obj}
- @raise: L{X2GoBrokerAgentException}
+ @raise X2GoBrokerAgentException: if the call to the remote broker agents fails.
"""
if logger is None:
@@ -189,7 +189,7 @@ def _call_remote_broker_agent(username, task, cmdline_args=[], remote_agent=None
@param logger: logger instance to report log messages to
@type logger: C{obj}
- @raise: L{X2GoBrokerAgentException}
+ @raise X2GoBrokerAgentException: if the call to the remote broker agents fails.
"""
if logger is None:
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index 280e205..2c6bbc2 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -19,7 +19,7 @@
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
"""\
-L{base.X2GoBroker} class - base skeleton for X2GoBroker implementations
+L{x2gobroker.brokers.base_broker.X2GoBroker} class - base skeleton for X2GoBroker implementations
"""
__NAME__ = 'x2gobroker-pylib'
@@ -47,7 +47,7 @@ from x2gobroker.defaults import X2GOBROKER_DAEMON_USER as _X2GOBROKER_DAEMON_USE
class X2GoBroker(object):
"""\
- L{base.X2GoBroker} is an abstract class for X2Go broker implementations.
+ L{x2gobroker.brokers.base_broker.X2GoBroker} is an abstract class for X2Go broker implementations.
This class needs to be inherited from a concrete broker class.
@@ -67,6 +67,11 @@ class X2GoBroker(object):
Initialize a new X2GoBroker instance to control X2Go session through an
X2Go Client with an intermediate session broker.
+ @param config_file: path to the X2Go Session Broker configuration file (x2gobroker.conf)
+ @type config_file: C{unicode}
+ @param config_defaults: Default settings for the broker's global configuration parameters.
+ @type config_defaults: C{dict}
+
"""
self.config_file = config_file
if self.config_file is None: self.config_file = x2gobroker.defaults.X2GOBROKER_CONFIG
@@ -79,7 +84,7 @@ class X2GoBroker(object):
def __del__(self):
"""\
- Cleanup on destruction of an L{X2GoBroker} instance.
+ Cleanup on destruction of an L{x2gobroker.brokers.base_broker.X2GoBroker} instance.
"""
pass
@@ -119,8 +124,8 @@ class X2GoBroker(object):
"""\
Set the client IP address.
- @param ip: the client IP
- @type ip: C{unicode}
+ @param address: the client IP
+ @type address: C{unicode}
"""
if netaddr.valid_ipv6(address):
@@ -136,8 +141,8 @@ class X2GoBroker(object):
"""\
Get the client IP address (if set).
- @return the client IP (either IPv4 or IPv6)
- @rtype ip: C{unicode}
+ @return: the client IP (either IPv4 or IPv6)
+ @rtype: C{unicode}
"""
if self._client_address:
@@ -149,8 +154,8 @@ class X2GoBroker(object):
"""\
Get the client IP address type of the client address (if set).
- @return the client address type (4: IPv4, 6: IPv6)
- @rtype ip: C{int}
+ @return: the client address type (4: IPv4, 6: IPv6)
+ @rtype: C{int}
"""
return self._client_address.version
@@ -263,7 +268,7 @@ class X2GoBroker(object):
configured session profiles have in common.
The defaults are hard-coded in L{x2gobroker.defaults} for class
- L{x2gobroker.base.X2GoBroker}.
+ L{x2gobroker.brokers.base_broker.X2GoBroker}.
@return: a dictionary containing the session profile defaults
@rtype: C{dict}
@@ -278,7 +283,7 @@ class X2GoBroker(object):
def get_acl_defaults(self):
"""\
Get the ACL defaults for session profiles. The defaults are hard-coded
- in L{x2gobroker.defaults} for class L{x2gobroker.base.X2GoBroker}.
+ in L{x2gobroker.defaults} for class L{x2gobroker.brokers.base_broker.X2GoBroker}.
@return: a dictionary containing the ACL defaults for all session profiles
@rtype: C{dict}
@@ -937,7 +942,7 @@ class X2GoBroker(object):
return False, None
### IMPLEMENT YOUR AUTHENTICATION LOGIC IN THE self._do_authenticate(**kwargs) METHOD
- ### when inheriting from the base.X2GoBroker class.
+ ### when inheriting from the x2gobroker.brokers.base_broker.X2GoBroker class.
if type(cookie) is types.StringType:
cookie = unicode(cookie)
@@ -973,7 +978,7 @@ class X2GoBroker(object):
# this should be the first time we have seen this user or they are using old client so verify their passwrd
### IMPLEMENT YOUR AUTHENTICATION LOGIC IN THE self._do_authenticate(**kwargs) METHOD
- ### when inheriting from the base.X2GoBroker class.
+ ### when inheriting from the x2gobroker.brokers.base_brokers.X2GoBroker class.
access = self._do_authenticate(username=username, password=password) or override_password_auth
@@ -1707,9 +1712,10 @@ class X2GoBroker(object):
def run_optional_script(self, script_type, username, password, task, profile_id, ip, cookie, authed=None, server=None):
"""\
Run all optional scripts of type script_type. Called with 3 different script types:
- pre_auth_scripts - before authentication happens
- post_auth_scripts - after authentication but before anything else occurs
- select_session_scripts - after load balancing before a specific server is sent to the client
+
+ - pre_auth_scripts - before authentication happens
+ - post_auth_scripts - after authentication but before anything else occurs
+ - select_session_scripts - after load balancing before a specific server is sent to the client
These scripts allow for both addional actions to be performed as well as the mangling of any relevant fields.
diff --git a/x2gobroker/brokers/inifile_broker.py b/x2gobroker/brokers/inifile_broker.py
index a110ba7..c2d3c5f 100644
--- a/x2gobroker/brokers/inifile_broker.py
+++ b/x2gobroker/brokers/inifile_broker.py
@@ -18,7 +18,7 @@
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
"""\
-L{inifile.X2GoBroker} class - a simple X2GoBroker implementations that uses text-based config files (also supports load balancing)
+L{x2gobroker.brokers.inifile_broker.X2GoBroker} class - a simple X2GoBroker implementations that uses text-based config files (also supports load balancing)
"""
__NAME__ = 'x2gobroker-pylib'
@@ -42,10 +42,10 @@ class X2GoBroker(base.X2GoBroker):
def __init__(self, profile_config_file=None, profile_config_defaults=None, **kwargs):
"""\
- @param config_file: path to the X2Go Session Broker configuration file (x2gobroker.conf)
- @type config_file: C{unicode}
@param profile_config_file: path to the backend's session profile configuration (x2gobroker-sessionprofiles.conf)
@type profile_config_file: C{unicode}
+ @param profile_config_defaults: Default settings for session profile configuration parameters.
+ @type profile_config_defaults: C{dict}
"""
base.X2GoBroker.__init__(self, **kwargs)
diff --git a/x2gobroker/brokers/zeroconf_broker.py b/x2gobroker/brokers/zeroconf_broker.py
index b2179ab..f84a78e 100644
--- a/x2gobroker/brokers/zeroconf_broker.py
+++ b/x2gobroker/brokers/zeroconf_broker.py
@@ -18,7 +18,7 @@
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
"""\
-L{zeroconf.X2GoBroker} class - a demo X2GoBroker implementations that needs not configuration at all
+L{x2gobroker.brokers.zeroconf_broker.X2GoBroker} class - a demo X2GoBroker implementations that needs not configuration at all
"""
__NAME__ = 'x2gobroker-pylib'
diff --git a/x2gobroker/loggers.py b/x2gobroker/loggers.py
index 8f4271e..30af0ff 100644
--- a/x2gobroker/loggers.py
+++ b/x2gobroker/loggers.py
@@ -29,7 +29,7 @@ def init_console_loggers():
Initialize loggers that log to stderr.
@return: a 3-tuple of (logger_broker, logger_access, logger_error)
- @rtype: C{tuple]
+ @rtype: C{tuple}
"""
logger_root = logging.getLogger()
stderr_handler = logging.StreamHandler(sys.stderr)
diff --git a/x2gobroker/utils.py b/x2gobroker/utils.py
index 4b00434..328a0b6 100644
--- a/x2gobroker/utils.py
+++ b/x2gobroker/utils.py
@@ -249,7 +249,7 @@ def portscan(addr, port=22):
we want to probe
@type addr: C{unicode}
@param port: port number (default: 22)
- @type addr: C{int}
+ @type port: C{int}
"""
ip_proto = 0
--
Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
More information about the x2go-commits
mailing list