Skip to content

Commit d5caa6a

Browse files
Dean TroyerSteve Martinelli
authored andcommitted
Command object docs: container, object
Change-Id: Ie3df543a28cbee0cc809310a05f431c97b2c7e70
1 parent a24d6e7 commit d5caa6a

4 files changed

Lines changed: 270 additions & 25 deletions

File tree

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
=========
2+
container
3+
=========
4+
5+
Object Store v1
6+
7+
container create
8+
----------------
9+
10+
Create new container
11+
12+
.. program:: container create
13+
.. code:: bash
14+
15+
os container create
16+
<container-name> [<container-name> ...]
17+
18+
.. option:: <container-name>
19+
20+
New container name(s)
21+
22+
container delete
23+
----------------
24+
25+
Delete container
26+
27+
.. program:: container delete
28+
.. code:: bash
29+
30+
os container delete
31+
<container> [<container> ...]
32+
33+
.. option:: <container>
34+
35+
Container(s) to delete
36+
37+
container list
38+
--------------
39+
40+
List containers
41+
42+
.. program:: container list
43+
.. code::bash
44+
45+
os container list
46+
[--prefix <prefix>]
47+
[--marker <marker>]
48+
[--end-marker <end-marker>]
49+
[--limit <limit>]
50+
[--long]
51+
[--all]
52+
53+
.. option:: --prefix <prefix>
54+
55+
Filter list using <prefix>
56+
57+
.. option:: --marker <marker>
58+
59+
Anchor for paging
60+
61+
.. option:: --end-marker <end-marker>
62+
63+
End anchor for paging
64+
65+
.. option:: --limit <limit>
66+
67+
Limit the number of containers returned
68+
69+
.. option:: --long
70+
71+
List additional fields in output
72+
73+
.. options:: --all
74+
75+
List all containers (default is 10000)
76+
77+
container save
78+
--------------
79+
80+
Save container contents locally
81+
82+
.. program:: container save
83+
.. code:: bash
84+
85+
os container save
86+
<container>
87+
88+
.. option:: <container>
89+
90+
Container to save
91+
92+
container show
93+
--------------
94+
95+
Show container details
96+
97+
.. program:: container show
98+
.. code:: bash
99+
100+
os container show
101+
[<container>]
102+
103+
.. option:: <container>
104+
105+
Container to display
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
======
2+
object
3+
======
4+
5+
Object Store v1
6+
7+
object create
8+
-------------
9+
10+
Upload object to container
11+
12+
.. program:: object create
13+
.. code:: bash
14+
15+
os object create
16+
<container>
17+
<filename> [<filename> ...]
18+
19+
.. option:: <container>
20+
21+
Container for new object
22+
23+
.. option:: <filename>
24+
25+
Local filename(s) to upload
26+
27+
object delete
28+
-------------
29+
30+
Delete object from container
31+
32+
.. program:: object delete
33+
.. code:: bash
34+
35+
os object delete
36+
<container>
37+
<object> [<object> ...]
38+
39+
.. option:: <container>
40+
41+
Delete object(s) from <container>
42+
43+
.. option:: <object>
44+
45+
Object(s) to delete
46+
47+
list object
48+
-----------
49+
50+
List objects
51+
52+
.. program object list
53+
.. code:: bash
54+
55+
os object list
56+
[--prefix <prefix>]
57+
[--delimiter <delimiter>]
58+
[--marker <marker>]
59+
[--end-marker <end-marker>]
60+
[--limit <limit>]
61+
[--long]
62+
[--all]
63+
<container>]
64+
65+
.. option:: --prefix <prefix>
66+
67+
Filter list using <prefix>
68+
69+
.. option:: --delimiter <delimiter>
70+
71+
Roll up items with <delimiter>
72+
73+
.. option:: --marker <marker>
74+
75+
Anchor for paging
76+
77+
.. option:: --end-marker <end-marker>
78+
79+
End anchor for paging
80+
81+
.. option:: --limit <limit>
82+
83+
Limit number of objects returned
84+
85+
.. option:: --long
86+
87+
List additional fields in output
88+
89+
.. options:: --all
90+
91+
List all objects in <container> (default is 10000)
92+
93+
.. option:: <container>
94+
95+
Container to list
96+
97+
object save
98+
-----------
99+
100+
Save object locally
101+
102+
.. program:: object save
103+
.. code:: bash
104+
105+
os object save
106+
[--file <filename>]
107+
[<container>]
108+
[<object>]
109+
110+
.. option:: --file <filename>
111+
112+
Destination filename (defaults to object name)
113+
114+
.. option:: <container>
115+
116+
Download <object> from <container>
117+
118+
.. option:: <object>
119+
120+
Object to save
121+
122+
object show
123+
-----------
124+
125+
Show object details
126+
127+
.. program:: object show
128+
.. code:: bash
129+
130+
os object show
131+
<container>
132+
<object>
133+
134+
.. option:: <container>
135+
136+
Display <object> from <container>
137+
138+
.. option:: <object>
139+
140+
Object to display

openstackclient/object/v1/container.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@
2727

2828

2929
class CreateContainer(lister.Lister):
30-
"""Create a container"""
30+
"""Create new container"""
3131

3232
log = logging.getLogger(__name__ + '.CreateContainer')
3333

3434
def get_parser(self, prog_name):
3535
parser = super(CreateContainer, self).get_parser(prog_name)
3636
parser.add_argument(
3737
'containers',
38-
metavar='<container>',
38+
metavar='<container-name>',
3939
nargs="+",
40-
help='Container name(s) to create',
40+
help='New container name(s)',
4141
)
4242
return parser
4343

@@ -60,7 +60,7 @@ def take_action(self, parsed_args):
6060

6161

6262
class DeleteContainer(command.Command):
63-
"""Delete a container"""
63+
"""Delete container"""
6464

6565
log = logging.getLogger(__name__ + '.DeleteContainer')
6666

@@ -70,7 +70,7 @@ def get_parser(self, prog_name):
7070
'containers',
7171
metavar='<container>',
7272
nargs="+",
73-
help='Container name(s) to delete',
73+
help='Container(s) to delete',
7474
)
7575
return parser
7676

@@ -157,7 +157,7 @@ def take_action(self, parsed_args):
157157

158158

159159
class SaveContainer(command.Command):
160-
"""Save the contents of a container locally"""
160+
"""Save container contents locally"""
161161

162162
log = logging.getLogger(__name__ + ".SaveContainer")
163163

@@ -166,7 +166,7 @@ def get_parser(self, prog_name):
166166
parser.add_argument(
167167
'container',
168168
metavar='<container>',
169-
help='Container name to save',
169+
help='Container to save',
170170
)
171171
return parser
172172

@@ -179,7 +179,7 @@ def take_action(self, parsed_args):
179179

180180

181181
class ShowContainer(show.ShowOne):
182-
"""Show container information"""
182+
"""Show container details"""
183183

184184
log = logging.getLogger(__name__ + '.ShowContainer')
185185

@@ -188,7 +188,7 @@ def get_parser(self, prog_name):
188188
parser.add_argument(
189189
'container',
190190
metavar='<container>',
191-
help='Container name to display',
191+
help='Container to display',
192192
)
193193
return parser
194194

0 commit comments

Comments
 (0)