dns.configure_bind

This model component configures bind for each DNSServer.

Attribute Depends:
  • topology

Model Component Dependencies:

Plugin

class dns.configure_bind_plugin.ConfigureBind(*args, **kwargs)[source]

Bases: AbstractPlugin

This plugin configures DNS for the experiment.

The plugin walks the graph building zone files for the experiment. It then gives the zone files to the DNS server by passing them to a vm_resource.

Graph attributes read: name interfaces type

Graph attributes set: schedule

__annotations__ = {}
__init__(*args, **kwargs)[source]

Constructor for ConfigureDNS

Parameters:
  • *args – extra args to pass to AbstractPlugin constructor

  • **kwargs – extra keyword args to pass to AbstractPlugin constructor

generate_glue_record(zone_name, base_domain, dns_server)[source]

Creates a glue record for the current zone

Looks for all branches stemming from this point in the tree. Skips any definitions of singular machines.

Parameters:
  • zone_name (str) – Current zone in the dictionary

  • base_domain (str) – Base name for the fully qualified domain name

  • dns_server (str) – The IP address of the dns_server

generate_records(zones, base_domain)[source]

Creates the records for a single machine in the topology

Parameters:
  • zones (dict) – Current subtree of the total zones dictionary

  • base_domain (str) – The base name for the fully qualified domain name

generate_root_glue_record(root_zone, dns_server)[source]

Creates a glue record for the root zone.

Parameters:
  • root_zone (dict) – The root zone for which to create a glue record

  • dns_server (str) – IP address of the dns_server in the topology

generate_zone_files(zones, dns_server)[source]

Function to seed the recursion of the dictionary.

Parameters:
  • zones (dict) – Dictionary containing information on all zones in the topology.

  • dns_server (str) – The IP address of the dns server in the topology

get_boilerplate(zone)[source]

Creates a boiler plate for the combined record files.

Parameters:

zone (str) – The fully qualified domain name for this zone

Returns:

The boiler plate string that is created.

Return type:

str

get_metadata(zones)[source]

Concatenates glue and a records together to make a single zone file

Once a single file for each zone is generated, pickle and encode them so they can be distributed by the metadata server.

Parameters:

zones (dict) – All generated zone files for the topology

Returns:

The pickled zone metadata.

Return type:

str

run(debug='')[source]

Function to invoke the ConfigureDNS plugin.

Parameters:

debug (str) – Enable debugging information to see everything the parser gathers. Value should be ‘True’ or ‘true’ to enable

walk_zones(zones, domain, dns_server)[source]

Walks the dictionary creating a records and glue records

Parameters:
  • zones (dict) – Dictionary containing information on all zones in the topology.

  • domain (str) – The base for the current machine’s fully qualified domain name

  • dns_server (str) – The IP address of the dns server in the topology