Skip to content

Commit 0d7a50d

Browse files
author
Steve Martinelli
committed
Command doc: image
Change-Id: Ib1563b58351315dc2a44ad77882f8c834a1214c0
1 parent f38d6e7 commit 0d7a50d

4 files changed

Lines changed: 260 additions & 15 deletions

File tree

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
======
2+
image
3+
======
4+
5+
Image v1, v2
6+
7+
image create
8+
------------
9+
10+
*Only supported for Image v1*
11+
12+
Create/upload an image
13+
14+
.. program:: image create
15+
.. code:: bash
16+
17+
os image create
18+
[--id <id>]
19+
[--store <store>]
20+
[--container-format <container-format>]
21+
[--disk-format <disk-format>]
22+
[--owner <project>]
23+
[--size <size>]
24+
[--min-disk <disk-gb>]
25+
[--min-ram <ram-mb>]
26+
[--location <image-url>]
27+
[--copy-from <image-url>]
28+
[--file <file>]
29+
[--volume <volume>]
30+
[--force]
31+
[--checksum <checksum>]
32+
[--protected | --unprotected]
33+
[--public | --private]
34+
[--property <key=value> [...] ]
35+
<image-name>
36+
37+
.. option:: --id <id>
38+
39+
Image ID to reserve
40+
41+
.. option:: --store <store>
42+
43+
Upload image to this store
44+
45+
.. option:: --container-format <container-format>
46+
47+
Image container format (default: bare)
48+
49+
.. option:: --disk-format <disk-format>
50+
51+
Image disk format (default: raw)
52+
53+
.. option:: --owner <project>
54+
55+
Image owner project name or ID
56+
57+
.. option:: --size <size>
58+
59+
Image size, in bytes (only used with --location and --copy-from)
60+
61+
.. option:: --min-disk <disk-gb>
62+
63+
Minimum disk size needed to boot image, in gigabytes
64+
65+
.. option:: --min-ram <disk-ram>
66+
67+
Minimum RAM size needed to boot image, in megabytes
68+
69+
.. option:: --location <image-url>
70+
71+
Download image from an existing URL
72+
73+
.. option:: --copy-from <image-url>
74+
75+
Copy image from the data store (similar to --location)
76+
77+
.. option:: --file <file>
78+
79+
Upload image from local file
80+
81+
.. option:: --volume <volume>
82+
83+
Create image from a volume
84+
85+
.. option:: --force
86+
87+
Force image creation if volume is in use (only meaningful with --volume)
88+
89+
.. option:: --checksum <checksum>
90+
91+
Image hash used for verification
92+
93+
.. option:: --protected
94+
95+
Prevent image from being deleted
96+
97+
.. option:: --unprotected
98+
99+
Allow image to be deleted (default)
100+
101+
.. option:: --public
102+
103+
Image is accessible to the public
104+
105+
.. option:: --private
106+
107+
Image is inaccessible to the public (default)
108+
109+
.. option:: --property <key=value>
110+
111+
Set a property on this image (repeat for multiple values)
112+
113+
.. describe:: <image-name>
114+
115+
New image name
116+
117+
image delete
118+
------------
119+
120+
Delete image(s)
121+
122+
.. program:: image delete
123+
.. code:: bash
124+
125+
os image delete
126+
<image>
127+
128+
.. describe:: <image>
129+
130+
Image(s) to delete (name or ID)
131+
132+
image list
133+
----------
134+
135+
List available images
136+
137+
.. program:: image list
138+
.. code:: bash
139+
140+
os image list
141+
[--page-size <size>]
142+
[--long]
143+
144+
.. option:: --page-size <size>
145+
146+
Number of images to request in each paginated request
147+
148+
.. option:: --long
149+
150+
List additional fields in output
151+
152+
image save
153+
----------
154+
155+
Save an image locally
156+
157+
.. program:: image save
158+
.. code:: bash
159+
160+
os image save
161+
--file <filename>
162+
<image>
163+
164+
.. option:: --file <filename>
165+
166+
Downloaded image save filename (default: stdout)
167+
168+
.. describe:: <image>
169+
170+
Image to save (name or ID)
171+
172+
image set
173+
---------
174+
175+
*Only supported for Image v1*
176+
177+
Set image properties
178+
179+
.. program:: image set
180+
.. code:: bash
181+
182+
os image set
183+
[--name <name>]
184+
[--owner <project>]
185+
[--min-disk <disk-gb>]
186+
[--min-ram <disk-ram>]
187+
[--protected | --unprotected]
188+
[--public | --private]
189+
[--property <key=value> [...] ]
190+
<image>
191+
192+
.. option:: --name <name>
193+
194+
New image name
195+
196+
.. option:: --owner <project>
197+
198+
New image owner project (name or ID)
199+
200+
.. option:: --min-disk <disk-gb>
201+
202+
Minimum disk size needed to boot image, in gigabytes
203+
204+
.. option:: --min-ram <disk-ram>
205+
206+
Minimum RAM size needed to boot image, in megabytes
207+
208+
.. option:: --protected
209+
210+
Prevent image from being deleted
211+
212+
.. option:: --unprotected
213+
214+
Allow image to be deleted (default)
215+
216+
.. option:: --public
217+
218+
Image is accessible to the public
219+
220+
.. option:: --private
221+
222+
Image is inaccessible to the public (default)
223+
224+
.. option:: --property <key=value>
225+
226+
Set a property on this image (repeat for multiple values)
227+
228+
.. describe:: <image>
229+
230+
Image to modify (name or ID)
231+
232+
image show
233+
----------
234+
235+
Display image details
236+
237+
.. program:: image show
238+
.. code:: bash
239+
240+
os image show
241+
<image>
242+
243+
.. describe:: <image>
244+
245+
Image to display (name or ID)

