|
|
e3ffab |
From 22f830576d7d9f6585842818ea33379fd1674091 Mon Sep 17 00:00:00 2001
|
|
|
e3ffab |
From: Martin Basti <mbasti@redhat.com>
|
|
|
e3ffab |
Date: Thu, 13 Nov 2014 14:02:02 +0100
|
|
|
e3ffab |
Subject: [PATCH] Fix warning message should not contain CLI commands
|
|
|
e3ffab |
|
|
|
e3ffab |
Message is now universal for both CLI and WebUI
|
|
|
e3ffab |
|
|
|
e3ffab |
Ticket: https://fedorahosted.org/freeipa/ticket/4647
|
|
|
e3ffab |
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
|
|
|
e3ffab |
---
|
|
|
e3ffab |
ipalib/messages.py | 4 ++--
|
|
|
e3ffab |
ipalib/plugins/dns.py | 9 ++++-----
|
|
|
e3ffab |
ipatests/test_xmlrpc/test_dns_plugin.py | 9 ++++++---
|
|
|
e3ffab |
3 files changed, 12 insertions(+), 10 deletions(-)
|
|
|
e3ffab |
|
|
|
e3ffab |
diff --git a/ipalib/messages.py b/ipalib/messages.py
|
|
|
e3ffab |
index 5eeab3c54caf3a7318d89a4aeaee1357fceb787f..102e35275dbe37328c84ecb3cd5b2a8d8578056f 100644
|
|
|
e3ffab |
--- a/ipalib/messages.py
|
|
|
e3ffab |
+++ b/ipalib/messages.py
|
|
|
e3ffab |
@@ -175,8 +175,8 @@ class OptionSemanticChangedWarning(PublicMessage):
|
|
|
e3ffab |
|
|
|
e3ffab |
errno = 13005
|
|
|
e3ffab |
type = "warning"
|
|
|
e3ffab |
- format = _(u"semantic of '%(option)s' option was changed: "
|
|
|
e3ffab |
- u"%(current_behavior)s.\n%(hint)s")
|
|
|
e3ffab |
+ format = _(u"Semantic of %(label)s was changed. %(current_behavior)s\n"
|
|
|
e3ffab |
+ u"%(hint)s")
|
|
|
e3ffab |
|
|
|
e3ffab |
|
|
|
e3ffab |
class DNSServerNotRespondingWarning(PublicMessage):
|
|
|
e3ffab |
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
|
|
|
e3ffab |
index dd1e640f4062a32921bf1edf316e122b81a6d485..c5d96a8c4fcdf101254ecefb60cb83d63bee6310 100644
|
|
|
e3ffab |
--- a/ipalib/plugins/dns.py
|
|
|
e3ffab |
+++ b/ipalib/plugins/dns.py
|
|
|
e3ffab |
@@ -2369,11 +2369,10 @@ class dnszone(DNSZoneBase):
|
|
|
e3ffab |
messages.add_message(
|
|
|
e3ffab |
options['version'],
|
|
|
e3ffab |
result, messages.OptionSemanticChangedWarning(
|
|
|
e3ffab |
- option=u"--name-server",
|
|
|
e3ffab |
- current_behavior=_(u"the option is used only for "
|
|
|
e3ffab |
- u"setting up the SOA MNAME attribute"),
|
|
|
e3ffab |
- hint=_(u"To edit NS record(s) in zone apex, use command "
|
|
|
e3ffab |
- u"'dnsrecord-mod [zone] @ --ns-rec=nameserver'.")
|
|
|
e3ffab |
+ label=_(u"setting Authoritative nameserver"),
|
|
|
e3ffab |
+ current_behavior=_(u"It is used only for setting the "
|
|
|
e3ffab |
+ u"SOA MNAME attribute."),
|
|
|
e3ffab |
+ hint=_(u"NS record(s) can be edited in zone apex - '@'. ")
|
|
|
e3ffab |
)
|
|
|
e3ffab |
)
|
|
|
e3ffab |
|
|
|
e3ffab |
diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py
|
|
|
e3ffab |
index a34d11a3278c67a3d00ca8f59bb8d8d19cf8a46e..fb53853147ecf663cf7015867131445f32364cfb 100644
|
|
|
e3ffab |
--- a/ipatests/test_xmlrpc/test_dns_plugin.py
|
|
|
e3ffab |
+++ b/ipatests/test_xmlrpc/test_dns_plugin.py
|
|
|
e3ffab |
@@ -497,9 +497,12 @@ class test_dns(Declarative):
|
|
|
e3ffab |
'objectclass': objectclasses.dnszone,
|
|
|
e3ffab |
},
|
|
|
e3ffab |
'messages': (
|
|
|
e3ffab |
- {'message': u"semantic of '--name-server' option was changed: the option is used only for setting up"
|
|
|
e3ffab |
- u" the SOA MNAME attribute.\nTo edit NS record(s) in zone apex, use command "
|
|
|
e3ffab |
- u"'dnsrecord-mod [zone] @ --ns-rec=nameserver'.",
|
|
|
e3ffab |
+ {'message': u"Semantic of setting Authoritative nameserver "
|
|
|
e3ffab |
+ u"was changed. "
|
|
|
e3ffab |
+ u"It is used only for setting the SOA MNAME "
|
|
|
e3ffab |
+ u"attribute.\n"
|
|
|
e3ffab |
+ u"NS record(s) can be edited in zone "
|
|
|
e3ffab |
+ u"apex - '@'. ",
|
|
|
e3ffab |
'code': 13005,
|
|
|
e3ffab |
'type': u'warning',
|
|
|
e3ffab |
'name': u'OptionSemanticChangedWarning'},
|
|
|
e3ffab |
--
|
|
|
e3ffab |
2.1.0
|
|
|
e3ffab |
|