ipmininet.host.config package¶
This module holds the configuration generators for daemons that can be used in a host.
-
class
ipmininet.host.config.
HostConfig
(node, daemons=(), sysctl=None, *args, **kwargs)¶ Bases:
ipmininet.router.config.base.NodeConfig
Initialize our config builder
Parameters: - node – The node for which this object will build configurations
- daemons – an iterable of active routing daemons for this node
- sysctl – A dictionnary of sysctl to set for this node. By default, it enables IPv4/IPv6 forwarding on all interfaces.
-
class
ipmininet.host.config.
HostDaemon
(node, template_lookup=<mako.lookup.TemplateLookup object>, **kwargs)¶
-
class
ipmininet.host.config.
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.
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.
ARecord
(domain_name, address, ttl=60)¶ Bases:
ipmininet.host.config.named.DNSRecord
-
rdata
¶
-
-
class
ipmininet.host.config.
NSRecord
(domain_name, name_server, ttl=60)¶ Bases:
ipmininet.host.config.named.DNSRecord
-
rdata
¶
-
-
class
ipmininet.host.config.
AAAARecord
(domain_name, address, ttl=60)¶
-
class
ipmininet.host.config.
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
¶
-
-
class
ipmininet.host.config.
PTRRecord
(address, domain_name, ttl=60)¶ Bases:
ipmininet.host.config.named.DNSRecord
-
rdata
¶
-
v6
¶
-