Using OpenStack DNS

Before working with the DNS service, you’ll need to create a connection to your OpenStack cloud by following the Connect user guide. This will provide you with the conn variable used in the examples below.

The primary resource of the DNS service is the server.

List Zones

Zone is a logical grouping of DNS records for a domain, allowing for the centralized management of DNS resources, including domain names, nameservers, and DNS queries.

Full example: dns resource list

List Recordsets

Recordsets allow for the centralized management of various DNS records within a Zone, helping to define how a domain responds to different types of DNS queries.

Full example: dns resource list

Create Zone

Create a zone. It allows users to define and manage the DNS namespace for a particular domain.

Full example: dns resource list

Create Recordset

Create a recordset. It accepts several parameters that define the DNS record’s properties and sends an API request to OpenStack to create the recordset within a specified DNS zone.

Full example: dns resource list

Delete Zone

Delete a zone. It allows users to completely delete the DNS management for a specified domain.

Full example: dns resource list

Delete Recordset

Delete a recordset.

Full example: dns resource list

Find Zone

The find_zone function searches for and returns a DNS zone by its name using a given connection object.

Full example: dns resource list

Find Recordset

The find_recordset function searches for a DNS recordset with a specific name and type within a given zone. If multiple recordsets with the same name exist, the record type can be specified to find the exact match.

Full example: dns resource list