Module dns — Inmanta 2017.3dev documentation

# Module dns

> - License: Apache 2.0
> - Version: 0.1.8
> - Author: Inmanta <code@inmanta.com>
> - Upstream project: https://github.com/inmanta/dns.git

## Typedefs

typedef `dns::hoststring`
  - Base type `string`
  - Type constraint `(self regex re.compile('^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*\\.?$'))`

## Entities

entity `dns::A`

  Parents: `dns::Record`

  An A record

  attribute ip::ip `ipaddress`

    The address to point this record to

  The following implementations are defined for this entity:

  > - `dns::aImpl`

  The following implements statements select implementations for this entity:

  > - `dns::aImpl`

entity `dns::AAAA`

  Parents: `dns::Record`

  attribute string `ipaddress`

  The following implementations are defined for this entity:

  > - `dns::aaaaImpl`

  The following implements statements select implementations for this entity:

  > - `dns::aaaaImpl`

entity `dns::Cname`

  Parents: `dns::Record`

  The following implementations are defined for this entity:

  > - `dns::cnameImpl`

  The following implements statements select implementations for this entity:

  > - `dns::cnameImpl`

entity `dns::DnsServer`

  Parents: `std::Entity`

  attribute ip::ip `ipaddress`
  relation dns::Zone `slave_zones` [0:*]

    other end: `dns::Zone.slaves [0:*]`

  relation dns::Zone `master_zones` [0:*]

    other end: `dns::Zone.master [1]`

  The following implements statements select implementations for this entity:

  > - `std::none`

entity `dns::MX`

  Parents: `dns::Record`

  attribute number `priority`=10
  attribute dns::hoststring `server`

  The following implementations are defined for this entity:

  > - `dns::mxImpl`

  The following implements statements select implementations for this entity:

  > - `dns::mxImpl`

entity `dns::NS`

  Parents: `dns::Record`

  attribute dns::hoststring `server`

  The following implementations are defined for this entity:

  > - `dns::nsImpl`

  The following implements statements select implementations for this entity:

  > - `dns::nsImpl`

entity `dns::PTR`

  Parents: `dns::Record`

  attribute string `name`
  attribute ip::ip `ipaddress`

  The following implementations are defined for this entity:

  > - `dns::ptrImpl`

  The following implements statements select implementations for this entity:

  > - `dns::ptrImpl`

entity `dns::Record`

  Parents: `std::Entity`

  A generic dns resource record

  attribute string `record_type`
  attribute string `value`
  attribute string `resource`=''
  relation dns::Zone `zone` [1]

    other end: `dns::Zone.records [0:*]`

  The following implements statements select implementations for this entity:

  > - `std::none`

entity `dns::Server`

  Parents: `ip::services::Server`, `dns::DnsServer`

  A dns server

  attribute string `allow_recursion`=''
  attribute bool `recursive`=True
  attribute string `forwarders`=''

entity `dns::SlaveZone`

  Parents: `dns::Zone`

  The following implements statements select implementations for this entity:

  > - `std::none`

entity `dns::TXT`

  Parents: `dns::Record`

  attribute string `data`

  The following implementations are defined for this entity:

  > - `dns::txtImpl`

  The following implements statements select implementations for this entity:

  > - `dns::txtImpl`

entity `dns::Zone`

  Parents: `std::Entity`

  A dns zone.

  attribute string `domain`
  attribute bool `add_ns`=False
  attribute number `ttl`=3600
  attribute number `refresh`=7200
  attribute string `hostmaster`
  attribute number `expiry`=1209600
  attribute number `retry`=600
  relation dns::DnsServer `master` [1]

    other end: `dns::DnsServer.master_zones [0:*]`

  relation dns::Record `records` [0:*]

    other end: `dns::Record.zone [1]`

  relation dns::DnsServer `slaves` [0:*]

    other end: `dns::DnsServer.slave_zones [0:*]`

  The following implementations are defined for this entity:

  > - `dns::addNS`

  The following implements statements select implementations for this entity:

  > - `std::none`
  > - `dns::addNS` constraint `add_ns`

## Implementations

implementation `dns::aImpl`

implementation `dns::aaaaImpl`

implementation `dns::addNS`

implementation `dns::cnameImpl`

implementation `dns::mxImpl`

implementation `dns::nsImpl`

implementation `dns::ptrImpl`

implementation `dns::txtImpl`

## Plugins

`dns.` `filter_record`(record: std::hoststring, zone: dns::Zone) → std::hoststring

  Filter the zone part from the record

`dns.` `ip_to_arpa`(ip_addr: ip::ip) → std::hoststring

  Convert an ip to the addr.arpa notation

`dns.` `quote`(data: string) → string