‎doc/source/commands.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ referring to both Compute and Volume quotas.
8989
* ``host``: Compute - the physical computer running a hypervisor
9090
* ``hypervisor``: Compute - the virtual machine manager
9191
* ``identity provider``: (**Identity**) a source of users and authentication
92-
* ``image``: Image - a disk image
92+
* ``image``: (**Image**) a disk image
9393
* ``ip fixed``: Compute, Network - an internal IP address assigned to a server
9494
* ``ip floating``: Compute, Network - a public IP address that can be mapped to a server
9595
* ``keypair``: (**Compute**) an SSH public key

‎openstackclient/image/v1/image.py‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def get_parser(self, prog_name):
4949
parser = super(CreateImage, self).get_parser(prog_name)
5050
parser.add_argument(
5151
"name",
52-
metavar="<name>",
52+
metavar="<image-name>",
5353
help="New image name",
5454
)
5555
parser.add_argument(
@@ -159,7 +159,7 @@ def get_parser(self, prog_name):
159159
dest="properties",
160160
metavar="<key=value>",
161161
action=parseractions.KeyValueAction,
162-
help="Set an image property "
162+
help="Set a property on this image "
163163
"(repeat option to set multiple properties)",
164164
)
165165
return parser
@@ -337,12 +337,12 @@ def get_parser(self, prog_name):
337337
parser.add_argument(
338338
"--file",
339339
metavar="<filename>",
340-
help="Downloaded image save filename [default: stdout]",
340+
help="Downloaded image save filename (default: stdout)",
341341
)
342342
parser.add_argument(
343343
"image",
344344
metavar="<image>",
345-
help="Name or ID of image to save",
345+
help="Image to save (name or ID)",
346346
)
347347
return parser
348348

@@ -360,7 +360,7 @@ def take_action(self, parsed_args):
360360

361361

362362
class SetImage(show.ShowOne):
363-
"""Change image properties"""
363+
"""Set image properties"""
364364

365365
log = logging.getLogger(__name__ + ".SetImage")
366366

@@ -369,7 +369,7 @@ def get_parser(self, prog_name):
369369
parser.add_argument(
370370
"image",
371371
metavar="<image>",
372-
help="Image name or ID to change",
372+
help="Image to modify (name or ID)",
373373
)
374374
parser.add_argument(
375375
"--name",
@@ -379,7 +379,7 @@ def get_parser(self, prog_name):
379379
parser.add_argument(
380380
"--owner",
381381
metavar="<project>",
382-
help="New image owner project name or ID",
382+
help="New image owner project (name or ID)",
383383
)
384384
parser.add_argument(
385385
"--min-disk",
@@ -420,7 +420,7 @@ def get_parser(self, prog_name):
420420
dest="properties",
421421
metavar="<key=value>",
422422
action=parseractions.KeyValueAction,
423-
help="Set an image property "
423+
help="Set a property on this image "
424424
"(repeat option to set multiple properties)",
425425
)
426426
return parser
@@ -474,7 +474,7 @@ def take_action(self, parsed_args):
474474

475475

476476
class ShowImage(show.ShowOne):
477-
"""Show image details"""
477+
"""Display image details"""
478478

479479
log = logging.getLogger(__name__ + ".ShowImage")
480480

@@ -483,7 +483,7 @@ def get_parser(self, prog_name):
483483
parser.add_argument(
484484
"image",
485485
metavar="<image>",
486-
help="Name or ID of image to display",
486+
help="Image to display (name or ID)",
487487
)
488488
return parser
489489

‎openstackclient/image/v2/image.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ def get_parser(self, prog_name):
102102
parser.add_argument(
103103
"--file",
104104
metavar="<filename>",
105-
help="Downloaded image save filename [default: stdout]",
105+
help="Downloaded image save filename (default: stdout)",
106106
)
107107
parser.add_argument(
108108
"image",
109109
metavar="<image>",
110-
help="Name or ID of image to save",
110+
help="Image to save (name or ID)",
111111
)
112112
return parser
113113

@@ -125,7 +125,7 @@ def take_action(self, parsed_args):
125125

126126

127127
class ShowImage(show.ShowOne):
128-
"""Show image details"""
128+
"""Display image details"""
129129

130130
log = logging.getLogger(__name__ + ".ShowImage")
131131

@@ -134,7 +134,7 @@ def get_parser(self, prog_name):
134134
parser.add_argument(
135135
"image",
136136
metavar="<image>",
137-
help="Name or ID of image to display",
137+
help="Image to display (name or ID)",
138138
)
139139
return parser
140140

0 commit comments

Comments
 (0)