Rework config.py and change cli tools. Maintain order of IPA servers from command line, config and DNS. Parse options before detecting IPA configuration. Don't ignore rest of the options if one is missing in ipa.conf. Drop the --usage options, we will rely on --help. Fixes: 458869, 459070, 458980, 459234

This commit is contained in:
Martin Nagy
2008-08-15 18:08:01 +02:00
parent 57669ba432
commit 885103c321
32 changed files with 375 additions and 441 deletions

View File

@@ -82,13 +82,15 @@ def main():
opt_parser.set_usage("Usage: %s [options] %s" % (distinguished_attr, os.path.basename(sys.argv[0])))
args = ipa.config.init_config(sys.argv)
options, args = opt_parser.parse_args(args)
ipa.config.add_standard_options(opt_parser)
options, args = opt_parser.parse_args()
if len(args) < 2:
if len(args) < 1:
opt_parser.error('missing %s' % (distinguished_attr))
ip_addr = args[1]
ipa.config.init_config(options)
ip_addr = args[0]
# Verify entity previously exists and get current values
ipa_client = ipaclient.IPAClient()