summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-05-09 13:30:45 -0700
committerBob Halley <halley@dnspython.org>2020-05-09 13:30:45 -0700
commitd85b31d8be47bd7d8cfa67f7119ba833738a8038 (patch)
tree272ef9acd1ff2e2518592599de33639ab1dd9b85 /doc
parent9caf1923acc263606c207013b493ed86c47c34a4 (diff)
downloaddnspython-d85b31d8be47bd7d8cfa67f7119ba833738a8038.tar.gz
more documentation
Diffstat (limited to 'doc')
-rw-r--r--doc/exceptions.rst8
-rw-r--r--doc/manual.rst3
-rw-r--r--doc/zone-class.rst30
-rw-r--r--doc/zone-make.rst8
-rw-r--r--doc/zone.rst10
5 files changed, 58 insertions, 1 deletions
diff --git a/doc/exceptions.rst b/doc/exceptions.rst
index b227e15..5f5dc41 100644
--- a/doc/exceptions.rst
+++ b/doc/exceptions.rst
@@ -86,3 +86,11 @@ dns.ttl Exceptions
------------------
.. autoexception:: dns.ttl.BadTTL
+
+dns.zone Exceptions
+-------------------
+
+.. autoexception:: dns.zone.BadZone
+.. autoexception:: dns.zone.NoSOA
+.. autoexception:: dns.zone.NoNS
+.. autoexception:: dns.zone.UnknownOrigin
diff --git a/doc/manual.rst b/doc/manual.rst
index 8feee46..440eafd 100644
--- a/doc/manual.rst
+++ b/doc/manual.rst
@@ -8,8 +8,9 @@ Dnspython Manual
name
rdata
message
- dnssec
query
resolver
+ zone
+ dnssec
exceptions
utilities
diff --git a/doc/zone-class.rst b/doc/zone-class.rst
new file mode 100644
index 0000000..b4d9869
--- /dev/null
+++ b/doc/zone-class.rst
@@ -0,0 +1,30 @@
+.. _zone-class:
+
+The dns.zone.Zone Class
+-----------------------
+
+.. autoclass:: dns.zone.Zone
+ :members:
+
+ .. attribute:: rdclass
+
+ The zone's rdata class, an ``int``; the default is class IN.
+
+ .. attribute:: origin
+
+ The origin of the zone, a ``dns.name.Name``.
+
+ .. attribute:: nodes
+
+ A dictionary mapping the names of nodes in the zone to the nodes
+ themselves.
+
+ .. attribute:: relativize
+
+ A ``bool``, which is ``True`` if names in the zone should be relativized.
+
+A ``Zone`` has a class attribute ``node_factory`` which is used to
+create new nodes and defaults to ``dns.node.Node``. ``Zone`` may be
+subclassed if a different node factory is desired.
+The node factory is a class or callable that returns a subclass of
+``dns.node.Node``.
diff --git a/doc/zone-make.rst b/doc/zone-make.rst
new file mode 100644
index 0000000..def1235
--- /dev/null
+++ b/doc/zone-make.rst
@@ -0,0 +1,8 @@
+.. _zone-make:
+
+Making DNS Zones
+----------------
+
+.. autofunction:: dns.zone.from_text
+.. autofunction:: dns.zone.from_file
+.. autofunction:: dns.zone.from_xfr
diff --git a/doc/zone.rst b/doc/zone.rst
new file mode 100644
index 0000000..777f08b
--- /dev/null
+++ b/doc/zone.rst
@@ -0,0 +1,10 @@
+.. module:: dns.zone
+.. _zone:
+
+DNS Zones
+=========
+
+.. toctree::
+
+ zone-class
+ zone-make