mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-24 14:17:41 -05:00
Make command dns-resolve deprecated.
To debug DNS issues other commands should be used like 'dig', 'host', 'nslookup' instead of command 'ipa dns-resolve'. This command is executed on server side, what may not be helpful with debugging clients. 'ipa dns-resolve' command is worse copy of host command, users should use 'host' command instead. dns-resolve is removed from CLI https://fedorahosted.org/freeipa/ticket/5466 Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
1 parent
801672cc66
commit
749dfc3917
2 files changed
+24
-3
No files matched your search
@@ -311,6 +311,16 @@ class DNSSuspiciousRelativeName(PublicMessage):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class CommandDeprecatedWarning(PublicMessage):
|
||||||
|
"""
|
||||||
|
**13015** Used when user uses a deprecated option
|
||||||
|
"""
|
||||||
|
|
||||||
|
errno = 13015
|
||||||
|
type = "warning"
|
||||||
|
format = _(u"'%(command)s' is deprecated. %(additional_info)s")
|
||||||
|
|
||||||
|
|
||||||
def iter_messages(variables, base):
|
def iter_messages(variables, base):
|
||||||
"""Return a tuple with all subclasses
|
"""Return a tuple with all subclasses
|
||||||
"""
|
"""
|
||||||
|
|||||||
+14
-3
@@ -4182,7 +4182,9 @@ class dnsrecord_find(LDAPSearch):
|
|||||||
|
|
||||||
@register()
|
@register()
|
||||||
class dns_resolve(Command):
|
class dns_resolve(Command):
|
||||||
__doc__ = _('Resolve a host name in DNS.')
|
__doc__ = _('Resolve a host name in DNS. (Deprecated)')
|
||||||
|
|
||||||
|
NO_CLI = True
|
||||||
|
|
||||||
has_output = output.standard_value
|
has_output = output.standard_value
|
||||||
msg_summary = _('Found \'%(value)s\'')
|
msg_summary = _('Found \'%(value)s\'')
|
||||||
@@ -4204,8 +4206,17 @@ class dns_resolve(Command):
|
|||||||
raise errors.NotFound(
|
raise errors.NotFound(
|
||||||
reason=_('Host \'%(host)s\' not found') % {'host': query}
|
reason=_('Host \'%(host)s\' not found') % {'host': query}
|
||||||
)
|
)
|
||||||
|
result = dict(result=True, value=query)
|
||||||
return dict(result=True, value=query)
|
messages.add_message(
|
||||||
|
options['version'], result,
|
||||||
|
messages.CommandDeprecatedWarning(
|
||||||
|
command='dns-resolve',
|
||||||
|
additional_info='The command may return an unexpected result, '
|
||||||
|
'the resolution of the DNS domain is done on '
|
||||||
|
'a randomly chosen IPA server.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
@register()
|
@register()
|
||||||
|
|||||||
Reference in new issue
Block a user