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

Ana Krivokapic akrivoka at redhat.com
Thu May 9 10:44:52 UTC 2013


On 05/09/2013 12:35 PM, Petr Spacek wrote:
> 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.

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.

>
> 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 :-)
>


-- 
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.




More information about the Freeipa-devel mailing list