ipmininet.host.config.named module

Base classes to configure a Named daemon

class ipmininet.host.config.named.AAAARecord(domain_name, address, ttl=60)

Bases: ipmininet.host.config.named.ARecord

class ipmininet.host.config.named.ARecord(domain_name, address, ttl=60)

Bases: ipmininet.host.config.named.DNSRecord

rdata
class ipmininet.host.config.named.DNSRecord(rtype, domain_name, ttl=60)

Bases: object

full_domain_name
rdata
class ipmininet.host.config.named.DNSZone(name, dns_master, dns_slaves=(), records=(), nodes=(), refresh_time=86400, retry_time=7200, expire_time=3600000, min_ttl=172800, ns_domain_name=None)

Bases: ipmininet.overlay.Overlay

Parameters:
  • name – The domain name of the zone
  • dns_master – The name of the master DNS server
  • dns_slaves – The list of names of DNS slaves
  • records – The list of DNS Records to be included in the zone
  • nodes – The list of nodes for which one A/AAAA record has to be created for each of their IPv4/IPv6 addresses
  • refresh_time – The number of seconds before the zone should be refreshed
  • retry_time – The number of seconds before a failed refresh should be retried
  • expire_time – The upper limit in seconds before a zone is considered no longer authoritative
  • min_ttl – The negative result TTL
  • ns_domain_name – If it is defined, it is the suffix of the domain of the name servers, otherwise, parameter ‘name’ is used.
apply(topo)

Apply the Overlay properties to the given topology

check_consistency(topo)

Check that this overlay is consistent

class ipmininet.host.config.named.NSRecord(domain_name, name_server, ttl=60)

Bases: ipmininet.host.config.named.DNSRecord

rdata
class ipmininet.host.config.named.Named(node, **kwargs)

Bases: ipmininet.host.config.base.HostDaemon

KILL_PATTERNS = ('named',)
NAME = 'named'
build()

Build the configuration tree for this daemon

Returns:ConfigDict-like object describing this configuration
build_largest_reverse_zone(cfg_zones, records)

Create the ConfigDict object representing a new reverse zone whose prefix is the largest one that includes all the PTR records. Then it adds it to the cfg_zones dict.

Parameters:
  • cfg_zones – The dict of ConfigDict representing existing zones
  • records – The list of PTR records to place a new reverse zone
build_reverse_zone(cfg_zones)

Build non-existing PTR records. Then, adds them to an existing reverse zone if any. The remaining ones are inserted in a new reverse zone that is added to cfg_zones dictionary.

build_zone(zone)
cfg_filenames

Return the list of filenames in which this daemon config should be stored

dry_run

The startup line to use to check that the daemon is well-configured

set_defaults(defaults)
Parameters:
  • log_severity – It controls the logging levels and may take the values defined. Logging will occur for any message equal to or higher than the level specified (=>) lower levels will not be logged. These levels are ‘critical’, ‘error’, ‘warning’, ‘notice’, ‘info’, ‘debug’ and ‘dynamic’.
  • dns_server_port – The port number of the dns server
startup_line

Return the corresponding startup_line for this daemon

template_filenames
zone_filename(domain_name)
class ipmininet.host.config.named.PTRRecord(address, domain_name, ttl=60)

Bases: ipmininet.host.config.named.DNSRecord

rdata
v6
class ipmininet.host.config.named.SOARecord(domain_name, refresh_time=86400, retry_time=7200, expire_time=3600000, min_ttl=172800, records=())

Bases: ipmininet.host.config.named.DNSRecord

add_record(record)
rdata
records