mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
DNS fix: do not show part options for unsupported records
Do not show parts options in help output, if record is marked as unsupported. Ticket: https://fedorahosted.org/freeipa/ticket/4930 Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
parent
56f0eb443c
commit
d89fca7ea9
@ -836,9 +836,10 @@ class DNSRecord(Str):
|
|||||||
label = self.part_label_format % (self.rrtype, unicode(part.label))
|
label = self.part_label_format % (self.rrtype, unicode(part.label))
|
||||||
option_group = self.option_group_format % self.rrtype
|
option_group = self.option_group_format % self.rrtype
|
||||||
flags = list(part.flags) + ['dnsrecord_part', 'virtual_attribute',]
|
flags = list(part.flags) + ['dnsrecord_part', 'virtual_attribute',]
|
||||||
|
|
||||||
if not part.required:
|
if not part.required:
|
||||||
flags.append('dnsrecord_optional')
|
flags.append('dnsrecord_optional')
|
||||||
|
if not self.supported:
|
||||||
|
flags.append("no_option")
|
||||||
|
|
||||||
return part.clone_rename(name,
|
return part.clone_rename(name,
|
||||||
cli_name=cli_name,
|
cli_name=cli_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user