Imported Upstream version 1.3.5
SVN-Git Migration
8 years ago
0 | 2005-07-31 Bob Halley <halley@nominum.com> | |
0 | 2005-10-31 Bob Halley <halley@dnspython.org> | |
1 | ||
2 | * (Version 1.3.5 released) | |
3 | ||
4 | 2005-10-12 Bob Halley <halley@dnspython.org> | |
5 | ||
6 | * dns/zone.py: Zone.iterate_rdatasets() and Zone.iterate_rdatas() | |
7 | did not have a default rdtype of dns.rdatatype.ANY as their | |
8 | docstrings said they did. They do now. | |
9 | ||
10 | 2005-10-06 Bob Halley <halley@dnspython.org> | |
11 | ||
12 | * dns/name.py: Added the parent() method, which returns the | |
13 | parent of a name. | |
14 | ||
15 | 2005-10-01 Bob Halley <halley@dnspython.org> | |
16 | ||
17 | * dns/resolver.py: Added zone_for_name() helper, which returns | |
18 | the name of the zone which contains the specified name. | |
19 | ||
20 | * dns/resolver.py: Added get_default_resolver(), which returns | |
21 | the default resolver, initializing it if necessary. | |
22 | ||
23 | 2005-09-29 Bob Halley <halley@dnspython.org> | |
24 | ||
25 | * dns/resolver.py (Resolver._compute_timeout): If time goes | |
26 | backwards a little bit, ignore it. | |
27 | ||
28 | 2005-07-31 Bob Halley <halley@dnspython.org> | |
1 | 29 | |
2 | 30 | * (Version 1.3.4 released) |
3 | 31 |
0 | 0 | Metadata-Version: 1.0 |
1 | 1 | Name: dnspython |
2 | Version: 1.3.4 | |
2 | Version: 1.3.5 | |
3 | 3 | Summary: DNS toolkit |
4 | 4 | Home-page: http://www.dnspython.org |
5 | 5 | Author: Bob Halley |
21 | 21 | |
22 | 22 | ABOUT THIS RELEASE |
23 | 23 | |
24 | This is dnspython 1.3.4 | |
24 | This is dnspython 1.3.5 | |
25 | ||
26 | New since 1.3.4: | |
27 | ||
28 | In the resolver, if time goes backward a little bit, ignore | |
29 | it. | |
30 | ||
31 | zone_for_name() has been added to the resolver module. It | |
32 | returns the zone which is authoritative for the specified | |
33 | name, which is handy for dynamic update. E.g. | |
34 | ||
35 | import dns.resolver | |
36 | print dns.resolver.zone_for_name('www.dnspython.org') | |
37 | ||
38 | will output "dnspython.org." and | |
39 | ||
40 | print dns.resolver.zone_for_name('a.b.c.d.e.f.example.') | |
41 | ||
42 | will output ".". | |
43 | ||
44 | The default resolver can be fetched with the | |
45 | get_default_resolver() method. | |
46 | ||
47 | You can now get the parent (immediate superdomain) of a name | |
48 | by using the parent() method. | |
49 | ||
50 | Zone.iterate_rdatasets() and Zone.iterate_rdatas() now have | |
51 | a default rdtype of dns.rdatatype.ANY like the documentation | |
52 | says. | |
53 | ||
54 | A Dynamic DNS example, ddns.py, has been added. | |
25 | 55 | |
26 | 56 | New since 1.3.3: |
27 | 57 |
51 | 51 | # |
52 | 52 | best_start = 0 |
53 | 53 | best_len = 0 |
54 | start = -1 | |
54 | 55 | last_was_zero = False |
55 | 56 | for i in xrange(8): |
56 | 57 | if chunks[i] != '0': |
16 | 16 | |
17 | 17 | import cStringIO |
18 | 18 | import random |
19 | import string | |
20 | 19 | import struct |
21 | 20 | import sys |
22 | 21 | import time |
24 | 24 | import string |
25 | 25 | import struct |
26 | 26 | import sys |
27 | import types | |
28 | 27 | |
29 | 28 | import dns.exception |
30 | 29 | |
66 | 65 | class AbsoluteConcatenation(dns.exception.DNSException): |
67 | 66 | """Raised if an attempt is made to append anything other than the |
68 | 67 | empty name to an absolute name.""" |
68 | pass | |
69 | ||
70 | class NoParent(dns.exception.DNSException): | |
71 | """Raised if an attempt is made to get the parent of the root name | |
72 | or the empty name.""" | |
69 | 73 | pass |
70 | 74 | |
71 | 75 | _escaped = { |
489 | 493 | return self.derelativize(origin) |
490 | 494 | else: |
491 | 495 | return self |
496 | ||
497 | def parent(self): | |
498 | """Return the parent of the name. | |
499 | @rtype: dns.name.Name object | |
500 | @raises NoParent: the name is either the root name or the empty name, | |
501 | and thus has no parent. | |
502 | """ | |
503 | if self == root or self == empty: | |
504 | raise NoParent | |
505 | return Name(self.labels[1:]) | |
492 | 506 | |
493 | 507 | root = Name(['']) |
494 | 508 | empty = Name([]) |
505 | 519 | labels = [] |
506 | 520 | label = '' |
507 | 521 | escaping = False |
522 | edigits = 0 | |
523 | total = 0 | |
508 | 524 | if text == '@': |
509 | 525 | text = '' |
510 | 526 | if text: |
85 | 85 | @type source: string |
86 | 86 | @param source_port: The port from which to send the message. |
87 | 87 | The default is 0. |
88 | @type port: int""" | |
88 | @type source_port: int""" | |
89 | 89 | |
90 | 90 | wire = q.to_wire() |
91 | 91 | if af is None: |
178 | 178 | @type source: string |
179 | 179 | @param source_port: The port from which to send the message. |
180 | 180 | The default is 0. |
181 | @type port: int""" | |
181 | @type source_port: int""" | |
182 | 182 | |
183 | 183 | wire = q.to_wire() |
184 | 184 | if af is None: |
244 | 244 | @param keyname: The name of the TSIG key to use |
245 | 245 | @type keyname: dns.name.Name object or string |
246 | 246 | @param relativize: If True, all names in the zone will be relativized to |
247 | the zone origin. | |
247 | the zone origin. It is essential that the relativize setting matches | |
248 | the one specified to dns.zone.from_xfr(). | |
248 | 249 | @type relativize: bool |
249 | 250 | @param af: the address family to use. The default is None, which |
250 | 251 | causes the address family to use to be inferred from the form of of where. |
259 | 260 | @type source: string |
260 | 261 | @param source_port: The port from which to send the message. |
261 | 262 | The default is 0. |
262 | @type port: int""" | |
263 | @type source_port: int""" | |
263 | 264 | |
264 | 265 | if isinstance(zone, str): |
265 | 266 | zone = dns.name.from_text(zone) |
24 | 24 | chunk of hexstring that _hexify() produces before whitespace occurs. |
25 | 25 | @type _hex_chunk: int""" |
26 | 26 | |
27 | import codecs | |
28 | import cStringIO | |
29 | ||
30 | 27 | import dns.exception |
31 | 28 | import dns.rdataclass |
32 | 29 | import dns.rdatatype |
249 | 246 | @param origin: The origin to use for relative names |
250 | 247 | @type origin: dns.name.Name |
251 | 248 | @param relativize: should names be relativized? |
252 | @type origin: bool | |
249 | @type relativize: bool | |
253 | 250 | @rtype: dns.rdata.Rdata instance |
254 | 251 | """ |
255 | 252 |
17 | 17 | import random |
18 | 18 | import StringIO |
19 | 19 | import struct |
20 | import sys | |
21 | 20 | |
22 | 21 | import dns.exception |
23 | 22 | import dns.rdatatype |
13 | 13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | 14 | |
15 | 15 | import cStringIO |
16 | import math | |
17 | 16 | import struct |
18 | 17 | |
19 | 18 | import dns.exception |
13 | 13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | 14 | |
15 | 15 | import cStringIO |
16 | import struct | |
17 | 16 | |
18 | 17 | import dns.exception |
19 | 18 | import dns.rdata |
11 | 11 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
12 | 12 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
13 | 13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | ||
15 | import struct | |
16 | 14 | |
17 | 15 | import dns.exception |
18 | 16 | import dns.rdata |
11 | 11 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
12 | 12 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
13 | 13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | ||
15 | import struct | |
16 | 14 | |
17 | 15 | import dns.exception |
18 | 16 | import dns.rdata |
11 | 11 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
12 | 12 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
13 | 13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | ||
15 | import socket | |
16 | 14 | |
17 | 15 | import dns.exception |
18 | 16 | import dns.rdata |
11 | 11 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
12 | 12 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
13 | 13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | ||
15 | import socket | |
16 | 14 | |
17 | 15 | import dns.exception |
18 | 16 | import dns.ipv4 |
11 | 11 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
12 | 12 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
13 | 13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | ||
15 | import socket | |
16 | 14 | |
17 | 15 | import dns.exception |
18 | 16 | import dns.inet |
13 | 13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | 14 | |
15 | 15 | import cStringIO |
16 | import socket | |
17 | 16 | import struct |
18 | 17 | |
19 | 18 | import dns.exception |
11 | 11 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
12 | 12 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
13 | 13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | ||
15 | import socket | |
16 | 14 | |
17 | 15 | import dns.exception |
18 | 16 | import dns.rdata |
13 | 13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | 14 | |
15 | 15 | """NS-like base classes.""" |
16 | ||
17 | import struct | |
18 | 16 | |
19 | 17 | import dns.exception |
20 | 18 | import dns.rdata |
20 | 20 | import socket |
21 | 21 | import sys |
22 | 22 | import time |
23 | import types | |
24 | 23 | |
25 | 24 | import dns.exception |
26 | 25 | import dns.message |
50 | 49 | class NoNameservers(dns.exception.DNSException): |
51 | 50 | """No non-broken nameservers are available to answer the query.""" |
52 | 51 | pass |
52 | ||
53 | class NotAbsolute(dns.exception.DNSException): | |
54 | """Raised if an absolute domain name is required but a relative name | |
55 | was provided.""" | |
56 | pass | |
57 | ||
58 | class NoRootSOA(dns.exception.DNSException): | |
59 | """Raised if for some reason there is no SOA at the root name. | |
60 | This should never happen!""" | |
61 | pass | |
62 | ||
53 | 63 | |
54 | 64 | class Answer(object): |
55 | 65 | """DNS stub resolver answer |
426 | 436 | def _compute_timeout(self, start): |
427 | 437 | now = time.time() |
428 | 438 | if now < start: |
429 | # Time going backwards is bad. Just give up. | |
430 | raise Timeout | |
439 | if start - now > 1: | |
440 | # Time going backwards is bad. Just give up. | |
441 | raise Timeout | |
442 | else: | |
443 | # Time went backwards, but only a little. This can | |
444 | # happen, e.g. under vmware with older linux kernels. | |
445 | # Pretend it didn't happen. | |
446 | now = start | |
431 | 447 | duration = now - start |
432 | 448 | if duration >= self.lifetime: |
433 | 449 | raise Timeout |
595 | 611 | |
596 | 612 | default_resolver = None |
597 | 613 | |
614 | def get_default_resolver(): | |
615 | """Get the default resolver, initializing it if necessary.""" | |
616 | global default_resolver | |
617 | if default_resolver is None: | |
618 | default_resolver = Resolver() | |
619 | return default_resolver | |
620 | ||
598 | 621 | def query(qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN, |
599 | 622 | tcp=False): |
600 | 623 | """Query nameservers to find the answer to the question. |
603 | 626 | object to make the query. |
604 | 627 | @see: L{dns.resolver.Resolver.query} for more information on the |
605 | 628 | parameters.""" |
606 | global default_resolver | |
607 | if default_resolver is None: | |
608 | default_resolver = Resolver() | |
609 | return default_resolver.query(qname, rdtype, rdclass, tcp) | |
629 | return get_default_resolver().query(qname, rdtype, rdclass, tcp) | |
630 | ||
631 | def zone_for_name(name, rdclass=dns.rdataclass.IN, tcp=False, resolver=None): | |
632 | """Find the name of the zone which contains the specified name. | |
633 | ||
634 | @param name: the query name | |
635 | @type name: absolute dns.name.Name object or string | |
636 | @param rdclass: The query class | |
637 | @type rdclass: int | |
638 | @param tcp: use TCP to make the query (default is False). | |
639 | @type tcp: bool | |
640 | @param resolver: the resolver to use | |
641 | @type resolver: dns.resolver.Resolver object or None | |
642 | @rtype: dns.name.Name""" | |
643 | ||
644 | if isinstance(name, str): | |
645 | name = dns.name.from_text(name, dns.name.root) | |
646 | if resolver is None: | |
647 | resolver = get_default_resolver() | |
648 | if not name.is_absolute(): | |
649 | raise NotAbsolute, name | |
650 | while 1: | |
651 | try: | |
652 | answer = resolver.query(name, dns.rdatatype.SOA, rdclass, tcp) | |
653 | return name | |
654 | except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer): | |
655 | try: | |
656 | name = name.parent() | |
657 | except dns.name.NoParent: | |
658 | raise NoRootSOA |
16 | 16 | |
17 | 17 | MAJOR = 1 |
18 | 18 | MINOR = 3 |
19 | MICRO = 4 | |
19 | MICRO = 5 | |
20 | 20 | RELEASELEVEL = 0x0f |
21 | 21 | SERIAL = 0 |
22 | 22 |
402 | 402 | rrset = None |
403 | 403 | return rrset |
404 | 404 | |
405 | def iterate_rdatasets(self, rdtype=None, covers=dns.rdatatype.NONE): | |
405 | def iterate_rdatasets(self, rdtype=dns.rdatatype.ANY, | |
406 | covers=dns.rdatatype.NONE): | |
406 | 407 | """Return a generator which yields (name, rdataset) tuples for |
407 | 408 | all rdatasets in the zone which have the specified I{rdtype} |
408 | 409 | and I{covers}. If I{rdtype} is dns.rdatatype.ANY, the default, |
424 | 425 | (rds.rdtype == rdtype and rds.covers == covers): |
425 | 426 | yield (name, rds) |
426 | 427 | |
427 | def iterate_rdatas(self, rdtype=None, covers=dns.rdatatype.NONE): | |
428 | def iterate_rdatas(self, rdtype=dns.rdatatype.ANY, | |
429 | covers=dns.rdatatype.NONE): | |
428 | 430 | """Return a generator which yields (name, ttl, rdata) tuples for |
429 | 431 | all rdatas in the zone which have the specified I{rdtype} |
430 | 432 | and I{covers}. If I{rdtype} is dns.rdatatype.ANY, the default, |
803 | 805 | |
804 | 806 | @param xfr: The xfr generator |
805 | 807 | @type xfr: generator of dns.message.Message objects |
806 | @param relativize: should names be relativized? The default is True | |
808 | @param relativize: should names be relativized? The default is True. | |
809 | It is essential that the relativize setting matches the one specified | |
810 | to dns.query.xfr(). | |
807 | 811 | @type relativize: bool |
808 | 812 | @raises dns.zone.NoSOA: No SOA RR was found at the zone origin |
809 | 813 | @raises dns.zone.NoNS: No NS RRset was found at the zone origin |
0 | #!/usr/bin/env python | |
1 | ||
2 | # | |
3 | # Use a TSIG-signed DDNS update to update our hostname-to-address | |
4 | # mapping. | |
5 | # | |
6 | # usage: ddns.py <ip-address> | |
7 | # | |
8 | # On linux systems, you can automatically update your DNS any time an | |
9 | # interface comes up by adding an ifup-local script that invokes this | |
10 | # python code. | |
11 | # | |
12 | # E.g. on my systems I have this | |
13 | # | |
14 | # #!/bin/sh | |
15 | # | |
16 | # DEVICE=$1 | |
17 | # | |
18 | # if [ "X${DEVICE}" == "Xeth0" ]; then | |
19 | # IPADDR=`LANG= LC_ALL= ifconfig ${DEVICE} | grep 'inet addr' | | |
20 | # awk -F: '{ print $2 } ' | awk '{ print $1 }'` | |
21 | # /usr/local/sbin/ddns.py $IPADDR | |
22 | # fi | |
23 | # | |
24 | # in /etc/ifup-local. | |
25 | # | |
26 | ||
27 | import sys | |
28 | ||
29 | import dns.update | |
30 | import dns.query | |
31 | import dns.tsigkeyring | |
32 | ||
33 | # | |
34 | # Replace the keyname and secret with appropriate values for your | |
35 | # configuration. | |
36 | # | |
37 | keyring = dns.tsigkeyring.from_text({ | |
38 | 'keyname.' : 'NjHwPsMKjdN++dOfE5iAiQ==' | |
39 | }) | |
40 | ||
41 | # | |
42 | # Replace "example." with your domain, and "host" with your hostname. | |
43 | # | |
44 | update = dns.update.Update('example.', keyring=keyring) | |
45 | update.replace('host', 300, 'A', sys.argv[1]) | |
46 | ||
47 | # | |
48 | # Replace "10.0.0.1" with the IP address of your master server. | |
49 | # | |
50 | response = dns.query.tcp(update, '10.0.0.1', timeout=10) |
18 | 18 | |
19 | 19 | setup( |
20 | 20 | name = "dnspython", |
21 | version = "1.3.4", | |
21 | version = "1.3.5", | |
22 | 22 | description = "DNS toolkit", |
23 | 23 | long_description = \ |
24 | 24 | """dnspython is a DNS toolkit for Python. It supports almost all |
588 | 588 | (n, cused) = dns.name.from_wire(w, 0) |
589 | 589 | self.failUnlessRaises(dns.name.BadLabelType, bad) |
590 | 590 | |
591 | def testParent1(self): | |
592 | n = dns.name.from_text('foo.bar.') | |
593 | self.failUnless(n.parent() == dns.name.from_text('bar.')) | |
594 | self.failUnless(n.parent().parent() == dns.name.root) | |
595 | ||
596 | def testParent2(self): | |
597 | n = dns.name.from_text('foo.bar', None) | |
598 | self.failUnless(n.parent() == dns.name.from_text('bar', None)) | |
599 | self.failUnless(n.parent().parent() == dns.name.empty) | |
600 | ||
601 | def testParent3(self): | |
602 | def bad(): | |
603 | n = dns.name.root | |
604 | n.parent() | |
605 | self.failUnlessRaises(dns.name.NoParent, bad) | |
606 | ||
607 | def testParent4(self): | |
608 | def bad(): | |
609 | n = dns.name.empty | |
610 | n.parent() | |
611 | self.failUnlessRaises(dns.name.NoParent, bad) | |
612 | ||
591 | 613 | if __name__ == '__main__': |
592 | 614 | unittest.main() |
76 | 76 | self.failUnless(cache.get((name, dns.rdatatype.A, dns.rdataclass.IN)) |
77 | 77 | is None) |
78 | 78 | |
79 | def testZoneForName1(self): | |
80 | name = dns.name.from_text('www.dnspython.org.') | |
81 | ezname = dns.name.from_text('dnspython.org.') | |
82 | zname = dns.resolver.zone_for_name(name) | |
83 | self.failUnless(zname == ezname) | |
84 | ||
85 | def testZoneForName2(self): | |
86 | name = dns.name.from_text('a.b.www.dnspython.org.') | |
87 | ezname = dns.name.from_text('dnspython.org.') | |
88 | zname = dns.resolver.zone_for_name(name) | |
89 | self.failUnless(zname == ezname) | |
90 | ||
91 | def testZoneForName3(self): | |
92 | name = dns.name.from_text('dnspython.org.') | |
93 | ezname = dns.name.from_text('dnspython.org.') | |
94 | zname = dns.resolver.zone_for_name(name) | |
95 | self.failUnless(zname == ezname) | |
96 | ||
97 | def testZoneForName4(self): | |
98 | def bad(): | |
99 | name = dns.name.from_text('dnspython.org', None) | |
100 | zname = dns.resolver.zone_for_name(name) | |
101 | self.failUnlessRaises(dns.resolver.NotAbsolute, bad) | |
102 | ||
79 | 103 | if __name__ == '__main__': |
80 | 104 | unittest.main() |
290 | 290 | self.failUnless(ns == [dns.name.from_text('ns1', None), |
291 | 291 | dns.name.from_text('ns2', None)]) |
292 | 292 | |
293 | def testIterateAllRdatasets(self): | |
294 | z = dns.zone.from_text(example_text, 'example.', relativize=True) | |
295 | ns = [n for n, r in z.iterate_rdatasets()] | |
296 | ns.sort() | |
297 | self.failUnless(ns == [dns.name.from_text('@', None), | |
298 | dns.name.from_text('@', None), | |
299 | dns.name.from_text('bar.foo', None), | |
300 | dns.name.from_text('ns1', None), | |
301 | dns.name.from_text('ns2', None)]) | |
302 | ||
293 | 303 | def testIterateRdatas(self): |
294 | 304 | z = dns.zone.from_text(example_text, 'example.', relativize=True) |
295 | 305 | l = list(z.iterate_rdatas('A')) |
296 | 306 | l.sort() |
297 | 307 | exl = [(dns.name.from_text('ns1', None), |
308 | 3600, | |
309 | dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.A, | |
310 | '10.0.0.1')), | |
311 | (dns.name.from_text('ns2', None), | |
312 | 3600, | |
313 | dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.A, | |
314 | '10.0.0.2'))] | |
315 | self.failUnless(l == exl) | |
316 | ||
317 | def testIterateAllRdatas(self): | |
318 | z = dns.zone.from_text(example_text, 'example.', relativize=True) | |
319 | l = list(z.iterate_rdatas()) | |
320 | l.sort() | |
321 | exl = [(dns.name.from_text('@', None), | |
322 | 3600, | |
323 | dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.NS, | |
324 | 'ns1')), | |
325 | (dns.name.from_text('@', None), | |
326 | 3600, | |
327 | dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.NS, | |
328 | 'ns2')), | |
329 | (dns.name.from_text('@', None), | |
330 | 3600, | |
331 | dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.SOA, | |
332 | 'foo bar 1 2 3 4 5')), | |
333 | (dns.name.from_text('bar.foo', None), | |
334 | 300, | |
335 | dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.MX, | |
336 | '0 blaz.foo')), | |
337 | (dns.name.from_text('ns1', None), | |
298 | 338 | 3600, |
299 | 339 | dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.A, |
300 | 340 | '10.0.0.1')), |