dns_sprockets_lib.loaders package — dns_sprockets 1.0 documentation

# dns_sprockets_lib.loaders package

## Subpackages

## Submodules

## dns_sprockets_lib.loaders.file module

file - Zone loader: File

class `File`(args)

  Bases: `dns_sprockets_lib.loaders.ZoneLoader`

  Loads a zone from a file in AXFR-type or Bind host-type format.

  `LOADER_OPTARGS` = {'allow_include': ('1', 'Allow file to include other files'), 'rdclass': ('IN', 'Class of records to pull')}
  `__init__`(args)

    Ctor.

  `run`()

    @return A dns.zone.Zone instance.

## dns_sprockets_lib.loaders.xfr module

xfr - Zone loader: Xfr

class `Xfr`(args)

  Bases: `dns_sprockets_lib.loaders.ZoneLoader`

  Loads a zone by XFR from a name server.

  `DEFAULT_PORT` = 53
  `LOADER_OPTARGS` = {'use_udp': ('0', 'Use UDP for IXFRing'), 'af': (None, 'The address family to use, AF_INET or AF_INET6'), 'keyalgorithm': ('HMAC-MD5.SIG-ALG.REG.INT.', 'The TSIG algorithm to use, one of: HMAC-MD5.SIG-ALG.REG.INT. hmac-sha1. hmac-sha224. hmac-sha256. hmac-sha384. hmac-sha512.'), 'lifetime': (None, 'Total seconds to wait for complete transfer'), 'serial': ('0', 'SOA serial number to use as base for IXFR diff'), 'rdtype': ('AXFR', 'Type of XFR to perform, AXFR or IXFR'), 'rdclass': ('IN', 'Class of records to pull'), 'keyring': (None, 'The TSIG keyring to use, a text dict of name->base64_secret e.g. "{\'n1\':\'H477A900\',\'n2\':\'K845CL21\'}"'), 'source': (None, 'Source address for the transfer'), 'keyname': (None, 'The name of the TSIG to use'), 'timeout': ('5.0', 'Seconds to wait for each response message'), 'source_port': ('0', 'Source port for the transfer')}
  `__init__`(args)

    Ctor.

  `run`()

    @return A dns.zone.Zone instance.

## Module contents

### __init__.py - Loaders for “dns_sprockets” zone validator.

class `ZoneLoader`(args)

  Bases: `object`

  [Base class for zone loaders]

  `LOADER_NAME` = None
  `LOADER_OPTARGS` = {}
  `__init__`(args)

    Ctor, caches the arguments used to run the application, and grabs any optional test arguments.

  `run`()

    Runs the zone loader – must override!

    Returns: | A dns.zone.Zone instance.