summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/dns.py
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-02-03 14:52:34 +0100
committerMartin Kosek <mkosek@redhat.com>2012-02-03 16:26:20 +0100
commitf411ed1e4717200016594acff05fb6e6e3b33b0b (patch)
tree25ed1109b1f9a48047b105e67bd9b97c31157afe /ipalib/plugins/dns.py
parente1fecfaf6a9f35d23105661292dea7d68b1cc19c (diff)
downloadfreeipa-f411ed1e4717200016594acff05fb6e6e3b33b0b.tar.gz
freeipa-f411ed1e4717200016594acff05fb6e6e3b33b0b.tar.xz
freeipa-f411ed1e4717200016594acff05fb6e6e3b33b0b.zip
Add data field for A6 record
Since A6 is an obsolete RR type, no DNS part option was created. This is, however, not consistent with the rest of per-type API and may cause problems. This patch adds at least a DNS part for raw A6 record data so that the record type is treated consistently. This patch also fixes interactive mode for A6 records. Their data were not detected correctly as dnsrecord_add didn't expect a number in DNS part option name. https://fedorahosted.org/freeipa/ticket/2309
Diffstat (limited to 'ipalib/plugins/dns.py')
-rw-r--r--ipalib/plugins/dns.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index a975d4dbb..8a3bc5ede 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -466,7 +466,15 @@ class ARecord(DNSRecord):
class A6Record(DNSRecord):
rrtype = 'A6'
rfc = 3226
- parts = None # experimental rr type
+ parts = (
+ Str('data',
+ label=_('Record data'),
+ ),
+ )
+
+ def _get_part_values(self, value):
+ # A6 RR type is obsolete and only a raw interface is provided
+ return (value,)
class AAAARecord(DNSRecord):
rrtype = 'AAAA'
@@ -1639,7 +1647,7 @@ class dnsrecord_add(LDAPCreate):
# check if any record part was added
for option in options:
- option_part_re = re.match(r'([a-z]+)_part_', option)
+ option_part_re = re.match(r'([a-z0-9]+)_part_', option)
if option_part_re is not None:
record_option = self.obj.get_record_option(option_part_re.group(1))