diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-01-17 10:00:20 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-01-17 12:55:52 -0500 |
commit | 4ea3569a0b396622a6c156588c4c8752a8dd7738 (patch) | |
tree | 8b04be472f79d6118b7fd9d68ee74c0c38b58145 /src/sbin | |
parent | f8b31cfa1596a17b248e28b82362e2d5e542b8ff (diff) | |
download | bcfg2-4ea3569a0b396622a6c156588c4c8752a8dd7738.tar.gz bcfg2-4ea3569a0b396622a6c156588c4c8752a8dd7738.tar.bz2 bcfg2-4ea3569a0b396622a6c156588c4c8752a8dd7738.zip |
Options: split loading a new OptionParser from fetching an existing parser
Diffstat (limited to 'src/sbin')
-rwxr-xr-x | src/sbin/bcfg2 | 4 | ||||
-rwxr-xr-x | src/sbin/bcfg2-admin | 2 | ||||
-rwxr-xr-x | src/sbin/bcfg2-crypt | 2 | ||||
-rwxr-xr-x | src/sbin/bcfg2-info | 2 | ||||
-rwxr-xr-x | src/sbin/bcfg2-lint | 2 | ||||
-rwxr-xr-x | src/sbin/bcfg2-report-collector | 2 | ||||
-rwxr-xr-x | src/sbin/bcfg2-server | 2 | ||||
-rwxr-xr-x | src/sbin/bcfg2-test | 2 |
8 files changed, 9 insertions, 9 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2 index e9beb47cd..62f749b80 100755 --- a/src/sbin/bcfg2 +++ b/src/sbin/bcfg2 @@ -4,7 +4,7 @@ import sys import signal from Bcfg2.Client.Client import Client -from Bcfg2.Options import get_option_parser, CLIENT_COMMON_OPTIONS +from Bcfg2.Options import load_option_parser, CLIENT_COMMON_OPTIONS def cb_sigint_handler(signum, frame): @@ -13,7 +13,7 @@ def cb_sigint_handler(signum, frame): def main(): - setup = get_option_parser(CLIENT_COMMON_OPTIONS) + setup = load_option_parser(CLIENT_COMMON_OPTIONS) setup.parse(sys.argv[1:]) if setup['args']: diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin index 8f6643ee0..3c63cd3f5 100755 --- a/src/sbin/bcfg2-admin +++ b/src/sbin/bcfg2-admin @@ -41,7 +41,7 @@ def main(): optinfo = dict() optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS) optinfo.update(Bcfg2.Options.SERVER_COMMON_OPTIONS) - setup = Bcfg2.Options.get_option_parser(optinfo) + setup = Bcfg2.Options.load_option_parser(optinfo) # override default help message to include description of all modes setup.hm = "Usage:\n\n%s\n%s" % (setup.buildHelpMessage(), create_description()) diff --git a/src/sbin/bcfg2-crypt b/src/sbin/bcfg2-crypt index 6a13b9bc5..0bee7e9b9 100755 --- a/src/sbin/bcfg2-crypt +++ b/src/sbin/bcfg2-crypt @@ -371,7 +371,7 @@ def main(): # pylint: disable=R0912,R0915 optinfo = dict(interactive=Bcfg2.Options.INTERACTIVE) optinfo.update(Bcfg2.Options.CRYPT_OPTIONS) optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS) - setup = Bcfg2.Options.get_option_parser(optinfo) + setup = Bcfg2.Options.load_option_parser(optinfo) setup.hm = " bcfg2-crypt [options] <filename>\nOptions:\n%s" % \ setup.buildHelpMessage() setup.parse() diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index c697e9fca..60b099284 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -751,7 +751,7 @@ def main(): interpreter=Bcfg2.Options.INTERPRETER) optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS) optinfo.update(Bcfg2.Options.SERVER_COMMON_OPTIONS) - setup = Bcfg2.Options.get_option_parser(optinfo) + setup = Bcfg2.Options.load_option_parser(optinfo) setup.hm = "\n".join([" bcfg2-info [options] [command <command args>]", "Options:", setup.buildHelpMessage(), diff --git a/src/sbin/bcfg2-lint b/src/sbin/bcfg2-lint index f12fcc6c4..557a03405 100755 --- a/src/sbin/bcfg2-lint +++ b/src/sbin/bcfg2-lint @@ -146,7 +146,7 @@ def main(): lint_plugins=Bcfg2.Options.LINT_PLUGINS) optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS) optinfo.update(Bcfg2.Options.SERVER_COMMON_OPTIONS) - setup = Bcfg2.Options.get_option_parser(optinfo) + setup = Bcfg2.Options.load_option_parser(optinfo) setup.parse(sys.argv[1:]) log_args = dict(to_syslog=setup['syslog'], to_console=logging.WARNING) diff --git a/src/sbin/bcfg2-report-collector b/src/sbin/bcfg2-report-collector index d925023d1..403775251 100755 --- a/src/sbin/bcfg2-report-collector +++ b/src/sbin/bcfg2-report-collector @@ -20,7 +20,7 @@ def main(): ) optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS) optinfo.update(Bcfg2.Options.REPORTING_COMMON_OPTIONS) - setup = Bcfg2.Options.get_option_parser(optinfo) + setup = Bcfg2.Options.load_option_parser(optinfo) setup.parse() # run collector diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server index 7e7dede30..8e96d65f2 100755 --- a/src/sbin/bcfg2-server +++ b/src/sbin/bcfg2-server @@ -16,7 +16,7 @@ def main(): optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS) optinfo.update(Bcfg2.Options.SERVER_COMMON_OPTIONS) optinfo.update(Bcfg2.Options.DAEMON_COMMON_OPTIONS) - setup = Bcfg2.Options.get_option_parser(args=optinfo) + setup = Bcfg2.Options.load_option_parser(optinfo) setup.parse(sys.argv[1:]) # check whether the specified bcfg2.conf exists if not os.path.exists(setup['configfile']): diff --git a/src/sbin/bcfg2-test b/src/sbin/bcfg2-test index a708a233a..28023a0f2 100755 --- a/src/sbin/bcfg2-test +++ b/src/sbin/bcfg2-test @@ -69,7 +69,7 @@ def main(): validate=Bcfg2.Options.CFG_VALIDATION) optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS) optinfo.update(Bcfg2.Options.SERVER_COMMON_OPTIONS) - setup = Bcfg2.Options.get_option_parser(args=optinfo) + setup = Bcfg2.Options.load_option_parser(optinfo) setup.hm = \ "bcfg2-test [options] [client] [client] [...]\nOptions:\n %s" % \ setup.buildHelpMessage() |