ipa-ca-install: error when replica file is passed with domain level > 0

with replica promotion (domain level > 0) there are no replica files,
thus adding replica file as parameter when domain level > 0 should be
disallowed.

https://fedorahosted.org/freeipa/ticket/5455

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Martin Basti committed 2015-11-27 16:14:06 +01:00
1 parent f12f56fe8d
commit fa2fbc680a
1 file changed
+3
+3
View File
@@ -110,6 +110,9 @@ def install_replica(safe_options, options, filename):
domain_level = dsinstance.get_domain_level(api)
if domain_level > DOMAIN_LEVEL_0:
options.promote = True
if filename is not None:
sys.exit("Too many parameters provided. "
"No replica file is required")
else:
options.promote = False
if filename is None: