Skip to content

Commit df32c09

Browse files
committed
Fixed #49 -- make module docstring into reST, everyone's happy.
1 parent 56effef commit df32c09

6 files changed

Lines changed: 49 additions & 35 deletions

File tree

api/urls.py

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
77
.. http:get:: /api/keys/(string:id)/
88
9-
Retrieve a :class:`~api.models.Key` by its id.
9+
Retrieve a :class:`~api.models.Key` by its `id`.
1010
1111
.. http:delete:: /api/keys/(string:id)/
1212
13-
Delete a :class:`~api.models.Key` by its id.
13+
Destroy a :class:`~api.models.Key` by its `id`.
14+
15+
See also :meth:`KeyViewSet.destroy() <api.views.KeyViewSet.destroy>`
1416
1517
.. http:get:: /api/keys/
1618
@@ -20,21 +22,23 @@
2022
2123
Create a new :class:`~api.models.Key`.
2224
25+
See also :meth:`KeyViewSet.post_save() <api.views.KeyViewSet.post_save>`
26+
2327
2428
Providers
2529
=========
2630
2731
.. http:get:: /api/providers/(string:id)/
2832
29-
Retrieve a :class:`~api.models.Provider` by its id.
33+
Retrieve a :class:`~api.models.Provider` by its `id`.
3034
3135
.. http:patch:: /api/providers/(string:id)/
3236
3337
Update parts of a :class:`~api.models.Provider`.
3438
3539
.. http:delete:: /api/providers/(string:id)/
3640
37-
Delete a :class:`~api.models.Provider` by its id.
41+
Destroy a :class:`~api.models.Provider` by its `id`.
3842
3943
.. http:get:: /api/providers/
4044
@@ -50,15 +54,15 @@
5054
5155
.. http:get:: /api/flavors/(string:id)/
5256
53-
Retrieve a :class:`~api.models.Flavor` by its id.
57+
Retrieve a :class:`~api.models.Flavor` by its `id`.
5458
5559
.. http:patch:: /api/flavors/(string:id)/
5660
5761
Update parts of a :class:`~api.models.Flavor`.
5862
5963
.. http:delete:: /api/flavors/(string:id)/
6064
61-
Delete a :class:`~api.models.Flavor` by its id.
65+
Destroy a :class:`~api.models.Flavor` by its `id`.
6266
6367
.. http:get:: /api/flavors/
6468
@@ -68,17 +72,19 @@
6872
6973
Create a new :class:`~api.models.Flavor`.
7074
75+
See also :meth:`FlavorViewSet.create() <api.views.FlavorViewSet.create>`
76+
7177
7278
Formations
7379
==========
7480
7581
.. http:get:: /api/formations/(string:id)/
7682
77-
Retrieve a :class:`~api.models.Formation` by its id.
83+
Retrieve a :class:`~api.models.Formation` by its `id`.
7884
7985
.. http:delete:: /api/formations/(string:id)/
8086
81-
Delete a :class:`~api.models.Formation` by its id.
87+
Destroy a :class:`~api.models.Formation` by its `id`.
8288
8389
.. http:get:: /api/formations/
8490
@@ -88,20 +94,25 @@
8894
8995
Create a new :class:`~api.models.Formation`.
9096
97+
See also
98+
:meth:`FormationViewSet.create() <api.views.FormationViewSet.create>` and
99+
:meth:`FormationViewSet.post_save() <api.views.FormationViewSet.post_save>`
100+
101+
91102
Infrastructure
92103
--------------
93104
94105
.. http:get:: /api/formations/(string:id)/layers/(string:id)/
95106
96-
Retrieve a :class:`~api.models.Layer` by its id.
107+
Retrieve a :class:`~api.models.Layer` by its `id`.
97108
98109
.. http:patch:: /api/formations/(string:id)/layers/(string:id)/
99110
100111
Update parts of a :class:`~api.models.Layer`.
101112
102113
.. http:delete:: /api/formations/(string:id)/layers/(string:id)/
103114
104-
Delete a :class:`~api.models.Layer` by its id.
115+
Destroy a :class:`~api.models.Layer` by its `id`.
105116
106117
.. http:get:: /api/formations/(string:id)/layers/
107118
@@ -113,11 +124,11 @@
113124
114125
.. http:get:: /api/formations/(string:id)/nodes/(string:id)/
115126
116-
Retrieve a :class:`~api.models.Node` by its id.
127+
Retrieve a :class:`~api.models.Node` by its `id`.
117128
118129
.. http:delete:: /api/formations/(string:id)/nodes/(string:id)/
119130
120-
Delete a :class:`~api.models.Node` by its id.
131+
Destroy a :class:`~api.models.Node` by its `id`.
121132
122133
.. http:get:: /api/formations/(string:id)/nodes/
123134
@@ -141,15 +152,15 @@
141152
142153
.. http:get:: /api/formations/(string:id)/builds/(string:uuid)/
143154
144-
Retrieve a :class:`~api.models.Build` by its uuid.
155+
Retrieve a :class:`~api.models.Build` by its `uuid`.
145156
146157
.. http:post:: /api/formations/(string:id)/builds/
147158
148159
Create a new :class:`~api.models.Build`.
149160
150161
.. http:get:: /api/formations/(string:id)/releases/(int:version)/
151162
152-
Retrieve a :class:`~api.models.Release` by its version.
163+
Retrieve a :class:`~api.models.Release` by its `version`.
153164
154165
.. http:get:: /api/formations/(string:id)/releases/
155166
@@ -160,23 +171,28 @@
160171
161172
.. http:post:: /api/formations/(string:id)/scale/layers/
162173
163-
scale_layers
174+
See also
175+
:meth:`FormationViewSet.scale_layers() <api.views.FormationViewSet.scale_layers>`
164176
165177
.. http:post:: /api/formations/(string:id)/scale/containers/
166178
167-
scale_containers
179+
See also
180+
:meth:`FormationViewSet.scale_containers() <api.views.FormationViewSet.scale_containers>`
168181
169182
.. http:post:: /api/formations/(string:id)/balance/
170183
171-
balance
184+
See also
185+
:meth:`FormationViewSet.balance() <api.views.FormationViewSet.balance>`
172186
173187
.. http:post:: /api/formations/(string:id)/calculate/
174188
175-
calculate
189+
See also
190+
:meth:`FormatinViewSet.calculate() <api.views.FormationViewSet.calculate>`
176191
177192
.. http:post:: /api/formations/(string:id)/converge/
178193
179-
converge
194+
See also
195+
:meth:`FormationViewSet.converge() <api.views.FormationViewSet.converge>`
180196
181197
182198
Auth

