From 69faac9ae1d4498b4791af40a8e6bb877b82da77 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Mon, 15 Oct 2012 09:10:10 -0400 Subject: documented core implementations --- doc/conf.py | 5 +++-- doc/development/core.txt | 29 ++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/conf.py b/doc/conf.py index 4dda8327f..96a1efbc7 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -264,8 +264,9 @@ def setup(app): versions = ["3.2", "2.7", "2.6"] cur_version = '.'.join(str(v) for v in sys.version_info[0:2]) -intersphinx_mapping = dict(mock=('http://www.voidspace.org.uk/python/mock', - None)) +intersphinx_mapping = \ + dict(mock=('http://www.voidspace.org.uk/python/mock', None), + cherrypy=('http://docs.cherrypy.org/stable', None)) for pyver in versions: if pyver == cur_version: key = 'py' diff --git a/doc/development/core.txt b/doc/development/core.txt index 145be3338..3607533ea 100644 --- a/doc/development/core.txt +++ b/doc/development/core.txt @@ -20,23 +20,26 @@ written to take advantage of other technologies, e.g., `Tornado A core implementation needs to: -* Override :func:`Bcfg2.Server.Core.Core._daemonize` to handle +* Override :func:`Bcfg2.Server.Core.BaseCore._daemonize` to handle daemonization, writing the PID file, and dropping privileges. -* Override :func:`Bcfg2.Server.Core.Core._run` to handle server +* Override :func:`Bcfg2.Server.Core.BaseCore._run` to handle server startup. -* Override :func:`Bcfg2.Server.Core.Core._block` to run the blocking - server loop. -* Call :func:`Bcfg2.Server.Core.Core.shutdown` on orderly shutdown. +* Override :func:`Bcfg2.Server.Core.BaseCore._block` to run the + blocking server loop. +* Call :func:`Bcfg2.Server.Core.BaseCore.shutdown` on orderly + shutdown. Nearly all XML-RPC handling is delegated entirely to the core implementation. It needs to: -* Call :func:`Bcfg2.Server.Core.Core.authenticate` to authenticate +* Call :func:`Bcfg2.Server.Core.BaseCore.authenticate` to authenticate clients. * Handle :exc:`xmlrpclib.Fault` exceptions raised by the exposed XML-RPC methods as appropriate. * Dispatch XML-RPC method invocations to the appropriate method, - including Plugin RMI. + including Plugin RMI. The client address pair (a tuple of remote IP + address and remote hostname) must be prepended to the argument list + passed to built-in methods (i.e., not to plugin RMI). Additionally, running and configuring the server is delegated to the core. It needs to honor the configuration options that influence how @@ -54,8 +57,20 @@ Core Implementations Builtin Core ------------ +The builtin server core consists of the core implementation +(:class:`Bcfg2.Server.BuiltinCore.Core`) and the XML-RPC server +implementation (:mod:`Bcfg2.SSLServer`). + +Core +~~~~ + .. automodule:: Bcfg2.Server.BuiltinCore +XML-RPC Server +~~~~~~~~~~~~~~ + +.. automodule:: Bcfg2.SSLServer + CherryPy Core ------------- -- cgit v1.2.3-1-g7c22