from_file(f,
origin=None,
rdclass=1,
relativize=True,
zone_factory=<class 'dns.zone.Zone'>,
filename=None,
allow_include=True,
check_origin=True)
| source code
|
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 (dns.name.Name object or string) - The origin of the zone; if not specified, the first $ORIGIN
statement in the master file will determine the origin of the
zone.
rdclass (int) - The zone's rdata class; the default is class IN.
relativize (bool) - should names be relativized? The default is True
zone_factory (function returning a Zone) - The zone factory to use
filename (string) - The filename to emit when describing where an error occurred; the
default is '<file>', or the value of f if f
is a string.
allow_include (bool) - is $INCLUDE allowed?
check_origin (bool) - should sanity checks of the origin node be done? The default is
True.
- Returns: dns.zone.Zone object
- Raises:
|