diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/development/option_parsing.txt | 20 | ||||
-rw-r--r-- | doc/installation/prerequisites.txt | 14 | ||||
-rw-r--r-- | doc/man/bcfg2.conf.txt | 4 | ||||
-rw-r--r-- | doc/reports/dynamic.txt | 3 |
4 files changed, 18 insertions, 23 deletions
diff --git a/doc/development/option_parsing.txt b/doc/development/option_parsing.txt index 091f43cdd..e14031e1e 100644 --- a/doc/development/option_parsing.txt +++ b/doc/development/option_parsing.txt @@ -174,28 +174,32 @@ The normal implementation pattern is this: #. Define all of your subcommands as children of :class:`Bcfg2.Options.Subcommand`. -#. Define a :class:`Bcfg2.Options.CommandRegistry` object that will be +#. Create a :class:`Bcfg2.Options.CommandRegistry` object that will be used to register all of the commands. Registering a command collect its options and adds it as a :class:`Bcfg2.Options.Subparser` option group to the main option parser. -#. Register your commands with - :func:`Bcfg2.Options.register_commands`, parse options, and run. +#. Register your commands with the + :func:`Bcfg2.Options.CommandRegistry.register_commands` method of + your ``CommandRegistry`` object. +#. Add options from the + :attr:`Bcfg2.Options.CommandRegistry.command_options` + attribute to the option parser. +#. Parse options, and run. :mod:`Bcfg2.Server.Admin` provides a fairly simple implementation, -where the CLI class is itself the command registry: +where the CLI class subclasses the command registry: .. code-block:: python class CLI(Bcfg2.Options.CommandRegistry): def __init__(self): Bcfg2.Options.CommandRegistry.__init__(self) - Bcfg2.Options.register_commands(self.__class__, - globals().values(), - parent=AdminCmd) + self.register_commands(globals().values(), parent=AdminCmd) parser = Bcfg2.Options.get_parser( description="Manage a running Bcfg2 server", components=[self]) + parser.add_options(self.subcommand_options) parser.parse() In this case, commands are collected from amongst all global variables @@ -208,9 +212,7 @@ At a minimum, the :func:`Bcfg2.Options.Subcommand.run` method must be overridden, and a docstring written. .. autoclass:: Subcommand -.. autoclass:: HelpCommand .. autoclass:: CommandRegistry -.. autofunction:: register_commands Actions ------- diff --git a/doc/installation/prerequisites.txt b/doc/installation/prerequisites.txt index a30a3b26b..8119be06b 100644 --- a/doc/installation/prerequisites.txt +++ b/doc/installation/prerequisites.txt @@ -76,17 +76,3 @@ reporting, such as Apache + mod_wsgi or nginx. +-------------------------------+----------+--------------------------------+ | south | 0.7.5+ | | +-------------------------------+----------+--------------------------------+ - -Bcfg2 Reporting ---------------- - -A webserver capabable of running wsgi applications is required for web reporting, -such as Apache + mod_wsgi or nginx. - -+-------------------------------+----------+--------------------------------+ -| Software | Version | Requires | -+===============================+==========+================================+ -| django | 1.2.0+ | | -+-------------------------------+----------+--------------------------------+ -| south | 0.7.0+ | | -+-------------------------------+----------+--------------------------------+ diff --git a/doc/man/bcfg2.conf.txt b/doc/man/bcfg2.conf.txt index 825ab2121..40766b88a 100644 --- a/doc/man/bcfg2.conf.txt +++ b/doc/man/bcfg2.conf.txt @@ -716,6 +716,10 @@ Reporting options web_debug Turn on Django debugging. + max_children + Maximum number of children for the reporting collector. Use 0 to + disable the limit. (default is 0) + See Also -------- diff --git a/doc/reports/dynamic.txt b/doc/reports/dynamic.txt index 53bdef24e..38d4c7e3a 100644 --- a/doc/reports/dynamic.txt +++ b/doc/reports/dynamic.txt @@ -270,6 +270,9 @@ reporting * web_prefix: Prefix to be added to Django's MEDIA_URL * file_limit: The maximum size of a diff or binary data to store in the database. +* max_children: Maximum number of children for the reporting + collector. Use 0 to disable the limit and spawn a thread + as soon as a working file is available. .. _dynamic_transports: |