diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2010-12-21 12:18:05 +0100 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-12-21 12:37:06 -0500 |
commit | 7bcc533d95f6c8309e789e6a1940f3f65e0a75af (patch) | |
tree | 1109896e9cc2472d6eeda8b55ab1877ed269fc8e | |
parent | ec5fba6e67710e7904ff7fc0f014fdccbcda6fbd (diff) | |
download | freeipa-7bcc533d95f6c8309e789e6a1940f3f65e0a75af.tar.gz freeipa-7bcc533d95f6c8309e789e6a1940f3f65e0a75af.tar.xz freeipa-7bcc533d95f6c8309e789e6a1940f3f65e0a75af.zip |
Added some fields to DNS2 plugin
Field idnszoneactive is marked as optional, because it is set to true by
default (see class dnszone_add).
https://fedorahosted.org/freeipa/ticket/601
-rw-r--r-- | ipalib/plugins/dns2.py | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/ipalib/plugins/dns2.py b/ipalib/plugins/dns2.py index 077714200..e4343098b 100644 --- a/ipalib/plugins/dns2.py +++ b/ipalib/plugins/dns2.py @@ -212,6 +212,19 @@ class dnszone(LDAPObject): label=_('BIND update policy'), doc=_('BIND update policy'), ), + Flag('idnszoneactive?', + cli_name='zone_active', + label=_('Active zone'), + doc=_('Is zone active?'), + flags=['no_create', 'no_update'], + attribute=True, + ), + Flag('idnsallowdynupdate', + cli_name='allow_dynupdate', + label=_('Dynamic update'), + doc=_('Allow dynamic update?'), + attribute=True, + ), ) def check_container_exists(self): @@ -227,15 +240,6 @@ class dnszone_add(LDAPCreate): """ Create new DNS zone (SOA record). """ - takes_options = ( - Flag('idnsallowdynupdate', - cli_name='allow_dynupdate', - label=_('Dynamic update'), - doc=_('allow dynamic update?'), - attribute=True, - ), - ) - def pre_callback(self, ldap, dn, entry_attrs, *keys, **options): self.obj.check_container_exists() entry_attrs['idnszoneactive'] = 'TRUE' @@ -259,15 +263,6 @@ class dnszone_mod(LDAPUpdate): """ Modify DNS zone (SOA record). """ - takes_options = ( - Flag('idnsallowdynupdate', - cli_name='allow_dynupdate', - label=_('Dynamic update'), - doc=_('allow dynamic update?'), - attribute=True, - ), - ) - def pre_callback(self, ldap, dn, entry_attrs, *keys, **options): entry_attrs['idnsallowdynupdate'] = str( entry_attrs.get('idnsallowdynupdate', False) |