mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add ipaDNSVersion option to dnsconfig* commands and use new attribute
Ad-hoc LDAP calls in DNS upgrade code were hard to maintain and ipaConfigString was bad idea from the very beginning as it was hard to manipulate the number in it. To avoid problems in future we are introducing new ipaDNSVersion attribute which is used on cn=dns instead of ipaConfigString. Original value of ipaConfigString is kept in the tree for now so older upgraders see it and do not execute the upgrade procedure again. The attribute can be changed only by installer/upgrade so it is not exposed in dnsconfig_mod API. Command dnsconfig_show displays it only if --all option was used. https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
70794c7b1d
commit
321a2ba918
@@ -4365,6 +4365,9 @@ class dnsconfig(LDAPObject):
|
||||
cli_name='zone_refresh',
|
||||
label=_('Zone refresh interval'),
|
||||
),
|
||||
Int('ipadnsversion?', # available only in installer/upgrade
|
||||
label=_('IPA DNS version'),
|
||||
),
|
||||
)
|
||||
managed_permissions = {
|
||||
'System: Write DNS Configuration': {
|
||||
@@ -4391,7 +4394,7 @@ class dnsconfig(LDAPObject):
|
||||
'ipapermdefaultattr': {
|
||||
'objectclass',
|
||||
'idnsallowsyncptr', 'idnsforwarders', 'idnsforwardpolicy',
|
||||
'idnspersistentsearch', 'idnszonerefresh'
|
||||
'idnspersistentsearch', 'idnszonerefresh', 'ipadnsversion'
|
||||
},
|
||||
'default_privileges': {'DNS Administrators', 'DNS Servers'},
|
||||
},
|
||||
@@ -4412,11 +4415,17 @@ class dnsconfig(LDAPObject):
|
||||
result['summary'] = unicode(_('Global DNS configuration is empty'))
|
||||
|
||||
|
||||
|
||||
@register()
|
||||
class dnsconfig_mod(LDAPUpdate):
|
||||
__doc__ = _('Modify global DNS configuration.')
|
||||
|
||||
def get_options(self):
|
||||
"""hide ipadnsversion outside of installer/upgrade"""
|
||||
for option in super(dnsconfig_mod, self).get_options():
|
||||
if option.name == 'ipadnsversion':
|
||||
option = option.clone(include=('installer', 'updates'))
|
||||
yield option
|
||||
|
||||
def interactive_prompt_callback(self, kw):
|
||||
|
||||
# show informative message on client side
|
||||
@@ -4480,6 +4489,7 @@ class dnsconfig_show(LDAPRetrieve):
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@register()
|
||||
class dnsforwardzone(DNSZoneBase):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user