Skip to content

Commit c0467ed

Browse files
author
Huanxuan Ao
committed
Update doc for credential in indentityv3
Change-Id: I5f49c038a75ea67674b6d9279a6e60d6ded8d12f
1 parent 5a21eb2 commit c0467ed

2 files changed

Lines changed: 107 additions & 21 deletions

File tree

Lines changed: 97 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,113 @@
1-
===========
1+
==========
22
credential
3-
===========
3+
==========
44

55
Identity v3
66

77
credential create
8-
------------------
8+
-----------------
99

10-
.. ''[consider rolling the ec2 creds into this too]''
10+
Create new credential
1111

12+
.. program:: credential create
1213
.. code:: bash
1314
1415
os credential create
15-
--x509
16-
[<private-key-file>]
17-
[<certificate-file>]
16+
[--type <type>]
17+
[--project <project>]
18+
<user> <data>
19+
20+
.. option:: --type <type>
21+
22+
New credential type
23+
24+
.. option:: --project <project>
25+
26+
Project which limits the scope of the credential (name or ID)
27+
28+
.. _credential_create:
29+
.. describe:: <user>
30+
31+
User that owns the credential (name or ID)
32+
33+
.. describe:: <data>
34+
35+
New credential data
36+
37+
credential delete
38+
-----------------
39+
40+
Delete credential(s)
41+
42+
.. program:: credential delete
43+
.. code:: bash
44+
45+
os credential delete
46+
<credential-id> [<credential-id> ...]
47+
48+
.. _credential_delete:
49+
.. describe:: <credential-id>
50+
51+
ID(s) of credential to delete
52+
53+
credential list
54+
---------------
55+
56+
List credentials
57+
58+
.. program:: credential list
59+
.. code:: bash
60+
61+
os credential list
62+
63+
credential set
64+
--------------
65+
66+
Set credential properties
67+
68+
.. program:: credential set
69+
.. code:: bash
70+
71+
os credential set
72+
[--user <user>]
73+
[--type <type>]
74+
[--data <data>]
75+
[--project <project>]
76+
<credential-id>
77+
78+
.. option:: --user <user>
79+
80+
User that owns the credential (name or ID)
81+
82+
.. option:: --type <type>
83+
84+
New credential type
85+
86+
.. option:: --data <data>
87+
88+
New credential data
89+
90+
.. option:: --project <project>
91+
92+
Project which limits the scope of the credential (name or ID)
93+
94+
.. _credential_set:
95+
.. describe:: <credential-id>
96+
97+
ID of credential to change
1898

1999
credential show
20-
----------------
100+
---------------
101+
102+
Display credential details
21103

104+
.. program:: credential show
22105
.. code:: bash
23106
24107
os credential show
25-
[--token]
26-
[--user]
27-
[--x509 [--root]]
108+
<credential-id>
109+
110+
.. _credential_show:
111+
.. describe:: <credential-id>
112+
113+
ID of credential to display

openstackclient/identity/v3/credential.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323

2424

2525
class CreateCredential(command.ShowOne):
26-
"""Create credential command"""
26+
"""Create new credential"""
2727

2828
def get_parser(self, prog_name):
2929
parser = super(CreateCredential, self).get_parser(prog_name)
3030
parser.add_argument(
3131
'user',
3232
metavar='<user>',
33-
help=_('Name or ID of user that owns the credential'),
33+
help=_('user that owns the credential (name or ID)'),
3434
)
3535
parser.add_argument(
3636
'--type',
@@ -47,8 +47,8 @@ def get_parser(self, prog_name):
4747
parser.add_argument(
4848
'--project',
4949
metavar='<project>',
50-
help=_('Project name or ID which limits the '
51-
'scope of the credential'),
50+
help=_('Project which limits the scope of '
51+
'the credential (name or ID)'),
5252
)
5353
return parser
5454

@@ -89,7 +89,7 @@ def take_action(self, parsed_args):
8989

9090

9191
class ListCredential(command.Lister):
92-
"""List credential command"""
92+
"""List credentials"""
9393

9494
def take_action(self, parsed_args):
9595
columns = ('ID', 'Type', 'User ID', 'Blob', 'Project ID')
@@ -103,7 +103,7 @@ def take_action(self, parsed_args):
103103

104104

105105
class SetCredential(command.Command):
106-
"""Set credential command"""
106+
"""Set credential properties"""
107107

108108
def get_parser(self, prog_name):
109109
parser = super(SetCredential, self).get_parser(prog_name)
@@ -116,7 +116,7 @@ def get_parser(self, prog_name):
116116
'--user',
117117
metavar='<user>',
118118
required=True,
119-
help=_('Name or ID of user that owns the credential'),
119+
help=_('User that owns the credential (name or ID)'),
120120
)
121121
parser.add_argument(
122122
'--type',
@@ -134,8 +134,8 @@ def get_parser(self, prog_name):
134134
parser.add_argument(
135135
'--project',
136136
metavar='<project>',
137-
help=_('Project name or ID which limits the '
138-
'scope of the credential'),
137+
help=_('Project which limits the scope of '
138+
'the credential (name or ID)'),
139139
)
140140
return parser
141141

@@ -159,7 +159,7 @@ def take_action(self, parsed_args):
159159

160160

161161
class ShowCredential(command.ShowOne):
162-
"""Show credential command"""
162+
"""Display credential details"""
163163

164164
def get_parser(self, prog_name):
165165
parser = super(ShowCredential, self).get_parser(prog_name)

0 commit comments

Comments
 (0)