From ac4efac3944d180cffd0ad9d63f631dc928e1d28 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Fri, 24 Oct 2008 20:02:14 -0600 Subject: Finished Env._finalize_core() and corresponding unit tests --- ipalib/constants.py | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'ipalib/constants.py') diff --git a/ipalib/constants.py b/ipalib/constants.py index d817fda4..a1cc5b4c 100644 --- a/ipalib/constants.py +++ b/ipalib/constants.py @@ -21,5 +21,41 @@ Constants centralized in one file. """ -# The section read in config files, i.e. [global] +# The section to read in the config files, i.e. [global] CONFIG_SECTION = 'global' + + +# The default configuration for api.env +DEFAULT_CONFIG = ( + ('lite_xmlrpc_port', 8888), + ('lite_webui_port', 9999), + ('xmlrpc_uri', 'http://localhost:8888'), + ('ldap_uri', ''), + + ('verbose', False), + ('debug', False), + + # Env.__init__() or Env._bootstrap() or Env._finalize_core() + # will have filled in all the keys below by the time DEFAULT_CONFIG + # is merged in, so the values below are never actually used. They are + # listed both to provide a big picture and so DEFAULT_CONFIG contains + # the keys that should be present after Env._load_standard is called. + + # Set in Env.__init__(): + ('ipalib', None), # The directory containing ipalib/__init__.py + ('site_packages', None), # The directory contaning ipalib + ('script', None), # sys.argv[0] + ('bin', None), # The directory containing script + ('home', None), # The home directory of user underwhich process is running + ('dot_ipa', None), # ~/.ipa directory + + # Set in Env._bootstrap(): + ('in_tree', None), # Whether or not running in-tree (bool) + ('context', None), # Name of context, default is 'default' + ('conf', None), # Path to configuration file + + # Set in Env._finalize_core(): + ('in_server', None), # Whether or not running in-server (bool) + ('log', None), # Path to log file + +) -- cgit