Remove support for replica_file option from ipa-kra-install

Raise "Domain level 0 is not supported anymore" error if there are
remainaing args after parsing. Remove all "DOMAIN LEVEL 0" and
"DOMAIN LEVEL 1" prefixes from the man page.

See: https://pagure.io/freeipa/issue/7669
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Thomas Woerner
2018-08-07 11:17:23 +02:00
committed by Christian Heimes
parent a170b284c4
commit 5f5180b825
2 changed files with 8 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ class KRAInstall(admintool.AdminTool):
command_name = 'ipa-kra-install'
usage = "%prog [options] [replica_file]"
usage = "%prog [options]"
description = "Install a master or replica KRA."
@@ -121,6 +121,8 @@ class KRAInstaller(KRAInstall):
if len(self.args) > 1:
self.option_parser.error("Too many arguments provided")
elif len(self.args) == 1:
# Domain level 0 is not supported anymore
self.option_parser.error("Domain level 0 is not supported anymore")
self.replica_file = self.args[0]
if not os.path.isfile(self.replica_file):
self.option_parser.error(
@@ -191,6 +193,9 @@ class KRAInstaller(KRAInstall):
config.top_dir = tempfile.mkdtemp("ipa")
config.dir = config.top_dir
else:
# Domain level 0 is not supported anymore
raise admintool.ScriptError(
"Domain level 0 is not supported anymore")
config = create_replica_config(
self.options.password,
self.replica_file,