From a8de10cde0b83743e8e453c8318cd1ab15e7c419 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 30 Oct 2013 10:02:38 -0400 Subject: DB: fixed how Django settings are loaded --- doc/development/option_parsing.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc/development') diff --git a/doc/development/option_parsing.txt b/doc/development/option_parsing.txt index 52da8fced..091f43cdd 100644 --- a/doc/development/option_parsing.txt +++ b/doc/development/option_parsing.txt @@ -67,9 +67,19 @@ There is no required interface for an option component. They may * An ``options`` attribute that is a list of :class:`Bcfg2.Options.Options.Option` objects or option groups. +* A boolean ``parse_first`` attribute; if set to True, the options for + the component are parsed before all other options. This is useful + for, e.g., Django database settings, which must be parsed before + plugins that use Django can be loaded. * A function or static method, ``options_parsed_hook``, that is called when all options have been parsed. (This will be called again if :func:`Bcfg2.Options.Parser.Parser.reparse` is called.) +* A function or static method, ``component_parsed_hook``, that is + called when early option parsing for a given component has + completed. This is *only* called for components with + ``parse_first`` set to True. It is passed a single argument: a + :class:`argparse.Namespace` object containing the complete set of + early options. Options are collected through two primary mechanisms: -- cgit v1.2.3-1-g7c22