summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Krizek <tkrizek@redhat.com>2016-09-23 13:26:40 +0200
committerMartin Basti <mbasti@redhat.com>2016-09-26 18:45:49 +0200
commitef9c718e3a82fcbd5944cc993e2c9f3f1237f85c (patch)
tree9c4c9596e8abf51e9d257ee735fe02c66aa05044
parentf7764cda6824a2fe73abe11f6daa28758a185319 (diff)
downloadfreeipa-ef9c718e3a82fcbd5944cc993e2c9f3f1237f85c.tar.gz
freeipa-ef9c718e3a82fcbd5944cc993e2c9f3f1237f85c.tar.xz
freeipa-ef9c718e3a82fcbd5944cc993e2c9f3f1237f85c.zip
Prompt for forwarder in dnsforwardzone-add
When the command ipa dnsforwardzone-add is invoked without specifying the forwarder as an argument and the forward policy is not set to none, prompt for DNS forwarder. https://fedorahosted.org/freeipa/ticket/6169 Reviewed-By: Petr Spacek <pspacek@redhat.com>
-rw-r--r--ipaclient/plugins/dns.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipaclient/plugins/dns.py b/ipaclient/plugins/dns.py
index b9ab709bf..42ccd3d03 100644
--- a/ipaclient/plugins/dns.py
+++ b/ipaclient/plugins/dns.py
@@ -389,6 +389,11 @@ class dnsconfig_mod(MethodOverride):
@register(override=True, no_fail=True)
class dnsforwardzone_add(MethodOverride):
def interactive_prompt_callback(self, kw):
+ if ('idnsforwarders' not in kw and
+ kw.get('idnsforwardpolicy') != u'none'):
+ kw['idnsforwarders'] = self.Backend.textui.prompt(
+ _(u'DNS forwarder'))
+
# show informative message on client side
# server cannot send messages asynchronous
if kw.get('idnsforwarders', False):