summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-03-07 15:54:38 +0100
committerMartin Kosek <mkosek@redhat.com>2012-03-20 15:40:08 +0100
commit9b562f7377e2efe26742740108a398f4ebb3df64 (patch)
tree87bb557920cbffa9a3cca80196ae0290d3d16e00
parent9d0ef96c670f0ddae12f4a4cbf12d9e4e58607da (diff)
downloadfreeipa.git-9b562f7377e2efe26742740108a398f4ebb3df64.tar.gz
freeipa.git-9b562f7377e2efe26742740108a398f4ebb3df64.tar.xz
freeipa.git-9b562f7377e2efe26742740108a398f4ebb3df64.zip
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
-rw-r--r--API.txt5
-rw-r--r--VERSION2
-rw-r--r--ipalib/plugins/dns.py21
-rw-r--r--tests/test_xmlrpc/test_dns_plugin.py6
4 files changed, 30 insertions, 4 deletions
diff --git a/API.txt b/API.txt
index f21dce7a..363ba5a5 100644
--- a/API.txt
+++ b/API.txt
@@ -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')
diff --git a/VERSION b/VERSION
index 51870e70..f26e8bfa 100644
--- a/VERSION
+++ b/VERSION
@@ -79,4 +79,4 @@ IPA_DATA_VERSION=20100614120000
# #
########################################################
IPA_API_VERSION_MAJOR=2
-IPA_API_VERSION_MINOR=30
+IPA_API_VERSION_MINOR=31
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index 251db476..a1d49544 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -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):
diff --git a/tests/test_xmlrpc/test_dns_plugin.py b/tests/test_xmlrpc/test_dns_plugin.py
index e3958d23..e310d319 100644
--- a/tests/test_xmlrpc/test_dns_plugin.py
+++ b/tests/test_xmlrpc/test_dns_plugin.py
@@ -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 = [