identity: autogenerate docs · openstack/python-openstackclient@26878e7 · GitHub
Skip to content

Commit 26878e7

Browse files
Eric Friedemonty
authored andcommitted
identity: autogenerate docs
$namespace = openstack.identity.v{2|3} The subcommand documents for $namespace were hardcoded and thus prone to drift over time. This commit removes the hardcoded content and uses the autoprogram-cliff directive to generate them automatically from the subcommand configuration classes. Special things: - Some reorganization happened here. Certain subcommand names, such as `endpoint` and `project`, are shared by identify v2 and v3. Previously the hardcoded documents had them combined and interleaved. Attempting to preserve this with autoprogram-cliff would have required significant additional infrastructure. However, since most readers care completely about one and not at all about the other, we instead split the v2 and v3 versions of these commands into separate pages. In case links to the old pages exist in the wild, they are preserved, but moved (with redirects) to a hidden directory, and populated simply with links to the new version-specific generated documents. - The `federation domain` and `federation project` subcommands were previously absent from the docs. They are added. These are such small commands and they seem related, so they're put into a single document. - Some pages were already being generated but were listing operations individually instead of using wildcards (possibly because they were created before wildcarding was supported by cliff). These are changed to use wildcarding. (We want to do this wherever possible as it is more future-proof in the event that more operations are added to a subcommand later.) - The `service provider` document was incorrectly titled `identity provider`. Fixed. Change-Id: I2030f9fe370038c5908b6eb6bed9692a73fe5067
1 parent 00e8882 commit 26878e7

50 files changed

Lines changed: 271 additions & 2458 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/source/_extra/.htaccess

Lines changed: 3 additions & 0 deletions
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
===============
2+
ec2 credentials
3+
===============
4+
5+
.. NOTE(efried): This page is hidden from the main TOC; it's here so links in
6+
the wild redirect somewhere sane, because previously identity v2 and v3 were
7+
combined in a single page.
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
12+
../command-objects/ec2-credentials-v2
13+
../command-objects/ec2-credentials-v3
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
========
2+
endpoint
3+
========
4+
5+
.. NOTE(efried): This page is hidden from the main TOC; it's here so links in
6+
the wild redirect somewhere sane, because previously identity v2 and v3 were
7+
combined in a single page.
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
12+
../command-objects/endpoint-v2
13+
../command-objects/endpoint-v3

doc/source/cli/_hidden/project.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=======
2+
project
3+
=======
4+
5+
.. NOTE(efried): This page is hidden from the main TOC; it's here so links in
6+
the wild redirect somewhere sane, because previously identity v2 and v3 were
7+
combined in a single page.
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
12+
../command-objects/project-v2
13+
../command-objects/project-v3

doc/source/cli/_hidden/role.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
====
2+
role
3+
====
4+
5+
.. NOTE(efried): This page is hidden from the main TOC; it's here so links in
6+
the wild redirect somewhere sane, because previously identity v2 and v3 were
7+
combined in a single page.
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
12+
../command-objects/role-v2
13+
../command-objects/role-v3

doc/source/cli/_hidden/service.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=======
2+
service
3+
=======
4+
5+
.. NOTE(efried): This page is hidden from the main TOC; it's here so links in
6+
the wild redirect somewhere sane, because previously identity v2 and v3 were
7+
combined in a single page.
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
12+
../command-objects/service-v2
13+
../command-objects/service-v3

doc/source/cli/_hidden/token.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=====
2+
token
3+
=====
4+
5+
.. NOTE(efried): This page is hidden from the main TOC; it's here so links in
6+
the wild redirect somewhere sane, because previously identity v2 and v3 were
7+
combined in a single page.
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
12+
../command-objects/token-v2
13+
../command-objects/token-v3

doc/source/cli/_hidden/user.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
====
2+
user
3+
====
4+
5+
.. NOTE(efried): This page is hidden from the main TOC; it's here so links in
6+
the wild redirect somewhere sane, because previously identity v2 and v3 were
7+
combined in a single page.
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
12+
../command-objects/user-v2
13+
../command-objects/user-v3

doc/source/cli/command-objects/application-credentials.rst

Lines changed: 2 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -8,109 +8,6 @@ With application credentials, a user can grant their applications limited
88
access to their cloud resources. Once created, users can authenticate with an
99
application credential by using the ``v3applicationcredential`` auth type.
1010

11-
application credential create
12-
-----------------------------
1311

14-
Create new application credential
15-
16-
.. program:: application credential create
17-
.. code:: bash
18-
19-
openstack application credential create
20-
[--secret <secret>]
21-
[--role <role>]
22-
[--expiration <expiration>]
23-
[--description <description>]
24-
[--restricted|--unrestricted]
25-
[--access-rules <access-rules>]
26-
<name>
27-
28-
.. option:: --secret <secret>
29-
30-
Secret to use for authentication (if not provided, one will be generated)
31-
32-
.. option:: --role <role>
33-
34-
Roles to authorize (name or ID) (repeat option to set multiple values)
35-
36-
.. option:: --expiration <expiration>
37-
38-
Sets an expiration date for the application credential (format of
39-
YYYY-mm-ddTHH:MM:SS)
40-
41-
.. option:: --description <description>
42-
43-
Application credential description
44-
45-
.. option:: --unrestricted
46-
47-
Enable application credential to create and delete other application
48-
credentials and trusts (this is potentially dangerous behavior and is
49-
disabled by default)
50-
51-
.. option:: --restricted
52-
53-
Prohibit application credential from creating and deleting other
54-
application credentials and trusts (this is the default behavior)
55-
56-
.. option:: --access-rules
57-
58-
Either a string or file path containing a JSON-formatted list of access
59-
rules, each containing a request method, path, and service, for example
60-
'[{"method": "GET", "path": "/v2.1/servers", "service": "compute"}]'
61-
62-
.. describe:: <name>
63-
64-
Name of the application credential
65-
66-
67-
application credential delete
68-
-----------------------------
69-
70-
Delete application credential(s)
71-
72-
.. program:: application credential delete
73-
.. code:: bash
74-
75-
openstack application credential delete
76-
<application-credential> [<application-credential> ...]
77-
78-
.. describe:: <application-credential>
79-
80-
Application credential(s) to delete (name or ID)
81-
82-
application credential list
83-
---------------------------
84-
85-
List application credentials
86-
87-
.. program:: application credential list
88-
.. code:: bash
89-
90-
openstack application credential list
91-
[--user <user>]
92-
[--user-domain <user-domain>]
93-
94-
.. option:: --user
95-
96-
User whose application credentials to list (name or ID)
97-
98-
.. option:: --user-domain
99-
100-
Domain the user belongs to (name or ID). This can be
101-
used in case collisions between user names exist.
102-
103-
application credential show
104-
---------------------------
105-
106-
Display application credential details
107-
108-
.. program:: application credential show
109-
.. code:: bash
110-
111-
openstack application credential show
112-
<application-credential>
113-
114-
.. describe:: <application-credential>
115-
116-
Application credential to display (name or ID)
12+
.. autoprogram-cliff:: openstack.identity.v3
13+
:command: application credential *

doc/source/cli/command-objects/catalog.rst

Lines changed: 1 addition & 4 deletions

0 commit comments

Comments
 (0)