SoftLayer.DNS

DNS Manager/helpers

copyright:
  1. 2013, SoftLayer Technologies, Inc. All rights reserved.
license:

BSD, see LICENSE for more details.

class SoftLayer.managers.dns.DNSManager(client)[source]

Manage DNS zones.

create_record(zone_id, record, type, data, ttl=60)[source]

Create a resource record on a domain.

Parameters:
  • id (integer) – the zone’s ID
  • record – the name of the record to add
  • type – the type of record (A, AAAA, CNAME, MX, SRV, TXT, etc.)
  • data – the record’s value
  • ttl (integer) – the TTL or time-to-live value (default: 60)
create_zone(zone, serial=None)[source]

Create a zone for the specified zone.

Parameters:
  • zone – the zone name to create
  • serial – serial value on the zone (default: strftime(%Y%m%d01))
delete_record(record_id)[source]

Delete a resource record by its ID.

Parameters:id (integer) – the record’s ID
delete_zone(id)[source]

Delete a zone by its ID.

Parameters:id (integer) – the zone ID to delete
dump_zone(zone_id)[source]

Retrieve a zone dump in BIND format.

Parameters:id (integer) – The zone ID to dump
edit_record(record)[source]

Update an existing record with the options provided. The provided dict must include an ‘id’ key and value corresponding to the record that should be updated.

Parameters:record (dict) – the record to update
edit_zone(zone)[source]

Update an existing zone with the options provided. The provided dict must include an ‘id’ key and value corresponding to the zone that should be updated.

Parameters:zone (dict) – the zone to update
get_records(zone_id, ttl=None, data=None, host=None, type=None, **kwargs)[source]

List, and optionally filter, records within a zone.

Parameters:
  • zone – the zone name in which to search.
  • ttl (int) – optionally, time in seconds:
  • data – optionally, the records data
  • host – optionally, record’s host
  • type – optionally, the type of record:
Returns list:
get_zone(zone_id, records=True)[source]

Get a zone and its records.

Parameters:zone – the zone name
list_zones(**kwargs)[source]

Retrieve a list of all DNS zones.

Parameters:**kwargs (dict) – response-level arguments (limit, offset, etc.)
resolve_ids(identifier)

Takes a string and tries to resolve to a list of matching ids. What exactly ‘identifier’ can be depends on the resolvers

Parameters:identifier (string) – identifying string
Returns list:
resolvers = []

Previous topic

SoftLayer.CCI

Next topic

SoftLayer.firewall

This Page