Skip to content

Commit 79d34ab

Browse files
authored
Prep dns docs for repo split. (#6020)
- Move contents of 'docs/dns/' to 'dns/docs'. - Harmonize / DRY 'dns/README.rst' with 'dns/docs/index.rst'.
1 parent 9dc38a4 commit 79d34ab

11 files changed

Lines changed: 89 additions & 59 deletions

File tree

dns/README.rst

Lines changed: 55 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,78 @@
11
Python Client for Google Cloud DNS
22
==================================
33

4-
Python idiomatic client for `Google Cloud DNS`_
4+
The `Google Cloud DNS`_ API provides methods that you can use to
5+
manage DNS for your applications.
56

6-
.. _Google Cloud DNS: https://cloud.google.com/dns/
77

88
|pypi| |versions|
99

10-
- `Documentation`_
10+
- `Client Library Documentation`_
11+
- `Product Documentation`_
1112

12-
.. _Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/dns/usage.html
13+
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-dns.svg
14+
:target: https://pypi.org/project/google-cloud-dns/
15+
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-dns.svg
16+
.. _Google Cloud DNS: https://cloud.google.com/dns/
17+
:target: https://pypi.org/project/google-cloud-dns/
18+
.. _Client Library Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/dns/index.html
19+
.. _Product Documentation: https://cloud.google.com/dns/docs/
1320

1421
Quick Start
1522
-----------
1623

17-
.. code-block:: console
24+
In order to use this library, you first need to go through the following steps:
1825

19-
$ pip install --upgrade google-cloud-dns
26+
1. `Select or create a Cloud Platform project.`_
27+
2. `Enable billing for your project.`_
28+
3. `Enable the Google Cloud Datastore API.`_
29+
4. `Setup Authentication.`_
2030

21-
For more information on setting up your Python development environment,
22-
such as installing ``pip`` and ``virtualenv`` on your system, please refer
23-
to `Python Development Environment Setup Guide`_ for Google Cloud Platform.
31+
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
32+
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
33+
.. _Enable the Google Cloud Datastore API.: https://cloud.google.com/datastore
34+
.. _Setup Authentication.: https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html
2435

25-
.. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup
36+
Installation
37+
~~~~~~~~~~~~
2638

27-
Authentication
28-
--------------
39+
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
40+
create isolated Python environments. The basic problem it addresses is one of
41+
dependencies and versions, and indirectly permissions.
2942

30-
With ``google-cloud-python`` we try to make authentication as painless as
31-
possible. Check out the `Authentication section`_ in our documentation to
32-
learn more. You may also find the `authentication document`_ shared by all
33-
the ``google-cloud-*`` libraries to be helpful.
43+
With `virtualenv`_, it's possible to install this library without needing system
44+
install permissions, and without clashing with the installed system
45+
dependencies.
3446

35-
.. _Authentication section: https://google-cloud-python.readthedocs.io/en/latest/core/auth.html
36-
.. _authentication document: https://github.com/GoogleCloudPlatform/google-cloud-common/tree/master/authentication
47+
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
3748

38-
Using the API
39-
-------------
4049

41-
The Cloud `DNS`_ API (`DNS API docs`_) provides methods that you can use to
42-
manage DNS for your applications.
50+
Mac/Linux
51+
^^^^^^^^^
4352

44-
.. _DNS: https://cloud.google.com/dns/
45-
.. _DNS API docs: https://cloud.google.com/dns/docs/apis
53+
.. code-block:: console
4654
47-
See the ``google-cloud-python`` API DNS `Documentation`_ to learn
48-
how to manage DNS records using this Client Library.
55+
pip install virtualenv
56+
virtualenv <your-env>
57+
source <your-env>/bin/activate
58+
<your-env>/bin/pip install google-cloud-datastore
4959
50-
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-dns.svg
51-
:target: https://pypi.org/project/google-cloud-dns/
52-
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-dns.svg
53-
:target: https://pypi.org/project/google-cloud-dns/
60+
61+
Windows
62+
^^^^^^^
63+
64+
.. code-block:: console
65+
66+
pip install virtualenv
67+
virtualenv <your-env>
68+
<your-env>\Scripts\activate
69+
<your-env>\Scripts\pip.exe install google-cloud-datastore
70+
71+
72+
Next Steps
73+
~~~~~~~~~~
74+
75+
- Read the `Client Library Documentation`_ for Google Cloud DNS
76+
API to see other available methods on the client.
77+
- Read the `Product documentation`_ to learn
78+
more about the product and see How-to Guides.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
1-
DNS
2-
===
1+
.. include:: /../dns/README.rst
32

4-
.. toctree::
5-
:maxdepth: 2
6-
:hidden:
7-
8-
client
9-
zone
10-
resource-record-set
11-
changes
12-
13-
Installation
14-
------------
15-
16-
Install the ``google-cloud-dns`` library using ``pip``:
17-
18-
.. code-block:: console
19-
20-
$ pip install google-cloud-dns
3+
Using the Library
4+
-----------------
215

226
Client
23-
------
7+
~~~~~~
248

259
:class:`Client <google.cloud.dns.client.Client>` objects provide a means to
2610
configure your DNS applications. Each instance holds both a ``project``
@@ -37,7 +21,7 @@ create an instance of :class:`Client <google.cloud.dns.client.Client>`.
3721
>>> client = dns.Client()
3822
3923
Projects
40-
--------
24+
~~~~~~~~
4125

4226
A project is the top-level container in the ``DNS`` API: it is tied
4327
closely to billing, and can provide default access control across all its
@@ -55,7 +39,7 @@ To override the project inferred from the environment, pass an explicit
5539
>>> client = dns.Client(project='PROJECT_ID')
5640
5741
Project Quotas
58-
--------------
42+
~~~~~~~~~~~~~~
5943

6044
Query the quotas for a given project:
6145

@@ -75,15 +59,15 @@ Query the quotas for a given project:
7559
7660
7761
Project ACLs
78-
~~~~~~~~~~~~
62+
^^^^^^^^^^^^
7963

8064
Each project has an access control list granting reader / writer / owner
8165
permission to one or more entities. This list cannot be queried or set
8266
via the API: it must be managed using the Google Developer Console.
8367

8468

8569
Managed Zones
86-
-------------
70+
~~~~~~~~~~~~~
8771

8872
A "managed zone" is the container for DNS records for the same DNS name
8973
suffix and has a set of name servers that accept and responds to queries:
@@ -113,7 +97,7 @@ List the zones for a given project:
11397
11498
11599
Resource Record Sets
116-
--------------------
100+
~~~~~~~~~~~~~~~~~~~~
117101

118102
Each managed zone exposes a read-only set of resource records:
119103

@@ -145,7 +129,7 @@ Each managed zone exposes a read-only set of resource records:
145129
146130
147131
Change requests
148-
---------------
132+
~~~~~~~~~~~~~~~
149133

150134
Update the resource record set for a zone by creating a change request
151135
bundling additions to or deletions from the set.
@@ -194,13 +178,24 @@ List changes made to the resource record set for a given zone:
194178
... page_token=page_token) # API request
195179
... changes.extend(next_batch)
196180
181+
182+
API Reference
183+
-------------
184+
.. toctree::
185+
:maxdepth: 2
186+
187+
client
188+
zone
189+
resource-record-set
190+
changes
191+
197192
Changelog
198193
---------
199194

200195
For a list of all ``google-cloud-dns`` releases:
201196

202197
.. toctree::
203-
:maxdepth: 2
198+
:maxdepth: 2
204199

205-
changelog
200+
changelog
206201

File renamed without changes.

dns/docs/usage.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="refresh" content="1; url=./index.html:" />
4+
<script>
5+
window.location.href = "./index.html"
6+
</script>
7+
</head>
8+
</html>
File renamed without changes.

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@
330330
# HTML pages to be copied from source to target
331331
static_html_pages = [
332332
'datastore/usage.html',
333+
'dns/usage.html',
333334
'bigquery/usage.html',
334335
'runtimeconfig/usage.html',
335336
'spanner/usage.html',

docs/dns

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../dns/docs

0 commit comments

Comments
 (0)