summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Options/Parser.py
Commit message (Collapse)AuthorAgeFilesLines
* Add BCFG2_CONFIG_FILE environment variable (regression from 1.3)Michael Fenn2014-04-071-0/+2
|
* Options: call _set_defaults_from_config before _parse_config_optionsMichael Fenn2014-03-191-0/+18
| | | | | | | | | | | | | | | | | | | | _set_defaults_from_config must be called before _parse_config_options This is due to a tricky interaction between the two methods: (1) _set_defaults_from_config does what its name implies, it updates the "default" property of each Option based on the value that exists in the config. (2) _parse_config_options will look at each option and set it to the default value that is _currently_ defined. If the option does not exist in the namespace, it will be added. The method carefully avoids overwriting the value of an option that is already defined in the namespace. Thus, if _set_defaults_from_config has not been called yet when _parse_config_options is called, all config file options will get set to their hardcoded defaults. This process defines the options in the namespace and _parse_config_options will never look at them again.
* Options: rename _set_defaults to _set_defaults_from_configMichael Fenn2014-03-191-3/+3
| | | | This is to make the method name more in line with what it does
* Options: set config file options only for the running parserChris St. Pierre2014-03-141-5/+4
|
* Options: Finalize actual value, not default valueChris St. Pierre2014-03-051-2/+1
| | | | This also fixes some extraneous calls in the option parsing loop.
* Options: set options debugging with environment variableChris St. Pierre2014-03-051-2/+24
|
* Options: Finalize onceMichael Fenn2013-12-071-1/+1
| | | | | | | | If finalize is called early, then some options will not be parsed but instead always take the default value (observed with reporting.transport). Calling finalize once at the end of the processing lets all options take the values they were assigned in the config file.
* Options: parse config options before setting defaultsChris St. Pierre2013-11-121-0/+1
|
* Options: made unit test flag publicChris St. Pierre2013-11-121-3/+3
|
* Options: added workaround for unit tests that use the parserChris St. Pierre2013-11-121-13/+12
|
* Options: Don't reparse initial config fileChris St. Pierre2013-10-311-3/+5
| | | | It hasn't been parsed at this stage anyway.
* DB: fixed how Django settings are loadedChris St. Pierre2013-10-301-8/+33
|
* Options: parse arg list passed in, not sys.argvChris St. Pierre2013-09-031-1/+1
|
* Options: fixed error message when bcfg2.conf is not readableChris St. Pierre2013-08-161-2/+1
|
* Options: Replace relative imports with absoluteChris St. Pierre2013-08-121-1/+1
|
* testsuite: fixed most pylint complaintsChris St. Pierre2013-08-091-7/+15
|
* Options: reparse all arguments on each passChris St. Pierre2013-08-091-7/+3
| | | | | | | | | This ensures that required positional arguments are handled properly. If we only reparse the remaining arguments -- i.e., those that were not understood on previous passes -- then we may parse out all of the positional arguments on the first pass, and then on a subsequent pass parse_known_args() will fail because the positional argument is not provided.
* Options: fix parsing of ComponentActions and other finalizable actionsChris St. Pierre2013-08-091-4/+4
|
* Options: wrote completely new option parserChris St. Pierre2013-06-271-0/+282