[Freeipa-devel] [PATCH] 0027 Prompt for nameserver IP address in dnszone-add

Petr Spacek pspacek at redhat.com
Thu May 9 10:35:54 UTC 2013


Hello,

On 7.5.2013 19:50, Ana Krivokapic wrote:
> Prompt for nameserver IP address in dnszone-add
>
> https://fedorahosted.org/freeipa/ticket/3603
[...]

> diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
> index 3ad03402d5a3b66b0f64545ff8812e9201258d6e..0ee24b1bba6b499336b61d48ad5786df2ca05826 100644
> --- 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.

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 Spacek




More information about the Freeipa-devel mailing list