summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/dns.py
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2009-11-28 15:42:28 +0100
committerRob Crittenden <rcritten@redhat.com>2009-11-30 13:39:46 -0500
commit29aa8fb05dbebe96ba44a4f6547cb7580562ef48 (patch)
treec3fe3689b96215674af3e6f8facfbc0f434f2105 /ipalib/plugins/dns.py
parent973f36c496b1c1f3bfdae2c5661edb935d5273ab (diff)
downloadfreeipa-29aa8fb05dbebe96ba44a4f6547cb7580562ef48.tar.gz
freeipa-29aa8fb05dbebe96ba44a4f6547cb7580562ef48.tar.xz
freeipa-29aa8fb05dbebe96ba44a4f6547cb7580562ef48.zip
Fix boolean attributes in DNS plugin.
Sometimes they worked fine and sometimes DS rejected them as invalid.
Diffstat (limited to 'ipalib/plugins/dns.py')
-rw-r--r--ipalib/plugins/dns.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index 2b4346a03..b956b7fb9 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -182,7 +182,10 @@ class dns_add(crud.Create):
# fill in required attributes
entry_attrs['objectclass'] = ['top', 'idnsrecord', 'idnszone']
- entry_attrs['idnszoneactive'] = True
+ entry_attrs['idnszoneactive'] = 'TRUE'
+ entry_attrs['idnsallowdynupdate'] = str(
+ entry_attrs['idnsallowdynupdate']
+ ).upper()
# fill default values, build SOA serial from current date
soa_serial = int('%s01' % time.strftime('%Y%d%m'))
@@ -258,6 +261,9 @@ class dns_mod(crud.Update):
# build entry attributes, don't include idnsname!
entry_attrs = self.args_options_2_entry(*tuple(), **options)
+ entry_attrs['idnsallowdynupdate'] = str(
+ entry_attrs['idnsallowdynupdate']
+ ).upper()
# build entry DN
dn = _get_zone_dn(ldap, idnsname)
@@ -391,7 +397,7 @@ class dns_enable(Command):
# activate!
try:
- ldap.update_entry(dn, {'idnszoneactive': True})
+ ldap.update_entry(dn, {'idnszoneactive': 'TRUE'})
except errors.EmptyModlist:
pass
@@ -426,7 +432,7 @@ class dns_disable(Command):
# deactivate!
try:
- ldap.update_entry(dn, {'idnszoneactive': False})
+ ldap.update_entry(dn, {'idnszoneactive': 'FALSE'})
except errors.EmptyModlist:
pass