diff options
Diffstat (limited to 'ipalib/plugins/dns.py')
-rw-r--r-- | ipalib/plugins/dns.py | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index aea04b40..24b8357a 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -1694,13 +1694,6 @@ class dnszone_add(LDAPCreate): ), ) - def args_options_2_params(self, *args, **options): - # FIXME: Check if name_from_ip is valid. The framework should do that, - # but it does not. Before it's fixed, this should suffice. - if 'name_from_ip' in options: - self.obj.params['name_from_ip'](unicode(options['name_from_ip'])) - return super(dnszone_add, self).args_options_2_params(*args, **options) - def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options): if not dns_container_exists(self.api.Backend.ldap2): raise errors.NotFound(reason=_('DNS is not configured')) @@ -1747,13 +1740,6 @@ api.register(dnszone_del) class dnszone_mod(LDAPUpdate): __doc__ = _('Modify DNS zone (SOA record).') - def args_options_2_params(self, *args, **options): - # FIXME: Check if name_from_ip is valid. The framework should do that, - # but it does not. Before it's fixed, this should suffice. - if 'name_from_ip' in options: - self.obj.params['name_from_ip'](unicode(options['name_from_ip'])) - return super(dnszone_mod, self).args_options_2_params(*args, **options) - api.register(dnszone_mod) @@ -1761,8 +1747,12 @@ class dnszone_find(LDAPSearch): __doc__ = _('Search for DNS zones (SOA records).') def args_options_2_params(self, *args, **options): - # FIXME: Check if name_from_ip is valid. The framework should do that, - # but it does not. Before it's fixed, this should suffice. + # FIXME: Check that name_from_ip is valid. This is necessary because + # custom validation rules, including _validate_ipnet, are not + # used when doing a search. Once we have a parameter type for + # IP network objects, this will no longer be necessary, as the + # parameter type will handle the validation itself (see + # <https://fedorahosted.org/freeipa/ticket/2266>). if 'name_from_ip' in options: self.obj.params['name_from_ip'](unicode(options['name_from_ip'])) return super(dnszone_find, self).args_options_2_params(*args, **options) |