summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Options.py
diff options
context:
space:
mode:
authorMichael Fenn <fennm@deshawresearch.com>2013-03-29 11:09:50 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-04-01 07:34:37 -0400
commitbef04ca6ed60f51f04756df5a063379c0089321d (patch)
tree93c4b13b9cb19e5efe5c1c617a6f5557051665f9 /src/lib/Bcfg2/Options.py
parent748a6c81e4233d7b4c75d9a529be26ada4306c5b (diff)
downloadbcfg2-bef04ca6ed60f51f04756df5a063379c0089321d.tar.gz
bcfg2-bef04ca6ed60f51f04756df5a063379c0089321d.tar.bz2
bcfg2-bef04ca6ed60f51f04756df5a063379c0089321d.zip
Promote bcfg2-info to have it's own Options dict
Turns out that CLIENT_COMMON_OPTIONS and SERVER_COMMON_OPTIONS conflict. Adding ppath and max_copies (turns out the latter is also necessary) to the bcfg2-info code directly seemed like a maintenance problem waiting to happen, so I factored that out into a new INFO_COMMON_OPTIONS dict. That will keep any options parsing special cases out of the bcfg2-info code hopefully be more maintainable going forward.
Diffstat (limited to 'src/lib/Bcfg2/Options.py')
-rw-r--r--src/lib/Bcfg2/Options.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Options.py b/src/lib/Bcfg2/Options.py
index 099709cbc..b7ec9c089 100644
--- a/src/lib/Bcfg2/Options.py
+++ b/src/lib/Bcfg2/Options.py
@@ -1280,6 +1280,10 @@ TEST_COMMON_OPTIONS = dict(noseopts=TEST_NOSEOPTS,
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):
"""