client/deis.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
55
Usage: deis <command> [--formation <formation>] [<args>...]
66
7+
::
8+
79
register register a new user with a controller
810
login login to a controller
911
logout logout from the current controller
1012
11-
Shortcut commands:
13+
Shortcut commands::
1214
1315
create create a new container formation
1416
info print a representation of the formation
@@ -17,7 +19,7 @@
1719
calculate recalculate and update the formation databag
1820
destroy destroy a container formation
1921
20-
Subcommands, use `deis help [subcommand]` to learn more:
22+
Subcommands, use `deis help [subcommand]` to learn more::
2123
2224
formations manage container formations
2325
layers manage layers of nodes

docs/api/client.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/api/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ API Reference
1313
.. toctree::
1414
:maxdepth: 1
1515

16+
rest
17+
1618
api.fields
1719
api.models
1820
api.routers
@@ -30,8 +32,6 @@ API Reference
3032
celerytasks.mock
3133
celerytasks.util
3234

33-
client
34-
3535
web.models
3636
web.urls
3737
web.views

docs/api/rest.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
========
2+
REST API
3+
========
4+
5+
.. _rest:
6+
7+
.. automodule:: api.urls

docs/commandline/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
CLI cheatsheet
88
==============
99

10-
**Coming soon...**
10+
.. automodule:: client.deis

0 commit comments

Comments
 (0)