File: dns.rst

package info (click to toggle)
python-openstacksdk 4.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,352 kB
  • sloc: python: 122,960; sh: 153; makefile: 23
file content (109 lines) | stat: -rw-r--r-- 2,948 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
Using OpenStack DNS
===================

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

.. contents:: Table of Contents
   :local:

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.

.. literalinclude:: ../examples/dns/list.py
   :pyobject: list_zones

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.

.. literalinclude:: ../examples/dns/list.py
   :pyobject: list_recordsets

Full example: `dns resource list`_

Create Zone
-----------

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

.. literalinclude:: ../examples/dns/create.py
   :pyobject: create_zone

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.

.. literalinclude:: ../examples/dns/create.py
   :pyobject: create_recordset

Full example: `dns resource list`_

Delete Zone
-----------

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

.. literalinclude:: ../examples/dns/delete.py
   :pyobject: delete_zone

Full example: `dns resource list`_

Delete Recordset
----------------

Delete a recordset.

.. literalinclude:: ../examples/dns/delete.py
   :pyobject: delete_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.

.. literalinclude:: ../examples/dns/find.py
   :pyobject: find_zone

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.

.. literalinclude:: ../examples/dns/find.py
   :pyobject: find_recordset

Full example: `dns resource list`_

.. _dns resource list: https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/list.py
.. _dns resource create: https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/create.py
.. _dns resource delete: https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/delete.py
.. _dns resource find: https://opendev.org/openstack/openstacksdk/src/branch/master/examples/dns/find.py