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
2015-11-19 15:40:20 +01:00
parent f12f56fe8d
commit fa2fbc680a

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: