Add missing global options in dnsconfig

Add a support for new global options in bind-dyndb-ldap, that is:
 * idnsforwardpolicy: Default policy for conditional forwarding
 * idnsallowsyncptr: Allow globaly PTR synchronization for dynamic
   updates
 * idnszonerefresh: Default interval between regular polls of the
   name server for new DNS zones

https://fedorahosted.org/freeipa/ticket/2439
This commit is contained in:
Martin Kosek 2012-03-07 15:54:38 +01:00
parent 9d0ef96c67
commit 9b562f7377
4 changed files with 30 additions and 4 deletions

View File

@ -611,8 +611,11 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None)
output: Output('result', <type 'bool'>, None)
output: Output('value', <type 'unicode'>, None)
command: dnsconfig_mod
args: 0,8,3
args: 0,11,3
option: Str('idnsforwarders', attribute=True, autofill=False, cli_name='forwarder', csv=True, multivalue=True, required=False)
option: StrEnum('idnsforwardpolicy', attribute=True, autofill=False, cli_name='forward_policy', multivalue=False, required=False, values=(u'only', u'first'))
option: Bool('idnsallowsyncptr', attribute=True, autofill=False, cli_name='allow_sync_ptr', multivalue=False, required=False)
option: Int('idnszonerefresh', attribute=True, autofill=False, cli_name='zone_refresh', minvalue=0, multivalue=False, required=False)
option: Str('setattr*', cli_name='setattr', exclude='webui')
option: Str('addattr*', cli_name='addattr', exclude='webui')
option: Str('delattr*', cli_name='delattr', exclude='webui')

View File

@ -79,4 +79,4 @@ IPA_DATA_VERSION=20100614120000
# #
########################################################
IPA_API_VERSION_MAJOR=2
IPA_API_VERSION_MINOR=30
IPA_API_VERSION_MINOR=31

View File

@ -2640,7 +2640,10 @@ class dnsconfig(LDAPObject):
DNS global configuration object
"""
object_name = _('DNS configuration options')
default_attributes = [ 'idnsforwarders', ]
default_attributes = [
'idnsforwardpolicy', 'idnsforwarders', 'idnsallowsyncptr',
'idnszonerefresh'
]
label = _('DNS Global Configuration')
label_singular = _('DNS Global Configuration')
@ -2654,6 +2657,22 @@ class dnsconfig(LDAPObject):
'for each forwarder using a standard format "IP_ADDRESS port PORT"'),
csv=True,
),
StrEnum('idnsforwardpolicy?',
cli_name='forward_policy',
label=_('Forward policy'),
values=(u'only', u'first',),
),
Bool('idnsallowsyncptr?',
cli_name='allow_sync_ptr',
label=_('Allow PTR sync'),
doc=_('Allow synchronization of forward (A, AAAA) and reverse (PTR) records'),
),
Int('idnszonerefresh?',
cli_name='zone_refresh',
label=_('Zone refresh interval'),
doc=_('An interval between regular polls of the name server for new DNS zones'),
minvalue=0,
),
)
def get_dn(self, *keys, **kwargs):

View File

@ -66,7 +66,11 @@ class test_dns(Declarative):
('dnsrecord_del', [dnszone1, dnsres1], {'del_all' : True}),
('dnszone_del', [dnszone2], {}),
('dnszone_del', [revdnszone1], {}),
('dnsconfig_mod', [], {'idnsforwarders' : None,})
('dnsconfig_mod', [], {'idnsforwarders' : None,
'idnsforwardpolicy' : None,
'idnsallowsyncptr' : None,
'idnszonerefresh' : None,
})
]
tests = [