summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-lint
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-21 15:19:03 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-21 15:19:03 -0400
commit1a43d45badb0c5127b75dfef436bd45af5ed916c (patch)
treeb8de6ab35e2275cae17ce6e89c3c7087b997c237 /src/sbin/bcfg2-lint
parent5bdcf1ce5fb01aeca47d36f5b96924182c950869 (diff)
downloadbcfg2-1a43d45badb0c5127b75dfef436bd45af5ed916c.tar.gz
bcfg2-1a43d45badb0c5127b75dfef436bd45af5ed916c.tar.bz2
bcfg2-1a43d45badb0c5127b75dfef436bd45af5ed916c.zip
added option groups
Diffstat (limited to 'src/sbin/bcfg2-lint')
-rwxr-xr-xsrc/sbin/bcfg2-lint40
1 files changed, 6 insertions, 34 deletions
diff --git a/src/sbin/bcfg2-lint b/src/sbin/bcfg2-lint
index bc1e5b70e..5368c4b93 100755
--- a/src/sbin/bcfg2-lint
+++ b/src/sbin/bcfg2-lint
@@ -65,44 +65,16 @@ def load_server(setup):
setup['password'], setup['encoding'],
filemonitor=setup['filemonitor'],
setup=setup)
- if setup['event debug']:
- core.fam.debug = True
core.fam.handle_events_in_interval(4)
return core
if __name__ == '__main__':
- optinfo = {
- 'configfile': Bcfg2.Options.CFILE,
- 'help': Bcfg2.Options.HELP,
- 'verbose': Bcfg2.Options.VERBOSE,
- 'event debug': Bcfg2.Options.DEBUG,
- 'encoding': Bcfg2.Options.ENCODING,
- # Server options
- 'repo': Bcfg2.Options.SERVER_REPOSITORY,
- 'plugins': Bcfg2.Options.SERVER_PLUGINS,
- 'mconnect': Bcfg2.Options.SERVER_MCONNECT,
- 'filemonitor': Bcfg2.Options.SERVER_FILEMONITOR,
- 'ignore': Bcfg2.Options.SERVER_FAM_IGNORE,
- 'location': Bcfg2.Options.SERVER_LOCATION,
- 'static': Bcfg2.Options.SERVER_STATIC,
- 'key': Bcfg2.Options.SERVER_KEY,
- 'cert': Bcfg2.Options.SERVER_CERT,
- 'ca': Bcfg2.Options.SERVER_CA,
- 'password': Bcfg2.Options.SERVER_PASSWORD,
- 'protocol': Bcfg2.Options.SERVER_PROTOCOL,
- # More options
- 'logging': Bcfg2.Options.LOGGING_FILE_PATH,
- 'stdin': Bcfg2.Options.FILES_ON_STDIN,
- 'schema': Bcfg2.Options.SCHEMA_PATH,
- 'config': Bcfg2.Options.Option('Specify bcfg2-lint configuration file',
- '/etc/bcfg2-lint.conf',
- cmd='--lint-config',
- odesc='<conffile>',
- long_arg=True),
- 'showerrors': Bcfg2.Options.Option('Show error handling', False,
- cmd='--list-errors',
- long_arg=True),
- }
+ optinto = dict(config=Bcfg2.Options.LINT_CONFIG,
+ showerrors=Bcfg2.Options.LINT_SHOW_ERRORS,
+ stdin=Bcfg2.Options.LINT_FILES_ON_STDIN,
+ schema=Bcfg2.Options.SCHEMA_PATH)
+ optinfo.update(CLI_COMMON_OPTIONS)
+ optinfo.update(SERVER_COMMON_OPTIONS)
setup = Bcfg2.Options.OptionParser(optinfo)
setup.parse(sys.argv[1:])