From bef04ca6ed60f51f04756df5a063379c0089321d Mon Sep 17 00:00:00 2001 From: Michael Fenn Date: Fri, 29 Mar 2013 11:09:50 -0400 Subject: 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. --- src/lib/Bcfg2/Options.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib/Bcfg2/Options.py') 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): """ -- cgit v1.2.3-1-g7c22