install: fix ipa-server-install fail on missing --forwarder

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Jan Cholasta 2015-10-01 11:41:39 +02:00 committed by Martin Basti
parent 03d696f224
commit 6067824be4
3 changed files with 13 additions and 4 deletions

View File

@ -401,10 +401,6 @@ class BaseServer(common.Installable, common.Interactive, core.Composite):
raise RuntimeError(
"You cannot specify a --forwarder option together with "
"--no-forwarders")
elif not self.dns.forwarders and not self.dns.no_forwarders:
raise RuntimeError(
"You must specify at least one --forwarder option or "
"--no-forwarders option")
elif self.dns.reverse_zones and self.dns.no_reverse:
raise RuntimeError(
"You cannot specify a --reverse-zone option together with "

View File

@ -1269,6 +1269,12 @@ class Server(BaseServer):
raise RuntimeError(
"In unattended mode you need to provide at least -r, -p "
"and -a options")
if self.setup_dns:
#pylint: disable=no-member
if not self.dns.forwarders and not self.dns.no_forwarders:
raise RuntimeError(
"You must specify at least one --forwarder option or "
"--no-forwarders option")
if self.idmax < self.idstart:
raise RuntimeError(

View File

@ -741,6 +741,13 @@ class Replica(BaseServer):
raise RuntimeError(
"Replica file %s does not exist" % self.replica_file)
if self.setup_dns:
#pylint: disable=no-member
if not self.dns.forwarders and not self.dns.no_forwarders:
raise RuntimeError(
"You must specify at least one --forwarder option or "
"--no-forwarders option")
self.password = self.dm_password
@step()