On 9.5.2013 12:44, Ana Krivokapic wrote:
On 05/09/2013 12:35 PM, Petr Spacek wrote:

On 7.5.2013 19:50, Ana Krivokapic wrote:
Prompt for nameserver IP address in dnszone-add


diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -1781,6 +1781,8 @@ class dnszone_add(LDAPCreate):
          Str('ip_address?', _validate_ipaddr,
              doc=_('Add forward record for nameserver located in the
created zone'),
+            label=_('Nameserver IP address'),
+            alwaysask=True,

If I understood correctly, IPA CLI will ask for IP address always -
right? The problem is that IP address is explicitly required only if
the name of the name server belongs to the new zone.

Yes, it will always ask for the IP address, but it is not a required
option - you can leave it blank and press [enter]. The same applies for
web UI, you can just leave it blank.

Unfortunately, the IP address is required for cases a) and b) and can't be specified in case c).

There are three different cases:

new zone = example.com.
a) NS = ns.example.com. (i.e. absolute name)
=> IP address is required because NS is defined inside the new zone

b) NS = ns (i.e. relative name)
=> IP address is required because NS is defined inside the new zone

c) NS = ns.example.net.
=> IP address is not required because NS is defined outside the new zone

I didn't do functional test, so I'm sorry if I missed the some
important piece of the patch :-)

Petr^2 Spacek

Freeipa-devel mailing list

Reply via email to