[Freeipa-devel] [PATCHES 0114-0115, 0120-0121, 0123-0125] DNS: allow to add root zone '.'

Martin Basti mbasti at redhat.com
Fri Sep 19 14:25:18 UTC 2014


On 19/09/14 13:54, Martin Kosek wrote:
> I did not review, just found something that hit me in the eyes:
>
>
> On 09/19/2014 01:25 PM, Martin Basti wrote:
>> +class OptionDeprecatedWarning(PublicMessage):
>> +    """
>> +    **13004** Used when user uses a deprecated option
>> +    """
>> +
>> +    errno = 13004
>> +    type = "warning"
>> +    format = _(u"'%(option)s' option is deprecated. 
>> %(additional_info)s")
>> +
>> +
>> +class OptionNameServerWarning(PublicMessage):
>> +    """
>> +    **13005** Used when user uses a dnszone-add/mod --name-server 
>> option
>> +    """
>> +
>> +    errno = 13005
>> +    type = "warning"
>> +    format = _(u"'--name-server' is used only for setting up the SOA 
>> MNAME attribute.\n"
>> +               u"To edit NS record(s) in zone apex, use command 
>> 'dnsrecord-mod [zone] @ --ns-rec=nameserver'.")
>
>
> OptionNameServerWarning has a nice generic name, but the format is not 
> that generic, compared to OptionDeprecatedWarning. I think we should 
> follow the approach as in OptionDeprecatedWarning so that the warning 
> can be reused.
>
> This is not urgent though, you can wait with the fix until Petr2 or 
> somebody else sends you other notes...
>
> Martin

Could be:

+class OptionSemanticChangedWarning(PublicMessage):
+    """
+    **13005** Used when user uses a dnszone-add/mod --name-server option
+    """
+
+    errno = 13005
+    type = "warning"
+    format = _(u"' semantic of %(option)s' option was changed: 
%(current_behavior)s.\n %(hint)s")

Example: Warning: semantic of  '--name-server' option was changed: the 
option is used only for setting up the SOA MNAME attribute.
To edit NS record(s) in zone apex, use command 'dnsrecord-mod [zone] @ 
--ns-rec=nameserver'.

?

-- 
Martin Basti




More information about the Freeipa-devel mailing list