from_file(f,
origin,
rdclass=1,
relativize=True,
zone_factory=<class 'dns.zone.Zone'>,
filename=None,
allow_include=True)
Read a master file and build a zone object.
-
- Parameters:
f -
file or string. If f is a string, it is treated as the
name of a file to open.
origin -
The origin of the zone.
(type=dns.name.Name object or string)
rdclass -
The zone's rdata class; the default is class IN.
(type=int)
relativize -
should names be relativized? The default is True
(type=bool)
zone_factory -
The zone factory to use
(type=function returning a Zone)
filename -
The filename to emit when describing where an error occurred;
the default is '<file>', or the value of f if
f is a string.
(type=string)
allow_include -
is $INCLUDE allowed?
(type=bool)
- Returns:
-
dns.zone.Zone object
- Raises:
dns.zone.NoSOA -
No SOA RR was found at the zone origin
dns.zone.NoNS -
No NS RRset was found at the zone origin
|