diff options
Diffstat (limited to 'src/lib/Bcfg2/Options.py')
-rw-r--r-- | src/lib/Bcfg2/Options.py | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Options.py b/src/lib/Bcfg2/Options.py index 74c488b45..e5aeccf4d 100644 --- a/src/lib/Bcfg2/Options.py +++ b/src/lib/Bcfg2/Options.py @@ -528,6 +528,11 @@ SERVER_FAM_IGNORE = \ 'SCCS', '.svn', '4913', '.gitignore'], cf=('server', 'ignore_files'), cook=list_split) +SERVER_FAM_BLOCK = \ + Option('FAM blocks on startup until all events are processed', + default=False, + cook=get_bool, + cf=('server', 'fam_blocking')) SERVER_LISTEN_ALL = \ Option('Listen on all interfaces', default=False, @@ -630,17 +635,19 @@ WEB_CFILE = \ default="/etc/bcfg2-web.conf", cmd='-W', odesc='<conffile>', - cf=('statistics', 'config'),) + cf=('reporting', 'config'), + deprecated_cf=('statistics', 'web_prefix'),) DJANGO_TIME_ZONE = \ Option('Django timezone', default=None, - cf=('statistics', 'time_zone'),) + cf=('reporting', 'time_zone'), + deprecated_cf=('statistics', 'web_prefix'),) DJANGO_DEBUG = \ Option('Django debug', default=None, - cf=('statistics', 'web_debug'), + cf=('reporting', 'web_debug'), + deprecated_cf=('statistics', 'web_prefix'), cook=get_bool,) -# Django options DJANGO_WEB_PREFIX = \ Option('Web prefix', default=None, @@ -824,7 +831,7 @@ CLIENT_COMMAND_TIMEOUT = \ # bcfg2-test and bcfg2-lint options TEST_NOSEOPTS = \ - Option('Options to pass to nosetests', + Option('Options to pass to nosetests. Only honored with --children 0', default=[], cmd='--nose-options', odesc='<opts>', @@ -839,6 +846,21 @@ TEST_IGNORE = \ cf=('bcfg2_test', 'ignore_entries'), cook=list_split, long_arg=True) +TEST_CHILDREN = \ + Option('Spawn this number of children for bcfg2-test (python 2.6+)', + default=0, + cmd='--children', + odesc='<children>', + cf=('bcfg2_test', 'children'), + cook=int, + long_arg=True) +TEST_XUNIT = \ + Option('Output an XUnit result file with --children', + default=None, + cmd='--xunit', + odesc='<xunit file>', + cf=('bcfg2_test', 'xunit'), + long_arg=True) LINT_CONFIG = \ Option('Specify bcfg2-lint configuration file', default='/etc/bcfg2-lint.conf', @@ -1019,7 +1041,7 @@ CRYPT_STDOUT = \ cmd='--stdout', long_arg=True) CRYPT_PASSPHRASE = \ - Option('Encryption passphrase (name or passphrase)', + Option('Encryption passphrase name', default=None, cmd='-p', odesc='<passphrase>') @@ -1066,6 +1088,7 @@ SERVER_COMMON_OPTIONS = dict(repo=SERVER_REPOSITORY, password=SERVER_PASSWORD, filemonitor=SERVER_FILEMONITOR, ignore=SERVER_FAM_IGNORE, + fam_blocking=SERVER_FAM_BLOCK, location=SERVER_LOCATION, key=SERVER_KEY, cert=SERVER_CERT, @@ -1172,6 +1195,16 @@ DATABASE_COMMON_OPTIONS = dict(web_configfile=WEB_CFILE, REPORTING_COMMON_OPTIONS = dict(reporting_file_limit=REPORTING_FILE_LIMIT, reporting_transport=REPORTING_TRANSPORT) +TEST_COMMON_OPTIONS = dict(noseopts=TEST_NOSEOPTS, + test_ignore=TEST_IGNORE, + children=TEST_CHILDREN, + xunit=TEST_XUNIT, + validate=CFG_VALIDATION) + +INFO_COMMON_OPTIONS = dict(ppath=PARANOID_PATH, + max_copies=PARANOID_MAX_COPIES) +INFO_COMMON_OPTIONS.update(CLI_COMMON_OPTIONS) +INFO_COMMON_OPTIONS.update(SERVER_COMMON_OPTIONS) class OptionParser(OptionSet): """ OptionParser bootstraps option parsing, getting the value of |