Re: [Freeipa-devel] [PATCH 0164] Fix warning message should not contain CLI commands due WebUI

2014-11-19 Thread Petr Vobornik

On 13.11.2014 16:49, Martin Basti wrote:

Ticket: https://fedorahosted.org/freeipa/ticket/4647
Patch attached.



The change looses information about the zone apex record. User also 
might not know what is the message about because it lacks context.


CLI option name as context is the cause of this bug but it could be 
replaced with, e.g., label.


So what about:

  Semantic of setting Authoritative nameserver was changed. It's
  used only for setting the SOA MNAME attribute.

  NS record(s) can be edited in special zone apex record - '@'.

--
Petr Vobornik

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 0164] Fix warning message should not contain CLI commands due WebUI

2014-11-19 Thread Martin Basti

On 19/11/14 12:45, Petr Vobornik wrote:

On 13.11.2014 16:49, Martin Basti wrote:

Ticket: https://fedorahosted.org/freeipa/ticket/4647
Patch attached.



The change looses information about the zone apex record. User also 
might not know what is the message about because it lacks context.


CLI option name as context is the cause of this bug but it could be 
replaced with, e.g., label.


So what about:

  Semantic of setting Authoritative nameserver was changed. It's
  used only for setting the SOA MNAME attribute.

  NS record(s) can be edited in special zone apex record - '@'.


Updated patch attached.

I used NS record(s) can be edited in zone apex - '@'. instead of yours.

--
Martin Basti

From 72abac759e43ca199c2b7dea36d21fca56f75cf3 Mon Sep 17 00:00:00 2001
From: Martin Basti mba...@redhat.com
Date: Thu, 13 Nov 2014 14:02:02 +0100
Subject: [PATCH] Fix warning message should not contain CLI commands

Message is now universal for both CLI and WebUI

Ticket: https://fedorahosted.org/freeipa/ticket/4647
---
 ipalib/messages.py  | 4 ++--
 ipalib/plugins/dns.py   | 9 -
 ipatests/test_xmlrpc/test_dns_plugin.py | 9 ++---
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/ipalib/messages.py b/ipalib/messages.py
index 5eeab3c54caf3a7318d89a4aeaee1357fceb787f..102e35275dbe37328c84ecb3cd5b2a8d8578056f 100644
--- a/ipalib/messages.py
+++ b/ipalib/messages.py
@@ -175,8 +175,8 @@ class OptionSemanticChangedWarning(PublicMessage):
 
 errno = 13005
 type = warning
-format = _(usemantic of '%(option)s' option was changed: 
-   u%(current_behavior)s.\n%(hint)s)
+format = _(uSemantic of %(label)s was changed. %(current_behavior)s\n
+   u%(hint)s)
 
 
 class DNSServerNotRespondingWarning(PublicMessage):
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index dd1e640f4062a32921bf1edf316e122b81a6d485..c5d96a8c4fcdf101254ecefb60cb83d63bee6310 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -2369,11 +2369,10 @@ class dnszone(DNSZoneBase):
 messages.add_message(
 options['version'],
 result, messages.OptionSemanticChangedWarning(
-option=u--name-server,
-current_behavior=_(uthe option is used only for 
-   usetting up the SOA MNAME attribute),
-hint=_(uTo edit NS record(s) in zone apex, use command 
-   u'dnsrecord-mod [zone] @ --ns-rec=nameserver'.)
+label=_(usetting Authoritative nameserver),
+current_behavior=_(uIt is used only for setting the 
+   uSOA MNAME attribute.),
+hint=_(uNS record(s) can be edited in zone apex - '@'. )
 )
 )
 
diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py
index a34d11a3278c67a3d00ca8f59bb8d8d19cf8a46e..fb53853147ecf663cf7015867131445f32364cfb 100644
--- a/ipatests/test_xmlrpc/test_dns_plugin.py
+++ b/ipatests/test_xmlrpc/test_dns_plugin.py
@@ -497,9 +497,12 @@ class test_dns(Declarative):
 'objectclass': objectclasses.dnszone,
 },
 'messages': (
-{'message': usemantic of '--name-server' option was changed: the option is used only for setting up
-u the SOA MNAME attribute.\nTo edit NS record(s) in zone apex, use command 
-u'dnsrecord-mod [zone] @ --ns-rec=nameserver'.,
+{'message': uSemantic of setting Authoritative nameserver 
+uwas changed. 
+uIt is used only for setting the SOA MNAME 
+uattribute.\n
+uNS record(s) can be edited in zone 
+uapex - '@'. ,
  'code': 13005,
  'type': u'warning',
  'name': u'OptionSemanticChangedWarning'},
-- 
1.8.3.1

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Re: [Freeipa-devel] [PATCH 0164] Fix warning message should not contain CLI commands due WebUI

2014-11-19 Thread Petr Vobornik

On 19.11.2014 13:47, Martin Basti wrote:

On 19/11/14 12:45, Petr Vobornik wrote:

On 13.11.2014 16:49, Martin Basti wrote:

Ticket: https://fedorahosted.org/freeipa/ticket/4647
Patch attached.



The change looses information about the zone apex record. User also
might not know what is the message about because it lacks context.

CLI option name as context is the cause of this bug but it could be
replaced with, e.g., label.

So what about:

  Semantic of setting Authoritative nameserver was changed. It's
  used only for setting the SOA MNAME attribute.

  NS record(s) can be edited in special zone apex record - '@'.


Updated patch attached.

I used NS record(s) can be edited in zone apex - '@'. instead of yours.



ACK

Pushed to:
master: 310e46452c41223afa0b1b318c503574567df105
ipa-4-1: 38130c632bda27711407f5c74f26031da5b52ad6
--
Petr Vobornik

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH 0164] Fix warning message should not contain CLI commands due WebUI

2014-11-13 Thread Martin Basti

Ticket: https://fedorahosted.org/freeipa/ticket/4647
Patch attached.

--
Martin Basti

From 98132a1ba593cb4b4390678a2037b9db92b5905b Mon Sep 17 00:00:00 2001
From: Martin Basti mba...@redhat.com
Date: Thu, 13 Nov 2014 14:02:02 +0100
Subject: [PATCH] Fix warning message should not contain CLI commands

Message is now universal for both CLI and WebUI

Ticket: https://fedorahosted.org/freeipa/ticket/4647
---
 ipalib/messages.py  | 3 +--
 ipalib/plugins/dns.py   | 8 +++-
 ipatests/test_xmlrpc/test_dns_plugin.py | 6 +++---
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/ipalib/messages.py b/ipalib/messages.py
index 5eeab3c54caf3a7318d89a4aeaee1357fceb787f..1e28cd1d6d572f7698ed3221e29c29160963ebad 100644
--- a/ipalib/messages.py
+++ b/ipalib/messages.py
@@ -175,8 +175,7 @@ class OptionSemanticChangedWarning(PublicMessage):
 
 errno = 13005
 type = warning
-format = _(usemantic of '%(option)s' option was changed: 
-   u%(current_behavior)s.\n%(hint)s)
+format = _(uSemantic was changed: %(current_behavior)s.)
 
 
 class DNSServerNotRespondingWarning(PublicMessage):
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index dd1e640f4062a32921bf1edf316e122b81a6d485..133b562dc16aa78646c127265532a0a991bd5398 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -2369,11 +2369,9 @@ class dnszone(DNSZoneBase):
 messages.add_message(
 options['version'],
 result, messages.OptionSemanticChangedWarning(
-option=u--name-server,
-current_behavior=_(uthe option is used only for 
-   usetting up the SOA MNAME attribute),
-hint=_(uTo edit NS record(s) in zone apex, use command 
-   u'dnsrecord-mod [zone] @ --ns-rec=nameserver'.)
+current_behavior=_(
+uthe name server value is used only for setting up 
+uthe SOA MNAME attribute),
 )
 )
 
diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py
index a34d11a3278c67a3d00ca8f59bb8d8d19cf8a46e..35579dec1912117e19a9cdaf6f54938cbaed75ca 100644
--- a/ipatests/test_xmlrpc/test_dns_plugin.py
+++ b/ipatests/test_xmlrpc/test_dns_plugin.py
@@ -497,9 +497,9 @@ class test_dns(Declarative):
 'objectclass': objectclasses.dnszone,
 },
 'messages': (
-{'message': usemantic of '--name-server' option was changed: the option is used only for setting up
-u the SOA MNAME attribute.\nTo edit NS record(s) in zone apex, use command 
-u'dnsrecord-mod [zone] @ --ns-rec=nameserver'.,
+{'message': uSemantic was changed: the name server value 
+uis used only for setting up the SOA MNAME 
+uattribute.,
  'code': 13005,
  'type': u'warning',
  'name': u'OptionSemanticChangedWarning'},
-- 
1.8.3.1

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel